CN110022285B - Method and device for detecting user information and computer equipment - Google Patents

Method and device for detecting user information and computer equipment Download PDF

Info

Publication number
CN110022285B
CN110022285B CN201810015941.0A CN201810015941A CN110022285B CN 110022285 B CN110022285 B CN 110022285B CN 201810015941 A CN201810015941 A CN 201810015941A CN 110022285 B CN110022285 B CN 110022285B
Authority
CN
China
Prior art keywords
user
input control
monitoring
user input
data
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
CN201810015941.0A
Other languages
Chinese (zh)
Other versions
CN110022285A (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 CN201810015941.0A priority Critical patent/CN110022285B/en
Publication of CN110022285A publication Critical patent/CN110022285A/en
Application granted granted Critical
Publication of CN110022285B publication Critical patent/CN110022285B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3041Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is an input/output interface
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • 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/40Support for services or applications
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • 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/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds

Abstract

The embodiment of the invention provides a method, a device and computer equipment for detecting user information, wherein the method comprises the following steps: respectively establishing a plurality of monitoring interfaces for each user input control; registering each monitoring interface to an application platform; monitoring the trigger event of each user input control by using each monitoring interface respectively, and acquiring the input data of each user input control and the calling state information of a plurality of monitoring interfaces of each user input control; and encrypting the input data and the calling state information, and sending the encrypted input data and the encrypted calling state information to a live broadcast platform server so that the live broadcast platform server can detect user information according to the input data and the calling state information.

Description

Method and device for detecting user information and computer equipment
Technical Field
The invention belongs to the technical field of information processing, and particularly relates to a method and a device for detecting user information and computer equipment.
Background
With the development of the live broadcast platform, various activities can be developed, for example, a main broadcast can provide activities capable of receiving free 'fish balls' for watching in the live broadcast platform for a certain time, for example, the main broadcast can enjoy audiences, so that the audiences can perform activities such as robbing treasure boxes, and the audiences can send barrages to all audiences in the whole room.
A hacker can compile scripts to realize automatic fish ball robbing and treasure box robbing, and simultaneously can send advertisements in a bullet screen sending mode, although the live platform can carry out banning operation on users sending the advertisements, the hacker can register a large number of abnormal users in batches to continuously change the users to send bullet screen advertisements, and the order of the live platform is disturbed.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiments of the present invention provide a method, an apparatus and a computer device for detecting user information, which are used to solve the technical problem that in the prior art, a large number of abnormal users in a live broadcast platform send advertisement barrage, but the abnormal users who send barrage advertisements for the first time cannot be prohibited, so that the order of the live broadcast platform cannot be guaranteed.
The invention provides a method for detecting user information, which comprises the following steps:
respectively establishing a plurality of monitoring interfaces for each user input control;
registering each monitoring interface to an application platform;
monitoring the trigger event of each user input control by using each monitoring interface respectively, and acquiring the input data of each user input control and the calling state information of a plurality of monitoring interfaces of each user input control;
acquiring first random data;
splicing the current time stamp of the first random data;
calling the message digest algorithm MD5 to calculate the spliced data to acquire first private key data;
calling a pairing key generation interface to generate first public key data based on the first private key data;
generating shared key data based on the first public key data and second public key data generated by the server;
and encrypting the input data and the calling state information by using the shared secret key data, and sending the encrypted input data and the encrypted calling state information to a live broadcast platform server so that the live broadcast platform server can detect user information according to the input data and the calling state information.
In the foregoing solution, the respectively establishing a monitoring interface for each user input control includes:
respectively constructing a monitoring function for each user input control, and constructing a corresponding monitoring interface in each monitoring function;
and acquiring the type of each user input control, and setting the type of each user input control in a corresponding monitoring function.
In the foregoing solution, registering each listening interface in the application platform includes:
defining a variable for each user input control in the application platform;
and setting the monitoring function of each user input control in a corresponding variable.
In the foregoing solution, the user input control includes: user name input control, user password confirmation input control, user mailbox input control and user mobile phone number input control.
The present invention also provides an apparatus for detecting user information, the apparatus comprising:
the establishing unit is used for respectively establishing a plurality of monitoring interfaces for each user input control;
the registration unit is used for registering each monitoring interface to the application platform;
the monitoring unit is used for monitoring the trigger event of each user input control by using each monitoring interface respectively, and acquiring the input data of each user input control and the calling state information of a plurality of monitoring interfaces of each user input control;
an encryption unit configured to acquire first random data;
splicing the current time stamp of the first random data;
calling the message digest algorithm MD5 to calculate the spliced data to acquire first private key data;
calling a pairing key generation interface to generate first public key data based on the first private key data;
generating shared key data based on the first public key data and second public key data generated by the server;
encrypting the input data and the calling state information by using the shared secret key data;
and the sending unit is used for sending the encrypted input data and the encrypted calling state information to a live broadcast platform server so that the live broadcast platform server can detect user information according to the input data and the calling state information.
In the foregoing solution, the establishing unit is configured to:
respectively constructing a monitoring function for each user input control, wherein each monitoring function comprises three monitoring interfaces;
and acquiring the type of each user input control, and setting the type of each user input control in a corresponding monitoring function.
In the foregoing solution, the registration unit is configured to:
defining a variable for each user input control in the application platform;
and setting the monitoring function of each user input control in a corresponding variable.
In the foregoing solution, the user input control includes: user name input control, user password confirmation input control, user mailbox input control and user mobile phone number input control.
The invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, is capable of performing the method as described in any one of the above.
The present invention also provides a computer device for detecting user information, comprising:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein,
the memory stores program instructions executable by the processor, the processor being capable of performing the method as described in any one of the above.
The embodiment of the invention provides a method, a device and computer equipment for detecting user information, wherein the method comprises the following steps: respectively establishing a plurality of monitoring interfaces for each user input control; registering each monitoring interface to an application platform; monitoring the trigger event of each user input control by using each monitoring interface respectively, and acquiring the input data of each user input control and the calling state information of a plurality of monitoring interfaces of each user input control; acquiring first random data; splicing the current time stamp of the first random data; calling the message digest algorithm MD5 to calculate the spliced data to acquire first private key data; calling a pairing key generation interface to generate first public key data based on the first private key data; generating shared key data based on the first public key data and second public key data generated by the server; encrypting the input data and the calling state information by using the shared secret key data, and sending the encrypted input data and the encrypted calling state information to a live broadcast platform server so that the live broadcast platform server can detect user information according to the input data and the calling state information; in this way, after the live broadcast platform server receives the input data in each user input control, if the data input by the user is determined to be inconsistent with the personal account data registered in the live broadcast platform in advance by the user, the user is determined to be an abnormal user; or if the plurality of monitoring interfaces are determined not to be all called based on the calling state information, determining that the user is an abnormal user, so that even if the user is the user who sends the barrage advertisement for the first time, as long as the user input control has a trigger event, whether the user is the abnormal user can be detected according to the input data of the user and the calling state information of the plurality of monitoring interfaces, if the user is the abnormal user, the abnormal user is forbidden, and the order of the live broadcast platform is ensured.
Drawings
Fig. 1 is a schematic flowchart of a method for detecting user information according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an apparatus for detecting user information according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a computer device for detecting user information according to an embodiment of the present invention.
Detailed Description
In order to solve the technical problem that in the prior art, when a large number of abnormal users send advertisement banners in a live broadcast platform, the abnormal users who send the banners for the first time cannot be prohibited, so that the order of the live broadcast platform cannot be guaranteed, the invention provides a method, a device and computer equipment for detecting user information, wherein the method comprises the following steps: respectively establishing a plurality of monitoring interfaces for each user input control; registering each monitoring interface to an application platform; monitoring the trigger event of each user input control by using each monitoring interface respectively, and acquiring the input data of each user input control and the calling state information of a plurality of monitoring interfaces of each user input control; acquiring first random data; splicing the current time stamp of the first random data; calling the message digest algorithm MD5 to calculate the spliced data to acquire first private key data; calling a pairing key generation interface to generate first public key data based on the first private key data; generating shared key data based on the first public key data and second public key data generated by the server; and encrypting the input data and the calling state information by using the shared secret key data, and sending the encrypted input data and the encrypted calling state information to a live broadcast platform server so that the live broadcast platform server can detect user information according to the input data and the calling state information.
The technical solution of the present invention is further described in detail by the accompanying drawings and the specific embodiments.
Example one
The embodiment provides a method for detecting user information, which is applied to an application platform of a client, such as an android platform, and as shown in fig. 1, the method includes:
s101, respectively establishing a plurality of monitoring interfaces for each user input control;
in this step, the user input control includes: user name input control, user password confirmation input control, user mailbox input control and user mobile phone number input control. If the name, password and other information input by a normal user is consistent with the information during registration when the normal user logs in the live broadcast platform, whether the user is an abnormal user can be detected by monitoring each user input control.
Correspondingly, a plurality of monitoring interfaces need to be respectively established for each user input control, in this step, each user input control includes three monitoring interfaces, which are respectively:
listening interface before user input control text change: beforeTextChanged;
the monitoring interface when the user input control text changes: onTextChanged;
the user inputs the monitoring interface after the control text is changed: an afterTextChanged.
Specifically, a monitoring function MyTextWatcher is respectively constructed for each user input control, the type of each user input control is obtained, and the type of each user input control is set in the corresponding monitoring function. The three listening interfaces described above may be built into the function.
The code is implemented as follows:
public MyTextWatcher(int etype){
this.etype=etype;
}
the type of the user input control is the type of the user input control, for example, a monitoring function is currently established for the user input control with the user name, and then the type of the user input control with the user name is filled in the position of the type, and the building process of the monitoring functions of other user input controls is the same operation, and is not repeated here.
In addition, a variable needs to be defined in the monitoring function for each of the three monitoring interfaces, and the variable is initialized, where each variable is used to identify the call state information of the corresponding monitoring interface, and when the variable is not called, the variable value is false, and the initialized variables are as follows:
g_beforeTextChangedFlag=false;
g_afterTextChangedFlag=false;
g_onTextChangedFlag=false;
wherein the g _ beforeTextChangedFlag corresponds to a monitoring interface before the text of the user input control is changed; the g _ onTextChangedFlag corresponds to a monitoring interface when the text of the user input control is changed; the g _ affterxtChangedFlag user enters the listening interface after the control text changes.
S102, registering each monitoring interface into an application platform;
after a plurality of monitoring interfaces of each user input control are established, registering each monitoring interface into an application platform, and specifically implementing the following steps:
defining a variable for each user input control in the application platform; and setting the monitoring function of each user input control in a corresponding variable.
For example, for a user name input control, a variable EditText username is defined for the user name input control;
if the listener function mytextwatch 1 of the username input control sets the listener function mytextwatch 1 of the username input control in the variable editttext username, the code is implemented as follows:
username.addTextChangedListener(new MyTextWatcher1());
similarly, for a user password input control, a variable EditText password is defined for the user password input control;
assuming that the listening function mytextwatch 2 of the user password input control sets the listening function mytextwatch 1 of the user password input control in the variable editttext password2, the code is implemented as follows:
password.addTextChangedListener(new MyTextWatcher2());
if the user password confirms the listening function mytextwatch 3 of the input control, the listening function mytextwatch 3 of the user password confirming the input control is set in the variable EditText password2, and the code is implemented as follows:
password2.addTextChangedListener(new MyTextWatcher3());
if the listening function mytextwatch 4 of the user mailbox input control sets the listening function mytextwatch 4 of the user password confirmation input control in the variable editttext email, the code is implemented as follows:
email.addTextChangedListener(new MyTextWatcher4());
this completes the registration of each listening interface.
S103, monitoring the trigger event of each user input control by using each monitoring interface respectively, and acquiring the input data of each user input control and the calling state information of a plurality of monitoring interfaces of each user input control;
after the monitoring interfaces complete registration, the monitoring interfaces are utilized to monitor the trigger events of each user input control respectively, and the input data of each user input control and the calling state information of the monitoring interfaces of each user input control are obtained.
For example, if a user inputs information in the user input control, the corresponding trigger event is an input event, and the input event is monitored through the monitoring interface corresponding to the user input control, which is specifically as follows:
firstly, when an input event occurs, a listening interface before a user inputs a control text to change is called, and at the moment, a variable g _ beforeTextChangedFlag is true; the code is implemented as follows:
@Override
public void beforeTextChanged(CharSequence s,int start,int count,int after){
g_beforeTextChangedFlag=true;
}
then, the information input by the user is obtained through the monitoring interface onTextChanged when the text of the user input control is changed, which is specifically realized as follows:
@Override
public void onTextChanged(CharSequence s,int start,int before,int count){
g_onTextChangedFlag=true;
String text=String.valueOf(s);
g_input_text=text;
}
specifically, a String interface valueOf is called to obtain an input character String text, and the content input by the current user is obtained in the interface, and the input character String is stored in a preset global variable g _ input _ text.
And finally, finishing the monitoring by calling a monitoring interface after the text of the user input control is changed, wherein the code is realized as follows:
@Override
public void afterTextChanged(Editable s)
g_afterTextChangedFlag=true;
}
s104, acquiring first random data; splicing the current time stamp of the first random data; calling the message digest algorithm MD5 to calculate the spliced data to acquire first private key data; calling a pairing key generation interface to generate first public key data based on the first private key data; generating shared key data based on the first public key data and second public key data generated by the server; encrypting the input data and the calling state information by using the shared secret key data;
after data input by a user in a user input control and calling state information of each monitoring interface are obtained, encrypting the input data and the calling state information, wherein the specific encryption mode is as follows:
calling a function Randdata ═ rand () to obtain first random data;
splicing the current time stamp of the first random data; here, the concatenation may be performed in a plurality of concatenation manners, for example, concatenation may be performed in a manner of first random data + current timestamp.
Calling the message digest algorithm ClientPrivatekey (Md 5.Create + TimeStamp) to calculate the spliced data to obtain first private key data, wherein the first private key is the calculated MD5 value; the Randdata is first random data, and the TimeStamp is a current TimeStamp.
Based on the first private key data, calling and generating a pairing key interface ClientPublinkey RSA. CreatePair (ClientPrivatekey); generating first public key data; the client thus generates a pair of public and private key data.
Similarly, the server generates the second public key data and the second private key data according to the same method, which is not described herein again.
Generating shared secret key data based on the first public key data and second public key data generated by the server; specifically, the client and the server exchange public key information with each other, and then encrypt the first public key data and the second public key data by using an asymmetric encryption algorithm RSA to generate the shared key data.
Here, the client uses the function ShareKey1 — rsa.createsharekey (ServerPublickey, ClientPrivatekey); first shared key data ShareKey1 is generated.
The server then uses the function ShareKey2 rsa. createsharekey (ClientPublickey, ServerPrivatekey); second shared key data ShareKey2 is generated.
The first shared key data ShareKey1 and the second shared key data ShareKey2 should be the same.
The first shared key data or the second shared key data is used to encrypt the input data and the call state information, and in this embodiment, the DES encryption algorithm is used to encrypt the input data and the call state information, which is implemented as follows:
EncryptData=DES.encrypt(g_beforeTextChangedFlag+
g_afterTextChangedFlag+g_onTextChangedFlag+text,ShareKey);
and S105, sending the encrypted input data and the encrypted calling state information to a live broadcast platform server so that the live broadcast platform server can detect user information according to the input data and the calling state information.
After encryption is completed, the encrypted input data and the encrypted calling state information are sent to a live broadcast platform server, so that the live broadcast platform server can detect user information according to the input data and the calling state information.
Specifically, the server decrypts the data after receiving the data; when the server does not receive the input data in each user input control, namely the data is null, the abnormal user of the user can be directly determined; or after receiving the input data in each user input control, if the input data is determined to be inconsistent with the information registered by the user in advance, determining that the user is an abnormal user; or if the received input data is not complete (the data of all the user input controls are not received), determining that the user is an abnormal user; in addition, if the monitoring interfaces of each user input control are not all called, the user is determined to be an abnormal user, so that whether the abnormal user sends the advertisement bullet screen for the first time or not can be detected, and if the abnormal user is determined, the abnormal user is forbidden, and the order of the live broadcast platform is ensured.
Example two
The present embodiment provides an apparatus for detecting user information, as shown in fig. 2, the apparatus includes: the device comprises a building unit 21, a registration unit 22, a monitoring unit 23, an encryption unit 24 and a sending unit 25; wherein the content of the first and second substances,
the establishing unit 21 is configured to establish a plurality of monitoring interfaces for each user input control; wherein the user input control comprises: user name input control, user password confirmation input control, user mailbox input control and user mobile phone number input control. If the name, password and other information input by a normal user is consistent with the information during registration when the normal user logs in the live broadcast platform, whether the user is an abnormal user can be detected by monitoring each user input control.
The establishing unit 21 needs to establish a plurality of monitoring interfaces for each user input control, in this step, each user input control includes three monitoring interfaces, which are:
listening interface before user input control text change: beforeTextChanged;
the monitoring interface when the user input control text changes: onTextChanged;
the user inputs the monitoring interface after the control text is changed: an afterTextChanged.
Specifically, the establishing unit 21 establishes a monitoring function mytextwatch for each user input control, obtains the type of each user input control, and sets the type of each user input control in the corresponding monitoring function. The three listening interfaces described above may be built into the function.
The code is implemented as follows:
public MyTextWatcher(int etype){
this.etype=etype;
}
the type of the user input control is the type of the user input control, for example, a monitoring function is currently established for the user input control with the user name, and then the type of the user input control with the user name is filled in the position of the type, and the building process of the monitoring functions of other user input controls is the same operation, and is not repeated here.
In addition, the establishing unit 21 further needs to define a variable for each of the three monitoring interfaces in the monitoring function, and initialize the variable, where each variable is used to identify the call state information of the corresponding monitoring interface, and when the variable is not called, the variable value is false, and the initialized variables are as follows:
g_beforeTextChangedFlag=false;
g_afterTextChangedFlag=false;
g_onTextChangedFlag=false;
wherein the g _ beforeTextChangedFlag corresponds to a monitoring interface before the text of the user input control is changed; the g _ onTextChangedFlag corresponds to a monitoring interface when the text of the user input control is changed; the g _ affterxtChangedFlag user enters the listening interface after the control text changes.
After the plurality of listening interfaces of each user input control are established, the registering unit 22 is configured to register each listening interface in the application platform, and the specific implementation is as follows:
defining a variable for each user input control in the application platform; and setting the monitoring function of each user input control in a corresponding variable.
For example, for a user name input control, a variable EditText username is defined for the user name input control;
if the listener function mytextwatch 1 of the username input control sets the listener function mytextwatch 1 of the username input control in the variable editttext username, the code is implemented as follows:
username.addTextChangedListener(new MyTextWatcher1());
similarly, for a user password input control, a variable EditText password is defined for the user password input control;
assuming that the listening function mytextwatch 2 of the user password input control sets the listening function mytextwatch 1 of the user password input control in the variable editttext password2, the code is implemented as follows:
password.addTextChangedListener(new MyTextWatcher2());
if the user password confirms the listening function mytextwatch 3 of the input control, the listening function mytextwatch 3 of the user password confirming the input control is set in the variable EditText password2, and the code is implemented as follows:
password2.addTextChangedListener(new MyTextWatcher3());
if the listening function mytextwatch 4 of the user mailbox input control sets the listening function mytextwatch 4 of the user password confirmation input control in the variable editttext email, the code is implemented as follows:
email.addTextChangedListener(new MyTextWatcher4());
this completes the registration of each listening interface.
After the monitoring interfaces complete registration, the monitoring unit 23 is configured to monitor the trigger event of each user input control by using each monitoring interface, and obtain input data of each user input control and call state information of the monitoring interfaces of each user input control.
For example, if a user inputs information in the user input control, the corresponding trigger event is an input event, and the monitoring unit 23 monitors the input event through the monitoring interface corresponding to the user input control, which is specifically as follows:
firstly, when an input event occurs, a listening interface before a user inputs a control text to change is called, and at the moment, a variable g _ beforeTextChangedFlag is true; the code is implemented as follows:
@Override
public void beforeTextChanged(CharSequence s,int start,int count,int after){
g_beforeTextChangedFlag=true;
}
then, the monitoring unit 23 obtains the information input by the user through the monitoring interface onTextChanged when the text of the user input control changes, which is specifically implemented as follows:
@Override
public void onTextChanged(CharSequence s,int start,int before,int count){
g_onTextChangedFlag=true;
String text=String.valueOf(s);
g_input_text=text;
}
the listening unit 23 specifically calls the String interface value to obtain the input character String text, and obtains the content input by the current user in the interface, where the input character String is stored in the preset global variable g _ input _ text.
And finally, finishing the monitoring by calling a monitoring interface after the text of the user input control is changed, wherein the code is realized as follows:
@Override
public void afterTextChanged(Editable s)
g_afterTextChangedFlag=true;
}
after acquiring data input by a user in the user input control and the call state information of each monitoring interface, the encryption unit 24 is configured to encrypt the input data and the call state information; the specific encryption method is as follows:
the encryption unit 24 calls a function Randdata ═ rand () to acquire first random data;
splicing the current time stamp of the first random data; here, the concatenation may be performed in a plurality of concatenation manners, for example, concatenation may be performed in a manner of first random data + current timestamp.
And calling the message digest algorithm ClientPrivatekey (Md 5.Create + TimeStamp) to calculate the spliced data to obtain first private key data, wherein the first private key is the calculated MD5 value.
Based on the first private key data, calling and generating a pairing key interface ClientPublinkey RSA. CreatePair (ClientPrivatekey); generating first public key data; the client thus generates a pair of public and private key data.
Similarly, the server generates the second public key data and the second private key data according to the same method, which is not described herein again.
The encryption unit 24 generates shared key data based on the first public key data and the second public key data generated by the server; specifically, the client and the server exchange public key information with each other, and then encrypt the first public key data and the second public key data by using an asymmetric encryption algorithm RSA to generate the shared key data.
The encryption unit 24 uses the function ShareKey1 rsa. createsharekey (ServerPublickey, ClientPrivatekey); first shared key data ShareKey1 is generated.
The server then uses the function ShareKey2 rsa. createsharekey (ClientPublickey, ServerPrivatekey); second shared key data ShareKey2 is generated.
The first shared key data ShareKey1 and the second shared key data ShareKey2 should be the same.
The encryption unit 24 encrypts the input data and the call state information by using the first shared key data or the second shared key data, and in this embodiment, the input data and the call state information are encrypted by using a DES encryption algorithm, which is implemented as follows:
EncryptData=DES.encrypt(g_beforeTextChangedFlag+
g_afterTextChangedFlag+g_onTextChangedFlag+text,ShareKey);
after the encryption is completed, the sending unit 25 is configured to send the encrypted input data and the encrypted call state information to a live broadcast platform server, so that the live broadcast platform server can detect user information according to the input data and the call state information.
Specifically, the server decrypts the data after receiving the data; when the server does not receive the input data in each user input control, namely the data is null, the abnormal user of the user can be directly determined; or after receiving the input data in each user input control, if the input data is determined to be inconsistent with the information registered by the user in advance, determining that the user is an abnormal user; or if the received input data is not complete (the data of all the user input controls are not received), determining that the user is an abnormal user; in addition, if the monitoring interfaces of each user input control are not all called, the user is determined to be an abnormal user, so that whether the abnormal user sends the advertisement bullet screen for the first time or not can be detected, and if the abnormal user is determined, the abnormal user is forbidden, and the order of the live broadcast platform is ensured.
EXAMPLE III
The embodiment further provides a computer device for detecting user information, as shown in fig. 3, the computer device includes: radio Frequency (RF) circuitry 310, memory 320, input unit 330, display unit 340, audio circuitry 350, WiFi module 360, processor 370, and power supply 380. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 3 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components.
The following describes the components of the computer device in detail with reference to fig. 3:
RF circuitry 310 may be used for receiving and transmitting signals, and in particular, for receiving downlink information from base stations and processing the received downlink information to processor 370. In general, the RF circuit 310 includes, but is not limited to, at least one Amplifier, transceiver, coupler, Low Noise Amplifier (LNA), duplexer, and the like.
The memory 320 may be used to store software programs and modules, and the processor 370 may execute various functional applications of the computer device and data processing by operating the software programs and modules stored in the memory 320. The memory 320 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, and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 320 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 volatile solid state storage device.
The input unit 330 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the computer apparatus. Specifically, the input unit 330 may include a keyboard 331 and other input devices 332. The keyboard 331 can collect the input operation of the user thereon and drive the corresponding connection device according to a preset program. The keyboard 331 collects the output information and sends it to the processor 370. The input unit 330 may include other input devices 332 in addition to the keyboard 331. In particular, other input devices 332 may include, but are not limited to, one or more of a touch panel, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 340 may be used to display information input by a user or information provided to the user and various menus of the computer device. The Display unit 340 may include a Display panel 341, and optionally, the Display panel 341 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the keyboard 331 may cover the display panel 341, and when the keyboard 331 detects a touch operation on or near the keyboard 331, the keyboard 331 transmits the touch event to the processor 370 to determine the type of the touch event, and then the processor 370 provides a corresponding visual output on the display panel 341 according to the type of the input event. Although the keyboard 331 and the display panel 341 are shown in fig. 3 as two separate components to implement input and output functions of the computer device, in some embodiments, the keyboard 331 and the display panel 341 may be integrated to implement input and output functions of the computer device.
Audio circuitry 350, speaker 351, microphone 352 may provide an audio interface between a user and a computer device. The audio circuit 350 may transmit the electrical signal converted from the received audio data to the speaker 351, and the electrical signal is converted into a sound signal by the speaker 351 and output;
WiFi belongs to short-distance wireless transmission technology, and computer equipment can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 360, and provides wireless broadband internet access for the user. Although fig. 3 shows the WiFi module 360, it is understood that it does not belong to the essential constitution of the computer device, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 370 is a control center of the computer device, connects various parts of the entire computer device using various interfaces and lines, performs various functions of the computer device and processes data by operating or executing software programs and/or modules stored in the memory 320 and calling data stored in the memory 320, thereby monitoring the computer device as a whole. Alternatively, processor 370 may include one or more processing units; preferably, the processor 370 may be integrated with an application processor, wherein the application processor primarily handles operating systems, user interfaces, application programs, and the like.
The computer device also includes a power supply 380 (such as a power adapter) for powering the various components, which may preferably be logically connected to the processor 370 through a power management system.
The method, the device and the computer equipment for detecting the user information provided by the embodiment of the invention have the advantages that at least:
the embodiment of the invention provides a method, a device and computer equipment for detecting user information, wherein the method comprises the following steps: respectively establishing a plurality of monitoring interfaces for each user input control; registering each monitoring interface to an application platform; monitoring the trigger event of each user input control by using each monitoring interface respectively, and acquiring the input data of each user input control and the calling state information of a plurality of monitoring interfaces of each user input control; acquiring first random data; splicing the current time stamp of the first random data; calling the message digest algorithm MD5 to calculate the spliced data to acquire first private key data; calling a pairing key generation interface to generate first public key data based on the first private key data; generating shared key data based on the first public key data and second public key data generated by the server; encrypting the input data and the calling state information by using the shared secret key data, and sending the encrypted input data and the encrypted calling state information to a live broadcast platform server so that the live broadcast platform server can detect user information according to the input data and the calling state information; therefore, when the server does not receive the input data in each user input control, the abnormal user of the user can be directly determined; or after receiving the input data in each user input control, if the input data is determined to be inconsistent with the information registered by the user in advance, determining that the user is an abnormal user; or if the data reported by all the user input controls are not received, determining that the user is an abnormal user; in addition, if the plurality of monitoring interfaces of each user input control are not all called, the user is determined to be an abnormal user, whether the abnormal user sends the advertisement bullet screen for the first time or not can be detected, if the abnormal user is determined, the abnormal user is forbidden, and the order of the live broadcast platform is ensured.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components of a gateway, proxy server, system according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on a computer-readable storage medium or may be in the form of one or more signals. Such a signal may be downloaded from an internet website, or provided on a carrier signal, or provided in any other form; the program when executed by a processor implements the steps of: respectively establishing a plurality of monitoring interfaces for each user input control; registering each monitoring interface to an application platform; monitoring the trigger event of each user input control by using each monitoring interface respectively, and acquiring the input data of each user input control and the calling state information of a plurality of monitoring interfaces of each user input control; acquiring first random data; splicing the current time stamp of the first random data; calling the message digest algorithm MD5 to calculate the spliced data to acquire first private key data; calling a pairing key generation interface to generate first public key data based on the first private key data; generating shared key data based on the first public key data and second public key data generated by the server; and encrypting the input data and the calling state information by using the shared secret key data, and sending the encrypted input data and the encrypted calling state information to a live broadcast platform server so that the live broadcast platform server can detect user information according to the input data and the calling state information.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements, etc. that are within the spirit and principle of the present invention should be included in the present invention.

