WO2021218341A1 - 网页模拟输入检测方法、装置、计算机设备及存储介质 - Google Patents

网页模拟输入检测方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2021218341A1
WO2021218341A1 PCT/CN2021/078157 CN2021078157W WO2021218341A1 WO 2021218341 A1 WO2021218341 A1 WO 2021218341A1 CN 2021078157 W CN2021078157 W CN 2021078157W WO 2021218341 A1 WO2021218341 A1 WO 2021218341A1
Authority
WO
WIPO (PCT)
Prior art keywords
event
behavior data
web page
monitoring
preset
Prior art date
Application number
PCT/CN2021/078157
Other languages
English (en)
French (fr)
Inventor
李海斌
Original Assignee
深圳壹账通智能科技有限公司
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 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2021218341A1 publication Critical patent/WO2021218341A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • H04L63/1483Countermeasures against malicious traffic service impersonation, e.g. phishing, pharming or web spoofing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1416Event detection, e.g. attack signature detection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Definitions

  • This application relates to the field of network security technology, and in particular to a webpage analog input detection method, device, computer equipment, and storage medium.
  • the embodiments of the present application provide a webpage analog input detection method, device, computer equipment, and storage medium, aiming to solve the problem of a web page being attacked by an illegal network, causing a sharp increase in network IO traffic and causing a server to be paralyzed.
  • an embodiment of the present application provides a webpage simulation input detection method, which is applied to a terminal, and includes: receiving an instruction from a user to open a webpage page to send a webpage request for opening the webpage page to a server; The web page returned by the server, wherein a page kit for collecting user behavior data is embedded in the web page; the page kit is loaded to add preset monitoring events to the page elements in the web page, wherein, the monitoring event includes a mouse move in event, a mouse move out event, a mouse click event, a keyboard down event, a keyboard up event, and a focus event; the behavior data of the user is collected, and the event information that triggers the monitoring event is recorded in In the behavior data, the event information includes the time from when the monitoring event is triggered to the loading of the web page; the behavior data is sent to the server so that the server can perform according to the behavior data Determine whether the webpage has an analog input behavior.
  • the embodiment of the present application provides a webpage simulation input detection method, which is applied to a server, which includes: receiving a webpage request from a terminal for opening a webpage page; embedding a webpage suite for collecting user behavior data To the web page and send the web page to the terminal, so that the terminal collects the behavior data of the user; receives the behavior data of the user sent by the terminal, and determines whether the behavior data is Whether there is a monitoring event, where the monitoring event includes a mouse move in event, a mouse move out event, a mouse click event, a keyboard down event, a keyboard up event, and a focus event; if the monitoring event exists in the behavior data, it is determined Whether the event information corresponding to the monitoring event complies with preset rules or determining whether the similarity between the behavior data and the preset behavior data is less than a preset threshold, wherein the event information includes the distance when the monitoring event is triggered The time when the web page is loaded, the preset behavior data is obtained by clustering multiple behavior data collected on
  • an embodiment of the present application also provides a webpage simulation input detection device, which includes: a request sending unit configured to receive an instruction from a user to open a webpage page to send a webpage request for opening the webpage page to a server;
  • the receiving unit is configured to receive the web page returned by the server, wherein a page package for collecting user behavior data is embedded in the web page;
  • the loading unit is configured to load the page package to compare the web page
  • the page elements in the page add preset monitoring events, where the monitoring events include mouse move in events, mouse move out events, mouse click events, keyboard down events, keyboard up events, and focus events;
  • the collection unit is used to collect User behavior data, and record event information that triggers the monitoring event into the behavior data, where the event information includes the time from when the monitoring event is triggered to the loading of the web page;
  • a sending unit It is used to send the behavior data to the server so that the server determines whether the webpage has an analog input behavior according to the behavior data.
  • an embodiment of the present application also provides a webpage simulation input detection device, which includes: a request receiving unit, configured to receive a web page request from a terminal for opening a web page; an embedding unit, configured to collect user The page suite of behavior data of the user is embedded in the web page and the web page is sent to the terminal, so that the terminal collects the user’s behavior data; the first judging unit is configured to receive the terminal sent Of the user’s behavior data, determine whether there is a monitoring event in the behavior data, where the monitoring event includes a mouse move in event, a mouse move out event, a mouse click event, a keyboard down event, a keyboard up event, and a focus event The second determining unit is used to determine whether the event information corresponding to the monitoring event meets preset rules or determine the similarity between the behavior data and the preset behavior data if the monitoring event exists in the behavior data Whether it is less than a preset threshold, wherein the event information includes the time from when the monitoring event is triggered until the web page is loaded
  • the behavior data is obtained after clustering; the first determining unit is configured to: if the event information corresponding to the monitoring event does not meet the preset rule or the similarity between the behavior data and the preset behavior data is less than the preset Threshold, it is determined that the web page has an analog input behavior.
  • the embodiments of the present application also provide a computer device, including a memory, a processor, and a computer program stored on the memory and running on the processor, wherein the processor executes the The computer program executes the webpage analog input detection method as described in the first aspect above.
  • the embodiments of the present application also provide a computer device, including a memory, a processor, and a computer program stored on the memory and running on the processor, wherein the processor executes the The computer program executes the web page analog input detection method as described in the second aspect above.
  • the embodiments of the present application also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes The webpage analog input detection method described in the first aspect.
  • the embodiments of the present application also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to execute The webpage analog input detection method described in the second aspect.
  • the event information corresponding to the monitoring event is further determined Whether it meets the preset rules or the similarity between the calculated behavior data and the preset behavior data, if the event information corresponding to the monitored event does not meet the preset rules or the similarity is less than the preset threshold, it can be determined that the web page has an analog input behavior. It can accurately detect the analog input behavior of the webpage, effectively prevent the server from being attacked, and ensure the security and reliability of the server.
  • FIG. 1 is a schematic diagram of an application scenario of a webpage analog input detection method provided by an embodiment of the application
  • FIG. 2 is a schematic flowchart of a method for detecting webpage analog input provided by an embodiment of the application
  • FIG. 3 is a schematic flowchart of a method for detecting webpage analog input provided by another embodiment of the application.
  • FIG. 4 is a schematic flowchart of a method for detecting webpage analog input provided by another embodiment of this application.
  • FIG. 5 is a schematic block diagram of a webpage analog input detection device provided by an embodiment of the application.
  • FIG. 6 is a schematic block diagram of a webpage analog input detection device provided by another embodiment of the application.
  • FIG. 7 is a schematic block diagram of a webpage analog input detection device provided by another embodiment of the application.
  • FIG. 8 is a schematic block diagram of a computer device provided by an embodiment of the application.
  • FIG. 1 is a schematic diagram of an application scenario of a webpage analog input detection method provided by an embodiment of the application.
  • FIG. 2 is a schematic flowchart of a method for detecting webpage analog input provided by an embodiment of the application.
  • the webpage simulation input detection method is applied to the terminal 10 and the server 20, and is realized through the interaction between the terminal 10 and the server 20.
  • FIG. 2 is a schematic flowchart of a method for detecting webpage analog input provided by an embodiment of the present application. As shown in the figure, the method includes the following steps S110-S150. This method is applied to the terminal 10.
  • S110 Receive an instruction from a user to open a web page to send a web page request for opening the web page to the server.
  • the server refers to the background server of the webpage
  • the terminal is the end of the user browsing the webpage
  • the webpage request refers to the request to open the webpage, that is, the HTTP request.
  • the webpage is opened through the browser, that is, the terminal receives the user's instruction to open the webpage, and the terminal sends the webpage request to the server, requesting the server to return the webpage corresponding to the webpage request.
  • the server For example, login page, registration page.
  • the substantial form of the page suite is a JS suite, which is pre-set for collecting user behavior data.
  • the user's behavior data refers to the user's operation data under the web page, such as mouse moving in, moving out, and clicking, keyboard pressing and lifting, and focus acquisition.
  • the server After receiving the web page request sent by the terminal, the server embeds the page package into the web page request, and then returns the web page corresponding to the web page request to the terminal.
  • the terminal receives the web page embedded with the page suite returned by the server.
  • page elements refer to controls on the page, such as buttons, input boxes, and links.
  • Monitoring events refers to events that monitor user actions. Among them, monitoring events include mouse move in event, mouse move out event, mouse click event, keyboard down event, keyboard up event and focus event.
  • the mouse over event is the mouse over event.
  • the mouse over event refers to the information that the mouse moves in. For example, when the user enters information on the page, he will use the mouse to click on an input box. At this time, the mouse over event is triggered, and its function is to detect the input box. Or whether the button has a mouse moving event, so that it can be judged whether it is a real user operating it.
  • the mouse out event is the mouse out event.
  • the mouse out event refers to the mouse out of information. For example, when the user enters multiple information on the page, the user needs to use the mouse to click on different input boxes, and the mouse out event will be triggered when the input box is switched. , Its function is to detect whether the mouse out event of the input box or button occurs, so that it can be judged whether it is a real user operating.
  • the mouse click event is the mouse click event.
  • the mouse click event refers to the mouse click information. For example, when the user enters information on the page, the user will use the mouse to click on an input box, and the mouse click event is triggered at this time, and its role is to detect the input box Or whether the button has a mouse click event, so that it can be judged whether it is a real user operating it.
  • the keyboard down event is the key down event.
  • the key down event refers to the keyboard down information. For example, when the user logs in on the page, he will use the keyboard to enter the user name, password, verification code and other information. At this time, the key down event is triggered. Its function is to detect whether a keyboard press event occurs when the input box is input, so that it can be judged whether it is a real user operating.
  • the keyboard up event is the key up event.
  • the key up event refers to the keyboard up information. For example, when the user logs in on the page, he will use the keyboard to input user name, password, verification code and other information, and key up will be triggered every time a character is input. Event, its function is to detect whether there is a keyboard up event occurred when the input box is input, so that it can be judged whether it is a real user operating.
  • the focus event is the onfocus event.
  • the onfocus event refers to whether the page element has focus information. For example, when the user enters information in the page text box, the text box will get the focus, and the onfocus event is triggered at this time, and its role is to detect the input box Or whether the button has a focus event, so that it can be judged whether the user is operating.
  • S140 Collect user behavior data, and record event information that triggers the monitoring event into the behavior data, where the event information includes the time until the web page is loaded when the monitoring event is triggered.
  • the user's behavior data is collected.
  • the user will operate the page elements in the webpage when browsing the webpage.
  • the event information when the monitoring event is triggered is recorded in the collected behavior data.
  • the operation behaviors that trigger the monitoring event include moving the mouse in, moving in, and clicking on the page element, pressing the keyboard, lifting the page element, and obtaining the focus of the page element.
  • Event information is the information recorded at the moment when the user's operation behavior triggers the monitoring event, which includes the time from when the monitoring event is triggered until the web page is loaded.
  • Event information is used to assist in determining whether there is an analog input behavior on a web page. Even if an illegal network attack method triggers a monitoring event, the analog input behavior of the web page can be further detected through the event information to improve the detection accuracy.
  • the user's behavior data is sent to the server, and the server determines whether the webpage is operated by a real user or a simulated input behavior of a machine operation based on the user's behavior data. If the behavior data received by the server does not contain the event information recorded when the monitoring event is triggered, it means that the user's operation behavior while browsing the webpage did not trigger the monitoring event. Without the monitoring event triggered, it is impossible for the real user to browse the webpage. It can be directly determined that the webpage has analog input behavior.
  • FIG. 3 is a schematic flowchart of a method for detecting webpage analog input according to another embodiment of the present application.
  • the webpage analog input detection method of this embodiment includes steps S210-S250. This method is applied to the server 20.
  • S210 Receive a web page request from the terminal for opening a web page.
  • the user opens the webpage through the browser when browsing the webpage, the terminal sends the webpage request to the backend server, and the server receives the webpage request.
  • S220 Embed a page kit for collecting user behavior data into the web page and send the web page to the terminal, so that the terminal collects the user's behavior data.
  • the substantial form of the page suite is a JS suite, which is pre-set for collecting user behavior data.
  • the server After receiving the web page request, the server embeds the page package into the web page corresponding to the web page request, and then returns the web page embedded with the page package to the terminal.
  • S230 Receive the user's behavior data sent by the terminal, and determine whether there is a monitoring event in the behavior data, where the monitoring event includes a mouse move in event, a mouse move out event, a mouse click event, a keyboard press event, Keyboard up event and focus event.
  • the monitoring event includes a mouse move in event, a mouse move out event, a mouse click event, a keyboard press event, Keyboard up event and focus event.
  • the server receives user behavior data collected by the terminal.
  • the user behavior data is the user's operation data under the web page, such as mouse movement in, out, and click, keyboard pressing and lifting, and focus Get etc.
  • Monitoring events refers to events that monitor user actions.
  • the user's operation behavior triggers the monitoring event to be recorded in the behavior data, so by judging whether there is a monitoring event in the behavior data, it is determined whether the web page is operated by a real user or a simulated input behavior of a machine operation.
  • the monitoring event exists in the behavior data, determine whether the event information corresponding to the monitoring event meets a preset rule, where the event information includes the distance from the web page loading when the monitoring event is triggered time.
  • event information is used to assist in determining whether the webpage is operated by a real user.
  • Event information is the information recorded at the moment when the user's operation behavior triggers the monitoring event.
  • the preset rules refer to a series of rules for real user operation behaviors. It is determined whether the webpage has an analog input behavior operated by the machine based on whether the event information meets the preset rules.
  • the step S240 includes: steps S241-S242.
  • S241 Determine whether the time between loading of the web page when the monitoring event is triggered exceeds a preset time.
  • the time when the web page is loaded is the time when the user opens the web page.
  • the preset time is 0.5 seconds.
  • the real operation of the user is to open the web page and then operate it through the mouse or keyboard. This process takes several seconds, and if it is the analog input of the machine, it only needs milliseconds. Therefore, it is possible to determine whether the preset rule is met by the time from when the monitoring event is triggered until the web page is loaded. For example, when a user registers an account, the user usually needs to enter personal registration information, such as user name, password, email address, mobile phone number, etc.
  • Each monitoring event triggered by the user during the account registration process is extremely short and does not exceed The preset time, and the real user operation usually takes a few minutes to fill in all the registration information, indicating that it is obviously a batch registration operation of the machine and does not meet the preset rules.
  • the event information further includes the mouse coordinate position
  • the step S240 includes: steps S243-S244.
  • the event information of the mouse coordinate position is also recorded when the monitoring event is triggered.
  • the actual operation of the user is to open the web page and then move the mouse to the page element or click the page element to perform the operation. If it is a machine's analog input, it does not need to move to the page element or click on the page element to operate. Therefore, it is judged by the coordinate position of the mouse when the monitoring event is triggered.
  • the coordinate position of the mouse when the monitoring event is triggered is within the range of the page element, it means that it belongs to the operation of the real user and conforms to the preset rules; if the monitoring event is triggered The coordinate position of the mouse is not within the range of the page element, indicating that it is a machine operation and does not conform to the preset rules. For example, when a user registers an account, the mouse must be moved to the user name input box to enter the user name. If the coordinate position of the mouse is not within the coordinate range of the input box when the monitoring event is triggered, it is obviously a machine operation and does not comply with Preset rules.
  • the event information further includes the position of the focus
  • the step S240 includes: steps S245-S246.
  • S245 Determine whether the focus position is on the target page element when the monitoring event is triggered.
  • the target page element refers to the page element that is added to monitor the event, and the page element of the focus event is distinguished by id. If the monitoring event includes a focus event, the event information of the focus position is also recorded when the monitoring event is triggered. Usually the real operation of the user is to open the web page and then move the mouse to the page element to obtain the focus before performing the operation. If it is the analog input of the machine, the operation can be performed without obtaining the focus of the target page element. Therefore, it is judged whether the focus position is on the target page element when the monitoring event is triggered.
  • the focus position is on the target page element when the monitoring event is triggered, it means that the operation belongs to the real user and conforms to the preset rules; if the event is monitored When triggered, the focus position is not on the target page element, indicating that it is a machine operation and does not meet the preset rules. For example, when a user registers an account, he must enter the password to get the focus of the password input box. The password input box is the target page element. If the focus is not on the password input box when the focus event is triggered, such as the user name input box , It is obviously a machine operation and does not comply with the preset rules.
  • the user's behavior data is collected to detect whether the webpage has an analog input behavior. Firstly, determine whether there is a monitoring event in the behavior data. If there is no monitoring event, it can be directly determined that the webpage has an analog input behavior; if there is a monitoring event, the event information recorded when the monitoring event is triggered is further used to determine whether the event information meets the preset rules , If it does not meet the preset rules, it is determined that there is an analog input behavior on the web page.
  • the user behavior data when a user registers an account, usually the user needs to enter personal registration information, such as user name, password, email address, mobile phone number, etc., then the user behavior data must include the keyboard press and keyboard up events, if the user is logged in The account did not trigger the keyboard press and keyboard up events, indicating that it was not an operation behavior of a real user, and there was an analog input behavior.
  • the time to load the web page when the keyboard press and keyboard up events are triggered is only 0.1 seconds, which does not exceed the preset time and does not comply with the preset rules , Which means that it is not the operation behavior of real users, but the behavior of analog input exists.
  • the server can obtain the terminal's IP address when receiving the terminal's web page request.
  • illegal network attacks will frequently launch attacks within a period of time. For example, batch registration of accounts will frequently initiate account registration requests to the server in a short period of time, and the server's IO traffic will increase sharply in a short period of time.
  • the IP address is forbidden to initiate a request to the server to access the webpage, and the webpage request of the IP address is forcibly redirected to the 404 page, thereby preventing the server from being attacked.
  • other methods are also possible, such as setting a whitelisted IP address.
  • the webpage simulation input detection method shown in the embodiment of the present application embeds a page kit for collecting user behavior data in the web page to determine whether there is a monitoring event in the collected behavior data, and further determine if there is a monitoring event in the behavior data Whether the event information corresponding to the monitoring event meets the preset rules, if there is no monitoring event in the behavior data or the event information corresponding to the monitoring event does not meet the preset rules, it can be determined that the web page has analog input behavior, which can realize the simulation of the accurate detection of the web page Input behavior, effectively prevent the server from being attacked, and ensure the security and reliability of the server.
  • the webpage analog input detection method includes steps S210-S270.
  • S210 Receive a web page request from the terminal for opening a web page.
  • S220 Embed a page kit for collecting user behavior data into the web page and send the web page to the terminal, so that the terminal collects the user's behavior data.
  • steps S210-S230 are the same as the foregoing embodiment, and will not be repeated here.
  • the k-means algorithm is a clustering algorithm.
  • clustering refers to dividing data objects with a higher degree of similarity into the same cluster according to the principle of similarity. Data objects are divided into different clusters. Specifically, the k-means algorithm first randomly selects K objects (sentence vectors) as the initial cluster centers (initial centroids), and then calculates the distance between each object and each seed cluster center, and assigns each object Give the cluster center closest to it; the cluster center and the objects assigned to them represent a cluster.
  • the cluster center of the cluster will be recalculated based on the existing objects in the cluster; this process It will continue to repeat until a certain termination condition is met, such as the local minimum sum of squared errors, so as to divide the objects into different clusters. Since the location of k initialized centroids has a great impact on the final clustering results and running time, if it is only a completely random selection, it may cause the algorithm to converge very slowly. Therefore, in order to select the appropriate k centroids, This solution uses the K-Means++ algorithm, which is an optimization of the K-Means method of randomly initializing the centroid.
  • K cluster centers are selected, and run the traditional k-means algorithm according to the selected K cluster centers.
  • the value of K is 1, because the purpose of using the clustering model in this embodiment is to obtain behavior data of real users, and finally to obtain a behavior data set of real users, which includes behavior data of multiple real users.
  • the preset behavior data is the behavior data in the set, and there are multiple preset behavior data. Specifically, the preset behavior data is obtained from the collection, and the similarity calculation is performed one by one according to the behavior data and the preset behavior data obtained from the collection. Specifically, the cosine distance between the behavior data and the preset behavior data is calculated.
  • the cosine distance uses the cosine value of the angle between two vectors in the vector space as a measure of the difference between two individuals.
  • the cosine distance is Indicates the similarity between the behavior data and the preset behavior data. The closer the cosine value is to 1, the higher the similarity, and the smaller the cosine value, the lower the similarity.
  • the similarity between the behavior data and each preset behavior data in the collection is calculated one by one, and the cosine value with the highest similarity is taken as the similarity between the behavior data and the preset behavior data taken from the collection.
  • the similarity between the behavior data and the preset behavior data is compared with the preset threshold. If the similarity between the behavior data and the preset behavior data is greater than the preset threshold, it means that the behavior data is true. The behavior of the user; if the similarity between the behavior data and the preset behavior data is less than the preset threshold, it means that the behavior data is a machine behavior, and the webpage has an analog input behavior. For example, if the similarity between the behavior data and the preset behavior data is 0.3, and the preset threshold is 0.8, then it is determined that the webpage has an analog input behavior.
  • the user's behavior data is collected to detect whether the webpage has an analog input behavior. First, determine whether there is a monitoring event in the behavior data. If there is no monitoring event, it can be directly determined that the webpage has an analog input behavior. Because real user behavior must trigger the monitoring time, and if there is no monitoring time in the behavior data, it can be directly determined that the webpage has an analog input behavior.
  • the webpage simulation input detection method shown in the embodiment of this application embeds a page kit for collecting user behavior data in the web page to determine whether there is a monitoring event in the collected behavior data, and if there is a monitoring event in the behavior data, further calculation is performed
  • the similarity between the behavior data and the preset behavior data is used to determine whether the similarity is less than a preset threshold. If the similarity between the behavior data and the preset behavior data is less than the preset threshold, it can be determined that the web page exists
  • the analog input behavior can accurately detect the analog input behavior of the webpage, effectively prevent the server from being attacked, and ensure the security and reliability of the server.
  • FIG. 5 is a schematic block diagram of a webpage analog input detection device 300 provided by an embodiment of the present application.
  • the present application also provides a webpage analog input detection device 300.
  • the webpage simulation input detection device 300 includes a unit for executing the above-mentioned webpage simulation input detection method, and the device can be configured in a desktop computer, a tablet computer, a laptop computer, and other terminals.
  • the webpage analog input detection device 300 includes a request sending unit 310, a receiving unit 320, a loading unit 330, a collecting unit 340, and a sending unit 350.
  • the request sending unit 310 is configured to receive an instruction from a user to open a web page to send a web page request for opening the web page to the server.
  • the receiving unit 320 is configured to receive the web page returned by the server, wherein a page package for collecting user behavior data is embedded in the web page.
  • the loading unit 330 is configured to load the page suite to add preset monitoring events to page elements in the web page, where the monitoring events include mouse move in events, mouse move out events, mouse click events, and keyboard presses Events, keyboard up events, and focus events.
  • the collection unit 340 is configured to collect user behavior data and record the event information that triggers the monitoring event into the behavior data, where the event information includes the distance from the web page when the monitoring event is triggered. Time of entry.
  • the sending unit 350 is configured to send the behavior data to the server so that the server determines whether the webpage has an analog input behavior according to the behavior data.
  • FIG. 6 is a schematic block diagram of a webpage analog input detection device 400 provided by an embodiment of the present application.
  • the present application also provides a webpage simulation input detection device 400.
  • the webpage simulation input detection device 400 includes a unit for executing the above-mentioned webpage simulation input detection method, and the device may be configured in the server 20.
  • the webpage analog input detection device 400 includes a request receiving unit 410, an embedding unit 420, a first judging unit 430, a second judging unit 440, and a first judging unit 450.
  • the request receiving unit 410 is configured to receive a web page request from the terminal for opening a web page.
  • the embedding unit 420 is configured to embed a page suite for collecting user behavior data into the web page and send the web page to the terminal, so that the terminal collects the user's behavior data.
  • the first determining unit 430 is configured to receive the behavior data of the user sent by the terminal, and determine whether there is a monitoring event in the behavior data, wherein the monitoring event includes a mouse move in event, a mouse move out event, and a mouse click event , Keyboard down event, keyboard up event and focus event.
  • the monitoring event includes a mouse move in event, a mouse move out event, and a mouse click event , Keyboard down event, keyboard up event and focus event.
  • the second determining unit 440 is configured to determine whether the event information corresponding to the monitoring event meets a preset rule if the monitoring event exists in the behavior data, wherein the event information includes the distance when the monitoring event is triggered The time when the web page is loaded.
  • the second judging unit 440 includes: a first judging subunit and a first judging subunit.
  • the first judging subunit is used to judge whether the time from the web page loading when the monitoring event is triggered exceeds a preset time
  • the first determining subunit is configured to determine that the event information corresponding to the monitoring event does not meet the preset rule if the time from the web page loading when the monitoring event is triggered does not exceed a preset time.
  • the second judging unit 440 includes: a second judging subunit and a second judging subunit.
  • the second judging subunit is used to judge whether the coordinate position of the mouse is within the coordinate range corresponding to the page element when the monitoring event is triggered.
  • the second determination subunit is configured to determine that the event information corresponding to the monitoring event does not meet the preset rule if the coordinate position of the mouse is not within the coordinate range corresponding to the page element when the monitoring event is triggered.
  • the second judging unit 440 includes: a third judging subunit and a third judging subunit.
  • the third judging subunit is used for judging whether the focus position is on the target page element when the monitoring event is triggered.
  • the third determination subunit is configured to determine that the event information corresponding to the monitoring event does not meet the preset rule if the focus position is not on the target page element when the monitoring event is triggered.
  • the first determining unit 450 is configured to determine that the web page has an analog input behavior if the event information corresponding to the monitoring event does not meet the preset rule.
  • the webpage analog input detection device 400 further includes: a third judgment unit 460.
  • the third determining unit 460 is configured to determine whether the similarity between the behavior data and the preset behavior data is less than a preset threshold if there is a monitoring event in the behavior data, wherein the preset behavior data is collected through aggregation
  • the class model is obtained after clustering multiple behavior data collected on the web page.
  • the third determining unit 470 is configured to determine that the web page has an analog input behavior if the similarity between the behavior data and the preset behavior data is less than a preset threshold.
  • the second determining unit 480 is configured to determine that there is an analog input behavior in the web page if there is no monitoring event in the behavior data.
  • the above-mentioned webpage analog input detection device can be implemented in the form of a computer program, and the computer program can be run on a computer device as shown in FIG. 8.
  • the computer device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
  • the non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032.
  • the processor 502 can execute the webpage analog input detection method.
  • the processor 502 is used to provide calculation and control capabilities, and support the operation of the entire computer device 500.
  • the internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503.
  • the processor 502 can execute the webpage simulation input detection method.
  • the network interface 505 is used for network communication, such as providing data information transmission.
  • the specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
  • the processor 502 is configured to run a computer program 5032 stored in a memory to implement any embodiment of the above-mentioned webpage analog input detection method.
  • the processor 502 may be a central processing unit (Central Processing Unit, CPU), and the processor 502 may also be other general-purpose processors 502, or digital signal processors 502 (Digital Signal Processors, DSPs). ), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor 502 may be a microprocessor 502 or the processor 502 may also be any conventional processor 502 and the like.
  • the computer program may be stored in a storage medium, and the storage medium may be a computer-readable storage medium.
  • the computer program is executed by at least one processor in the computer system to implement the process steps of the foregoing method embodiment.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the storage medium stores a computer program, which, when executed by a processor, implements any embodiment of the above-mentioned webpage analog input detection method.
  • the computer-readable storage medium may be a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a magnetic disk, or an optical disk, etc., which can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请实施例公开了一种网页模拟输入检测方法、装置、计算机设备及存储介质。所述方法通过在网页页面中嵌入用于采集用户的行为数据的页面套件,判断采集的行为数据中是否存在监听事件,若行为数据中存在监听事件则进一步地判断监听事件对应的事件信息是否符合预设规则或者判断行为数据与预设行为数据之间的相似度是否小于预设阈值,若监听事件对应的事件信息不符合预设规则或者行为数据与预设行为数据之间的相似度小于预设阈值,则可判定网页页面存在模拟输入行为。本申请应用于安全防护中的访问控制领域,涉及智慧城市的建设。通过实施本申请可准确识别网页的模拟输入,有效地防止服务器被攻击,保证服务器的安全性和可靠性。

