CN109067805B - Live broadcast room data anti-crawling method and device, terminal and readable medium - Google Patents

Live broadcast room data anti-crawling method and device, terminal and readable medium Download PDF

Info

Publication number
CN109067805B
CN109067805B CN201811189748.5A CN201811189748A CN109067805B CN 109067805 B CN109067805 B CN 109067805B CN 201811189748 A CN201811189748 A CN 201811189748A CN 109067805 B CN109067805 B CN 109067805B
Authority
CN
China
Prior art keywords
data
live broadcast
broadcast room
rule file
obfuscated
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
CN201811189748.5A
Other languages
Chinese (zh)
Other versions
CN109067805A (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 CN201811189748.5A priority Critical patent/CN109067805B/en
Publication of CN109067805A publication Critical patent/CN109067805A/en
Application granted granted Critical
Publication of CN109067805B publication Critical patent/CN109067805B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0478Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload applying multiple layers of encryption, e.g. nested tunnels or encrypting the content with a first key and then with at least a second key
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • H04L63/145Countermeasures against malicious traffic the attack involving the propagation of malware through the network, e.g. viruses, trojans or worms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • H04L63/1491Countermeasures against malicious traffic using deception as countermeasure, e.g. honeypots, honeynets, decoys or entrapment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/61Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/085Secret sharing or secret splitting, e.g. threshold schemes

Abstract

The embodiment of the invention discloses a method, a device, a terminal and a readable medium for preventing crawling insects of live broadcast room data, wherein the method comprises the following steps: acquiring live broadcast room data, and obfuscating the live broadcast room data according to an obfuscation rule file; the method comprises the steps that confusion data with high security level are encrypted for the first time by using confusion data with low security level in adjacent security level, the data after the encryption for the first time are encrypted for the second time by using a shared secret key, and the confusion data with the lowest security level are encrypted for the first time by using a preset shared secret key; encrypting the file name of the confusion rule file by using a shared key; and issuing the encrypted confusion data and the file name to the client so that the client determines the data in the live broadcast room according to the data issued by the server. The anti-crawling method, device, terminal and readable medium for the live broadcast room data, provided by the embodiment of the invention, have the advantages that the data breaking strength of the live broadcast room is improved, a crawler is prevented from crawling correct live broadcast room data, and the safety of the live broadcast room data is ensured.

Description

Live broadcast room data anti-crawling method and device, terminal and readable medium
Technical Field
The embodiment of the invention relates to computer technology, in particular to a method, a device, a terminal and a readable medium for preventing crawling insects of live broadcast room data.
Background
With the rapid development of the internet and streaming media technology, various live broadcast platforms are full of precious and rich in entertainment life and social experience, and users are provided with the live broadcast platforms.
The live broadcast room data in the live broadcast platform comprises confidential data such as concern data, fan data, online watching number, received gift number, user number when the user level in the live broadcast room reaches a preset level and the like. However, the web crawler may crawl these confidential data to account for information such as live platform revenue and anchor revenue. Therefore, a method for protecting live broadcast data by using an anti-crawling method is urgently needed.
The conventional anti-crawling method generally adopts a picture format file to replace live broadcast room data for transmission or display and other operations so as to prevent a crawler from directly crawling the live broadcast room data. The existing anti-crawler method has the defects that the picture format file is large and is not beneficial to processing such as storage or transmission, and the crawler can perform image recognition to indirectly acquire data of a live broadcast room after crawling the picture format file, and the data cracking strength is low.
Disclosure of Invention
In view of this, embodiments of the present invention provide a live broadcast room data crawling prevention method, apparatus, terminal and readable medium, which improve the live broadcast room data destruction strength, prevent crawlers from crawling correct live broadcast room data, and ensure the security of live broadcast room data.
In a first aspect, an embodiment of the present invention provides a method for preventing crawling insects for live broadcast data, including:
acquiring live broadcast room data, and obfuscating the live broadcast room data according to an obfuscation rule file, wherein the types of the live broadcast room data at least include the following two types: the method comprises the following steps that attention data, fan data, online watching number of people, received gift data and the number of users with the user level reaching a preset level in online watching users in a live broadcast room are collected in the live broadcast room;
acquiring the security level corresponding to each live broadcast room data type, performing primary encryption on the obfuscated live broadcast room data with high security level by using the obfuscated live broadcast room data with low security level in the adjacent security levels, performing secondary encryption on the data subjected to primary encryption by using a preset shared key, and performing primary encryption on the obfuscated live broadcast room data with the lowest security level by using the preset shared key;
encrypting the file name of the confusion rule file by using a preset shared key;
and issuing the obfuscated and encrypted live broadcast room data and the encrypted obfuscating rule file name to the client so that the client determines the live broadcast room data according to the data issued by the server.
Optionally, the obtaining live broadcast data, and obfuscating the live broadcast data according to an obfuscation rule file includes:
acquiring live broadcast room data through a data acquisition interface, wherein the type of the live broadcast room data corresponds to an enumeration element in a preset enumeration object;
selecting a confusion rule file corresponding to the enumeration value of the enumeration element, and confusing the live broadcast data of the type corresponding to the enumeration element according to the confusion rule file, wherein the confusion rule file corresponding to the enumeration value of the enumeration element is replaced at preset time intervals.
Optionally, the issuing the obfuscated and encrypted live broadcast data and the encrypted obfuscation rule file name to the client, so that the client determines the live broadcast data according to the data issued by the server, includes:
and sending the obfuscated and encrypted live broadcast room data and the encrypted obfuscating rule file name to the client through long connection, so that the client decrypts the obfuscated and encrypted live broadcast room data and the encrypted obfuscating rule file name to obtain the obfuscated live broadcast room data and the obfuscating rule file name, and downloading the live broadcast room data corresponding to the obfuscated live broadcast room data in the obfuscating rule file corresponding to the obfuscating rule file name through an HTTP interface.
Optionally, before the acquiring live broadcast data, the method further includes:
a client generates a first public key and a first private key and sends the first public key to the server;
the server generates a second public key and a second private key and sends the second public key to the client;
the client generates a first shared key according to the first private key and the second public key;
the server generates a second shared secret key according to the second private key and the first public key;
the value of the first shared key is consistent with that of the second shared key, and the first shared key and the second shared key are respectively used as preset shared keys of the client and the server.
In a second aspect, an embodiment of the present invention provides a method for preventing crawling insects for live broadcast data, including:
receiving the obfuscated and encrypted live broadcast room data and the encrypted obfuscating rule file name which are sent by the server through the long connection;
decrypting the obfuscated and encrypted live broadcast room data and the encrypted obfuscating rule file name to obtain obfuscated live broadcast room data and an obfuscating rule file name;
and downloading live broadcast room data corresponding to the live broadcast room data after confusion in the confusion rule file corresponding to the confusion rule file name through an HTTP interface.
In a third aspect, an embodiment of the present invention provides a device for preventing crawling insects for live broadcast data, including:
the data confusion module is used for acquiring the live broadcast data and confusing the live broadcast data according to the confusion rule file, wherein the data types of the live broadcast at least comprise the following two types: the method comprises the following steps that attention data, fan data, online watching number of people, received gift data and the number of users with the user level reaching a preset level in online watching users in a live broadcast room are collected in the live broadcast room;
the confusion data encryption module is used for acquiring the security level corresponding to each live broadcast room data type, carrying out primary encryption on the confusion live broadcast room data with high security level by using the confusion live broadcast room data with low security level in the adjacent security levels, carrying out secondary encryption on the once encrypted data by using a preset shared key, and carrying out primary encryption on the confusion live broadcast room data with the lowest security level by using the preset shared key;
the file name encryption module is used for encrypting the file name of the confusion rule file by using a preset shared secret key;
and the data sending module is used for sending the obfuscated and encrypted live broadcast data and the encrypted obfuscation rule file name to the client so that the client can determine the live broadcast data according to the data sent by the server.
In a fourth aspect, an embodiment of the present invention provides a device for preventing crawling insects for live broadcast data, including:
the data receiving module is used for receiving the obfuscated and encrypted live broadcast room data and the encrypted obfuscating rule file name which are sent by the server through long connection;
the data decryption module is used for decrypting the obfuscated and encrypted live broadcast room data and the encrypted obfuscating rule file name to obtain the obfuscated live broadcast room data and the obfuscating rule file name;
and the data de-obfuscating module is used for downloading live broadcast room data corresponding to the obfuscated live broadcast room data in the obfuscating rule file corresponding to the obfuscating rule file name through the HTTP interface.
In a fifth aspect, an embodiment of the present invention provides a server, including:
one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for preventing the crawling of the live broadcast data according to the first embodiment of the present invention.
In a sixth aspect, an embodiment of the present invention provides a terminal, including:
one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for preventing the crawling of the live broadcast data according to the second embodiment of the present invention.
In a seventh aspect, an embodiment of the present invention provides a readable medium, on which a computer program is stored, where the program, when executed by a processor, implements a method for preventing crawling of live broadcast data according to any embodiment of the present invention.
According to the anti-crawling method, device, terminal and readable medium for live broadcast room data, provided by the embodiment of the invention, a server acquires live broadcast room data and obfuscates the live broadcast room data according to an obfuscation rule file; acquiring security levels corresponding to various types of data in a live broadcast room, performing primary encryption on the obfuscated live broadcast room data with high security level by using the obfuscated live broadcast room data with low security level in adjacent security levels, performing secondary encryption on the data subjected to primary encryption by using a preset shared key, and performing primary encryption on the obfuscated live broadcast room data with the lowest security level by using the preset shared key; encrypting the file name of the confusion rule file by using a preset shared key; and issuing the obfuscated and encrypted live broadcast room data and the encrypted obfuscating rule file name to the client so that the client determines the live broadcast room data according to the data issued by the server. Through obscuring the live broadcast room data to and carry out once encryption of layer upon layer relevance to obscuring the data according to the secret grade of live broadcast room data, and utilize the shared key to encrypt once more, can improve the broken intensity of live broadcast room data, prevent that the crawler from crawling and getting exact live broadcast room data, guaranteed the security of live broadcast room data.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description will be given below of the drawings required for the embodiments or the technical solutions in the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of an anti-crawling method for live broadcast data according to an embodiment of the present invention;
fig. 2 is a flowchart of an anti-crawling method for live broadcast data according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of an anti-crawling apparatus for live broadcast data according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an anti-crawling apparatus for live broadcast data according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a server according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal according to a sixth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described through embodiments with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Fig. 1 is a flowchart of a live broadcast data crawling method according to an embodiment of the present invention, where this embodiment is applicable to a live broadcast data crawling situation, and the method may be implemented by a server, and may be specifically implemented by software and/or hardware in the server.
Referring to fig. 1, the method for preventing the live broadcast data from being crawled comprises the following steps:
s110, acquiring live broadcast data, and obfuscating the live broadcast data according to an obfuscation rule file, wherein the types of the live broadcast data at least include the following two types: the method comprises the steps of directly broadcasting the data of the live broadcast room, the data of the fans, the number of online watching persons, the received gift data and the number of users with the user level reaching the preset level in online watching users in the live broadcast room.
The obfuscation rule file may be a table file, a text file, or a global variable in the server system program. The server may include at least one confusion rule file, different live broadcast rooms may use different confusion rule files, and preferably, different types of live broadcast room data in each live broadcast room use different confusion rule files. Different confusion rule files are adopted in different live broadcast rooms, and different confusion rule files are adopted in different types of live broadcast room data in the same live broadcast room, so that the difficulty of confusion resolution of the crawler can be improved.
The server may store the confusion rule files corresponding to different types of live broadcast data in each live broadcast by using a Map container, and specifically may store the confusion rule files by using Map < int, fontdata > mapFont, where the key int may be used to store a room number of the live broadcast, and the fontdata may be a structural body representing the confusion rule files. Illustratively, the fontdata structure may be defined as follows:
Struct fontdata{
String fontname1;
Int nData1[10];
String fontname2;
Int nData2[10];
String fontname3;
Int nData3[10];
};
the fontname can represent the file name of the confusion rule file, and each confusion rule file corresponds to a unique file name; the names of the fontname1, the fontname2 and the fontname3 can be the same or different, namely, the same obfuscation rule file can be selected, or different obfuscation rule files can be selected, and preferably, the three names are different, namely, different obfuscation rule files are selected; and the number of fontname is consistent with the number of data types of the live-air data, namely each data type corresponds to the file name of one confusion rule file, and the number of file names is not limited to 3. Wherein, nData can represent an obfuscated rule file, where the names of fontname1, fontname2, and fontname3 are the same, the obfuscated rule files nData1, nData2, and nData3 are the same, and where the names of fontname1, fontname2, and fontname3 are different, the obfuscated rule files nData1, nData2, and nData3 are also different.
In order to ensure that each obfuscating rule file corresponds to a unique file name, the file name may be obtained by calling a Fontname-md5. create (nData) statement, where the Algorithm for obtaining the file name is not limited to the MD5 Algorithm, but may also be other algorithms, for example, five algorithms of a Secure Hash Algorithm (SHA) family, which are SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512, or may be an MD4 Algorithm or a CRC32 Algorithm, and the like.
Illustratively, the contents of the obfuscation rule file nData may be specifically, 2038694751. Wherein 2038694751 are respectively corresponding to 0123456789. For example, if the obfuscated live broadcast data is 012, the corresponding correct live broadcast data is 203.
The concerned data of the live broadcast room can comprise the number of users and user information of other concerned users in the current live broadcast room; the fan data can comprise the number of users and user information and the like in the current live broadcast room, wherein the users are concerned by other users; the online watching number can be understood as the number of users who watch online when the live broadcast room is live broadcast, wherein the online watching number can be updated in real time; the received gift data may include the type of gift received, the number of each type of gift, etc., and the received gift data may also be updated in real time. When the live broadcast data types include at least two types, the encryption process of encrypting the obfuscated live broadcast data with a high security level once by using the obfuscated live broadcast data with a low security level in the adjacent security levels in step S120 may be performed.
Optionally, the obtaining of the live broadcast data and the obfuscating of the live broadcast data according to the obfuscation rule file include:
acquiring live broadcast room data through a data acquisition interface, wherein the type of the live broadcast room data corresponds to an enumeration element in a preset enumeration object; selecting a confusion rule file corresponding to the enumeration value of the enumeration element, and confusing the live broadcast data of the type corresponding to the enumeration element according to the confusion rule file, wherein the confusion rule file corresponding to the enumeration value of the enumeration element is replaced at preset intervals.
The method includes acquiring live broadcast data through a data acquisition interface, and specifically may be:
Int GetData(int nroomid,int type,int data){};
wherein, GetData is the name of the data acquisition interface, which is used to represent the data acquisition interface, and the name of the data acquisition interface is not limited to GetData; the system comprises a live broadcast room, a plurality of live broadcast rooms, a plurality of network servers and a plurality of network servers, wherein the nromoid is a room number name of the live broadcast room and is used for representing the room number of the live broadcast room, the room number name of the live broadcast room is not limited to the nromoid, and the room number name of each live broadcast room is different; the type is the type name of the live broadcast data and is used for representing the type of the live broadcast data, and the type name of the live broadcast data is not limited to the type; the data is a live broadcast data name and represents live broadcast data, and the live broadcast data name is not limited to the data.
The live broadcast room data type corresponds to an enumeration element in a preset enumeration object, and specifically may be:
Enum dataType{
edataType_Focus
edataType_Fans
edataType_Noble
};
the dataType is an enumeration object which can represent a data type contained in a live broadcast room; wherein, the edatatType _ Focus, the edatatType _ Fans and the edatatType _ Noble are enumeration elements in the enumeration object dataType; wherein, the edatatable _ Focus may represent a data type of the data of interest, the edatatable _ Fans may represent a data type of the fan data, and the edatatable _ Noble may represent a data type of the number of nobility of the live broadcast room (i.e., the number of users whose user ratings reach a preset rating among users who watch online in the live broadcast room). The number of the enumerated elements is consistent with the data types of the live broadcast data, namely each data type corresponds to one enumerated element, the number of the enumerated elements is not limited to 3, and the types of the live broadcast data are not limited to the three types. Wherein, the enumeration elements in the enumeration object have fixed enumeration values, the enumeration value of the first enumeration element is 0, the enumeration value of the second enumeration element is 1, and so on, that is, the enumeration values of edataType _ Focus, edataType _ Fans and edataType _ Noble are 0, 1 and 2, respectively. When the server acquires the data type of the live broadcast room, the enumeration value of the data type of the live broadcast room is acquired through the enumeration object immediately. By establishing the corresponding relation between the enumeration value and the confusion rule file nData in the map container, the corresponding confusion rule file nData can be searched in the map container according to the enumeration value, and the live broadcast data of the type corresponding to the enumeration element is confused according to the confusion rule file.
Illustratively, searching a corresponding confusion rule file nData in the map container according to the enumeration value, and obfuscating live broadcast data of a type corresponding to the enumeration element according to the confusion rule file, which may specifically be:
Map<int,fontdata>::iterator itr;
Itr=mapFont.find(nroomid);
Int nResult=0;
If(type==edataType_Focus){
nResult=(*itr).nData1[data];
}else if(type==edataType_Fans){
nResult=(*itr).nData2[data];
}else if(type==edataType_Noble{
nResult=(*itr).nData3[data];
}
Retrurn nResult;
the iterator itr is defined by Map < int, fontdata >: the iterator itr is used for searching the related information of the room number nromomid of the live broadcast room by the searching function mapFine (nromomid) of the Map container; wherein, a result data nResult is defined and used for storing a result value, namely the obfuscated live broadcast data; according to enumeration values corresponding to data types of the different live rooms, namely, edatatType _ Focus, edatatType _ Fans and edatatType _ Noble, different obfuscation algorithms nData can be adopted to obfuscate the data of the live rooms.
By setting the enumeration object, the enumeration value corresponding to the data type of the live broadcast can be obtained, the corresponding confusion rule file nData can be searched from the map container according to the corresponding relation between the enumeration value and the confusion rule file, and the live broadcast data of the type corresponding to the enumeration element is confused according to the confusion rule file. And the confusion rule files corresponding to the data types of the live broadcasting rooms in the live broadcasting rooms can be continuously updated every other preset time, so that the difficulty coefficient of the crawler for confusion resolution of the confusion data is improved.
S120, obtaining the security level corresponding to each live broadcast room data type, carrying out primary encryption on the obfuscated live broadcast room data with high security level by using the obfuscated live broadcast room data with low security level in the adjacent security levels, carrying out secondary encryption on the data subjected to primary encryption by using a preset shared key, and carrying out primary encryption on the obfuscated live broadcast room data with the lowest security level by using the preset shared key.
The security level corresponding to the data type of the live broadcast room can be preset in the server and can be modified according to the service requirement of the live broadcast platform. The method comprises the steps that the obfuscated live broadcast room data with high security level are encrypted once by using the obfuscated live broadcast room data with low security level in the adjacent security level, so that different types of live broadcast room data can be encrypted layer by layer from low to high in order, and the data cracking threshold can be improved by performing associated encryption on the different types of live broadcast room data.
Illustratively, if the live room data types include attention data nFocus, fan data nFans, and noble data nnable, the privacy level gradually increases. Encryption of the obfuscated live room data may be accomplished by:
KEY value acquisition.
HASH calculation of the obfuscated data of interest to obtain KEY1 value, which may be, for example, KEY1 ═ md5.create (nFocus); HASH calculation of the obfuscated fan data yields KEY2 value, which may be, for example, KEY2 ═ md4.create (nFans).
2. Data encryption is concerned after obfuscation.
The obfuscated data of interest is encrypted by using a preset shared key, which may be, for example:
EncryptnFocus=Tea.Encrypt(nFocus,ShareKey)。
3. and encrypting the vermicelli data after confusion.
The obfuscated fan data is encrypted once by using the KEY1 value, which may be:
EncryptnFans=Tea.Encrypt(nFans,KEY1);
the data after the primary encryption is secondarily encrypted by using a preset shared key, for example, the following steps may be performed:
EncryptnFans2=Blowfish.Encrypt(EncryptnFans,ShareKey)。
4. and encrypting the obfuscated noble data.
The obfuscated noble data is encrypted once with KEY2 value, which may be, for example:
EncryptnNoble=Rc4.Encrypt(nNoble,KEY2);
the data after the primary encryption is secondarily encrypted by using a preset shared key, for example, the following steps may be performed:
EncryptnNoble2=IDEA.Encrypt(EncryptnNoble,ShareKey)。
the HASH Algorithm may be five algorithms of a Secure HASH Algorithm (SHA) family, namely SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512, or other algorithms, such as CRC32 Algorithm. The Encryption Algorithm may be a Tea Algorithm, a Blowfish Algorithm, or an International Data Encryption Algorithm (IDEA), or may also be an Advanced Encryption Standard (AES), a Data Encryption Standard (DES), a Triple Data Encryption Standard (Triple DES, 3DES), and the like, which is not limited herein.
And S130, encrypting the file name of the confusion rule file by using a preset shared key.
For example, the file names Fontname1, Fontname2 and Fontname3 of the obfuscated rule file are encrypted by using a preset shared key, which may specifically be:
encryptname1=AES.Encrypt(Fontname1,ShareKey);
encryptname2=AES.Encrypt(Fontname2,ShareKey);
encryptname3=AES.Encrypt(Fontname3,ShareKey);
similarly, the Encryption Algorithm may be a Tea Algorithm, a Blowfish Algorithm, or an International Data Encryption Algorithm (IDEA), or may be an Advanced Encryption Standard (AES), a Data Encryption Standard (DES), a Triple Data Encryption Standard (Triple DES, 3DES), or the like, which is not limited herein.
And S140, issuing the obfuscated and encrypted live broadcast data and the encrypted obfuscation rule file name to the client so that the client can determine the live broadcast data according to the data issued by the server.
Optionally, the sending the obfuscated and encrypted live broadcast data and the encrypted obfuscation rule file name to the client, so that the client determines the live broadcast data according to the data sent by the server, including:
and sending the obfuscated and encrypted live broadcast room data and the encrypted obfuscating rule file name to the client through long connection, so that the client decrypts the obfuscated and encrypted live broadcast room data and the encrypted obfuscating rule file name to obtain the obfuscated live broadcast room data and the obfuscating rule file name, and downloading the live broadcast room data corresponding to the obfuscated live broadcast room data in the obfuscating rule file corresponding to the obfuscating rule file name through an HTTP interface.
The long connection may be understood as that, after a webpage is opened, a Transmission Control Protocol (TCP) connection for transmitting HTTP data between the client and the server is not closed, and the client may continue to use the established connection when accessing the server again. The live broadcast room data is continuously updated data based on the real live broadcast situation in the live broadcast room, such as the number of people watching online, and therefore, the server can preferably adopt long connection when sending the live broadcast room data.
The client can interact with the server through two interfaces, namely a long connection interface and an HTTP interface, so that the safety of data in a live broadcast room can be enhanced.
Optionally, before acquiring live broadcast data, the method further includes:
the client generates a first public key and a first private key and sends the first public key to the server;
the server generates a second public key and a second private key and issues the second public key to the client;
the client generates a first shared key according to the first private key and the second public key;
the server generates a second shared secret key according to the second private key and the first public key;
the value of the first shared key is consistent with that of the second shared key, and the first shared key and the second shared key are respectively used as preset shared keys of the client and the server.
When a client logs in a server, the server generates a pair of public key and private key information, namely a second public key and a second private key, for the client; meanwhile, the client can also generate a pair of public key and private key information, namely a first public key and a first private key; the client and the server exchange respective public key information, namely the client sends the first public key to the server, the server issues the second public key to the client, the client generates a shared key according to the first private key and the second public key, the server generates the shared key according to the second private key and the first public key, and the two shared keys are consistent in value.
The client can use the random data to generate the first private key, and the first public key is obtained by using the first private key, so that different clients can be guaranteed to correspond to different private keys and public keys as far as possible, and the cracking threshold is improved. The step of generating the first public key by the client may specifically be as follows:
1. random data is generated.
RandData=rand();
A piece of random data RandData is generated by calling a system function rand.
2. Random data is used as a first private key.
ClientPrivatekey=RandData。
3. A first public key is calculated.
ClientPublickey=EccEncryption.CreatePair(ClientPrivatekey);
The first public key is generated by calling an Elliptic Curve Cryptography (ECC) generation mating key interface eccencrypt. Besides ECC, other asymmetric algorithms can be used, such as Elgamal algorithm, knapsack algorithm, or RSA encryption algorithm.
When the server detects that the client logs in, the server also generates a second private key and a second public key according to the generation method of the first private key and the first public key, so that different clients are guaranteed to correspond to different private keys and public keys as far as possible, and the cracking threshold is improved. The step of generating the second public key by the server is specifically as follows:
1. generating random data
Randdata=rand();
And generating a random data Randdata by calling a system function rand.
2. The random data is used as a second private key.
ServerPrivatekey=Randdata。
3. A second public key is calculated.
ServerPublickey=EccEncryption.(ServerPrivatekey);
The second public key is generated by calling the generating mating key interface eccen encryption of the Elliptic Curve Cryptography (ECC). Besides ECC, other asymmetric algorithms can be used, such as Elgamal algorithm, knapsack algorithm, or RSA encryption algorithm.
The client and the server respectively generate a shared key according to the first public key and the second public key, and the method specifically comprises the following steps:
1. the public keys are interchanged.
And the server sends the second public key ServerPublinkey to the client.
The client sends the first public key ClientPublinkey to the server.
2. The server generates a shared key.
ShareKey=EccEncryption.CreateShareKey(ClientPublickey,ServerPrivatekey);
3. The client generates a shared secret.
ShareKey=EccEncryption.CreateShareKey(ServerPublickey,ClientPrivatekey);
Wherein, the shared key generated by the server and the shared key generated by the client have the same value of 2 ShareKey. By sharing the key setting, the security of data transmission can be guaranteed.
According to the anti-crawling method for the data in the live broadcast room, the data in the live broadcast room are obfuscated, the obfuscated data are encrypted one time layer by layer according to the confidentiality grade of the data in the live broadcast room, and the obfuscated data are encrypted again by using the shared key, so that the data breaking strength of the live broadcast room can be improved, a crawler is prevented from crawling correct data in the live broadcast room, and the safety of the data in the live broadcast room is guaranteed.
Example two
Fig. 2 is a flowchart of a live broadcast data crawling method according to a second embodiment of the present invention, where this embodiment is applicable to a live broadcast data crawling situation, and the method may be implemented by a terminal, and may be implemented by software and/or hardware in the terminal.
Referring to fig. 2, the method for preventing the live broadcast data from being crawled comprises the following steps:
s210, receiving the obfuscated and encrypted live broadcast data and the encrypted obfuscating rule file name which are sent by the server through long connection;
s220, decrypting the obfuscated and encrypted live broadcast room data and the encrypted obfuscating rule file name to obtain obfuscated live broadcast room data and an obfuscating rule file name;
and S230, downloading live broadcast room data corresponding to the live broadcast room data after confusion in the confusion rule file corresponding to the confusion rule file name through the HTTP interface.
Optionally, decrypting the encrypted obfuscation rule file name includes: and decrypting the file name of the confusion rule file by using a preset shared key.
And the decryption algorithm used for decryption is consistent with the encryption algorithm used by the server for encrypting the confusion rule file. For example, when the server encrypts the confusion rule file, the encryption algorithm used is an AES algorithm, and the decryption algorithm used by the client to decrypt the encrypted confusion rule file name is also the AES algorithm, which may specifically be:
Fontname=AES.Decrypt(encryptname,ShareKey)。
optionally, decrypting the obfuscated and encrypted live broadcast data includes:
decrypting the confused live broadcast room data with the lowest security level by using a preset shared key;
and carrying out primary decryption on the data subjected to secondary encryption by using a preset shared key, and carrying out secondary decryption on the data subjected to primary decryption with high security level by using the obfuscated live broadcast room data with low security level in adjacent security levels.
And the decryption algorithm used for decrypting the obfuscated live broadcast room data with the lowest security level is consistent with the encryption algorithm used when the server encrypts the obfuscated live broadcast room data with the lowest security level for one time. Illustratively, when the encryption algorithm adopted by the server to encrypt the obfuscated live broadcast room data with the lowest security level for one time is a Tea algorithm, the decryption algorithm adopted by the client to decrypt the obfuscated live broadcast room data with the lowest security level is also the Tea algorithm. Similarly, the decryption algorithm used for the primary decryption of the secondarily encrypted data is consistent with the encryption algorithm for the secondary encryption of the primarily encrypted data by the server by using the preset shared key.
The obfuscated live broadcast room data with the lowest security level can be used for carrying out secondary decryption on the primary decrypted data with the penultimate security level after primary decryption, and the obfuscated live broadcast room data with the penultimate security level can be obtained; similarly, the obfuscated live broadcast room data with the lowest security level from the penultimate end can be used for decrypting the primary decrypted data with the lowest security level from the penultimate end after primary decryption for the second time until all the obfuscated live broadcast room data are obtained, and decryption of the obfuscated and encrypted live broadcast room data is completed.
Illustratively, the data sent by the server and received by the client includes three types, namely primary encrypted interest data encryptnnocus, secondary encrypted fan data encryptnfas 2 and secondary encrypted noble data EncryptnNoble2, wherein the security level is gradually improved. Decrypting the obfuscated and encrypted live-room data may be accomplished by:
1. decrypting the once encrypted obfuscated attention data.
Decrypting the obfuscated data of interest by using a preset shared key may be, for example:
nFocus=Tea.Decrypt(EncryptnFocus,ShareKey)。
KEY1 value acquisition.
HASH calculation is performed on the obfuscated attention data nCard to obtain a KEY1 value, which may be
KEY1=Md5.Create(nFocus)。
3. And decrypting the twice encrypted confused vermicelli data.
The second encrypted data is decrypted by using the preset shared key, for example, the following steps are performed:
EncryptnFans=Blowfish.Decrypt(EncryptnFans2,ShareKey);
the KEY1 value is used to decrypt the data after the primary decryption for the second time, which may be:
nFans=Tea.Decrypt(EncryptnFans,KEY1)。
KEY2 value acquisition.
HASH calculation is performed on the obfuscated fan data nFans to obtain KEY2 value, which may be, for example, KEY2 ═ md4.create (nFocus).
5. And decrypting the twice encrypted obfuscated noble data.
The second encrypted data is decrypted by using the preset shared key, for example, the following steps are performed:
EncryptnNoble=IDEA.Decrypt(EncryptnNoble2,ShareKey);
the KEY2 value is used to decrypt the data after the primary decryption for the second time, which may be:
nNoble=Rc4.Decrypt(EncryptnNoble,KEY2)。
optionally, downloading live broadcast room data corresponding to live broadcast room data obfuscated in an obfuscation rule file corresponding to the obfuscation rule file name through an HTTP interface includes:
requesting a confusion rule file corresponding to the file name of the confusion rule file obtained by decryption through an HTTP interface; and inquiring the confusion rule file, and acquiring live broadcast room data corresponding to the confused live broadcast room data.
The client can interact with the server through two interfaces, namely a long connection interface and an HTTP interface, so that the safety of data in a live broadcast room can be enhanced.
Optionally, before the step S210, the method further includes:
the client generates a first public key and a first private key and sends the first public key to the server;
the server generates a second public key and a second private key and issues the second public key to the client;
the client generates a first shared key according to the first private key and the second public key;
the server generates a second shared secret key according to the second private key and the first public key;
the value of the first shared key is consistent with that of the second shared key, and the first shared key and the second shared key are respectively used as preset shared keys of the client and the server.
The method for preventing the crawling insects of the live broadcast data provided by the embodiment belongs to the same inventive concept as the method for preventing the crawling insects of the live broadcast data provided by the first embodiment, and technical details which are not described in detail in the embodiment can be referred to as the first embodiment, and the first embodiment have the same beneficial effects.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a live broadcast data crawling device according to a third embodiment of the present invention, which is applicable to a live broadcast data crawling situation.
Referring to fig. 3, the anti-crawling apparatus for live broadcast data in this embodiment includes:
a data obfuscating module 310, configured to obtain live broadcast data, and obfuscate the live broadcast data according to an obfuscating rule file, where the types of the live broadcast data include at least two of: the method comprises the following steps that attention data, fan data, online watching number of people, received gift data and the number of users with the user level reaching a preset level in online watching users in a live broadcast room are collected in the live broadcast room;
the obfuscated data encryption module 320 is configured to obtain a security level corresponding to each live broadcast room data type, perform primary encryption on obfuscated live broadcast room data with a high security level by using obfuscated live broadcast room data with a low security level in adjacent security levels, perform secondary encryption on the primary encrypted data by using a preset shared key, and perform primary encryption on obfuscated live broadcast room data with a lowest security level by using a preset shared key;
the file name encryption module 330 is configured to encrypt a file name of the obfuscation rule file by using a preset shared key;
and the data sending module 340 is configured to send the obfuscated and encrypted live broadcast data and the encrypted obfuscation rule file name to the client, so that the client determines the live broadcast data according to the server sent data.
Optionally, the data obfuscation module 310 is specifically configured to:
acquiring live broadcast room data through a data acquisition interface, wherein the type of the live broadcast room data corresponds to an enumeration element in a preset enumeration object; selecting a confusion rule file corresponding to the enumeration value of the enumeration element, and confusing the live broadcast data of the type corresponding to the enumeration element according to the confusion rule file, wherein the confusion rule file corresponding to the enumeration value of the enumeration element is replaced at preset intervals.
Optionally, the data sending module 340 is specifically configured to:
and sending the obfuscated and encrypted live broadcast room data and the encrypted obfuscating rule file name to the client through long connection, so that the client decrypts the obfuscated and encrypted live broadcast room data and the encrypted obfuscating rule file name to obtain the obfuscated live broadcast room data and the obfuscating rule file name, and downloading the live broadcast room data corresponding to the obfuscated live broadcast room data in the obfuscating rule file corresponding to the obfuscating rule file name through an HTTP interface.
Optionally, the anti-crawler device of live broadcast room data still includes:
the shared key generation module is used for generating a second public key and a second private key and issuing the second public key to the client; generating a second shared secret key according to the second private key and the first public key sent by the client; and taking the second shared key as a preset shared key.
The device for preventing the crawling insects of the live broadcast data provided by the embodiment belongs to the same inventive concept as the method for preventing the crawling insects of the live broadcast data provided by the embodiment one, and technical details which are not described in detail in the embodiment can be referred to the embodiment one, and the embodiment one have the same beneficial effects.
Example four
Fig. 4 is a schematic structural diagram of a live broadcast data crawling device according to a fourth embodiment of the present invention, which is applicable to a live broadcast data crawling situation.
Referring to fig. 4, the anti-crawling apparatus for live broadcast data in this embodiment includes:
the data receiving module 410 is configured to receive, through a long connection, obfuscated and encrypted live broadcast data and an encrypted obfuscation rule file name that are sent by a server;
the data decryption module 420 is configured to decrypt the obfuscated and encrypted live broadcast data and the encrypted obfuscating rule file name to obtain the obfuscated live broadcast data and the obfuscating rule file name;
and the data de-obfuscating module 430 is configured to download live broadcast data corresponding to the live broadcast data obfuscated in the obfuscation rule file corresponding to the obfuscation rule file name through the HTTP interface.
Optionally, the data decryption module 420 includes:
and the file name decryption submodule is used for decrypting the file name of the confusion rule file by using a preset shared key.
The obfuscated data decryption submodule is used for decrypting the obfuscated live broadcast room data with the lowest security level by using a preset shared key; and carrying out primary decryption on the data subjected to secondary encryption by using a preset shared key, and carrying out secondary decryption on the data subjected to primary decryption with high security level by using the obfuscated live broadcast room data with low security level in adjacent security levels.
Optionally, the data de-obfuscating module 430 is specifically configured to:
requesting a confusion rule file corresponding to the file name of the confusion rule file obtained by decryption through an HTTP interface; and inquiring the confusion rule file, and acquiring live broadcast room data corresponding to the confused live broadcast room data.
Optionally, the anti-crawler device of live broadcast room data still includes:
the shared key generation module is used for generating a first public key and a first private key and sending the first public key to the server; generating a first shared key according to the first private key and a second public key sent by the server; and taking the first shared key as a preset shared key.
The device for preventing the crawling insects of the live broadcast data provided by the embodiment belongs to the same inventive concept as the method for preventing the crawling insects of the live broadcast data provided by the second embodiment, and technical details which are not described in detail in the embodiment can be referred to the second embodiment, and the second embodiment have the same beneficial effects.
EXAMPLE five
The embodiment provides a terminal which can be used for preventing the condition of reptiles of live broadcast data. Fig. 5 is a schematic structural diagram of a terminal according to a fifth embodiment of the present invention. Referring to fig. 5, the terminal includes:
one or more processors 510;
a memory 520 for storing one or more programs;
when executed by the one or more processors 510, cause the one or more processors 510 to implement a method for anti-crawling live room data as set forth in an embodiment.
In FIG. 5, a processor 510 is illustrated as an example; the processor 510 and the memory 520 may be connected by a bus or other means, such as by a bus in FIG. 5.
The memory 520 is a computer-readable storage medium and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the method for preventing the crawling of the live broadcast data in the embodiment of the present invention. The processor 510 executes various functional applications and data processing of the terminal by executing software programs, instructions and modules stored in the memory 520, that is, implements the above-described live broadcast data anti-crawling method.
The memory 520 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 520 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 520 may further include memory located remotely from the processor 510, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The terminal provided by the embodiment and the live broadcast data crawling prevention method provided by the embodiment belong to the same inventive concept, and technical details which are not described in detail in the embodiment can be referred to in the embodiment i, and the embodiment i have the same beneficial effects.
EXAMPLE six
The embodiment provides a terminal which can be used for preventing the condition of reptiles of live broadcast data. Fig. 6 is a schematic structural diagram of a terminal according to a sixth embodiment of the present invention. Referring to fig. 6, the terminal includes:
one or more processors 610;
a memory 620 for storing one or more programs;
when executed by the one or more processors 610, cause the one or more processors 610 to implement a method for anti-crawling live room data as set forth in embodiment two.
In FIG. 6, a processor 610 is illustrated; the processor 610 and the memory 620 may be connected by a bus or other means, such as by a bus in FIG. 6.
The memory 620 is used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the method for preventing the crawling of the live broadcast data in the embodiment of the present invention. The processor 610 executes various functional applications and data processing of the terminal by running software programs, instructions and modules stored in the memory 620, that is, the above-described live broadcast data anti-crawling method is implemented.
The memory 620 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 620 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 620 can further include memory located remotely from the processor 610, which can be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The terminal provided by the embodiment and the live broadcast data crawling prevention method provided by the second embodiment belong to the same inventive concept, and technical details which are not described in detail in the embodiment can be referred to in the second embodiment, and the second embodiment have the same beneficial effects.
EXAMPLE seven
The present embodiment provides a readable medium, on which a computer program is stored, which when executed by a processor implements a live room data anti-crawling method as set forth in one or two of the embodiments.
The readable medium provided by the embodiment and the method for preventing the crawling insects of the live broadcast data provided by the embodiment one or two belong to the same inventive concept, and technical details which are not described in detail in the embodiment can be referred to the embodiment one or two, and the embodiment one or two have the same beneficial effects.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for preventing crawling insects of data in a live broadcast room is characterized by comprising the following steps:
acquiring live broadcast room data, and obfuscating the live broadcast room data according to an obfuscation rule file, wherein the types of the live broadcast room data at least include the following two types: the method comprises the following steps that attention data, fan data, online watching number of people, received gift data and the number of users with the user level reaching a preset level in online watching users in a live broadcast room are collected in the live broadcast room;
acquiring the security level corresponding to each live broadcast room data type, performing primary encryption on the obfuscated live broadcast room data with high security level by using the obfuscated live broadcast room data with low security level in the adjacent security levels, performing secondary encryption on the data subjected to primary encryption by using a preset shared key, and performing primary encryption on the obfuscated live broadcast room data with the lowest security level by using the preset shared key;
encrypting the file name of the confusion rule file by using a preset shared key;
and issuing the obfuscated and encrypted live broadcast room data and the encrypted obfuscating rule file name to the client so that the client determines the live broadcast room data according to the data issued by the server.
2. The method of claim 1, wherein the obtaining live space data and obfuscating the live space data according to an obfuscation rule file comprises:
acquiring live broadcast room data through a data acquisition interface, wherein the type of the live broadcast room data corresponds to an enumeration element in a preset enumeration object;
selecting a confusion rule file corresponding to the enumeration value of the enumeration element, and confusing the live broadcast data of the type corresponding to the enumeration element according to the confusion rule file, wherein the confusion rule file corresponding to the enumeration value of the enumeration element is replaced at preset time intervals.
3. The method as claimed in claim 1, wherein the sending the obfuscated and encrypted live broadcast data and the encrypted obfuscation rule file name to the client, so that the client determines the live broadcast data according to the data sent by the server, includes:
sending the obfuscated and encrypted live broadcast room data and the encrypted obfuscating rule file name to the client through long connection, so that the client decrypts the obfuscated and encrypted live broadcast room data and the encrypted obfuscating rule file name to obtain the obfuscated live broadcast room data and the obfuscating rule file name, downloading an obfuscating rule file corresponding to the obfuscating rule file name through an HTTP interface, inquiring the obfuscating rule file, and obtaining live broadcast room data corresponding to the obfuscated live broadcast room data.
4. The method of claim 1, prior to the obtaining live-air data, further comprising:
a client generates a first public key and a first private key and sends the first public key to the server;
the server generates a second public key and a second private key and sends the second public key to the client;
the client generates a first shared key according to the first private key and the second public key;
the server generates a second shared secret key according to the second private key and the first public key;
the value of the first shared key is consistent with that of the second shared key, and the first shared key and the second shared key are respectively used as preset shared keys of the client and the server.
5. A method for preventing crawling insects of data in a live broadcast room is characterized by comprising the following steps:
receiving the obfuscated and encrypted live broadcast room data and the encrypted obfuscating rule file name which are sent by the server through the long connection;
decrypting the obfuscated and encrypted live broadcast room data and the encrypted obfuscating rule file name to obtain obfuscated live broadcast room data and an obfuscating rule file name;
downloading a confusion rule file corresponding to the confusion rule file name through an HTTP interface, inquiring the confusion rule file, and acquiring live broadcast room data corresponding to the confused live broadcast room data;
the decrypting the encrypted obfuscation rule file name includes: decrypting the file name of the confusion rule file by using a preset shared key;
the decrypting the obfuscated and encrypted live broadcast room data includes:
decrypting the confused live broadcast room data with the lowest security level by using a preset shared key;
and carrying out primary decryption on the data subjected to secondary encryption by using a preset shared key, and carrying out secondary decryption on the data subjected to primary decryption with high security level by using the obfuscated live broadcast room data with low security level in adjacent security levels.
6. An anti-crawling device for live broadcast room data, comprising:
the data confusion module is used for acquiring the live broadcast data and confusing the live broadcast data according to the confusion rule file, wherein the data types of the live broadcast at least comprise the following two types: the method comprises the following steps that attention data, fan data, online watching number of people, received gift data and the number of users with the user level reaching a preset level in online watching users in a live broadcast room are collected in the live broadcast room;
the confusion data encryption module is used for acquiring the security level corresponding to each live broadcast room data type, carrying out primary encryption on the confusion live broadcast room data with high security level by using the confusion live broadcast room data with low security level in the adjacent security levels, carrying out secondary encryption on the once encrypted data by using a preset shared key, and carrying out primary encryption on the confusion live broadcast room data with the lowest security level by using the preset shared key;
the file name encryption module is used for encrypting the file name of the confusion rule file by using a preset shared secret key;
and the data sending module is used for sending the obfuscated and encrypted live broadcast data and the encrypted obfuscation rule file name to the client so that the client can determine the live broadcast data according to the data sent by the server.
7. An anti-crawling device for live broadcast room data, comprising:
the data receiving module is used for receiving the obfuscated and encrypted live broadcast room data and the encrypted obfuscating rule file name which are sent by the server through long connection;
the data decryption module is used for decrypting the obfuscated and encrypted live broadcast room data and the encrypted obfuscating rule file name to obtain the obfuscated live broadcast room data and the obfuscating rule file name;
the data de-obfuscating module is used for downloading an obfuscating rule file corresponding to the obfuscating rule file name through the HTTP interface, inquiring the obfuscating rule file and acquiring live broadcast data corresponding to the obfuscated live broadcast data;
the file name decryption submodule is used for decrypting the file name of the confusion rule file by using a preset shared key;
the obfuscated data decryption submodule is used for decrypting the obfuscated live broadcast room data with the lowest security level by using a preset shared key; and carrying out primary decryption on the data subjected to secondary encryption by using a preset shared key, and carrying out secondary decryption on the data subjected to primary decryption with high security level by using the obfuscated live broadcast room data with low security level in adjacent security levels.
8. A server, characterized in that the server comprises:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement a method of crawling live-room data as recited in any of claims 1-4.
9. A terminal, characterized in that the terminal comprises:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a method for anti-crawling live room data as recited in claim 5.
10. A readable medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out a method of anti-crawling of live room data as claimed in any one of claims 1 to 4 or 5.
CN201811189748.5A 2018-10-12 2018-10-12 Live broadcast room data anti-crawling method and device, terminal and readable medium Active CN109067805B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811189748.5A CN109067805B (en) 2018-10-12 2018-10-12 Live broadcast room data anti-crawling method and device, terminal and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811189748.5A CN109067805B (en) 2018-10-12 2018-10-12 Live broadcast room data anti-crawling method and device, terminal and readable medium

Publications (2)

Publication Number Publication Date
CN109067805A CN109067805A (en) 2018-12-21
CN109067805B true CN109067805B (en) 2021-07-23

Family

ID=64764791

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811189748.5A Active CN109067805B (en) 2018-10-12 2018-10-12 Live broadcast room data anti-crawling method and device, terminal and readable medium

Country Status (1)

Country Link
CN (1) CN109067805B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109768978B (en) * 2019-01-16 2021-05-25 武汉斗鱼鱼乐网络科技有限公司 Method and related device for obfuscating data
CN112449204B (en) * 2019-08-30 2022-09-09 武汉斗鱼网络科技有限公司 Method and related device for obfuscating data
CN110929270A (en) * 2019-10-29 2020-03-27 北京芯盾集团有限公司 Information security encryption method and device
CN111314351A (en) * 2020-02-19 2020-06-19 望海康信(北京)科技股份公司 Anti-crawler data processing method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932349A (en) * 2012-10-31 2013-02-13 成都主导软件技术有限公司 Data transmission method, device and system
CN105577684A (en) * 2016-01-25 2016-05-11 北京京东尚科信息技术有限公司 Anti-crawling methods, server, client and system
CN107220291A (en) * 2017-04-25 2017-09-29 深圳中兴网信科技有限公司 The method and system of the anti-crawl of web data
CN108197482A (en) * 2017-12-27 2018-06-22 致象尔微电子科技(上海)有限公司 A kind of internal storage data encrypting and decrypting method and device
CN108289096A (en) * 2018-01-05 2018-07-17 武汉斗鱼网络科技有限公司 The method and device of direct broadcasting room concern is paid close attention to, verified to a kind of direct broadcasting room

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170070481A1 (en) * 2015-09-03 2017-03-09 Pilixo Limited Communication channel security against packet sniffing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932349A (en) * 2012-10-31 2013-02-13 成都主导软件技术有限公司 Data transmission method, device and system
CN105577684A (en) * 2016-01-25 2016-05-11 北京京东尚科信息技术有限公司 Anti-crawling methods, server, client and system
CN107220291A (en) * 2017-04-25 2017-09-29 深圳中兴网信科技有限公司 The method and system of the anti-crawl of web data
CN108197482A (en) * 2017-12-27 2018-06-22 致象尔微电子科技(上海)有限公司 A kind of internal storage data encrypting and decrypting method and device
CN108289096A (en) * 2018-01-05 2018-07-17 武汉斗鱼网络科技有限公司 The method and device of direct broadcasting room concern is paid close attention to, verified to a kind of direct broadcasting room

Also Published As

Publication number Publication date
CN109067805A (en) 2018-12-21

Similar Documents

Publication Publication Date Title
CN109067805B (en) Live broadcast room data anti-crawling method and device, terminal and readable medium
US9537864B2 (en) Encryption system using web browsers and untrusted web servers
US11329962B2 (en) Pluggable cipher suite negotiation
RU2589861C2 (en) System and method of user data encryption
US9973481B1 (en) Envelope-based encryption method
EP2830282B1 (en) Storage method, system and apparatus
Kapil et al. Attribute based honey encryption algorithm for securing big data: Hadoop distributed file system perspective
US20230025052A1 (en) Method and system for securing data
WO2013006296A1 (en) Methods and apparatus for secure data sharing
US20130290731A1 (en) Systems and methods for storing and verifying security information
US11063917B2 (en) Communication network with rolling encryption keys and data exfiltration control
US20170353745A1 (en) Secure media player
CN109768978B (en) Method and related device for obfuscating data
US11681499B2 (en) Data set including a secure key
WO2021016205A1 (en) Computer file security using extended metadata
Mahalakshmi et al. Effectuation of secure authorized deduplication in hybrid cloud
Lai et al. Secure file storage on cloud using hybrid cryptography
US20130290732A1 (en) Systems and methods for storing and verifying security information
KR20170084802A (en) Methdo and system for transmitting secure data in a terminal
Dudiki et al. A Hybrid Cryptography Algorithm to Improve Cloud Computing Security
CN113595982B (en) Data transmission method and device, electronic equipment and storage medium
CN114218584A (en) Power data privacy protection model and method for system-level revocable attribute encryption
CN113609522A (en) Data authorization and data access method and device
Pilla Enhancing data security by making data disappear in a P2P system
CN109474617B (en) Method, device, terminal and storage medium for calling functions in SO file

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