Claims (10)

1. A method for detecting user information, the method comprising:
respectively establishing a plurality of monitoring interfaces for each user input control;
registering each monitoring interface to an application platform;
monitoring the trigger event of each user input control by using each monitoring interface respectively, and acquiring the input data of each user input control and the calling state information of a plurality of monitoring interfaces of each user input control;
acquiring first random data;
splicing the current time stamp of the first random data;
calling the message digest algorithm MD5 to calculate the spliced data to acquire first private key data;
calling a pairing key generation interface to generate first public key data based on the first private key data;
generating shared key data based on the first public key data and second public key data generated by the server;
encrypting the input data and the calling state information by using the shared secret key data, and sending the encrypted input data and the encrypted calling state information to a live broadcast platform server so that the live broadcast platform server can detect user information according to the input data and the calling state information; wherein the content of the first and second substances,
and if the monitoring interfaces of each user input control are not all called, determining that the user is an abnormal user.
2. The method of claim 1, wherein establishing a listening interface for each user input control separately comprises:
respectively constructing a monitoring function for each user input control, and constructing a corresponding monitoring interface in each monitoring function;
and acquiring the type of each user input control, and setting the type of each user input control in a corresponding monitoring function.
3. The method of claim 2, wherein registering each listening interface into the application platform comprises:
defining a variable for each user input control in the application platform;
and setting the monitoring function of each user input control in a corresponding variable.
4. The method of claim 1, wherein the user input control comprises: user name input control, user password confirmation input control, user mailbox input control and user mobile phone number input control.
5. An apparatus for detecting user information, the apparatus comprising:
the establishing unit is used for respectively establishing a plurality of monitoring interfaces for each user input control;
the registration unit is used for registering each monitoring interface to the application platform;
the monitoring unit is used for monitoring the trigger event of each user input control by using each monitoring interface respectively, and acquiring the input data of each user input control and the calling state information of a plurality of monitoring interfaces of each user input control;
an encryption unit configured to acquire first random data;
splicing the current time stamp of the first random data;
calling the message digest algorithm MD5 to calculate the spliced data to acquire first private key data;
calling a pairing key generation interface to generate first public key data based on the first private key data;
generating shared key data based on the first public key data and second public key data generated by the server;
encrypting the input data and the calling state information by using the shared secret key data;
the sending unit is used for sending the encrypted input data and the encrypted calling state information to a live broadcast platform server so that the live broadcast platform server can detect user information according to the input data and the calling state information; wherein the content of the first and second substances,
and if the monitoring interfaces of each user input control are not all called, determining that the user is an abnormal user.
6. The apparatus of claim 5, wherein the establishing unit is to:
respectively constructing a monitoring function for each user input control, wherein each monitoring function comprises three monitoring interfaces;
and acquiring the type of each user input control, and setting the type of each user input control in a corresponding monitoring function.
7. The apparatus of claim 5, wherein the registration unit is to:
defining a variable for each user input control in the application platform;
and setting the monitoring function of each user input control in a corresponding variable.
8. The apparatus of claim 5, wherein the user input control comprises: user name input control, user password confirmation input control, user mailbox input control and user mobile phone number input control.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, is able to carry out the method according to any one of claims 1 to 4.
10. A computer device for detecting user information, comprising:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein,
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 4.
CN201810015941.0A 2018-01-08 2018-01-08 Method and device for detecting user information and computer equipment Active CN110022285B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810015941.0A CN110022285B (en) 2018-01-08 2018-01-08 Method and device for detecting user information and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810015941.0A CN110022285B (en) 2018-01-08 2018-01-08 Method and device for detecting user information and computer equipment

