CN112449204A - Method and related device for obfuscating data - Google Patents

Method and related device for obfuscating data Download PDF

Info

Publication number
CN112449204A
CN112449204A CN201910816491.XA CN201910816491A CN112449204A CN 112449204 A CN112449204 A CN 112449204A CN 201910816491 A CN201910816491 A CN 201910816491A CN 112449204 A CN112449204 A CN 112449204A
Authority
CN
China
Prior art keywords
live broadcast
gift information
value
gift
platform server
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.)
Granted
Application number
CN201910816491.XA
Other languages
Chinese (zh)
Other versions
CN112449204B (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 CN201910816491.XA priority Critical patent/CN112449204B/en
Publication of CN112449204A publication Critical patent/CN112449204A/en
Application granted granted Critical
Publication of CN112449204B publication Critical patent/CN112449204B/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/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • 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/258Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
    • H04N21/25808Management of client data
    • H04N21/25816Management of client data involving client authentication
    • 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/258Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
    • H04N21/25866Management of end-user 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/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting

Abstract

The embodiment of the application discloses a method for obfuscating data and a related device, which are used for improving privacy and safety of live platform data. The method in the embodiment of the application comprises the following steps: grouping users in a live broadcast room to obtain a plurality of user groups; determining repeated gift information according to a preset algorithm, wherein the repeated gift information is displayed in at least two grouped live broadcasting rooms; determining a hacker client and generating false gift information; obtaining the number of target gifts received by each group of live broadcast rooms within a preset time length, and determining a target delivery value corresponding to the number of the target gifts based on the incidence relation between the number of the gifts and the delivery value; sending false gift information of a target delivery value quantity to a hacker client in each grouped live broadcast room, and sending corresponding gift information to all clients in each grouped live broadcast room, so that a legal client displays the gift information through a self-defined display control.

Description

Method and related device for obfuscating data
Technical Field
The present application relates to the field of live broadcast platforms, and in particular, to a method for obfuscating data and a related apparatus.
Background
With the increasing popularity and development of networks, online live broadcasting becomes more and more popular with users. For a live broadcast platform, the gifts given to the anchor by each live viewer are all shown to all viewers in the live broadcast room, and then all the gift messages can be received by each viewer.
However, when a hacker enters a live broadcast room by using the identity of the audience and records the received gift message, the hacker can calculate all profits of live broadcast in one day of the live broadcast and amplify the profits to the whole live broadcast platform, the hacker can log in an account in each room of the live broadcast platform, so that the revenue of the live broadcast in each live broadcast room of the live broadcast platform can be calculated, the data of the live broadcast platform is completely exposed to the hacker, the privacy of the revenue data of the live broadcast platform is low, and therefore how to improve the privacy and the security of the revenue data of the live broadcast platform is a problem to be solved urgently at present.
Disclosure of Invention
The embodiment of the application provides a method and a related device for obfuscating data, which are used for improving privacy and safety of live platform data.
A first aspect of an embodiment of the present application provides a method for obfuscating data, where the method is applied in a live broadcast field, and includes: the live broadcast platform server groups users of the live broadcast rooms to obtain a plurality of user groups, wherein the user groups respectively correspond to all grouped live broadcast rooms, and gift information displayed by all the grouped live broadcast rooms is different; the live broadcast platform server determines repeated gift information according to a preset algorithm, and the repeated gift information is displayed in at least two grouped live broadcast rooms; the live broadcast platform server determines a hacker client and generates false gift information, wherein the false gift information comprises a target field, and the target field is used for indicating the authenticity of the false gift information; the live broadcast platform server obtains the number of target gifts received by each group of live broadcast rooms within a preset time length, and determines a target delivery value corresponding to the number of the target gifts based on the incidence relation between the number of the gifts and the delivery value; the live broadcast platform server sends the false gift information of the target delivery value quantity to the hacker client in each grouped live broadcast room, and sends corresponding gift information to all the clients in each grouped live broadcast room, so that the legal clients display the gift information through a self-defined display control, wherein all the clients comprise the hacker client and the legal clients, and the gift information comprises the repeated gift information.
In a possible embodiment, the step of obtaining, by the live broadcast platform server, a target gift number received by each group of live broadcast rooms within a preset time duration, and determining a target delivery value corresponding to the target gift number based on an association relationship between the gift number and the delivery value includes: the live broadcast platform server obtains a start Time and a current Time through a system function Time (), counts the number of received gifts from the start Time, pauses the counting when the difference value between the current Time and the start Time is the preset Time length, and takes the number of the gifts counted in the pausing as the number of the target gifts; when the target gift number is larger than the initial delivery value of the false message, the live broadcast platform server determines the value range (num _ min, num _ max) of the target delivery value by the following formula:
num_max=(count-A)n*k
num_min=(count-A)m*k
the num _ max is used for representing a maximum value of the target delivery value, the num _ min is used for representing a minimum value of the target delivery value, the count is used for representing the number of the target gifts, both the A, m and the n are positive integers, the A is the initial delivery value of the false message, the n is larger than the m, the n is positively correlated with the number of the target gifts, and the k is a constant used for representing a proportionality coefficient; and the live broadcast platform server randomly selects an integer value in the value range of the target delivery value through a system function rand () as the target delivery value.
In one possible embodiment, the determining, by the live platform server, the duplicate gift information according to a preset algorithm includes: the live broadcast platform server judges whether the value of the gift information is greater than a value threshold value; if so, the live broadcast platform server determines that the high-value gift information is the repeated gift information so as to display the high-value gift information in each grouped live broadcast room, wherein the high-value gift information is the gift information with the value larger than the value threshold value.
In one possible embodiment, the determining, by the live platform server, the duplicate gift information according to a preset algorithm includes: if the value of the gift information is smaller than the value threshold value, the live broadcast platform server acquires the type and the quantity of small-value gift information, wherein the small-value gift information is the gift information with the value smaller than the value threshold value; the live broadcast platform server sorts the small-value gifts according to the gift values and sequentially stores the small-value gifts into a gift array; and the live broadcast platform server determines the repeated gift information and the grouped live broadcast rooms to which the repeated gift information is delivered according to the room number, the current date, the type and the number of the small-value gift information of each grouped live broadcast room and the gift array.
In one possible embodiment, the determining, by the live platform server, the duplicate gift information and the group live room to which the duplicate gift information is delivered according to the room number of each group live room, the current date, the type and the number of the small value gift information comprises: the live broadcast platform server calculates seed data through the following formula: seed-128 create (roomid + Time + Gifttype _ array + giftnum); wherein the Seed is used for representing the Seed data, the roomid is used for representing a room number of the grouping live room, the Time is used for representing the current date, the Gifttype _ array is used for representing the gift array, and the Giftnum is used for representing the number of the small-value gift information; the live broadcast platform server determines the gift type and delivery number of the repeated gift information according to the following formula: gitfttype x ═ Gifttype _ array [ seed [ x-1 ]% giftnum ]; selected [127 ]% giftnum; wherein the Gitfttype x is used for representing the gift type of the repeated gift information, the Seed [ x-1] is used for representing the x-th bit data of the Seed, the Selectnum is used for representing the delivery number, and the Seed [127] is used for representing the last bit data of the Seed; the live broadcast platform server determines a packet live broadcast room to which the repeated gift information is delivered according to the following formula: team y ═ seed [ y +100 ]% teamnum; the Team y is used for representing each grouping live broadcast room, and the Team num is used for representing the total number of the groupings; when the Team y is not equal to the Team y +1, the live broadcast platform server determines that the Team y +1 is a grouping live broadcast room where the repeated gift information is delivered, so that the gift information of which the gift type is Gitfttype x in the Team y is repeatedly displayed in the Team y + 1.
In one possible embodiment, the live platform server determining the hacking client includes: the live broadcast platform server determines the IP address of each client of the live broadcast platform; if the number of target clients with the same IP address is larger than a first threshold value, the live broadcast platform server determines that the target clients are the hacker clients; or, the live broadcast platform server determines the live broadcast room switching times and the online time length when each client of the live broadcast platform is online; and if the online time of the target client is greater than a second threshold value and the number of times of switching the live broadcast rooms is 0, the live broadcast platform server determines that the target client is the hacker client.
In one possible embodiment, before the live platform server sends the target delivery value amount of false gift information to hacker clients in each group live broadcast room and sends corresponding gift information to all clients in each group live broadcast room, the method further includes: the live broadcast platform server generates a server public and private key pair, sends a server public key to the client and receives a client public key sent by the client; the live broadcast platform server generates a shared key according to the client public key and a server private key; and the live broadcast platform server encrypts the gift information according to the shared secret key.
A second aspect of an embodiment of the present application provides a live platform server, including: the grouping unit is used for grouping the users in the live broadcast rooms to obtain a plurality of user groups, the user groups respectively correspond to the grouped live broadcast rooms, and gift information displayed in the grouped live broadcast rooms is different; the determining unit is used for determining repeated gift information according to a preset algorithm, and the repeated gift information is displayed in at least two grouped live broadcasting rooms; determining a hacker client and generating false gift information, wherein the false gift information comprises a target field used for indicating authenticity of the false gift information; obtaining the number of target gifts received by each group of live broadcast rooms within a preset time length, and determining a target delivery value corresponding to the number of the target gifts based on the incidence relation between the number of the gifts and the delivery value; and the receiving and sending unit is used for sending the false gift information of the target delivery value quantity to the hacker client in each grouped live broadcast room and sending corresponding gift information to all the clients in each grouped live broadcast room, so that the legal clients display the gift information through a self-defined display control, wherein all the clients comprise the hacker client and the legal clients, and the gift information comprises the repeated gift information.
A third aspect of the present application provides an electronic device comprising a memory and a processor, wherein the processor is configured to implement the steps of the method for obfuscating data according to any one of the first aspect described above when executing a computer management-like program stored in the memory.
A fourth aspect of the present application provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to perform the method of the above-described aspects.
A fifth aspect of the present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the above-described aspects.
According to the technical scheme, the embodiment of the application has the following advantages: the live broadcast platform server groups users of the live broadcast rooms to obtain a plurality of user groups, wherein the user groups respectively correspond to all grouped live broadcast rooms, and gift information displayed by all the grouped live broadcast rooms is different; determining repeated gift information according to a preset algorithm, wherein the repeated gift information is displayed in at least two grouped live broadcasting rooms; determining a hacker client and generating false gift information, wherein the false gift information comprises a target field used for indicating authenticity of the false gift information; obtaining the number of target gifts received by each group of live broadcast rooms within a preset time length, and determining a target delivery value corresponding to the number of the target gifts based on the incidence relation between the number of the gifts and the delivery value; sending the false gift information of the target delivery value quantity to the hacker client in each group of live broadcast rooms, and sending corresponding gift information to all the clients in each group of live broadcast rooms, so that the legal clients display the gift information through a self-defined display control, wherein all the clients comprise the hacker client and the legal client, and the gift information comprises the repeated gift information. In the embodiment of the application, the live platform server displays the gift information in groups, sends the repeated gift information to each group, and sends the false gift information to the hacker client to confuse the gift information of the live platform obtained by the hacker client, so that the privacy and the safety of the live platform data are improved.
Drawings
Fig. 1 is a flowchart of a method for obfuscating data according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a possible live broadcast platform server according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a hardware structure of a possible electronic device according to an embodiment of the present disclosure;
fig. 4 is a schematic hardware structure diagram of a possible computer-readable storage medium according to an embodiment of the present disclosure.
Detailed Description
The embodiment of the application provides a method and a related device for obfuscating data, which are used for improving privacy and safety of live platform data.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, a flowchart of a method for obfuscating data according to an embodiment of the present application includes:
101. the live broadcast platform server groups the users in the live broadcast room to obtain a plurality of user groups;
for some live broadcast rooms with a large number of people, the number of people can cause too many messages, so that the users cannot watch live broadcast contents, and therefore the users can be grouped in the embodiment of the application. For example, the number of users greater than 2 ten thousand may be divided into 2 ten thousand groups, and if the number of users in the live broadcast room is 10 ten thousand or more, the number may be divided into at least 6 user groups.
The live broadcast platform server divides the users of the live broadcast rooms into groups to obtain a plurality of user groups, the user groups respectively correspond to the grouped live broadcast rooms, and gift information displayed in the grouped live broadcast rooms is different.
It should be noted that, in order to prevent a hacker from obtaining revenue data of a live broadcast room, in the embodiment of the present application, a user of each group can only receive gift information of the group, and viewers of other groups cannot view the gift information, so that a client corresponding to the user of the group cannot count all the gift information of other groups.
102. The live broadcast platform server determines repeated gift information according to a preset algorithm;
in addition, in this embodiment of the application, in order to prevent a hacker from obtaining all gift information by entering one audience for each group, the live broadcast platform server may determine the duplicate gift information, so that the duplicate gift information is displayed in at least two group live broadcast rooms, where the number of displays and the groups among which the display is performed, which is not limited in this embodiment of the application. Specifically, the manner in which the live platform server determines the repeated gift information includes: the live broadcast platform server judges whether the value of the gift information is greater than a value threshold value; and if so, determining that the high-value gift information is the repeated gift information so as to display the high-value gift information in each group of live rooms, wherein the high-value gift information is the gift information with the value larger than the value threshold value.
If the value of the gift information is smaller than the value threshold value, the live broadcast platform server acquires the type and the quantity of the small-value gift information, wherein the small-value gift information is the gift information with the value smaller than the value threshold value; the live broadcast platform server sorts the small-value gifts according to the gift value values and sequentially stores the small-value gifts into a gift array; the live broadcast platform server determines the repeated gift information and the grouped live broadcast rooms to which the repeated gift information is delivered according to the room number, the current date, the type and the number of the small value gift information and the gift arrays of all the grouped live broadcast rooms. It can be understood that the strategy of the application can be different for each room according to the room number of the grouped live broadcast room, so that a hacker can hardly know the rule; the types and the number of all the small-value gift information are acquired, so that the algorithm can be changed if new gifts and numbers are added, and more application scenes can be adapted; and at the current date, the number of days can be accurate, so that the algorithm of the method can be changed every day, and a hacker can difficultly find out the rule. In this embodiment, the specific algorithm may be as follows:
Seed=sha-128.create(roomid+Time+Gifttype_array+giftnum);
wherein Seed is used for representing Seed data, roomid is used for representing the room number of a grouping live room, Time is used for representing the current date, Gifttype _ array is used for representing a gift array, and giftnum is used for representing the number of small-value gift information. Therefore, based on the room number, the current date, the number of low value gift information, and the gift array, a hash value Seed may be calculated as Seed data for the subsequent selection of the type of gift and the number of deliveries.
It should be noted that Seed is 128 bytes of data, and the gift type of the repeated gift information can be determined by the following formula in this embodiment: gitfttype x ═ Gifttype _ array [ seed [ x-1 ]% giftnum ];
wherein Gitfttype x is used to indicate the gift type of the duplicate gift information, and Seed [ x-1] is used to indicate the xth bit data of Seed. The gift type can be selected from all gift types as the gift type of the repeated gift information through the formula for determining the gift types, the gift types are continuously changed each time the gift types are selected, the variability is better, and a hacker can hardly perceive the regularity to crack the gift.
For example, the first and second data of Seed may be selected as the type of duplicate gift information, i.e.,
Gitfttype1=Gifttype_array[seed[0]%giftnum];
Gitfttype2=Gifttype_array[seed[1]%giftnum];
in addition, in this embodiment, the last data of Seed may be used as the selection number, where the selection number is the number of types of the repeated gift information, and the calculation method may be as follows:
Selectnum=seed[127]%giftnum;
where Selectnum is used to indicate the number of selections and Seed [127] is used to indicate the last bit of Seed.
After determining the gift type, the live broadcast platform server needs to determine which packets the repeated gift information is repeatedly sent in, wherein in this embodiment, the packets may also be determined by using Seed data, that is, a packet live broadcast room where the repeated gift information is delivered is determined, which is specifically implemented as follows:
Team y=seed[y+100]%teamnum;
team y is used for representing each group of live broadcast rooms, and Team num is used for representing the total number of groups; when the Team y is not equal to the Team y +1, the live broadcast platform server determines that the Team y +1 is a grouping live broadcast room where the repeated gift information is delivered, so that the gift information with the gift type of Gitfttype x in the Team y is repeatedly displayed in the Team y + 1. For ease of understanding, for example, Team1 ═ seed [100 ]% teamnum, Team2 ═ seed [101 ]% teamnum; reselecting a packet if Team2 is equal to Team 1; if the Team2 is not equal to Team1, the selected gift type of Team1 is repeatedly transmitted at Team 2. In addition, in consideration of the fact that all the duplicate gift information cannot be transmitted to Team2, resulting in excessive gift information of Team2, the present embodiment calculates the gift type of the next duplicate gift information and determines whether the calculated value is in Seed, transmits the duplicate gift information to packet 2 if it exists, and does not perform duplicate transmission if it does not exist.
By the method, even if a hacker monitors the grouped live broadcast rooms of a plurality of groups, the gift messages received by the hacker have a plurality of repeated gift messages, so that the hacker cannot acquire accurate gift revenue data.
In addition, for the small-value gift information in one packet, when the number of gifts in the same time packet is large, the live broadcast platform server may consider discarding part of the small-value gift information, and the specific degradation may use a sliding window manner, for example, calculating the number of small gifts received in one second, setting the maximum number of gifts in one second, and discarding the small-value gift information if the number of small-value gift information exceeds the maximum number of small-value gift information received in one second. The specific algorithm is as follows: first, after receiving gift information, the value of the gift information is judged, if the gift information is high-value gift information, a discarding strategy is not adopted, and only low-value gift information adopts the discarding strategy. In this embodiment, a GiftLimit class is defined, a queue list is designed to store a time when gift information is received, the time is an integer value of time, and the type of the time can be uint64_ t, and then a member variable m _ nLimit storing a threshold value is defined to store the maximum gift number DanmuLimit issued by the live broadcast platform server, where the specific function is implemented as follows:
Class GiftLimit{
std::list<uint64_t>m_item_times;
size_t m_nLimit;
m_nLimit=DanmuLimit;
and then redesigning interface information of the gift message degradation class. Firstly, acquiring the current time by calling a system function nowtime, storing the current time into a nowvariable, and judging whether the time number in the current queue is greater than a threshold value m _ nLimit or not; if the current time is less than the maximum threshold, the current time now is stored in the queue by calling the push _ back of the list, and the true is returned, which indicates that the gift information can be displayed currently, and the specific function is implemented as follows:
Figure BDA0002186499200000071
Figure BDA0002186499200000081
then, whether the current time and the time at the head of the queue are smaller than 1s, namely a threshold value of 1000ms is judged, if yes, false is returned, otherwise, a function DeleteOlderTime () is called to delete the time exceeding the threshold value of 1s in the queue, and the specific function is realized as follows:
if((now-m_item_times.front())<=1000)
return false;}
DeleteOlderTime(now);
}
it should be noted that, since the deletion interface DeleteOlderTime is defined above, in this embodiment, all time values that the time difference between the time in the queue and the time at the head of the queue exceeds a threshold, for example, 1s, need to be deleted, and a manner of implementing the deletion interface includes: writing a loop to traverse the queue, firstly defining an iterator std: list < element 64_ t: iterator iterer; then, the iterator is assigned as the starting iter of the queue, m _ item _ times, begin (); writing a for loop to traverse, judging whether the difference value between the time in the queue and the current time is greater than a threshold value 1000ms, if so, deleting the time from the queue through a deletion function m _ item _ time. If not, indicating that the time of the queue head is less than the threshold value, interrupting the circulation and directly returning, wherein the specific function implementation comprises the following steps:
Figure BDA0002186499200000082
wherein iter! End () represents whether it is the end of the queue.
In this embodiment, since too many gifts are received at the same time, the network performance or other device performance of the client may not handle too many gifts, so discarding part of the small gifts may not only improve the viewing experience of the user, but also prevent hackers from obtaining the quantity and value of all the gifts.
103. The live broadcast platform server determines a hacker client and generates false gift information;
in order to further enhance the interference on the data of the hackers, in the embodiment, the monitoring accounts and the clients of some hackers can be analyzed based on the characteristics of the live broadcast platform, so that some false gift information can be delivered to the clients of the hackers in the following period. The method for determining the hacker client by the live broadcast platform server comprises the following steps:
in order to obtain the income of the live broadcast platform, a hacker needs to log in a live broadcast room by a large number of account numbers, and the live broadcast platform server can search a large number of client sides corresponding to the account numbers under the same IP address by analyzing the IP addresses of the client sides of the account numbers to be used as the hacker client sides. Namely, the live broadcast platform server determines the IP address of each client of the live broadcast platform; if the number of the target clients with the same IP address is larger than a first threshold value, the live broadcast platform server determines that the target clients are hacker clients;
alternatively, the first and second electrodes may be,
for hackers to get all gift data of each live room of the live platform, an account must be entered in each live room, and an account must be within the live room for 24 hours each day that must last. For a normal user, when the main broadcast shows that the live broadcast room is a blank screen, normal audiences can quit the live broadcast room, accounts which do not quit and are online for 24 hours are suspicious accounts, and the client corresponding to the accounts is a hacker client. For normal users, the account numbers can be continuously switched to different live broadcast rooms for watching, the account numbers of hackers cannot be used for switching rooms, and once the rooms are switched, the gift messages are lost, the obtained gift messages are inaccurate, so that the hacker account numbers basically cannot have normal user behaviors such as room switching and the like. Namely, the live broadcast platform server determines the live broadcast room switching times and the online time length when each client of the live broadcast platform is online; and if the online time of the target client is greater than the second threshold and the live broadcast switching time is 0, determining that the target client is a hacker client.
Therefore, in the embodiment of the present application, there are various ways to determine the hacker client, and the details are not limited herein.
In addition, in order to make the income data acquired by hackers inaccurate, the live platform server can also generate false gift information for confusion. The specific implementation comprises the following steps: the method comprises the steps that an identification field is added in gift information and used for indicating whether the information is real gift information or false gift information, the identification field is pre-embedded in a code of a client before a client releases a version, after the client receives the gift information, the identification field of the gift information is judged firstly, if the information is the false gift information, the identification field is directly discarded without being displayed, and if the information is the real gift information, the identification field is displayed. In addition, in order to better conceal the identification field property, before the client releases the version, the live broadcast platform server negotiates with different clients to define a field, the negotiated identification fields of the different clients are different, and the identification field is modified every time a new client version is released, so that the live broadcast platform server needs to release different fields according to different client versions. For example, for windows7.0 version, the live platform server indicates whether the information is false through 1-bit field a, such as 1 indicating real gift information and 0 indicating false gift information; for windows8.0 version, the live platform server indicates whether or not there is false information through a 2-bit field B, e.g., 11 indicates real gift information and 00 indicates false gift information.
It will be appreciated that each modification of the identification field is to prevent a hacker from cracking the identification field and thereby circumventing the false gift message of this embodiment. If the hacker does not know that the false gift information is set, the total gift revenue obtained by the hacker client is an error.
104. The live broadcast platform server obtains the number of target gifts received by each group of live broadcast rooms within a preset time length, and determines a target delivery value corresponding to the number of the target gifts based on the incidence relation between the number of the gifts and the delivery value;
in the embodiment, after the hacker client is determined, false gift information is delivered to the hacker client, and the obtained revenue data of the hacker is wrong due to the false gift information obtained by the hacker client. In order to make the false gift information more authentic, the same false gift type and gift number may be delivered to hacker clients with the same IP address, so that the hackers are not easily aware of it. It can be understood that the false gift information is not easy to be found when the gift information is delivered in a large quantity, so that the live broadcast platform server can calculate the heat degree of the gift information, namely when the gift information received by the live broadcast room in a preset time length is greater than the initial delivery value of the false message, the false gift information is delivered to each client of the live broadcast room; and when the gift information received within the preset time length is smaller than the initial delivery value of the false information, the false gift information is not delivered to each client side of the live broadcast room.
In this embodiment, stepwise delivery multiples may be used, that is, the number of false gifts delivered is set to be different for each class, and in order not to generate regularity, a delivery range may be set and then a number may be randomly selected from the range data. The concrete implementation is as follows:
the live broadcast platform server obtains the starting Time and the current Time through a system function Time (), counts the number of received gifts from the starting Time, pauses the counting when the difference value between the current Time and the starting Time is preset Time length, and takes the number of the gifts counted when pausing as the number of target gifts, and the function implementation can be as follows:
firstly, obtaining a starting Time timestamp through a system function Time (), namely Uint64 timestamp ═ Time (); then setting a variable count for recording the number of gift messages, and initializing the variable count to 0, namely, intcount is 0; when receiving information, judging whether the information is gift information, if so, acquiring current of current time, calculating a difference elapse between the current time and the starting time, and if the elapse is greater than a preset time (such as 1000ms), restarting statistics, namely setting the starting time as the current time and setting the number of the current gifts as 0; if the elapse is less than the preset time length, when the received information is gift information, adding 1 to the value of the variable count until the elapse is equal to the preset time length, stopping the round of statistics, and performing the next round again. The function is implemented as follows:
Figure BDA0002186499200000101
Figure BDA0002186499200000111
wherein, message is used to indicate a message received, type is used to indicate the field type of the message, and gift is used to indicate that the message is gift information.
After counting the number of gifts received within a preset time, the live broadcast platform server determines the value range (num _ min, num _ max) of the target delivery value by the following formula:
num_max=(count-A)n*k;
num_min=(count-A)m*k;
wherein num _ max is used for representing the maximum value of the target delivery value, num _ min is used for representing the minimum value of the target delivery value, count is used for representing the number of target gifts, A, m and n are positive integers, A is a false message initial delivery value, n is larger than m, n is positively correlated with the number of the target gifts, and k is a constant used for representing a proportionality coefficient; in addition, different scaling factors may be set based on different live rooms. In practical application, if the number of target gifts in the live broadcast room is larger, the value of k may be smaller. For example, k may randomly take between 0.5 and 2 when count >500, and between 2 and 4 when 400< count < 500.
The value range of the target delivery value is obtained through the formula, the value range is positively correlated with the size of the target gift quantity exceeding the initial delivery value of the false message, namely, the larger the gift sending heat of the live broadcast room is, the more false gift information can be delivered, the more income data obtained by the hacker client can be confused, and the smaller the gift sending heat of the live broadcast room is, the less the delivered false gift information is, so as to avoid being doubted by the hacker client. Meanwhile, the value is randomly selected from the value range to serve as the target delivery value, so that a hacker is more difficult to find the rule, and the security threshold for acquiring the income data of the live broadcast platform is improved.
For the convenience of understanding, when the counted target gift number count is greater than 500, the smallest value of the target delivery value can be calculated by multiplying the square of the number of (count-500) by the scaling factor k, and the largest value of the target delivery value can be calculated by multiplying the cube of the number of (count-500) by the scaling factor k, which is specifically calculated as follows:
Switch(count){
Case count>500:{
Int num_min=(count-500)*(count-500)*k;
Int num_max=(count-500)*(count-500)*(count-500)*k;
}
when the counted target gift number count is greater than 400, the number of (count-500) is multiplied by a proportionality coefficient k to calculate the minimum value of the target delivery value, and the square of the number of (count-500) is multiplied by the proportionality coefficient k to calculate the maximum value of the target delivery value, which is specifically calculated as follows:
Case count>400:{
Int num_min=(count-500)*k;
Int num_max=(count-500)*(count-500)*k;
since the number of 400 gifts is less than the number of 500 gifts and the expansion factor is less than 500, the maximum data uses the square. Wherein, the proportionality coefficient k can be set based on different live broadcast rooms, and k can randomly take 2.0 to 4.0 direct data according to rooms.
After the value range (num _ min, num _ max) of the target delivery value is determined, an integer value is randomly selected in the value range of the target delivery value through a system function rand () as the target delivery value, and the specific function implementation comprises the following steps: intra — rand (num _ min, num _ max); where num is used to represent the target delivery value.
Therefore, after the target delivery value which is the false gift number needing to be delivered is obtained, the live broadcast platform server can deliver the false gift information of the target delivery value number to the hacker client.
105. Encrypting gift information by the live platform server;
in order to prevent a hacker from easily obtaining the gift information through a network protocol without passing through a client to ensure the security of the gift information, in this embodiment, the live broadcast platform server may encrypt the gift information and then send the encrypted gift information to each client, so that a threshold for the hacker to monitor the gift information may be further increased, and difficulty for the hacker to obtain the full amount of the gift information may be increased. In this embodiment, different encryption algorithms and keys are used based on different client types, so that the live broadcast platform server uses algorithms and keys with different strengths for different clients. The client type can comprise android client, Ios client, Windows client, WEB client and the like. The concrete implementation is as follows:
after the client logs in, the live broadcast platform server and the client negotiate a shared key based on an encryption algorithm, and subsequent information is encrypted and transmitted based on the key. For example, the key may be negotiated using an asymmetric algorithm, that is, the client generates a pair of client public and private keys, the live platform server generates a pair of server public and private keys, and then the client exchanges a public key with the live platform server, the client generates a shared key using a client private key and a server public key, the live platform server generates a shared key using a client public key and a server private key, and the shared key of the live platform server and the shared key of the client are the same. The specific implementation function is as follows:
generating a client private key, namely ClientPrivatekey ═ RandData, by using random data, wherein the ClientPrivatekey is used for representing the client private key; then, according to the client private key, an asymmetric algorithm Ecc is used to generate a client public key, namely clientpublic key ═ eccencryption. createpair (clientprivate key), wherein the clientpublic key is used to represent the client public key; similarly, the direct broadcast platform server adopts the same algorithm to generate a server private key serverpivatekey and a server public key ServerPublickey. After the generation, the live broadcast platform server sends a server public key ServerPublinkey to the client and receives a client public key ClientPublinkey sent by the client, the client and the live broadcast platform server respectively generate shared keys, and the function expression is as follows:
the client generates a shared key:
ShareKey=EccEncryption.CreateShareKey(ServerPublickey,ClientPrivatekey);
the live broadcast platform server generates a shared key:
ShareKey=EccEncryption.CreateShareKey(ClientPublickey,ServerPrivatekey);
after the live broadcast platform server generates a shared key, gift information is encrypted according to the shared key, and the specific functions are implemented as follows:
Encrypt_data=encrypt(gift_data,ShareKey);
wherein, gift _ Data is gift information, Encrypt () is an encryption interface, and Encrypt _ Data is used for representing the encrypted gift information. Therefore, the gift information encrypted based on the shared key is received by the client, and can be decrypted by the shared key to obtain the plaintext.
In this step, the live broadcast platform server encrypts the gift information and sends the encrypted gift information to each client, so that the threshold of a hacker for monitoring the gift information can be further improved, and the difficulty of the hacker for acquiring the full amount of gift information is increased.
106. The live broadcast platform server sends the false gift information of the target delivery value quantity to the hacker client in each grouped live broadcast room, and sends the corresponding gift information to all the clients in each grouped live broadcast room;
when the live broadcast platform server determines that gift information received by a grouping live broadcast room in a preset time length is larger than an initial delivery value of false information, the live broadcast platform server sends the false gift information of a target delivery value number to a hacker client in the grouping live broadcast room and sends corresponding gift information to all clients in each grouping live broadcast room, wherein all the clients comprise the hacker client and legal clients, and the gift information comprises repeated gift information.
Optionally, the gift information sent by the live broadcast platform server to all the clients may be gift information encrypted by using a shared key, and then the legal client may decrypt the encrypted gift information by using the negotiated shared key to obtain a plaintext after receiving the encrypted gift information, and the hacker client cannot decrypt the encrypted gift information if the hacker client does not know that the network protocol cannot generate the shared key, so that difficulty in obtaining the revenue data of the live broadcast platform by the hacker client is improved.
107. A legal client self-defines a display control;
108. and the legal client decrypts the gift information and displays the gift information.
It is contemplated that hackers may also take Hook from the display control of the gift information to obtain the gift information, thereby bypassing the encryption algorithm of the gift information. Because the control provided by the system stores all messages and the content of the messages in the attributes of the control and is easily acquired by a hacker, for the security of the gift information, a legal client side can display the gift information by using a customized display control instead, and the customized display control needs to be much secure from the security perspective and different from the control provided by the system, so that the difficulty of acquiring by the hacker is higher. The customized control can be understood as a display control corresponding to self-writing of a legal client, for example, the number display of the gift information is a text control, the system can provide a TextView control to display the text, and in this embodiment, the legal client can customize a TextView control to display the text, and simultaneously encrypt the file content stored in the control, and only decrypt and display the file content when displaying. It can be understood that since the display control is different among different types of clients, a set of display controls needs to be implemented independently among different types of clients. For example, for a windows platform, all the controls are implemented based on the windows, a window may be created, characters may be drawn on the window, and various events of the window may be composed, such as entering a text event, deleting the text event, the window acquiring a focus, and the like. Specifically, in the embodiment of the present application, the manner of customizing the display control by the legal client is as follows:
firstly, a legal client writes a class DataCenter, all data of the control provided by a system are different from the control provided by the system are in one control, for example, all displayed data and data content are in one control, the class DataCenter in the embodiment is used for storing the self-defined control in the text, including all data related to the control and handles of the control, the storage of the data and the use of the data are extracted, and the handles of the control are stored into the class DataCenter, namely a data center, so that the handles and the data in the system TextView are separated, and a hacker cannot acquire the related handles and the data from the system TextView. The specific function is implemented as follows:
Class DataCenter{
HWND_ParentWnd;
HWND_DynamicEdit;
HFONT_Font;
BYTE_RndKey;
String_textdata;
wherein the ParentWnd is used for storing a handle of a parent control of the control; the dynamic edit is used for storing a window handle of the user-defined control; the Font is used for storing the Font of the control; RndKey is used for further encryption key of data, and textdata is text data. It should be noted that if the number of the incoming gifts and the number are encrypted, the data stored in the variable is ciphertext, while the traditional control is written by the system itself, so that the data stored in the traditional control must be plaintext, and the data stored in the text can be in the form of ciphertext by using the custom control.
After the class DataCenter is defined, the incoming control handle is stored into this class.
CDataCenter(HWND ParentWnd,HWND DynamicEdit,HFONT Font){
_ParentWnd=ParentWnd;
_DynamicEdit=DynamicEdit;
_Font=Font;
It should be noted that, when the class data center is constructed, a key is also created for encrypting data, including first setting a seed for generating random data by using a srand () function, so as to make the data different each time, where the srand () function is an initialization function of a random number generator, and randomly generating a key by using a function rand (), so that the key generated by each control is different each time, and then obtaining text data by using a getdata () function and storing the text data by using a temporary variable, where the text data is encrypted data and only needs to be provided to plaintext data to be displayed when the plaintext data is displayed, and the specific implementation function is as follows:
::srand((unsigned)::time(NULL));
_RndKey=rand();。
String getdata(){
String temp=_textdata;
in addition, when text data needs to be displayed, the stored text data is decrypted to obtain a plaintext to be displayed, in this embodiment, a loop is used to decrypt each text data, and the function is implemented as follows:
Temp[i]^=_RndKey[i];
Temp=decrypt(temp,key);
Return temp;
}
Void setdata(string data){
Temp=data;
Temp[i]^=_RndKey[i];
}}}
it should be noted that the interface setdata is data set and stored, and when the gift information of the live broadcast platform server is received, the interface setdata is stored in the interface first, and secondary encryption storage is performed, and the key of the secondary encryption is the RndKey randomly generated each time.
Therefore, the constructor of the customized display control in the embodiment of the present application is as follows:
Class TextView:public Window,public DataCenter{TextView(string encryptdata):DataCenter(encryptdata){textdata=encryptdata;}
as can be seen by the construction function Class TextView, when a legal client constructs and displays a control, ciphertext characters of the control need to be transmitted in, and are simultaneously stored in the member variable textdata. In addition, in this embodiment, after the display control is customized, a method for responding to the display control is also provided, where the method for responding to the display control is similar to the method for responding to the system control, for example: focus is obtained by LRESULT onset focus (HWND) response, focus is released by LRESULT OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags) response button, mouse down is responded by LRESULT OnChar (UINT nChar, UINT nRepCnt, UINT nFlags), mouse down is responded by LRESULT onmouse button down (UINT nFlags, LONG XPos, LONG YPos), mouse etc., and details are not repeated herein.
In addition, for the drawn text of the customized display control, since the data of the customized display control is stored in a ciphertext manner from beginning to end and only a plaintext is transmitted during drawing, the data stored in the display control needs to be decrypted and drawn during drawing, so that the form of the ciphertext is used to the maximum extent, and a hacker cannot acquire plaintext data from the control through the display control. In this embodiment, the interface function OnPaint that the control finally draws may be customized to draw the content of the drawn text to the UI control, specifically including obtaining a window handle that displays the control, where the handle is stored in a class DataCenter, and a background color is set by a SetBkColor () function, a foreground color of a text is set by a SetTextColor () function, and then plaintext data textdata is obtained from the class DataCenter by a getdata () function, and then the text may be drawn by a DrawText () function, and the specific functions are implemented as follows:
LRESULT OnPaint();HDC hDC=BeginPaint(CDataCenter->DynamicEdit);
SetBkColor(hDC,dwBKColor);
SetTextColor(hDC,dwTextColor);
String tempdata=getdata(textdata);
DrawText(hDC,tempdata,tempdata.length(),&stRect,DT_LEFT|DT_VCENTER);
it should be noted that, after the rendering is completed, the temporary variable needs to be cleared immediately to prevent the temporary variable from storing decrypted data, including: assigning tempdata as an empty character string, and simultaneously setting the Font through a SelectObject () function because the Font is the Font _ Font acquired from the control center when acquiring the Font, and finally finishing the receipt through an EndPoint () function, wherein the specific functions are realized as follows:
tempdata=“”;
SelectObject(hDC,DataCenter->_Font);
EndPaint(Edit,&stPaint);
}}
in this step, since the display control displays the gift information based on the character string of the ciphertext, the hacker cannot acquire the plaintext data of the display control through the display control or the message function of the display control. Compared with the control provided by the traditional system, a hacker can easily acquire data from the control, and the customized display control in the step can prevent the hacker from finding the message distribution of the control and reading the data of the control to obtain the message and the number of gifts.
Therefore, after receiving the gift information delivered by the live broadcast platform server, if the gift information is sent after being encrypted by the live broadcast platform server, the legal client stores the gift information in the customized display control, and decrypts the gift information by using the shared key for display when the gift information needs to be displayed.
It should be noted that, if the gift information includes false gift information, the valid client confirms that the gift information is not true through the identifier of the false gift information, and directly performs discarding processing without displaying.
The method and the device provide a plurality of strategies including data encryption of gift information, addition of false fields to the gift information, repeated display in each group of live broadcast rooms according to the type and the value of the gift information and the like. Since the legal clients need to compile the analysis of the corresponding gift information and the display of the gift information before releasing the version, the live broadcast platform server cannot modify the functions of the legal clients once the functions of the legal clients are compiled, otherwise, the legal clients cannot parse the files to cause errors. From a security point of view, therefore, the legitimate client needs to have a hot update function, for example, using JS code or other hot update methods. After the legal client has the function of hot update, the live broadcast platform server can continuously change the analysis of the gift information and the field content at regular intervals, the client first receives a new JD code from the live broadcast platform server, and the new JS code contains the analysis of the new gift information. All the strategies of the embodiment can continuously update the strategies without releasing the client version, and the concealment and the safety are improved.
The embodiments of the present application are described above from the perspective of a method for obfuscating data, and the embodiments of the present application are described below from the perspective of a live platform server.
Referring to fig. 2, fig. 2 is a schematic diagram of an embodiment of a possible live platform server provided in an embodiment of the present application, where the live platform server specifically includes:
the grouping unit 201 is configured to group users in a live broadcast room to obtain a plurality of user groups, where the user groups correspond to respective grouping live broadcast rooms, and gift information displayed in the respective grouping live broadcast rooms is different;
a determining unit 202, configured to determine, according to a preset algorithm, duplicate gift information, where the duplicate gift information is displayed in at least two of the grouped live broadcast rooms; determining a hacker client and generating false gift information, wherein the false gift information comprises a target field used for indicating authenticity of the false gift information; obtaining the number of target gifts received by each group of live broadcast rooms within a preset time length, and determining a target delivery value corresponding to the number of the target gifts based on the incidence relation between the number of the gifts and the delivery value;
a transceiving unit 203, configured to send the false gift information of the target delivery value amount to the hacker client in each group of live broadcast rooms, and send corresponding gift information to all clients in each group of live broadcast rooms, so that the legitimate client displays the gift information through a customized display control, where all clients include the hacker client and the legitimate client, and the gift information includes the duplicate gift information.
Referring to fig. 3, fig. 3 is a schematic view of an embodiment of an electronic device according to an embodiment of the present disclosure.
As shown in fig. 3, an electronic device according to an embodiment of the present application includes a memory 310, a processor 320, and a computer program 311 stored in the memory 320 and executable on the processor 320, where the processor 320 executes the computer program 311 to implement the following steps: grouping users of the live broadcast rooms to obtain a plurality of user groups, wherein the user groups respectively correspond to all grouped live broadcast rooms, and gift information displayed by all the grouped live broadcast rooms is different; determining repeated gift information according to a preset algorithm, wherein the repeated gift information is displayed in at least two grouped live broadcasting rooms; determining a hacker client and generating false gift information, wherein the false gift information comprises a target field used for indicating authenticity of the false gift information; obtaining the number of target gifts received by each group of live broadcast rooms within a preset time length, and determining a target delivery value corresponding to the number of the target gifts based on the incidence relation between the number of the gifts and the delivery value; sending the false gift information of the target delivery value quantity to the hacker client in each group of live broadcast rooms, and sending corresponding gift information to all the clients in each group of live broadcast rooms, so that the legal clients display the gift information through a self-defined display control, wherein all the clients comprise the hacker client and the legal client, and the gift information comprises the repeated gift information.
Since the electronic device described in this embodiment is a device used for implementing a live broadcast platform server in this embodiment, based on the method described in this embodiment, a person skilled in the art can understand a specific implementation manner of the electronic device of this embodiment and various variations thereof, so that details of how to implement the method in this embodiment by the electronic device are not described here, and as long as the person skilled in the art implements the device used for implementing the method in this embodiment, the device belongs to the scope of the present application.
Referring to fig. 4, fig. 4 is a schematic diagram illustrating an embodiment of a computer-readable storage medium according to the present application.
As shown in fig. 4, the present embodiment provides a computer-readable storage medium 400, on which a computer program 411 is stored, the computer program 411 implementing the following steps when executed by a processor: grouping users of the live broadcast rooms to obtain a plurality of user groups, wherein the user groups respectively correspond to all grouped live broadcast rooms, and gift information displayed by all the grouped live broadcast rooms is different; determining repeated gift information according to a preset algorithm, wherein the repeated gift information is displayed in at least two grouped live broadcasting rooms; determining a hacker client and generating false gift information, wherein the false gift information comprises a target field used for indicating authenticity of the false gift information; obtaining the number of target gifts received by each group of live broadcast rooms within a preset time length, and determining a target delivery value corresponding to the number of the target gifts based on the incidence relation between the number of the gifts and the delivery value; sending the false gift information of the target delivery value quantity to the hacker client in each group of live broadcast rooms, and sending corresponding gift information to all the clients in each group of live broadcast rooms, so that the legal clients display the gift information through a self-defined display control, wherein all the clients comprise the hacker client and the legal client, and the gift information comprises the repeated gift information.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include such modifications and variations.