Description

网页模拟输入检测方法、装置、计算机设备及存储介质
本申请要求于2020年04月28日提交中国专利局、申请号为202010352223.X,发明名称为“网页模拟输入检测方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及网络安全技术领域,尤其涉及一种网页模拟输入检测方法、装置、计算机设备及存储介质。
背景技术
随着互联网的发展,互联网已深入到人们的生活中,人们对互联网依赖的程度越来越高。因此,互联网的网络安全愈发被重视,尤其是人们日常生活中使用频率最高的浏览器网页的安全问题。目前,存在恶意的网络用户采用非法的网络攻击手段攻击网页的安全,例如,批量注册、批量登录,或者是通过自动输入枚举账号,以测试账号的真实性,从而非法获取用户资料。发明人发现这些非法的网络攻击手段会导致网络IO流量很大,对服务器产生巨大压力,造成服务器瘫痪。
发明内容
本申请实施例提供了一种网页模拟输入检测方法、装置、计算机设备及存储介质,旨在解决相关技术中网页遭到非法网络攻击造成网络IO流量剧增,导致服务器瘫痪的问题。
第一方面,本申请实施例提供了一种网页模拟输入检测方法,应用于终端中,其包括:接收用户打开网页页面的指令以向服务器发送用于打开所述网页页面的网页请求;接收所述服务器返回的所述网页页面,其中,所述网页页面中嵌入了用于采集用户行为数据的页面套件;加载所述页面套件以对所述网页页面中的页面元素添加预设的监听事件,其中,所述监听事件包括鼠标移入事件、鼠标移出事件、鼠标点击事件、键盘按下事件、键盘抬起事件以及焦点事件;采集用户的行为数据,并将触发所述监听事件的事件信息记录到所述行为数据中,其中,所述事件信息包括所述监听事件被触发时距离所述网页页面载入的时间;将所述行为数据发送至所述服务器以使所述服务器根据所述行为数据判断所述网页是否存在模拟输入的行为。
第二方面,本申请实施例提供了一种网页模拟输入检测方法,应用于服务器中,其包括:接收来自终端用于打开网页页面的网页请求;将用于采集用户的行为数据的页面套件嵌入至所述网页页面中并将所述网页页面发送至所述终端,以使所述终端采集用户的所述行为数据;接收所述终端发送的用户的所述行为数据,判断所述行为数据中是否存在监听事件,其中,所述监听事件包括鼠标移入事件、鼠标移出事件、鼠标点击事件、键盘按下事件、键盘抬起事件以及焦点事件;若所述行为数据中存在所述监听事件,判断所述监听事件对应的事件信息是否符合预设规则或者判断所述行为数据与预设行为数据之间的相似度是否小于预设阈值, 其中,所述事件信息包括所述监听事件被触发时距离所述网页页面载入的时间,所述预设行为数据是通过聚类模型对所述网页页面所采集的多个行为数据进行聚类后得到;若所述监听事件对应的事件信息不符合所述预设规则或者所述行为数据与预设行为数据之间的相似度小于预设阈值,则判定所述网页页面存在模拟输入行为。
第三方面,本申请实施例还提供了一种网页模拟输入检测装置,其包括:请求发送单元,用于接收用户打开网页页面的指令以向服务器发送用于打开所述网页页面的网页请求;接收单元,用于接收所述服务器返回的所述网页页面,其中,所述网页页面中嵌入了用于采集用户行为数据的页面套件;加载单元,用于加载所述页面套件以对所述网页页面中的页面元素添加预设的监听事件,其中,所述监听事件包括鼠标移入事件、鼠标移出事件、鼠标点击事件、键盘按下事件、键盘抬起事件以及焦点事件;采集单元,用于采集用户的行为数据,并将触发所述监听事件的事件信息记录到所述行为数据中,其中,所述事件信息包括所述监听事件被触发时距离所述网页页面载入的时间;发送单元,用于将所述行为数据发送至所述服务器以使所述服务器根据所述行为数据判断所述网页是否存在模拟输入的行为。
第四方面,本申请实施例还提供了一种网页模拟输入检测装置,其包括:请求接收单元,用于接收来自终端用于打开网页页面的网页请求;嵌入单元,用于将用于采集用户的行为数据的页面套件嵌入至所述网页页面中并将所述网页页面发送至所述终端,以使所述终端采集用户的所述行为数据;第一判断单元,用于接收所述终端发送的用户的所述行为数据,判断所述行为数据中是否存在监听事件,其中,所述监听事件包括鼠标移入事件、鼠标移出事件、鼠标点击事件、键盘按下事件、键盘抬起事件以及焦点事件;第二判断单元,用于若所述行为数据中存在所述监听事件,判断所述监听事件对应的事件信息是否符合预设规则或者判断所述行为数据与预设行为数据之间的相似度是否小于预设阈值,其中,所述事件信息包括所述监听事件被触发时距离所述网页页面载入的时间,所述预设行为数据是通过聚类模型对所述网页页面所采集的多个行为数据进行聚类后得到;第一判定单元,用于若所述监听事件对应的事件信息不符合所述预设规则或者所述行为数据与预设行为数据之间的相似度小于预设阈值,则判定所述网页页面存在模拟输入行为。
第五方面,本申请实施例还提供了一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时执行如上述第一方面所述的网页模拟输入检测方法。
第六方面,本申请实施例还提供了一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时执行如上述第二方面所述的网页模拟输入检测方法。
第七方面,本申请实施例还提供了一种计算机可读存储介质,其中所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行时使所述处理器执行如上述第一方面所述的网页模拟输入检测方法。
第八方面,本申请实施例还提供了一种计算机可读存储介质,其中所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行时使所述处理器执行如上述第二方 面所述的网页模拟输入检测方法。
本申请实施例由于通过在网页页面中嵌入用于采集用户的行为数据的页面套件,判断采集的行为数据中是否存在监听事件,若行为数据中存在监听事件则进一步地判断监听事件对应的事件信息是否符合预设规则或者计算行为数据与预设行为数据之间的相似度,若监听事件对应的事件信息不符合预设规则或者相似度小于预设阈值,则可判定网页页面存在模拟输入行为,可实现准确检测网页的模拟输入行为,有效地防止服务器被攻击,保证服务器的安全性和可靠性。
附图说明
图1为本申请实施例提供的网页模拟输入检测方法的应用场景示意图;
图2为本申请实施例提供的网页模拟输入检测方法的流程示意图;
图3为本申请另一实施例提供的网页模拟输入检测方法的流程示意图;
图4为本申请又一实施例提供的网页模拟输入检测方法的流程示意图;
图5为本申请实施例提供的网页模拟输入检测装置的示意性框图;
图6为本申请另一实施例提供的网页模拟输入检测装置的示意性框图;
图7为本申请另一实施例提供的网页模拟输入检测装置的示意性框图;
图8为本申请实施例提供的计算机设备的示意性框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
请参阅图1和图2,图1为本申请实施例提供的网页模拟输入检测方法的应用场景示意图。图2为本申请实施例提供的网页模拟输入检测方法的示意性流程图。该网页模拟输入检测方法应用于终端10和服务器20中,通过终端10与服务器20之间的交互实现。
图2是本申请实施例提供的网页模拟输入检测方法的流程示意图。如图所示,该方法包括以下步骤S110-S150。该方法应用与终端10中。
S110、接收用户打开网页页面的指令以向服务器发送用于打开所述网页页面的网页请求。
在一实施例中,服务器指的是网页的后台服务器,终端是用户浏览网页的一端,网页请求指的是打开网页页面的请求,即HTTP请求。用户浏览网页时通过浏览器打开网页页面,也即终端接收用户打开网页页面的指令,终端将网页页面请求发送给服务器,请求服务器返回该网页请求对应的网页页面。例如,登录页面,注册页面。
S120、接收所述服务器返回的所述网页页面,其中,所述网页页面中嵌入了用于采集用户行为数据的页面套件。
在一实施例中,页面套件的实质形式是JS套件,该页面套件预先设置好,用于采集用户的行为数据。用户的行为数据即用户在网页页面下的操作数据,例如鼠标的移入、移出和点击,键盘的按下和抬起,以及焦点的获取等。服务器接收到终端发送的网页请求后,将该 页面套件嵌入至网页请求中,再将该网页请求对应的网页页面返回给终端。终端接收服务器返回的嵌入有页面套件的网页页面。
S130、加载所述页面套件以对所述网页页面中的页面元素添加预设的监听事件,其中,所述监听事件包括鼠标移入事件、鼠标移出事件、鼠标点击事件、键盘按下事件、键盘抬起事件以及焦点事件。
在一实施例中,页面元素指的是页面上的控件,例如按钮、输入框以及链接等。监听事件指的是监听用户操作行为的事件。其中,监听事件包括鼠标移入事件、鼠标移出事件、鼠标点击事件、键盘按下事件、键盘抬起事件以及焦点事件。
鼠标移入事件即mouse over事件,mouse over事件指的是鼠标移入信息,比如用户在页面输入信息时,会使用鼠标点击某个输入框,此时即触发了mouse over事件,其作用是检测输入框或者按钮是否有鼠标移入事件发生,从而可以判断是否是真实用户在操作。
鼠标移出事件即mouse out事件,mouse out事件指的是鼠标移出信息,比如用户在页面输入多项信息时,用户需要使用鼠标点击不同的输入框,在进行输入框切换时即会触发mouse out事件,其作用是检测输入框或者按钮是否有鼠标移出事件发生,从而可以判断是否是真实用户在操作。
鼠标点击事件即mouse click事件,mouse click事件指的是鼠标点击信息,比如用户在页面输入信息时,会使用鼠标点击某个输入框,此时即触发了mouse click事件,其作用是检测输入框或者按钮是否有鼠标点击事件发生,从而可以判断是否是真实用户在操作。
键盘按下事件即key down事件,key down事件指的是键盘按下信息,比如用户在页面登录时,会使用键盘输入用户名、密码、验证码等信息,此时即触发了key down事件,其作用是检测输入框输入时是否有键盘按下事件发生,从而可以判断是否是真实用户在操作。
键盘抬起事件即key up事件,key up事件指的是键盘抬起信息,比如用户在页面登录时,会使用键盘输入用户名、密码、验证码等信息,每输入一个字符即触发了key up事件,其作用是检测输入框输入时是否有键盘抬起事件发生,从而可以判断是否是真实用户在操作。
焦点事件即onfocus事件,onfocus事件指的是页面元素是否有焦点信息,比如用户在页面文本框输入信息时,此文本框即会获取焦点,此时即触发了onfocus事件,其作用是检测输入框或者按钮是否有焦点事件发生,从而可以判断是否是用户在操作。
在接收到服务器返回的嵌入有页面套件的网页页面后,通过浏览器加载网页页面以及该页面套件,加载该页面套件运行该页面套件对应的JS脚本,从而在网页页面的页面元素中添加预设的监听事件。其中,不同的页面元素添加不同的监听事件,例如,用户需要点击阅读隐私条款、需要点击同意协议复选框,需要点击提交按钮等,可在链接、复选框以及按钮页面元素上添加鼠标点击事件。又例如,用户需要在输入框中输入用户名或密码,可在输入框页面元素上添加键盘按下和键盘抬起事件或者焦点事件。鼠标移入事件和鼠标移入事件适用范围广,任何页面元素均可添加。
S140、采集用户的行为数据,并将触发所述监听事件的事件信息记录到所述行为数据中,其中,所述事件信息包括所述监听事件被触发时距离所述网页页面载入的时间。
在一实施例中,载入嵌入有页面套件的网页页面后,采集用户的行为数据。用户在浏览网页时会对网页中的页面元素进行操作,一旦用户的操作触发了添加在页面元素上的监听事件,将触发监听事件时的事件信息记录到所采集的行为数据中。其中,触发监听事件的操作行为包括鼠标移入、移入、点击页面元素,键盘按下、抬起页面元素,以及获取页面元素的焦点。事件信息是用户操作行为触发监听事件瞬间记录的信息,其包括监听事件被触发时距离网页页面载入的时间。事件信息用于辅助判断网页是否存在模拟输入的行为,非法的网络攻击手段即使触发了监听事件,也可通过事件信息进一步地检测出网页的模拟输入行为,以提高检测的准确率。
S150、将所述行为数据发送至所述服务器以使所述服务器根据所述行为数据判断所述网页是否存在模拟输入的行为。
在一实施例中,在采集完用户的行为数据后,将用户的行为数据发送给服务器,由服务器根据用户的行为数据判断该网页是由真实用户在操作,还是机器操作的模拟输入行为。若服务器接收的行为数据中不存在触发监听事件时记录的事件信息,说明用户在浏览网页时的操作行为没有触发监听事件,在没有触发监听事件的情况下,不可能是真实用户在浏览网页,可直接判定网页存在模拟输入行为。
图3是本申请另一实施例提供的一种网页模拟输入检测方法的流程示意图。如图3所示,本实施例的网页模拟输入检测方法包括步骤S210-S250。该方法应用于服务器20中。
S210、接收来自终端用于打开网页页面的网页请求。
在一实施例中,用户浏览网页时通过浏览器打开网页,终端将网页请求发送给后台的服务器,服务器接收该网页请求。
S220、将用于采集用户的行为数据的页面套件嵌入至所述网页页面中并将所述网页页面发送至所述终端,以使所述终端采集用户的所述行为数据。
在一实施例中,页面套件的实质形式是JS套件,该页面套件预先设置好,用于采集用户的行为数据。服务器在接收到网页请求后,将该页面套件嵌入至网页请求对应的网页页面,再将嵌入有页面套件的网页页面返回给终端。
S230、接收所述终端发送的用户的所述行为数据,判断所述行为数据中是否存在监听事件,其中,所述监听事件包括鼠标移入事件、鼠标移出事件、鼠标点击事件、键盘按下事件、键盘抬起事件以及焦点事件。
在一实施例中,服务器接收终端所采集的用户行为数据,用户的行为数据即用户在网页页面下的操作数据,例如鼠标的移入、移出和点击,键盘的按下和抬起,以及焦点的获取等。监听事件指的是监听用户操作行为的事件。用户的操作行为触发了监听事件被记录到行为数据中,因而通过判断行为数据中是否存在监听事件来判定网页是由真实用户在操作,还是机器操作的模拟输入行为。
S240、若所述行为数据中存在所述监听事件,判断所述监听事件对应的事件信息是否符合预设规则,其中,所述事件信息包括所述监听事件被触发时距离所述网页页面载入的时间。
在一实施例中,由于非法网络攻击手段可能绕开监听事件来对服务器进行攻击,因而为 了进一步地保护服务器的安全,通过事件信息来辅助判断网页是否由真实用户操作。事件信息是用户操作行为触发监听事件瞬间记录的信息。预设规则指的是真实用户操作行为的一系列规则。通过事件信息是否符合预设规则来判定网页是否存在由机器操作的模拟输入行为。
在一实施例中,所述步骤S240包括:步骤S241-S242。
S241、判断所述监听事件被触发时距离所述网页页面载入的时间是否超过预设时间。
S242、若所述监听事件被触发时距离所述网页页面载入的时间未超过预设时间,判定所述监听事件对应的事件信息不符合预设规则。
在一实施例中,网页页面载入的时间即用户打开网页页面的时间。预设时间为0.5秒,当然可以理解的是,还可以是其他的数值。通常用户的真实操作为打开网页页面后再通过鼠标或者键盘进行操作,这个过程需要持续数秒,而如果是机器的模拟输入只需要毫秒级别即可。因此,可通过监听事件被触发时距离网页页面载入的时间来判断是否符合预设规则。例如,用户在注册账号时,通常用户需要输入个人注册信息,如用户名、密码、邮箱、手机号码等等,用户在注册账号的过程中触发的每个监听事件都是极短的,没有超过预设时间,而真实的用户操作通常需要几分钟才能填写完所有的注册信息,说明明显属于机器的批量注册操作,不符合预设规则。
在另一实施例中,所述事件信息还包括鼠标坐标位置,所述步骤S240包括:步骤S243-S244。
S243、判断所述监听事件被触发时鼠标的坐标位置是否在页面元素对应的坐标范围内。
S244、若所述监听事件被触发时鼠标的坐标位置不在页面元素对应的坐标范围内,则判定所述监听事件对应的事件信息不符合预设规则。
在一实施例中,若监听事件包括鼠标移入事件、鼠标移出事件、鼠标点击事件,监听事件在触发时还记录了鼠标坐标位置的事件信息。通常用户的真实操作为打开网页页面后再通过鼠标移动到页面元素中或者点击页面元素进行操作。而如果是机器的模拟输入则不需要移动到页面元素或者不需要点击页面元素即可进行操作。因此,通过监听事件被触发时鼠标的坐标位置进行判断,如果监听事件被触发时鼠标的坐标位置位于页面元素的范围内,说明属于真实用户的操作,符合预设规则;如果监听事件被触发时鼠标的坐标位置没有位于页面元素的范围内,说明属于机器操作,不符合预设规则。例如,用户在注册账号时,鼠标必须移动到用户名的输入框以输入用户名,如果在触发监听事件时鼠标的坐标位置却不在输入框的坐标范围内,则明显是属于机器操作,不符合预设规则。
在另一实施例中,所述事件信息还包括焦点的位置,所述步骤S240包括:步骤S245-S246。
S245、判断所述监听事件被触发时焦点的位置是否在目标页面元素上。
S246、若所述监听事件被触发时焦点的位置不在目标页面元素上,则判定所述监听事件对应的事件信息不符合预设规则。
在一实施例中,目标页面元素指的是添加监听事件的页面元素,焦点事件的页面元素通过id区分。若监听事件包括焦点事件,监听事件在触发时还记录了焦点的位置的事件信息。通常用户的真实操作为打开网页页面后再通过鼠标移动到页面元素中获取焦点后再进行操作。 而如果是机器的模拟输入则不需要获取到目标页面元素的焦点即可进行操作。因此,通过监听事件被触发时焦点的位置是否在目标页面元素上进行判断,如果监听事件被触发时焦点的位置在目标页面元素上,说明属于真实用户的操作,符合预设规则;如果监听事件被触发时焦点的位置不在目标页面元素上,说明属于机器操作,不符合预设规则。例如,用户在注册账号时,输入密码必须获取密码输入框的焦点,密码输入框即为目标页面元素,如果在触发焦点事件时焦点的位置不在密码输入框上,比如在用户名的输入框上,则明显是属于机器操作,不符合预设规则。
S250、若所述监听事件对应的事件信息不符合所述预设规则,则判定所述网页页面存在模拟输入行为。
在一实施例中,通过采集用户的行为数据来检测网页是否存在模拟输入行为。首先判断行为数据中是否存在监听事件,如果不存在监听事件则可直接判定网页存在模拟输入行为;如果存在监听事件则进一步地利用监听事件在触发时记录的事件信息判断事件信息是否符合预设规则,如果不符合预设规则则判定网页存在模拟输入行为。例如,用户在注册账号时,通常用户需要输入个人注册信息,如用户名、密码、邮箱、手机号码等等,那么用户行为数据中必须要包含键盘按下和键盘抬起事件,如果用户登录了账号却没有触发键盘按下和键盘抬起事件,说明并非为真实用户的操作行为,存在模拟输入的行为。又例如,用户行为数据中存在键盘按下和键盘抬起事件,但是键盘按下和键盘抬起事件被触发时距离网页页面载入的时间只有0.1秒,没有超过预设时间不符合预设规则,说明并非为真实用户的操作行为,存在模拟输入的行为。
在一实施例中,例如本实施例中,在得知网页被非法网络手段攻击后,需要采取相应的制止措施。服务器接收终端的网页请求时可获取到终端的IP地址。通常非法网络手段攻击会在一段时间内频繁地发起攻击,例如,批量注册账号会在短时间内频繁地向服务器发起账号注册请求,服务器的IO流量短时间内剧增。那么则获取到终端的IP地址后,禁止该IP地址向服务器发起访问网页的请求,将该IP地址的网页请求强制跳转至404页面,从而阻止服务器被攻击。当然可以理解的是,还可以是其他的方式,例如设置白名单IP地址。
本申请实施例展示的网页模拟输入检测方法通过在网页页面中嵌入用于采集用户的行为数据的页面套件,判断采集的行为数据中是否存在监听事件,若行为数据中存在监听事件则进一步地判断监听事件对应的事件信息是否符合预设规则,若行为数据中不存在监听事件或者监听事件对应的事件信息不符合预设规则,则可判定网页页面存在模拟输入行为,可实现准确检测网页的模拟输入行为,有效地防止服务器被攻击,保证服务器的安全性和可靠性。
在另一实施例中,如图4所示,所述网页模拟输入检测方法包括步骤S210-S270。
S210、接收来自终端用于打开网页页面的网页请求。
S220、将用于采集用户的行为数据的页面套件嵌入至所述网页页面中并将所述网页页面发送至所述终端,以使所述终端采集用户的所述行为数据。
S230、接收所述终端发送的用户的所述行为数据,判断所述行为数据中是否存在监听事件。
在本实施例中,所述步骤S210-S230与上述实施例相同,在此不再赘述。
S260、若所述行为数据中存在监听事件,判断所述行为数据与预设行为数据之间的相似度是否小于预设阈值,其中,所述预设行为数据是通过聚类模型对所述网页页面所采集的多个行为数据进行聚类后得到。
在本实施例中,k-means算法是一种聚类算法,所谓聚类,即根据相似性原则,将具有较高相似度的数据对象划分至同一类簇,将具有较高相异度的数据对象划分至不同类簇。具体地,k-means算法是首先随机选取K个对象(句向量)作为初始的聚类中心(初始化质心),然后计算每个对象与各个种子聚类中心之间的距离,将每个对象分配给距离它最近的聚类中心;聚类中心以及分配给它们的对象就代表一个聚类,每分配一个样本,聚类的聚类中心会根据聚类中现有的对象被重新计算;这个过程将不断重复直到满足某个终止条件,如误差平方和局部最小,从而将对象划分到不同的类簇中。由于k个初始化的质心的位置选择对最后的聚类结果和运行时间都有很大的影响,如果仅仅是完全随机的选择,有可能导致算法收敛很慢,因此为了选择合适的k个质心,本方案采用K-Means++算法,K-Means++算法就是对K-Means随机初始化质心的方法的优化。具体地,采集多个用户操作网页的行为数据,从所有的行为数据中随机选择一个作为聚类中心,计算每一个行为数据到初始质心的距离,选择一个最近的行为数据作为下一个聚类中心,重复上述过程直到选择到K个聚类中心,根据所选择的K个聚类中心运行传统的k-means算法即可。其中,K值为1,因为本实施例中利用聚类模型的目的是得到真实用户的行为数据,最终得到真实用户的行为数据集合,该集合中包括多个真实用户的行为数据。
预设行为数据即该集合中的行为数据,预设行为数据有多个。具体地,从该集合中获取预设行为数据,根据行为数据与从集合中获取的预设行为数据一一进行相似度计算。具体地,计算行为数据与预设行为数据之间的cos余弦距离,余弦距离是用向量空间中两个向量夹角的余弦值作为衡量两个个体间差异的大小的度量,该cos余弦距离即表示行为数据与预设行为数据之间的相似度,余弦值越接近与1则表示相似度越高,余弦值越小则表示相似度越低。将行为数据与集合中的每个预设行为数据一一进行相似度计算,取相似度最高的余弦值作为该行为数据与从集合中取出的预设行为数据之间的相似度。
S270、若所述行为数据与预设行为数据之间的相似度小于预设阈值,则判定所述网页页面存在模拟输入行为。
在本实施例中,将行为数据与预设行为数据之间的相似度与预设阈值进行对比,若行为数据与预设行为数据之间的相似度大于预设阈值,说明该行为数据属于真实用户的行为;若行为数据与预设行为数据之间的相似度小于预设阈值,说明该行为数据属于机器行为,网页存在模拟输入行为。例如,行为数据与预设行为数据之间的相似度为0.3,预设阈值为0.8,那么则判定网页存在模拟输入行为。
若所述行为数据中不存在监听事件,则判定所述网页页面存在模拟输入行为。在本实施例中,通过采集用户的行为数据来检测网页是否存在模拟输入行为。首先判断行为数据中是否存在监听事件,如果不存在监听事件则可直接判定网页存在模拟输入行为。因为真实用户 行为必然触发监听时间,而如果行为数据中不存在监听时间则可直接判定网页存在模拟输入行为。
本申请实施例展示的网页模拟输入检测方法通过在网页页面中嵌入用于采集用户的行为数据的页面套件,判断采集的行为数据中是否存在监听事件,若行为数据中存在监听事件则进一步地计算所述行为数据与预设行为数据之间的相似度以判断相似度是否小于预设阈值,若所述行为数据与预设行为数据之间的相似度小于预设阈值,则可判定网页页面存在模拟输入行为,可实现准确检测网页的模拟输入行为,有效地防止服务器被攻击,保证服务器的安全性和可靠性。
图5是本申请实施例提供的一种网页模拟输入检测装置300的示意性框图。如图5所示,对应于以上应用于所述终端10的网页模拟输入检测方法,本申请还提供一种网页模拟输入检测装置300。该网页模拟输入检测装置300包括用于执行上述网页模拟输入检测方法的单元,该装置可以被配置于台式电脑、平板电脑、手提电脑、等终端中。具体地,请参阅图5,该网页模拟输入检测装置300包括请求发送单元310、接收单元320、加载单元330、采集单元340以及发送单元350。
请求发送单元310,用于接收用户打开网页页面的指令以向服务器发送用于打开所述网页页面的网页请求。
接收单元320,用于接收所述服务器返回的所述网页页面,其中,所述网页页面中嵌入了用于采集用户行为数据的页面套件。
加载单元330,用于加载所述页面套件以对所述网页页面中的页面元素添加预设的监听事件,其中,所述监听事件包括鼠标移入事件、鼠标移出事件、鼠标点击事件、键盘按下事件、键盘抬起事件以及焦点事件。
采集单元340,用于采集用户的行为数据,并将触发所述监听事件的事件信息记录到所述行为数据中,其中,所述事件信息包括所述监听事件被触发时距离所述网页页面载入的时间。
发送单元350,用于将所述行为数据发送至所述服务器以使所述服务器根据所述行为数据判断所述网页是否存在模拟输入的行为。
需要说明的是,所属领域的技术人员可以清楚地了解到,上述网页模拟输入检测装置300和各单元的具体实现过程,可以参考前述方法实施例中的相应描述,为了描述的方便和简洁,在此不再赘述。
图6是本申请实施例提供的一种网页模拟输入检测装置400的示意性框图。如图6所示,对应于以上应用与所述服务器20的网页模拟输入检测方法,本申请还提供一种网页模拟输入检测装置400。该网页模拟输入检测装置400包括用于执行上述网页模拟输入检测方法的单元,该装置可以被配置于服务器20中。具体地,请参阅图6,该网页模拟输入检测装置400包括请求接收单元410、嵌入单元420、第一判断单元430、第二判断单元440以及第一判定单元450。
请求接收单元410,用于接收来自终端用于打开网页页面的网页请求。
嵌入单元420,用于将用于采集用户的行为数据的页面套件嵌入至所述网页页面中并将所述网页页面发送至所述终端,以使所述终端采集用户的所述行为数据。
第一判断单元430,用于接收所述终端发送的用户的所述行为数据,判断所述行为数据中是否存在监听事件,其中,所述监听事件包括鼠标移入事件、鼠标移出事件、鼠标点击事件、键盘按下事件、键盘抬起事件以及焦点事件。
第二判断单元440,用于若所述行为数据中存在所述监听事件,判断所述监听事件对应的事件信息是否符合预设规则,其中,所述事件信息包括所述监听事件被触发时距离所述网页页面载入的时间。
在一实施例中,所述第二判断单元440包括:第一判断子单元和第一判定子单元。
第一判断子单元,用于判断所述监听事件被触发时距离所述网页页面载入的时间是否超过预设时间;
第一判定子单元,用于若所述监听事件被触发时距离所述网页页面载入的时间未超过预设时间,判定所述监听事件对应的事件信息不符合预设规则。
在一实施例中,所述第二判断单元440包括:第二判断子单元和第二判定子单元。
第二判断子单元,用于判断所述监听事件被触发时鼠标的坐标位置是否在页面元素对应的坐标范围内。
第二判定子单元,用于若所述监听事件被触发时鼠标的坐标位置不在页面元素对应的坐标范围内,则判定所述监听事件对应的事件信息不符合预设规则。
在一实施例中,所述第二判断单元440包括:第三判断子单元和第三判定子单元。
第三判断子单元,用于判断所述监听事件被触发时焦点的位置是否在目标页面元素上。
第三判定子单元,用于若所述监听事件被触发时焦点的位置不在目标页面元素上,则判定所述监听事件对应的事件信息不符合预设规则。
第一判定单元450,用于若所述监听事件对应的事件信息不符合所述预设规则,则判定所述网页页面存在模拟输入行为。
在另一实施例中,如图7所示,所述网页模拟输入检测装置400还包括:第三判断单元460。
第三判断单元460,用于若所述行为数据中存在监听事件,判断所述行为数据与预设行为数据之间的相似度是否小于预设阈值,其中,所述预设行为数据是通过聚类模型对所述网页页面所采集的多个行为数据进行聚类后得到。
第三判定单元470,用于若所述行为数据与预设行为数据之间的相似度小于预设阈值,则判定所述网页页面存在模拟输入行为。
第二判定单元480,用于若所述行为数据中不存在监听事件,则判定所述网页页面存在模拟输入行为。
需要说明的是,所属领域的技术人员可以清楚地了解到,上述网页模拟输入检测装置400和各单元的具体实现过程,可以参考前述方法实施例中的相应描述,为了描述的方便和简洁,在此不再赘述。
上述网页模拟输入检测装置可以实现为一种计算机程序的形式,该计算机程序可以在如图8所示的计算机设备上运行。
参阅图8,该计算机设备500包括通过系统总线501连接的处理器502、存储器和网络接口505,其中,存储器可以包括非易失性存储介质503和内存储器504。
该非易失性存储介质503可存储操作系统5031和计算机程序5032。该计算机程序5032被执行时,可使得处理器502执行网页模拟输入检测方法。该处理器502用于提供计算和控制能力,支撑整个计算机设备500的运行。该内存储器504为非易失性存储介质503中的计算机程序5032的运行提供环境,该计算机程序5032被处理器502执行时,可使得处理器502执行网页模拟输入检测方法。该网络接口505用于进行网络通信,如提供数据信息的传输等。本领域技术人员可以理解,图8中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备500的限定,具体的计算机设备500可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
其中,所述处理器502用于运行存储在存储器中的计算机程序5032,以实现上述网页模拟输入检测方法的任一实施例。
应当理解,在本申请实施例中,处理器502可以是中央处理单元(Central Processing Unit,CPU),该处理器502还可以是其他通用处理器502、数字信号处理器502(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器502可以是微处理器502或者该处理器502也可以是任何常规的处理器502等。
本领域普通技术人员可以理解的是实现上述实施例的方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成。该计算机程序可存储于一存储介质中,该存储介质可以为计算机可读存储介质。该计算机程序被该计算机系统中的至少一个处理器执行,以实现上述方法的实施例的流程步骤。
因此,本申请还提供了一种计算机可读存储介质。该计算机可读存储介质可以是非易失性,也可以是易失性。该存储介质存储有计算机程序,该计算机程序当被处理器执行时实现上述网页模拟输入检测方法的任一实施例。
该计算机可读存储介质可以是U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (20)

  1. 一种网页模拟输入检测方法,应用于终端中,包括:
    接收用户打开网页页面的指令以向服务器发送用于打开所述网页页面的网页请求;
    接收所述服务器返回的所述网页页面,其中,所述网页页面中嵌入了用于采集用户行为数据的页面套件;
    加载所述页面套件以对所述网页页面中的页面元素添加预设的监听事件,其中,所述监听事件包括鼠标移入事件、鼠标移出事件、鼠标点击事件、键盘按下事件、键盘抬起事件以及焦点事件;
    采集用户的行为数据,并将触发所述监听事件的事件信息记录到所述行为数据中,其中,所述事件信息包括所述监听事件被触发时距离所述网页页面载入的时间;
    将所述行为数据发送至所述服务器以使所述服务器根据所述行为数据判断所述网页是否存在模拟输入的行为。
  2. 一种网页模拟输入检测方法,应用于服务器中,包括:
    接收来自终端用于打开网页页面的网页请求;
    将用于采集用户的行为数据的页面套件嵌入至所述网页页面中并将所述网页页面发送至所述终端,以使所述终端采集用户的所述行为数据;
    接收所述终端发送的用户的所述行为数据,判断所述行为数据中是否存在监听事件,其中,所述监听事件包括鼠标移入事件、鼠标移出事件、鼠标点击事件、键盘按下事件、键盘抬起事件以及焦点事件;
    若所述行为数据中存在所述监听事件,判断所述监听事件对应的事件信息是否符合预设规则或者判断所述行为数据与预设行为数据之间的相似度是否小于预设阈值,其中,所述事件信息包括所述监听事件被触发时距离所述网页页面载入的时间,所述预设行为数据是通过聚类模型对所述网页页面所采集的多个行为数据进行聚类后得到;
    若所述监听事件对应的事件信息不符合所述预设规则或者所述行为数据与预设行为数据之间的相似度小于预设阈值,则判定所述网页页面存在模拟输入行为。
  3. 根据权利要求2所述的网页模拟输入检测方法,还包括:
    若所述行为数据中不存在监听事件,则判定所述网页页面存在模拟输入行为。
  4. 根据权利要求2所述的网页模拟输入检测方法,其中,所述判断所述监听事件对应的事件信息是否符合预设规则,包括:
    判断所述监听事件被触发时距离所述网页页面载入的时间是否超过预设时间;
    若所述监听事件被触发时距离所述网页页面载入的时间未超过预设时间,判定所述监听事件对应的事件信息不符合预设规则。
  5. 根据权利要求2所述的网页模拟输入检测方法,其中,所述事件信息还包括鼠标坐标位置,所述判断所述监听事件对应的事件信息是否符合预设规则,包括:
    判断所述监听事件被触发时鼠标的坐标位置是否在页面元素对应的坐标范围内;
    若所述监听事件被触发时鼠标的坐标位置不在页面元素对应的坐标范围内,则判定所述监听事件对应的事件信息不符合预设规则。
  6. 根据权利要求2所述的网页模拟输入检测方法,其中,所述事件信息还包括焦点的位置,所述判断所述监听事件对应的事件信息是否符合预设规则,包括:
    判断所述监听事件被触发时焦点的位置是否在目标页面元素上;
    若所述监听事件被触发时焦点的位置不在目标页面元素上,则判定所述监听事件对应的事件信息不符合预设规则。
  7. 根据权利要求2所述的网页模拟输入检测方法,其中,所述若所述监听事件对应的事件信息不符合所述预设规则或者所述行为数据与预设行为数据之间的相似度小于预设阈值,则判定所述网页页面存在模拟输入行为之后,还包括:
    禁止所述终端的IP地址再次发送访问网页的请求并强制跳转至404页面。
  8. 一种网页模拟输入检测装置,包括:
    请求发送单元,用于接收用户打开网页页面的指令以向服务器发送用于打开所述网页页面的网页请求;
    接收单元,用于接收所述服务器返回的所述网页页面,其中,所述网页页面中嵌入了用于采集用户行为数据的页面套件;
    加载单元,用于加载所述页面套件以对所述网页页面中的页面元素添加预设的监听事件,其中,所述监听事件包括鼠标移入事件、鼠标移出事件、鼠标点击事件、键盘按下事件、键盘抬起事件以及焦点事件;
    采集单元,用于采集用户的行为数据,并将触发所述监听事件的事件信息记录到所述行为数据中,其中,所述事件信息包括所述监听事件被触发时距离所述网页页面载入的时间;
    发送单元,用于将所述行为数据发送至所述服务器以使所述服务器根据所述行为数据判断所述网页是否存在模拟输入的行为。
  9. 一种网页模拟输入检测装置,包括:
    请求接收单元,用于接收来自终端用于打开网页页面的网页请求;
    嵌入单元,用于将用于采集用户的行为数据的页面套件嵌入至所述网页页面中并将所述网页页面发送至所述终端,以使所述终端采集用户的所述行为数据;
    第一判断单元,用于接收所述终端发送的用户的所述行为数据,判断所述行为数据中是否存在监听事件,其中,所述监听事件包括鼠标移入事件、鼠标移出事件、鼠标点击事件、键盘按下事件、键盘抬起事件以及焦点事件;
    第二判断单元,用于若所述行为数据中存在所述监听事件,判断所述监听事件对应的事件信息是否符合预设规则或者判断所述行为数据与预设行为数据之间的相似度是否小于预设阈值,其中,所述事件信息包括所述监听事件被触发时距离所述网页页面载入的时间,所述预设行为数据是通过聚类模型对所述网页页面所采集的多个行为数据进行聚类后得到;
    第一判定单元,用于若所述监听事件对应的事件信息不符合所述预设规则或者所述行为数据与预设行为数据之间的相似度小于预设阈值,则判定所述网页页面存在模拟输入行为。
  10. 一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时执行以下步骤:
    接收用户打开网页页面的指令以向服务器发送用于打开所述网页页面的网页请求;
    接收所述服务器返回的所述网页页面,其中,所述网页页面中嵌入了用于采集用户行为数据的页面套件;
    加载所述页面套件以对所述网页页面中的页面元素添加预设的监听事件,其中,所述监听事件包括鼠标移入事件、鼠标移出事件、鼠标点击事件、键盘按下事件、键盘抬起事件以及焦点事件;
    采集用户的行为数据,并将触发所述监听事件的事件信息记录到所述行为数据中,其中,所述事件信息包括所述监听事件被触发时距离所述网页页面载入的时间;
    将所述行为数据发送至所述服务器以使所述服务器根据所述行为数据判断所述网页是否存在模拟输入的行为。
  11. 一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时执行以下步骤:
    接收来自终端用于打开网页页面的网页请求;
    将用于采集用户的行为数据的页面套件嵌入至所述网页页面中并将所述网页页面发送至所述终端,以使所述终端采集用户的所述行为数据;
    接收所述终端发送的用户的所述行为数据,判断所述行为数据中是否存在监听事件,其中,所述监听事件包括鼠标移入事件、鼠标移出事件、鼠标点击事件、键盘按下事件、键盘抬起事件以及焦点事件;
    若所述行为数据中存在所述监听事件,判断所述监听事件对应的事件信息是否符合预设规则或者判断所述行为数据与预设行为数据之间的相似度是否小于预设阈值,其中,所述事件信息包括所述监听事件被触发时距离所述网页页面载入的时间,所述预设行为数据是通过聚类模型对所述网页页面所采集的多个行为数据进行聚类后得到;
    若所述监听事件对应的事件信息不符合所述预设规则或者所述行为数据与预设行为数据之间的相似度小于预设阈值,则判定所述网页页面存在模拟输入行为。
  12. 根据权利要求11所述的计算机设备,还包括:
    若所述行为数据中不存在监听事件,则判定所述网页页面存在模拟输入行为。
  13. 根据权利要求11所述的计算机设备,其中,所述判断所述监听事件对应的事件信息是否符合预设规则,包括:
    判断所述监听事件被触发时距离所述网页页面载入的时间是否超过预设时间;
    若所述监听事件被触发时距离所述网页页面载入的时间未超过预设时间,判定所述监听事件对应的事件信息不符合预设规则。
  14. 根据权利要求11所述的计算机设备,其中,所述事件信息还包括鼠标坐标位置,所述判断所述监听事件对应的事件信息是否符合预设规则,包括:
    判断所述监听事件被触发时鼠标的坐标位置是否在页面元素对应的坐标范围内;
    若所述监听事件被触发时鼠标的坐标位置不在页面元素对应的坐标范围内,则判定所述监听事件对应的事件信息不符合预设规则。
  15. 根据权利要求11所述的计算机设备,其中,所述事件信息还包括焦点的位置,所述判断所述监听事件对应的事件信息是否符合预设规则,包括:
    判断所述监听事件被触发时焦点的位置是否在目标页面元素上;
    若所述监听事件被触发时焦点的位置不在目标页面元素上,则判定所述监听事件对应的事件信息不符合预设规则。
  16. 根据权利要求11所述的计算机设备,其中,所述若所述监听事件对应的事件信息不符合所述预设规则或者所述行为数据与预设行为数据之间的相似度小于预设阈值,则判定所述网页页面存在模拟输入行为之后,还包括:
    禁止所述终端的IP地址再次发送访问网页的请求并强制跳转至404页面。
  17. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行以下步骤:
    接收用户打开网页页面的指令以向服务器发送用于打开所述网页页面的网页请求;
    接收所述服务器返回的所述网页页面,其中,所述网页页面中嵌入了用于采集用户行为数据的页面套件;
    加载所述页面套件以对所述网页页面中的页面元素添加预设的监听事件,其中,所述监听事件包括鼠标移入事件、鼠标移出事件、鼠标点击事件、键盘按下事件、键盘抬起事件以及焦点事件;
    采集用户的行为数据,并将触发所述监听事件的事件信息记录到所述行为数据中,其中,所述事件信息包括所述监听事件被触发时距离所述网页页面载入的时间;
    将所述行为数据发送至所述服务器以使所述服务器根据所述行为数据判断所述网页是否存在模拟输入的行为。
  18. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行以下步骤:
    接收来自终端用于打开网页页面的网页请求;
    将用于采集用户的行为数据的页面套件嵌入至所述网页页面中并将所述网页页面发送至所述终端,以使所述终端采集用户的所述行为数据;
    接收所述终端发送的用户的所述行为数据,判断所述行为数据中是否存在监听事件,其中,所述监听事件包括鼠标移入事件、鼠标移出事件、鼠标点击事件、键盘按下事件、键盘抬起事件以及焦点事件;
    若所述行为数据中存在所述监听事件,判断所述监听事件对应的事件信息是否符合预设规则或者判断所述行为数据与预设行为数据之间的相似度是否小于预设阈值,其中,所述事件信息包括所述监听事件被触发时距离所述网页页面载入的时间,所述预设行为数据是通过聚类模型对所述网页页面所采集的多个行为数据进行聚类后得到;
    若所述监听事件对应的事件信息不符合所述预设规则或者所述行为数据与预设行为数据之间的相似度小于预设阈值,则判定所述网页页面存在模拟输入行为。
  19. 根据权利要求18所述的计算机可读存储介质,还包括:
    若所述行为数据中不存在监听事件,则判定所述网页页面存在模拟输入行为。
  20. 根据权利要求18所述的计算机可读存储介质,其中,所述判断所述监听事件对应的事件信息是否符合预设规则,包括:
    判断所述监听事件被触发时距离所述网页页面载入的时间是否超过预设时间;
    若所述监听事件被触发时距离所述网页页面载入的时间未超过预设时间,判定所述监听事件对应的事件信息不符合预设规则。
PCT/CN2021/078157 2020-04-28 2021-02-26 网页模拟输入检测方法、装置、计算机设备及存储介质 WO2021218341A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010352223.X 2020-04-28
CN202010352223.XA CN111641588A (zh) 2020-04-28 2020-04-28 网页模拟输入检测方法、装置、计算机设备及存储介质

Publications (1)

Publication Number Publication Date
WO2021218341A1 true WO2021218341A1 (zh) 2021-11-04

Family

ID=72330934

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/078157 WO2021218341A1 (zh) 2020-04-28 2021-02-26 网页模拟输入检测方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN111641588A (zh)
WO (1) WO2021218341A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116070180A (zh) * 2022-11-10 2023-05-05 支付宝(杭州)信息技术有限公司 一种安全业务执行方法、装置、存储介质及电子设备

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111641588A (zh) * 2020-04-28 2020-09-08 深圳壹账通智能科技有限公司 网页模拟输入检测方法、装置、计算机设备及存储介质
CN112365267A (zh) * 2020-11-10 2021-02-12 中国工商银行股份有限公司 一种基于操作行为的反爬虫方法及装置
CN112631908A (zh) * 2020-12-21 2021-04-09 深圳壹账通智能科技有限公司 浏览器页面测试方法、装置、计算机设备及存储介质
CN113761443A (zh) * 2021-08-24 2021-12-07 百安居信息技术(上海)有限公司 一种网站页面数据采集与统计方法、存储介质及设备
CN117170982B (zh) * 2023-11-02 2024-02-13 建信金融科技有限责任公司 人机检测方法、装置、电子设备和计算机可读介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7184939B1 (en) * 2005-08-03 2007-02-27 Novell, Inc. System and method of implementing user action monitoring to automatically populate object launchers
CN102737019A (zh) * 2011-03-31 2012-10-17 阿里巴巴集团控股有限公司 机器行为确定方法、网页浏览器及网页服务器
CN105653944A (zh) * 2015-12-25 2016-06-08 北京奇虎科技有限公司 作弊行为检测方法及装置
CN105989268A (zh) * 2015-03-02 2016-10-05 苏宁云商集团股份有限公司 一种人机识别的安全访问方法和系统
CN110995641A (zh) * 2019-09-30 2020-04-10 厦门快商通科技股份有限公司 骚扰信息识别方法、装置、电子设备及介质
CN111641588A (zh) * 2020-04-28 2020-09-08 深圳壹账通智能科技有限公司 网页模拟输入检测方法、装置、计算机设备及存储介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10069852B2 (en) * 2010-11-29 2018-09-04 Biocatch Ltd. Detection of computerized bots and automated cyber-attack modules
CN104994092B (zh) * 2015-06-30 2018-11-06 百度在线网络技术(北京)有限公司 业务请求处理方法、终端浏览器及防攻击服务器
CN106878397A (zh) * 2017-01-21 2017-06-20 浙江沛宏网络科技有限公司 一种web用户行为反馈方法及系统
CN109829121B (zh) * 2017-08-22 2021-07-06 北京京东尚科信息技术有限公司 一种点击行为数据上报的方法和装置
CN110069910A (zh) * 2018-01-23 2019-07-30 袁明凯 一种机器行为确定方法、网页浏览器及网页服务器
CN110244946A (zh) * 2018-01-29 2019-09-17 方欣科技有限公司 一种纳税人行为数据采集方法及装置
CN109710354A (zh) * 2018-12-13 2019-05-03 平安普惠企业管理有限公司 页面监听方法、页面还原方法、装置、设备及介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7184939B1 (en) * 2005-08-03 2007-02-27 Novell, Inc. System and method of implementing user action monitoring to automatically populate object launchers
CN102737019A (zh) * 2011-03-31 2012-10-17 阿里巴巴集团控股有限公司 机器行为确定方法、网页浏览器及网页服务器
CN105989268A (zh) * 2015-03-02 2016-10-05 苏宁云商集团股份有限公司 一种人机识别的安全访问方法和系统
CN105653944A (zh) * 2015-12-25 2016-06-08 北京奇虎科技有限公司 作弊行为检测方法及装置
CN110995641A (zh) * 2019-09-30 2020-04-10 厦门快商通科技股份有限公司 骚扰信息识别方法、装置、电子设备及介质
CN111641588A (zh) * 2020-04-28 2020-09-08 深圳壹账通智能科技有限公司 网页模拟输入检测方法、装置、计算机设备及存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116070180A (zh) * 2022-11-10 2023-05-05 支付宝(杭州)信息技术有限公司 一种安全业务执行方法、装置、存储介质及电子设备

Also Published As

Publication number Publication date
CN111641588A (zh) 2020-09-08

Similar Documents

Publication Publication Date Title
WO2021218341A1 (zh) 网页模拟输入检测方法、装置、计算机设备及存储介质
JP7405596B2 (ja) コンピュータシステムのオブジェクト分類のためのシステムおよび方法
US10565367B2 (en) Filtering data transfers
US11403396B2 (en) System and method of allocating computer resources for detection of malicious files
JP6715292B2 (ja) 機械学習を用いる悪意のあるファイルを検出するシステムおよび方法
JP6731988B2 (ja) 訓練された機械学習モデルを使用することで悪意のあるファイルを検出するシステムおよび方法
CN102647421B (zh) 基于行为特征的web后门检测方法和装置
JP6636096B2 (ja) マルウェア検出モデルの機械学習のシステムおよび方法
CN108282440B (zh) 一种安全检测方法、安全检测装置及服务器
JP6731981B2 (ja) 機械学習モデルに基づいた悪意のあるファイルの検出のための計算資源を管理するシステムおよび方法
CN109586282B (zh) 一种电网未知威胁检测系统及方法
RU2651196C1 (ru) Способ обнаружения аномальных событий по популярности свертки события
CN110417778B (zh) 访问请求的处理方法和装置
JP2020115320A (ja) 悪意あるファイルを検出するためのシステムおよび方法
EP3763097A1 (en) System and method for restricting access to web resources
US8364776B1 (en) Method and system for employing user input for website classification
AU2018218526B2 (en) Identifying human interaction with a computer
RU2673711C1 (ru) Способ обнаружения аномальных событий на основании набора сверток безопасных событий
JP2020109611A (ja) コンピュータシステム内の悪意のあるアクティビティの源を検出するシステムおよび方法
CN113239333A (zh) 基于跨域资源访问的浏览器用户身份验证的方法及系统
CN111625825A (zh) 一种病毒检测方法、装置、设备及存储介质
RU2757408C1 (ru) Система и способ формирования правила проверки файла на вредоносность
EP3462354B1 (en) System and method for detection of anomalous events based on popularity of their convolutions
CN117896154A (zh) 撞库风险的数据处理方法、装置和服务器
CN112422553A (zh) 一种检测VBScript漏洞利用的方法、装置及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21796339

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 20/02/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21796339

Country of ref document: EP

Kind code of ref document: A1