Publications (2)

Publication Number Publication Date
CN110022285A CN110022285A (en) 2019-07-16
CN110022285B true CN110022285B (en) 2021-09-07

Family

ID=67187537

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810015941.0A Active CN110022285B (en) 2018-01-08 2018-01-08 Method and device for detecting user information and computer equipment

Country Status (1)

Country Link
CN (1) CN110022285B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103259919A (en) * 2013-02-01 2013-08-21 广州网视通信息科技有限公司 Method for overlapping scrolling subtitles on mobile phone real-time monitoring videos
CN103684765A (en) * 2013-12-24 2014-03-26 歌尔声学股份有限公司 Method and device for ciphering and deciphering data in management system
CN104486205A (en) * 2014-12-17 2015-04-01 沈文策 Information interaction method and device
CN105468374A (en) * 2015-11-26 2016-04-06 Tcl集团股份有限公司 Realization method and system for calendar and time controls of intelligent device
CN105516820A (en) * 2015-12-10 2016-04-20 腾讯科技(深圳)有限公司 Barrage interaction method and device
CN105939485A (en) * 2016-06-27 2016-09-14 武汉斗鱼网络科技有限公司 System and method for monitoring bullet screen service availability based on user bullet screen behaviors
CN106201817A (en) * 2016-06-21 2016-12-07 微梦创科网络科技(中国)有限公司 Dynamic Display content monitor method, system and device
CN107451852A (en) * 2017-06-23 2017-12-08 武汉斗鱼网络科技有限公司 The live promotion method and server using APP of third party in a kind of live platform
CN110020529A (en) * 2018-01-08 2019-07-16 武汉斗鱼网络科技有限公司 It is a kind of for detecting the method, apparatus and computer equipment of user information

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103259919A (en) * 2013-02-01 2013-08-21 广州网视通信息科技有限公司 Method for overlapping scrolling subtitles on mobile phone real-time monitoring videos
CN103684765A (en) * 2013-12-24 2014-03-26 歌尔声学股份有限公司 Method and device for ciphering and deciphering data in management system
CN104486205A (en) * 2014-12-17 2015-04-01 沈文策 Information interaction method and device
CN105468374A (en) * 2015-11-26 2016-04-06 Tcl集团股份有限公司 Realization method and system for calendar and time controls of intelligent device
CN105516820A (en) * 2015-12-10 2016-04-20 腾讯科技(深圳)有限公司 Barrage interaction method and device
CN106201817A (en) * 2016-06-21 2016-12-07 微梦创科网络科技(中国)有限公司 Dynamic Display content monitor method, system and device
CN105939485A (en) * 2016-06-27 2016-09-14 武汉斗鱼网络科技有限公司 System and method for monitoring bullet screen service availability based on user bullet screen behaviors
CN107451852A (en) * 2017-06-23 2017-12-08 武汉斗鱼网络科技有限公司 The live promotion method and server using APP of third party in a kind of live platform
CN110020529A (en) * 2018-01-08 2019-07-16 武汉斗鱼网络科技有限公司 It is a kind of for detecting the method, apparatus and computer equipment of user information