Claims (10)

1. A method for obfuscating data, the method being applied to the live broadcast field, the method comprising:
the live broadcast platform server groups users of the live broadcast rooms to obtain a plurality of user groups, wherein the user groups respectively correspond to all grouped live broadcast rooms, and gift information displayed by all the grouped live broadcast rooms is different;
the live broadcast platform server determines repeated gift information according to a preset algorithm, and the repeated gift information is displayed in at least two grouped live broadcast rooms;
the live broadcast platform server determines a hacker client and generates false gift information, wherein the false gift information comprises a target field, and the target field is used for indicating the authenticity of the false gift information;
the live broadcast platform server obtains the number of target gifts received by each group of live broadcast rooms within a preset time length, and determines a target delivery value corresponding to the number of the target gifts based on the incidence relation between the number of the gifts and the delivery value;
the live broadcast platform server sends the false gift information of the target delivery value quantity to the hacker client in each grouped live broadcast room, and sends corresponding gift information to all the clients in each grouped live broadcast room, so that the legal clients display the gift information through a self-defined display control, wherein all the clients comprise the hacker client and the legal clients, and the gift information comprises the repeated gift information.
2. The method as claimed in claim 1, wherein the step of the live broadcast platform server obtaining the target gift quantity received by each group of live broadcast rooms within a preset time length, and determining the target delivery value corresponding to the target gift quantity based on the association relationship between the gift quantity and the delivery value comprises:
the live broadcast platform server obtains a start Time and a current Time through a system function Time (), counts the number of received gifts from the start Time, pauses the counting when the difference value between the current Time and the start Time is the preset Time length, and takes the number of the gifts counted in the pausing as the number of the target gifts;
when the target gift number is larger than the initial delivery value of the false message, the live broadcast platform server determines the value range (num _ min, num _ max) of the target delivery value by the following formula:
num_max=(count-A)n*k
num_min=(count-A)m*k
the num _ max is used for representing a maximum value of the target delivery value, the num _ min is used for representing a minimum value of the target delivery value, the count is used for representing the number of the target gifts, both the A, m and the n are positive integers, the A is the initial delivery value of the false message, the n is larger than the m, the n is positively correlated with the number of the target gifts, and the k is a constant used for representing a proportionality coefficient;
and the live broadcast platform server randomly selects an integer value in the value range of the target delivery value through a system function rand () as the target delivery value.
3. The method of claim 1, wherein the determining, by the live platform server, duplicate gift information according to a preset algorithm comprises:
the live broadcast platform server judges whether the value of the gift information is greater than a value threshold value;
if so, the live broadcast platform server determines that the high-value gift information is the repeated gift information so as to display the high-value gift information in each grouped live broadcast room, wherein the high-value gift information is the gift information with the value larger than the value threshold value.
4. The method of claim 3, wherein the determining, by the live platform server, the duplicate gift information according to a preset algorithm comprises:
if the value of the gift information is smaller than the value threshold value, the live broadcast platform server acquires the type and the quantity of small-value gift information, wherein the small-value gift information is the gift information with the value smaller than the value threshold value;
the live broadcast platform server sorts the small-value gifts according to the gift values and sequentially stores the small-value gifts into a gift array;
and the live broadcast platform server determines the repeated gift information and the grouped live broadcast rooms to which the repeated gift information is delivered according to the room number, the current date, the type and the number of the small-value gift information of each grouped live broadcast room and the gift array.
5. The method of claim 4, wherein the determining, by the live platform server, the duplicate gift information and the group live room to which the duplicate gift information is delivered based on the room number of the group live rooms, the current date, the type and the number of the small value gift information comprises:
the live broadcast platform server calculates seed data through the following formula:
Seed=sha-128.create(roomid+Time+Gifttype_array+giftnum);
wherein the Seed is used for representing the Seed data, the roomid is used for representing a room number of the grouping live room, the Time is used for representing the current date, the Gifttype _ array is used for representing the gift array, and the Giftnum is used for representing the number of the small-value gift information;
the live broadcast platform server determines the gift type and the selection number of the repeated gift information according to the following formula:
Gitfttype x=Gifttype_array[seed[x-1]%giftnum];
Selectnum=seed[127]%giftnum;
wherein the Gitfttype x is used for representing the gift type of the repeated gift information, the Seed [ x-1] is used for representing the x-th bit data of the Seed, the Selectnum is used for representing the selection number, and the Seed [127] is used for representing the last bit data of the Seed;
the live broadcast platform server determines a packet live broadcast room to which the repeated gift information is delivered according to the following formula:
Team y=seed[y+100]%teamnum;
the Team y is used for representing each grouping live broadcast room, and the Team num is used for representing the total number of the groupings;
when the Team y is not equal to the Team y +1, the live broadcast platform server determines that the Team y +1 is a grouping live broadcast room where the repeated gift information is delivered, so that the gift information of which the gift type is Gitfttype x in the Team y is repeatedly displayed in the Team y + 1.
6. The method of claim 1, wherein the determining, by the live platform server, the hacker client comprises:
the live broadcast platform server determines the IP address of each client of the live broadcast platform;
if the number of target clients with the same IP address is larger than a first threshold value, the live broadcast platform server determines that the target clients are the hacker clients;
or the like, or, alternatively,
the live broadcast platform server determines the live broadcast room switching times and the online time length when each client of the live broadcast platform is online;
and if the online time of the target client is greater than a second threshold value and the number of times of switching the live broadcast rooms is 0, the live broadcast platform server determines that the target client is the hacker client.
7. The method of claim 1, wherein before the live platform server sends the target delivery value amount of false gift information to hacker clients in the respective packet live bays and sends corresponding gift information to all clients in the respective packet live bays, the method further comprises:
the live broadcast platform server generates a server public and private key pair, sends a server public key to the client and receives a client public key sent by the client;
the live broadcast platform server generates a shared key according to the client public key and a server private key;
and the live broadcast platform server encrypts the gift information according to the shared secret key.
8. A live platform server, comprising:
the grouping unit is used for grouping the users in the live broadcast rooms to obtain a plurality of user groups, the user groups respectively correspond to the grouped live broadcast rooms, and gift information displayed in the grouped live broadcast rooms is different;
the determining unit is used for determining repeated gift information according to a preset algorithm, and the repeated gift information is displayed in at least two grouped live broadcasting rooms; determining a hacker client and generating false gift information, wherein the false gift information comprises a target field used for indicating authenticity of the false gift information; obtaining the number of target gifts received by each group of live broadcast rooms within a preset time length, and determining a target delivery value corresponding to the number of the target gifts based on the incidence relation between the number of the gifts and the delivery value;
and the receiving and sending unit is used for sending the false gift information of the target delivery value quantity to the hacker client in each grouped live broadcast room and sending corresponding gift information to all the clients in each grouped live broadcast room, so that the legal clients display the gift information through a self-defined display control, wherein all the clients comprise the hacker client and the legal clients, and the gift information comprises the repeated gift information.
9. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of any of claims 1-7.
10. A computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 7.
CN201910816491.XA 2019-08-30 2019-08-30 Method and related device for obfuscating data Active CN112449204B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910816491.XA CN112449204B (en) 2019-08-30 2019-08-30 Method and related device for obfuscating data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910816491.XA CN112449204B (en) 2019-08-30 2019-08-30 Method and related device for obfuscating data