Also Published As

Publication number Publication date
CN110022285A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
CN112733107B (en) Information verification method, related device, equipment and storage medium
CN111193695B (en) Encryption method and device for third party account login and storage medium
US10880746B2 (en) Network connection method, apparatus, storage medium and terminal
CN110417543B (en) Data encryption method, device and storage medium
CN104836664B (en) A kind of methods, devices and systems executing business processing
CN110198301B (en) Service data acquisition method, device and equipment
CN104580167B (en) A kind of methods, devices and systems transmitting data
CN106302325B (en) The methods, devices and systems of specified communication service are provided
CN108920366B (en) Sub-application debugging method, device and system
CN110427738B (en) Resource distribution method, device, equipment and storage medium
CN107154935B (en) Service request method and device
CN105096157A (en) Virtual article receiving method, sending method, interaction method and device
US10454905B2 (en) Method and apparatus for encrypting and decrypting picture, and device
CN104598263A (en) Application program operation method and configuration file generating method and device
CN108763876B (en) Resource copyright checking method, device and equipment
CN106709282B (en) resource file decryption method and device
CN109768977A (en) Streaming medium data processing method, device and relevant device and medium
CN109257793A (en) Method for connecting network, device, equipment and storage medium
CN108011879A (en) File encryption, method, apparatus, equipment and the storage medium of decryption
CN104954126A (en) Sensitive operation verification method, device and system
CN114553612B (en) Data encryption and decryption method and device, storage medium and electronic equipment
CN110020529B (en) Method and device for detecting user information and computer equipment
CN104639394A (en) Statistical method, device and system for number of users of client
CN110022285B (en) Method and device for detecting user information and computer equipment
CN108737341B (en) Service processing method, terminal and server

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