Publications (2)

Publication Number Publication Date
CN112449204A true CN112449204A (en) 2021-03-05
CN112449204B CN112449204B (en) 2022-09-09

Family

ID=74734111

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910816491.XA Active CN112449204B (en) 2019-08-30 2019-08-30 Method and related device for obfuscating data

Country Status (1)

Country Link
CN (1) CN112449204B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030236986A1 (en) * 2002-06-21 2003-12-25 Cronce Paul A. Protecting software from unauthorized use by converting source code modules to byte codes
CN101197679A (en) * 2008-01-04 2008-06-11 中兴通讯股份有限公司 User authentication method and system for preventing attack from refusal service
CN103888480A (en) * 2014-04-18 2014-06-25 北京奇虎科技有限公司 Cloud monitoring based network information security identification method and cloud device
CN107172006A (en) * 2017-03-22 2017-09-15 深信服科技股份有限公司 Detect the malicious method and device of wireless network
CN107770161A (en) * 2017-10-09 2018-03-06 武汉斗鱼网络科技有限公司 The method and device of brush present is prevented in a kind of live platform
US20180160158A1 (en) * 2016-12-06 2018-06-07 Bing Liu Method and system for live stream broadcast and content monetization
CN109067805A (en) * 2018-10-12 2018-12-21 武汉斗鱼网络科技有限公司 Anti- crawler method, apparatus, terminal and the readable medium of direct broadcasting room data
CN109768978A (en) * 2019-01-16 2019-05-17 武汉斗鱼鱼乐网络科技有限公司 A kind of method and relevant apparatus of obfuscated data
KR102327764B1 (en) * 2021-03-26 2021-11-18 가이아스 주식회사 Watt hour meter of smart metering for safety reinforced

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030236986A1 (en) * 2002-06-21 2003-12-25 Cronce Paul A. Protecting software from unauthorized use by converting source code modules to byte codes
CN101197679A (en) * 2008-01-04 2008-06-11 中兴通讯股份有限公司 User authentication method and system for preventing attack from refusal service
CN103888480A (en) * 2014-04-18 2014-06-25 北京奇虎科技有限公司 Cloud monitoring based network information security identification method and cloud device
US20180160158A1 (en) * 2016-12-06 2018-06-07 Bing Liu Method and system for live stream broadcast and content monetization
CN107172006A (en) * 2017-03-22 2017-09-15 深信服科技股份有限公司 Detect the malicious method and device of wireless network
CN107770161A (en) * 2017-10-09 2018-03-06 武汉斗鱼网络科技有限公司 The method and device of brush present is prevented in a kind of live platform
CN109067805A (en) * 2018-10-12 2018-12-21 武汉斗鱼网络科技有限公司 Anti- crawler method, apparatus, terminal and the readable medium of direct broadcasting room data
CN109768978A (en) * 2019-01-16 2019-05-17 武汉斗鱼鱼乐网络科技有限公司 A kind of method and relevant apparatus of obfuscated data
KR102327764B1 (en) * 2021-03-26 2021-11-18 가이아스 주식회사 Watt hour meter of smart metering for safety reinforced

Also Published As

Publication number Publication date
CN112449204B (en) 2022-09-09

Similar Documents

Publication Publication Date Title
CN107454441B (en) A kind of method, live streaming Platform Server and the computer readable storage medium of detection direct broadcasting room brush popularity behavior
CN108769067B (en) Authentication verification method, device, equipment and medium
CN111931253B (en) Data processing method, system, device and medium based on node group
Zheng et al. Secure and efficient proof of storage with deduplication
US7856100B2 (en) Privacy-preserving data aggregation using homomorphic encryption
CN109768978B (en) Method and related device for obfuscating data
CN111093097A (en) Stream media data encryption and decryption method and device, electronic equipment and storage medium
WO2019071859A1 (en) Method and apparatus for preventing gift swiping on live broadcast platform
JP5574402B2 (en) Distributed concealed data integration apparatus, distributed concealed data integration method, and distributed concealed data integration program
CN108197439A (en) A kind of file encrypting method, device and server
KR102154754B1 (en) Video Coding System with Patterned Null Frame
CN108229192B (en) File decryption method and device and client
TW201215110A (en) System and method for privacy-preserving advertisement selection
CN112685785A (en) Privacy-protecting infectious disease close contact person tracking method and system
CN109218837B (en) Method and equipment for displaying special effect of virtual gift
CN110222142A (en) A kind of topic distribution method and device
CN112449204B (en) Method and related device for obfuscating data
WO2019136860A1 (en) Method, apparatus, electronic device, and medium for determining legitimacy of following
US11695546B2 (en) Decoupled custom event system based on ephemeral tokens for enabling secure custom services on a digital audio stream
CN110380843B (en) Information processing method and related equipment
US20230208615A1 (en) Online-Streamer Image Model File Transmission in Co-Hosting During Livestreaming
CN108924089B (en) Client device identification method and device and client device
CN109412788A (en) Cloud storage method of controlling security and system are acted on behalf of in anti-quantum calculation based on public keys pond
CN113014956B (en) Video playing method and device
CN108712657B (en) Barrage verification method, computer equipment and storage medium

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