CN117055793A - Slider assembly detection method and device, storage medium and electronic equipment - Google Patents

Slider assembly detection method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN117055793A
CN117055793A CN202311203312.8A CN202311203312A CN117055793A CN 117055793 A CN117055793 A CN 117055793A CN 202311203312 A CN202311203312 A CN 202311203312A CN 117055793 A CN117055793 A CN 117055793A
Authority
CN
China
Prior art keywords
slider
sliding block
position coordinates
assembly
standard deviation
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.)
Pending
Application number
CN202311203312.8A
Other languages
Chinese (zh)
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.)
Hunan MgtvCom Interactive Entertainment Media Co Ltd
Original Assignee
Hunan MgtvCom Interactive Entertainment Media 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 Hunan MgtvCom Interactive Entertainment Media Co Ltd filed Critical Hunan MgtvCom Interactive Entertainment Media Co Ltd
Priority to CN202311203312.8A priority Critical patent/CN117055793A/en
Publication of CN117055793A publication Critical patent/CN117055793A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/24323Tree-organised classifiers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/01Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Human Computer Interaction (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a slider assembly detection method and device, a storage medium and electronic equipment, wherein a target random forest model is obtained through pre-training based on operation sample data included in a slider assembly operation sample data set, so that operation related data of an operation slider assembly are obtained, and the operation related data comprise: a first time period from entering the slider assembly until clicking the slider in the slider assembly, a second time period from clicking the slider until releasing the slider, a slider displacement speed average value, a slider displacement speed standard deviation, a slider movement angle average value, a slider movement angle standard deviation and a slider movement distance; and then, inputting the operation related data into a pre-constructed target random forest model to obtain a detection result for representing whether an operation object for operating the sliding block assembly is an automatic program, and realizing automatic program identification on the sliding block assembly in a verification scene, so that corresponding measures are taken, and the influence on the performance and the safety of the system is reduced.

Description

Slider assembly detection method and device, storage medium and electronic equipment
Technical Field
The present application relates to the field of intelligent detection technologies, and in particular, to a method and apparatus for detecting a slider assembly, a storage medium, and an electronic device.
Background
An automation program (automated crawler) can simulate the behavior of a human user, access web pages, capture data, and potentially impact the performance and security of the system.
When data processing is performed between various systems, the situation that the sliding verification is completed by dragging the jigsaw to the designated position is often encountered, so how to provide a scheme capable of realizing automatic program identification on the slider assembly in the verification scene is a technical problem that needs to be solved by those skilled in the art at present.
Disclosure of Invention
The application provides a slider assembly detection method and device, a storage medium and electronic equipment, and aims to solve the problem that automatic program identification is performed on a slider assembly in a verification scene.
In order to achieve the above object, the present application provides the following technical solutions:
a slider assembly detection method comprising:
acquiring operation related data of an operation sliding block assembly; the operation-related data includes: a first time period from entering the slider assembly until clicking the slider in the slider assembly, a second time period from clicking the slider until releasing the slider, a slider displacement speed average value, a slider displacement speed standard deviation, a slider movement angle average value, a slider movement angle standard deviation and a slider movement distance;
Inputting the operation related data into a pre-constructed target random forest model to obtain a detection result used for representing whether an operation object for operating the sliding block assembly is an automatic program or not; the target random forest model is obtained through pre-training based on operation sample data included in the slider assembly operation sample data set.
The method, optionally, the acquiring operation related data of the operation slider assembly includes:
acquiring the time of entering the sliding block assembly, the time of starting clicking the sliding block in the sliding block assembly and the starting position coordinates of the sliding block;
sampling position coordinates of the sliding block in the process of operating the sliding block assembly according to the sampling frequency to obtain a plurality of intermediate position coordinates;
acquiring the time for loosening the sliding block and the end position coordinate of the sliding block after loosening the sliding block;
acquiring a first duration from entering the slider assembly until clicking the slider in the slider assembly according to the time of entering the slider assembly and the time of starting clicking the slider;
acquiring a second time length from the start of clicking the slider to the release of the slider according to the time of starting clicking the slider and the time of releasing the slider;
and acquiring a sliding block displacement speed average value, a sliding block displacement speed standard deviation, a sliding block moving angle average value, a sliding block moving angle standard deviation and a sliding block moving distance according to the starting position coordinates, the plurality of intermediate position coordinates, the ending position coordinates, the second duration and the sampling frequency.
According to the above method, optionally, the obtaining a sliding block displacement speed average value, a sliding block displacement speed standard deviation, a sliding block movement angle average value, a sliding block movement angle standard deviation and a sliding block movement distance according to the starting position coordinates, the plurality of intermediate position coordinates, the ending position coordinates, the second duration and the sampling frequency includes:
calculating the moving distance of the sliding block according to the starting position coordinates and the ending position coordinates;
calculating the relative displacement between each position coordinate and the starting position coordinate according to the starting position coordinate, the plurality of intermediate position coordinates and the ending position coordinate; the position coordinates comprise a start position coordinate, a middle position coordinate or an end position coordinate;
calculating the speed and the angle between every two adjacent position coordinates according to the relative displacement between each position coordinate and the starting position coordinate, the second duration and the sampling frequency;
calculating a sliding block displacement speed average value and a sliding block displacement speed standard deviation according to the speed between every two adjacent position coordinates;
and calculating the average value of the sliding block moving angles and the standard deviation of the sliding block moving angles according to the angles between every two adjacent position coordinates.
The method, optionally, the construction process of the target random forest model includes:
acquiring a slider assembly operation sample data set; the slider assembly operation sample data set comprises a plurality of operation sample data, each operation sample data comprises a plurality of characteristic data and an operation object, and the plurality of characteristic data comprises a first historical time period from entering the historical slider assembly until clicking the slider in the historical slider assembly, a second historical time period from starting clicking the slider in the historical slider assembly until loosening the slider in the historical slider assembly after dragging is completed, a historical slider displacement speed mean value, a historical slider displacement speed standard deviation, a historical slider acceleration mean value, a historical slider movement angle standard deviation and a historical slider movement distance;
selecting a plurality of operation sample data as training data, and selecting a plurality of operation sample data as test data;
the method comprises the steps that selected training data are put back from all training data, and A training data sets are obtained; the A is the number of decision trees included in the random forest model;
constructing a decision tree corresponding to each training data set;
and testing the random forest model formed by each decision tree by using each test data to obtain a test result, if the test result does not meet the stop condition, returning to execute the step of constructing the decision tree corresponding to each training data set until the test result meets the stop condition, and determining the current random forest model formed by each decision tree as a target random forest.
The method, optionally, the constructing a decision tree corresponding to each training data set includes:
and for each training data set, randomly selecting B pieces of characteristic data from a plurality of characteristic data included in the training data to form a characteristic subset, determining target characteristic data from the characteristic data included in the characteristic subset according to a coefficient of a base, taking the target characteristic data as a root node of a decision tree, and executing splitting operation on the root node until the splitting depth reaches a preset depth to obtain the decision tree corresponding to the training data set.
A slider assembly detection device, comprising:
an acquisition unit configured to acquire operation-related data for operating the slider assembly; the operation-related data includes: a first time period from entering the slider assembly until clicking the slider in the slider assembly, a second time period from clicking the slider until releasing the slider, a slider displacement speed average value, a slider displacement speed standard deviation, a slider movement angle average value, a slider movement angle standard deviation and a slider movement distance;
the detection unit is used for inputting the operation related data into a pre-constructed target random forest model to obtain a detection result used for representing whether an operation object for operating the sliding block assembly is an automatic program or not; the target random forest model is obtained through pre-training based on operation sample data included in the slider assembly operation sample data set.
The above device, optionally, the acquiring unit is specifically configured to:
acquiring the time of entering the sliding block assembly, the time of starting clicking the sliding block in the sliding block assembly and the starting position coordinates of the sliding block;
sampling position coordinates of the sliding block in the process of operating the sliding block assembly according to the sampling frequency to obtain a plurality of intermediate position coordinates;
acquiring the time for loosening the sliding block and the end position coordinate of the sliding block after loosening the sliding block;
acquiring a first duration from entering the slider assembly until clicking the slider in the slider assembly according to the time of entering the slider assembly and the time of starting clicking the slider;
acquiring a second time length from the start of clicking the slider to the release of the slider according to the time of starting clicking the slider and the time of releasing the slider;
and acquiring a sliding block displacement speed average value, a sliding block displacement speed standard deviation, a sliding block moving angle average value, a sliding block moving angle standard deviation and a sliding block moving distance according to the starting position coordinates, the plurality of intermediate position coordinates, the ending position coordinates, the second duration and the sampling frequency.
The above apparatus, optionally, the obtaining unit is specifically configured to, when obtaining the average value of the sliding block displacement speed, the standard deviation of the sliding block displacement speed, the average value of the sliding block movement angle, the standard deviation of the sliding block movement angle, and the sliding block movement distance according to the start position coordinate, the plurality of intermediate position coordinates, the end position coordinate, the second duration, and the sampling frequency:
Calculating the moving distance of the sliding block according to the starting position coordinates and the ending position coordinates;
calculating the relative displacement between each position coordinate and the starting position coordinate according to the starting position coordinate, the plurality of intermediate position coordinates and the ending position coordinate; the position coordinates comprise a start position coordinate, a middle position coordinate or an end position coordinate;
calculating the speed and the angle between every two adjacent position coordinates according to the relative displacement between each position coordinate and the starting position coordinate, the second duration and the sampling frequency;
calculating a sliding block displacement speed average value and a sliding block displacement speed standard deviation according to the speed between every two adjacent position coordinates;
and calculating the average value of the sliding block moving angles and the standard deviation of the sliding block moving angles according to the angles between every two adjacent position coordinates.
A storage medium storing a set of instructions, wherein the set of instructions, when executed by a processor, implement a slider assembly detection method as disclosed in the first aspect above, or a slider assembly detection method as disclosed in the third aspect.
An electronic device, comprising:
a memory for storing at least one set of instructions;
And a processor, configured to execute an instruction set stored in the memory, and implement the slider assembly detection method disclosed in the first aspect or the slider assembly detection method disclosed in the third aspect by executing the instruction set.
Compared with the prior art, the application has the following advantages:
the application provides a method and a device for detecting a sliding block assembly, a storage medium and electronic equipment, wherein the method is used for acquiring operation related data of an operation sliding block assembly; the operation-related data includes: a first time period from entering the slider assembly until clicking the slider in the slider assembly, a second time period from clicking the slider until releasing the slider, a slider displacement speed average value, a slider displacement speed standard deviation, a slider movement angle average value, a slider movement angle standard deviation and a slider movement distance; inputting operation related data into a pre-constructed target random forest model to obtain a detection result for representing whether an operation object of the operation sliding block assembly is an automatic program or not; the target random forest model is obtained through pre-training based on operation sample data included in the slider assembly operation sample data set. Therefore, according to the scheme, the operation related data of the operation sliding block assembly is input into the target random forest model through pre-constructing the target random forest model, and automatic program identification can be realized on the sliding block assembly in the verification scene, so that corresponding measures are taken conveniently, and the influence on the performance and the safety of the system is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for detecting a slider assembly according to the present application;
FIG. 2 is a flowchart of another method for detecting a slider assembly according to the present application;
FIG. 3 is a flowchart of another method for detecting a slider assembly according to the present application;
FIG. 4 is a flowchart of another method for detecting a slider assembly according to the present application;
FIG. 5 is a schematic diagram of a detecting device for a slider assembly according to the present application;
fig. 6 is a schematic structural diagram of an electronic device according to the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used for distinguishing between different devices, modules, or units and not for limiting the order or interdependence of the functions performed by these devices, modules, or units.
It should be noted that references to "one" or "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be interpreted as "one or more" unless the context clearly indicates otherwise.
The embodiment of the application provides a method for detecting a sliding block assembly, and a flow chart of the method is shown in fig. 1, and specifically comprises the following steps:
s101, acquiring operation related data of an operation sliding block assembly; the operation-related data includes: a first duration from entering the slider assembly until clicking on a slider in the slider assembly, a second duration from starting clicking on the slider until releasing the slider, a slider displacement speed average, a slider displacement speed standard deviation, a slider movement angle average, a slider movement angle standard deviation, and a slider movement distance.
In this embodiment, operation related data of an operation slider assembly is obtained for a scenario in which an operation object operates the slider assembly for verification; wherein the operation-related data includes: a first duration from entering the slider assembly until clicking on a slider in the slider assembly, a second duration from starting clicking on the slider until releasing the slider, a slider displacement speed average, a slider displacement speed standard deviation, a slider movement angle average, a slider movement angle standard deviation, and a slider movement distance.
The sliding block speed average value is the speed average value between the starting position and the position of the sliding block in the sliding assembly after the sliding block is dragged.
The standard deviation of the position and the speed of the sliding block is the standard deviation of the speed of the sliding block in the sliding assembly from the starting position to the position after the dragging is completed.
The average value of the sliding block moving angle is the standard deviation of the speed of the sliding block in the sliding assembly from the starting position to the position after the dragging is completed.
The sliding block moving angle mean value is the standard deviation of the angle between the starting position and the position of the sliding block after the dragging is completed.
The sliding block moving distance is the distance that the sliding block in the sliding component moves from the starting position to the position after being dragged.
For example, the first time period from entering the slider assembly until clicking on the slider in the slider assembly may be equal to Δt h onver Indicating that the second time period from the start of clicking the slider until the slider is released can be used as Δt enter The mean value of the displacement speed of the sliding block can be expressed as V mean The standard deviation of the displacement speed of the sliding block can be expressed by V std The average value of the sliding block moving angle can be represented by angel mean The representation is made of a combination of a first and a second color,the standard deviation of the sliding block moving angle can be angel std The slider movement Distance may be expressed as Distance.
Referring to fig. 2, the process of acquiring operation related data of the operation slider assembly specifically includes the following steps:
s201, acquiring time for entering the slider assembly, time for starting clicking the slider in the slider assembly and starting position coordinates of the slider.
In this embodiment, the time for entering the slider assembly is obtained, that is, the time for jumping to the page where the slider assembly is located is obtained, for example, when logging in a website, after inputting login information, the user jumps to the verification page where the slider assembly is located, and the time for jumping to the verification page where the slider assembly is located is the time for entering the slider assembly.
In this embodiment, the process of operating the sliding assembly by the operation object is: clicking the sliding block in the sliding component, dragging the sliding component to finish verification, and loosening the sliding block.
In this embodiment, the time when the operation object starts clicking the slider in the slider assembly and the start position coordinates of the slider are acquired; the starting position coordinates of the sliding block are coordinates of the position of the sliding block before the sliding block is not operated.
The time of entry into the slider assembly may be expressed, for example, as t on_h over The time to begin clicking on a slider in the slider assembly may be denoted as t enter The starting position coordinates of the slider can be expressed as pos enter
S202, sampling position coordinates of the sliding block in the process of operating the sliding block assembly according to the sampling frequency to obtain a plurality of middle position coordinates.
In this embodiment, the position coordinates of the slider during the operation of the slider assembly are sampled by a frequency, which may be represented as N, for example, to obtain a plurality of intermediate position coordinates.
The plurality of intermediate position coordinates may be expressed as pos 1 ,pos 2 ...pos i
Wherein,Δt enter for a second period of time from the start of clicking the slider until the slider is released.
S203, acquiring the time for loosening the sliding block and the end position coordinates of the sliding block after loosening the sliding block.
In this embodiment, the time for releasing the slider and the end position coordinates of the slider after releasing the slider are obtained.
The time for releasing the slider can be expressed as t leave The end position coordinates of the slider after releasing the slider can be expressed as pos leave
S204, acquiring a first duration from entering the slider assembly to clicking the slider in the slider assembly according to the time of entering the slider assembly and the time of starting clicking the slider.
And obtaining a first duration from entering the slider assembly until clicking the slider in the slider assembly according to the time of entering the slider assembly and the time of starting clicking the slider by the operation object, specifically subtracting the time of entering the slider assembly from the time of starting clicking the slider, and obtaining the first duration from entering the slider assembly until clicking the slider in the slider assembly.
S205, acquiring a second time period from the start of clicking the slider to the release of the slider according to the time of starting clicking the slider and the time of releasing the slider.
And obtaining a second duration from the start of clicking the slider to the release of the slider after the completion of dragging according to the time of the operation object to start clicking the slider and the time of the operation object to release the slider, specifically subtracting the time of the start of clicking the slider from the time of the release of the slider, thereby obtaining the second duration from the start of clicking the slider to the release of the slider.
S206, acquiring a sliding block displacement speed average value, a sliding block displacement speed standard deviation, a sliding block moving angle average value, a sliding block moving angle standard deviation and a sliding block moving distance according to the starting position coordinates, the plurality of intermediate position coordinates, the ending position coordinates, the second duration and the sampling frequency.
In this embodiment, according to the start position coordinates, the plurality of intermediate position coordinates, the second duration of the end position coordinates, and the sampling frequency, the slide displacement speed average value, the slide displacement speed standard deviation, the slide movement angle average value, the slide movement angle standard deviation, and the slide movement distance are obtained.
Referring to fig. 3, according to the start position coordinates, the plurality of intermediate position coordinates, the second duration of the end position coordinates, and the sampling frequency, a process of obtaining a sliding block displacement speed average value, a sliding block displacement speed standard deviation, a sliding block movement angle average value, a sliding block movement angle standard deviation, and a sliding block movement distance specifically includes the following steps:
s301, calculating the moving distance of the sliding block according to the starting position coordinates and the ending position coordinates.
In this embodiment, the sliding movement distance is calculated according to the start position coordinate and the end position coordinate, specifically, according to the start position coordinate and the end position coordinate, the sliding movement distance is calculated by a distance calculation formula.
S302, calculating relative displacement between each position coordinate and the starting position coordinate according to the starting position coordinate, the plurality of intermediate position coordinates and the ending position coordinate; the position coordinates include a start position coordinate, an intermediate position coordinate, or an end position coordinate.
Calculating the relative displacement between each position coordinate and the starting position coordinate according to the starting position coordinate, the plurality of intermediate position coordinates and the ending position coordinate, namely calculating pos enter -pos enter ,pos 1 -pos enter ,pos 2 -pos enter ...pos i -pos enter ,pos leave -pos enter
Wherein the position coordinates include a start position coordinate, an intermediate position coordinate, or an end position coordinate.
Specifically, the relative displacement between the starting position coordinates and the starting position coordinates is calculated, the relative displacement of quality inspection of each intermediate position coordinate and the starting position coordinates is calculated, and the relative displacement of quality inspection of the ending position coordinates and the starting position coordinates is calculated.
For example, the relative displacement between each position coordinate and the start position coordinate may be expressed as
S303, calculating the speed and the angle between every two adjacent position coordinates according to the relative displacement between each position coordinate and the starting position coordinate, the second duration and the sampling frequency.
In this embodiment, the speed between every two adjacent position coordinates is calculated according to the relative displacement between each position coordinate and the start position coordinate, the second duration and the sampling frequency by the first formula.
Wherein, the first formula is:
wherein V 'is' t For the velocity between the coordinates of the t-th adjacent two positions, t represents the t-th relative displacement, Δt enter The second time period from the start of clicking the slider until the slider is released is indicated, and N is the adoption frequency.
Thereby obtaining the velocity between all adjacent two position coordinates as
According to the relative displacement between each position coordinate and the starting position coordinate, calculating the angle between every two adjacent position coordinates through a second formula.
Wherein, the second formula is:
angle t =tan(Pos' t+1 ,Pos' t )
wherein angle is t The angle between the t-th adjacent two position coordinates.
Thereby obtaining the angles between all adjacent two position coordinates as
S304, calculating the average value of the displacement speed of the sliding block and the standard deviation of the displacement speed of the sliding block according to the speed between every two adjacent position coordinates.
In this embodiment, the average value of the displacement speed of the slide block is calculated according to the speed between every two adjacent position coordinates by a third formula.
Wherein, the third formula is:
wherein V is mean Is the average value of the displacement speed of the sliding block.
In this embodiment, according to the speed between every two adjacent position coordinates, the standard deviation of the displacement speed of the slider is calculated by a fourth formula.
Wherein the fourth formula is:
wherein V is std Is the standard deviation of the displacement speed of the sliding block.
S305, calculating a sliding block moving angle mean value and a sliding block moving angle standard deviation according to the angle between every two adjacent position coordinates.
According to the angle between every two adjacent position coordinates, calculating the average value of the sliding block moving angles through a fifth formula.
Wherein, the fifth formula is:
wherein angle is mean Is the average value of the moving angles of the sliding blocks.
And calculating the standard deviation of the sliding block movement angle according to the angle between every two adjacent position coordinates through a sixth formula.
Wherein, the sixth formula is:
wherein angle is std Is the standard deviation of the displacement angle of the sliding block.
S102, inputting operation related data into a pre-constructed target random forest model to obtain a detection result used for representing whether an operation object of the operation sliding block assembly is an automatic program.
In this embodiment, a target random forest model is built in advance.
Referring to fig. 4, the construction process of the target random forest model specifically includes the following steps:
s401, acquiring a slider assembly operation sample data set.
In this embodiment, a slider assembly operation sample data set is obtained, where the slider assembly operation sample data set includes a plurality of operation sample data, and each operation sample data includes a plurality of feature data and an operation object, where the plurality of feature data includes a first historical time period from entering the history slider assembly until clicking the slider in the history slider assembly, a second historical time period from starting clicking the slider in the history slider assembly until releasing the slider in the history slider assembly after dragging is completed, a history slider displacement speed average, a history slider displacement speed standard deviation, a history slider acceleration average, a history slider movement angle standard deviation, and a history slider movement distance.
Alternatively, each operation sample data may be expressed as { Δt } h onver ,Δt enter ,V mean ,V std ,angel mean ,angel std Distance, valid, wherein valid is an operation object including a real user or an automation program.
S402, selecting a plurality of operation sample data as training data, and selecting a plurality of operation sample data as test data.
A plurality of operation sample data is selected as training data and a plurality of operation sample data is selected as test data, alternatively ninety percent of the plurality of operation sample data may be used as training data and the remaining ten percent of the operation sample data may be used as test data.
S403, selecting training data which are put back from the training data to obtain A training data sets.
And selecting training data which are put back from the training data, so that A training data sets are obtained, wherein A is the number of decision trees included in the random forest model, and the number of the training data included in each training data set is the same as the number of the operation sample data which are selected as the training data.
S404, constructing a decision tree corresponding to each training data set.
And constructing a decision tree corresponding to each training data set.
Specifically, for each training data set, B pieces of feature data are randomly selected from a plurality of feature data included in the training data to form a feature subset, target feature data are determined from the feature data included in the feature subset according to the coefficient of the base, the target feature data are used as root nodes of the decision tree, splitting operation is performed on the root nodes until the splitting depth reaches a preset depth, and the decision tree corresponding to the training data set is obtained.
Wherein B is less than the total number of feature data comprised by the training data.
Exemplary, the training data includes a total number of characteristic data of m, and B may be That is, B may be +.>Rounding or->Is the rounding of (2)Or->Is a rounding of (2).
The specific implementation process of determining the target feature data from the feature data included in the feature subset according to the coefficient of kunning may refer to the prior art, and will not be described herein.
S405, testing a random forest model formed by each decision tree by using each test data to obtain a test result.
In this embodiment, a random forest model formed by each decision tree is tested by using each test data, specifically, the test data is passed through each decision tree in the random forest model to obtain a predicted result of each decision tree, and the average value of each predicted result is calculated, so as to obtain a test result based on the average value of each predicted result.
S406, judging whether the test result meets the stop condition, if not, executing S404, and if yes, executing S407.
Judging whether the test result meets the stop condition, specifically, calculating the accuracy of the test result, judging whether the accuracy is larger than a preset threshold, if the accuracy is larger than the preset threshold, determining that the test result meets the stop condition, and if the test result is not larger than the preset threshold, determining that the test result does not meet the stop condition.
In this example, if the test result satisfies the stop condition, step S407 is executed, and if the test result does not satisfy the stop condition, step S404 is executed.
S407, determining the current random forest model formed by all the decision trees as a target random forest.
In this embodiment, if the test result meets the stop condition, determining that the current random forest model is a target random forest formed by each decision tree.
Illustratively, the above-mentioned construction process of the target random forest is illustrated as follows:
and (5) manually collecting effective data and establishing an initial slider data set S. The collected data set S is taken as a training sample matrix into a Random Forest (Random Forest) model.
And cutting the data set S into S', T, wherein the proportions are [0.9,0.1] respectively.
The original sample set S' is decimated from t training sample sets. t is the number of decision trees in the random forest model.
For each decision tree t in the random forest model:
a subset of valid training samples is randomly selected and replaced to create a boot sample from the valid data (Bootstrap method). A feature subset (m') is randomly selected from the total feature set (m=7) without substitution. The decision tree is trained using guided samples of valid data and selected features.
Training for decision trees:
on each node of the decision tree, finding out the optimal characteristic and segmentation point according to the coefficient of the radix, and segmenting the sample:
P i representing the probability of each category occurring. The smaller the value of the coefficient of kunity, the purer the sample, and the easier the classification. And selecting one most suitable characteristic as a splitting node according to Gini, and splitting the valid sample into two child nodes according to the selected characteristic and a splitting point. This process is repeated recursively until the stopping criterion (maximum depth) is met.
Model prediction:
the prediction process is kept unchanged, the test sample T passes through each tree in the random forest, and the final prediction result is determined by the mean value.
The accuracy of the test sample may be determined empirically by repeating the random forest process by adjusting the value of m', which may be empirically determinedAnd (3) testing.
The model of the screening robot can be obtained by training only with effective data, and the target random forest model is obtained.
According to the sliding block assembly detection method provided by the embodiment of the application, the operation related data of the operation sliding block assembly is obtained; the operation-related data includes: a first time period from entering the slider assembly until clicking the slider in the slider assembly, a second time period from clicking the slider until releasing the slider, a slider displacement speed average value, a slider displacement speed standard deviation, a slider movement angle average value, a slider movement angle standard deviation and a slider movement distance; inputting operation related data into a pre-constructed target random forest model to obtain a detection result for representing whether an operation object of the operation sliding block assembly is an automatic program or not; the target random forest model is obtained through pre-training based on operation sample data included in the slider assembly operation sample data set. Therefore, according to the scheme, the operation related data of the operation sliding block assembly is input into the target random forest model through pre-constructing the target random forest model, and automatic program identification can be realized on the sliding block assembly in the verification scene, so that corresponding measures are taken conveniently, and the influence on the performance and the safety of the system is reduced.
It should be noted that although instructions are depicted in a particular order, this should not be understood as requiring that such instructions be executed in the particular order presented, or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
Corresponding to the method shown in fig. 1, the embodiment of the application further provides a device for detecting a slider assembly, which is used for implementing the method shown in fig. 1, and the device has a structure schematically shown in fig. 5, and specifically includes:
an acquisition unit 501 for acquiring operation-related data of operating the slider assembly; the operation-related data includes: a first time period from entering the slider assembly until clicking the slider in the slider assembly, a second time period from clicking the slider until releasing the slider, a slider displacement speed average value, a slider displacement speed standard deviation, a slider movement angle average value, a slider movement angle standard deviation and a slider movement distance;
The detection unit 502 is configured to input the operation-related data into a pre-constructed target random forest model, to obtain a detection result for characterizing whether an operation object for operating the slider assembly is an automation program; the target random forest model is obtained through pre-training based on operation sample data included in the slider assembly operation sample data set.
According to the slide block component detection device provided by the embodiment of the application, the operation related data of the operation slide block component is input into the target random forest model by constructing the target random forest model in advance, so that the slide block component in the verification scene can be automatically identified by a program, corresponding measures can be taken conveniently, and the influence on the performance and the safety of the system is reduced.
In one embodiment of the present application, based on the foregoing scheme, the obtaining unit 501 is specifically configured to:
acquiring the time of entering the sliding block assembly, the time of starting clicking the sliding block in the sliding block assembly and the starting position coordinates of the sliding block;
sampling position coordinates of the sliding block in the process of operating the sliding block assembly according to the sampling frequency to obtain a plurality of intermediate position coordinates;
acquiring the time for loosening the sliding block and the end position coordinate of the sliding block after loosening the sliding block;
Acquiring a first duration from entering the slider assembly until clicking the slider in the slider assembly according to the time of entering the slider assembly and the time of starting clicking the slider;
acquiring a second time length from the start of clicking the slider to the release of the slider according to the time of starting clicking the slider and the time of releasing the slider;
and acquiring a sliding block displacement speed average value, a sliding block displacement speed standard deviation, a sliding block moving angle average value, a sliding block moving angle standard deviation and a sliding block moving distance according to the starting position coordinates, the plurality of intermediate position coordinates, the ending position coordinates, the second duration and the sampling frequency.
In one embodiment of the present application, based on the foregoing scheme, the obtaining unit 501 is specifically configured to, when obtaining the average value of the slide displacement speed, the standard deviation of the slide displacement speed, the average value of the slide movement angle, the standard deviation of the slide movement angle, and the slide movement distance according to the start position coordinate, the plurality of intermediate position coordinates, the end position coordinate, the second duration, and the sampling frequency:
calculating the moving distance of the sliding block according to the starting position coordinates and the ending position coordinates;
calculating the relative displacement between each position coordinate and the starting position coordinate according to the starting position coordinate, the plurality of intermediate position coordinates and the ending position coordinate; the position coordinates comprise a start position coordinate, a middle position coordinate or an end position coordinate;
Calculating the speed and the angle between every two adjacent position coordinates according to the relative displacement between each position coordinate and the starting position coordinate, the second duration and the sampling frequency;
calculating a sliding block displacement speed average value and a sliding block displacement speed standard deviation according to the speed between every two adjacent position coordinates;
and calculating the average value of the sliding block moving angles and the standard deviation of the sliding block moving angles according to the angles between every two adjacent position coordinates.
In one embodiment of the present application, based on the foregoing scheme, the detection unit 502 is specifically configured to:
acquiring a slider assembly operation sample data set; the slider assembly operation sample data set comprises a plurality of operation sample data, each operation sample data comprises a plurality of characteristic data and an operation object, and the plurality of characteristic data comprises a first historical time period from entering the historical slider assembly until clicking the slider in the historical slider assembly, a second historical time period from starting clicking the slider in the historical slider assembly until loosening the slider in the historical slider assembly after dragging is completed, a historical slider displacement speed mean value, a historical slider displacement speed standard deviation, a historical slider acceleration mean value, a historical slider movement angle standard deviation and a historical slider movement distance;
Selecting a plurality of operation sample data as training data, and selecting a plurality of operation sample data as test data;
the method comprises the steps that selected training data are put back from all training data, and A training data sets are obtained; the A is the number of decision trees included in the random forest model;
constructing a decision tree corresponding to each training data set;
and testing the random forest model formed by each decision tree by using each test data to obtain a test result, if the test result does not meet the stop condition, returning to execute the step of constructing the decision tree corresponding to each training data set until the test result meets the stop condition, and determining the current random forest model formed by each decision tree as a target random forest.
In one embodiment of the present application, based on the foregoing scheme, the detection unit 502 is specifically configured to, when constructing the decision tree corresponding to each training data set:
and for each training data set, randomly selecting B pieces of characteristic data from a plurality of characteristic data included in the training data to form a characteristic subset, determining target characteristic data from the characteristic data included in the characteristic subset according to a coefficient of a base, taking the target characteristic data as a root node of a decision tree, and executing splitting operation on the root node until the splitting depth reaches a preset depth to obtain the decision tree corresponding to the training data set.
The embodiment of the application also provides a storage medium, wherein the storage medium stores an instruction set, and the method for detecting the sliding block assembly disclosed in any embodiment above is executed when the instruction set runs.
The embodiment of the application also provides an electronic device, the structure of which is shown in fig. 6, specifically including a memory 601 for storing at least one group of instruction sets; a processor 602 for executing the instruction set stored in the memory by performing the slider assembly detection method as disclosed in any of the embodiments above.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.
While several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
The above description is only illustrative of the presently disclosed preferred embodiments and of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be made by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as the above-described features, are mutually replaced with the technical features having similar functions disclosed in the disclosure (but not limited to the disclosure).

Claims (10)

1. A method of detecting a slider assembly, comprising:
acquiring operation related data of an operation sliding block assembly; the operation-related data includes: a first time period from entering the slider assembly until clicking the slider in the slider assembly, a second time period from clicking the slider until releasing the slider, a slider displacement speed average value, a slider displacement speed standard deviation, a slider movement angle average value, a slider movement angle standard deviation and a slider movement distance;
inputting the operation related data into a pre-constructed target random forest model to obtain a detection result used for representing whether an operation object for operating the sliding block assembly is an automatic program or not; the target random forest model is obtained through pre-training based on operation sample data included in the slider assembly operation sample data set.
2. The method of claim 1, wherein the acquiring operation-related data of the operation slider assembly comprises:
acquiring the time of entering the sliding block assembly, the time of starting clicking the sliding block in the sliding block assembly and the starting position coordinates of the sliding block;
sampling position coordinates of the sliding block in the process of operating the sliding block assembly according to the sampling frequency to obtain a plurality of intermediate position coordinates;
acquiring the time for loosening the sliding block and the end position coordinate of the sliding block after loosening the sliding block;
acquiring a first duration from entering the slider assembly until clicking the slider in the slider assembly according to the time of entering the slider assembly and the time of starting clicking the slider;
acquiring a second time length from the start of clicking the slider to the release of the slider according to the time of starting clicking the slider and the time of releasing the slider;
and acquiring a sliding block displacement speed average value, a sliding block displacement speed standard deviation, a sliding block moving angle average value, a sliding block moving angle standard deviation and a sliding block moving distance according to the starting position coordinates, the plurality of intermediate position coordinates, the ending position coordinates, the second duration and the sampling frequency.
3. The method of claim 2, wherein the obtaining a slider displacement velocity mean, a slider displacement velocity standard deviation, a slider movement angle mean, a slider movement angle standard deviation, and a slider movement distance from the start position coordinates, the plurality of intermediate position coordinates, the end position coordinates, the second duration, and the sampling frequency comprises:
Calculating the moving distance of the sliding block according to the starting position coordinates and the ending position coordinates;
calculating the relative displacement between each position coordinate and the starting position coordinate according to the starting position coordinate, the plurality of intermediate position coordinates and the ending position coordinate; the position coordinates comprise a start position coordinate, a middle position coordinate or an end position coordinate;
calculating the speed and the angle between every two adjacent position coordinates according to the relative displacement between each position coordinate and the starting position coordinate, the second duration and the sampling frequency;
calculating a sliding block displacement speed average value and a sliding block displacement speed standard deviation according to the speed between every two adjacent position coordinates;
and calculating the average value of the sliding block moving angles and the standard deviation of the sliding block moving angles according to the angles between every two adjacent position coordinates.
4. The method of claim 1, wherein the process of constructing the target random forest model comprises:
acquiring a slider assembly operation sample data set; the slider assembly operation sample data set comprises a plurality of operation sample data, each operation sample data comprises a plurality of characteristic data and an operation object, and the plurality of characteristic data comprises a first historical time period from entering the historical slider assembly until clicking the slider in the historical slider assembly, a second historical time period from starting clicking the slider in the historical slider assembly until loosening the slider in the historical slider assembly after dragging is completed, a historical slider displacement speed mean value, a historical slider displacement speed standard deviation, a historical slider acceleration mean value, a historical slider movement angle standard deviation and a historical slider movement distance;
Selecting a plurality of operation sample data as training data, and selecting a plurality of operation sample data as test data;
the method comprises the steps that selected training data are put back from all training data, and A training data sets are obtained; the A is the number of decision trees included in the random forest model;
constructing a decision tree corresponding to each training data set;
and testing the random forest model formed by each decision tree by using each test data to obtain a test result, if the test result does not meet the stop condition, returning to execute the step of constructing the decision tree corresponding to each training data set until the test result meets the stop condition, and determining the current random forest model formed by each decision tree as a target random forest.
5. The method of claim 4, wherein constructing a decision tree for each training dataset comprises:
and for each training data set, randomly selecting B pieces of characteristic data from a plurality of characteristic data included in the training data to form a characteristic subset, determining target characteristic data from the characteristic data included in the characteristic subset according to a coefficient of a base, taking the target characteristic data as a root node of a decision tree, and executing splitting operation on the root node until the splitting depth reaches a preset depth to obtain the decision tree corresponding to the training data set.
6. A slider assembly detection device, comprising:
an acquisition unit configured to acquire operation-related data for operating the slider assembly; the operation-related data includes: a first time period from entering the slider assembly until clicking the slider in the slider assembly, a second time period from clicking the slider until releasing the slider, a slider displacement speed average value, a slider displacement speed standard deviation, a slider movement angle average value, a slider movement angle standard deviation and a slider movement distance;
the detection unit is used for inputting the operation related data into a pre-constructed target random forest model to obtain a detection result used for representing whether an operation object for operating the sliding block assembly is an automatic program or not; the target random forest model is obtained through pre-training based on operation sample data included in the slider assembly operation sample data set.
7. The apparatus according to claim 6, wherein the acquisition unit is specifically configured to:
acquiring the time of entering the sliding block assembly, the time of starting clicking the sliding block in the sliding block assembly and the starting position coordinates of the sliding block;
sampling position coordinates of the sliding block in the process of operating the sliding block assembly according to the sampling frequency to obtain a plurality of intermediate position coordinates;
Acquiring the time for loosening the sliding block and the end position coordinate of the sliding block after loosening the sliding block;
acquiring a first duration from entering the slider assembly until clicking the slider in the slider assembly according to the time of entering the slider assembly and the time of starting clicking the slider;
acquiring a second time length from the start of clicking the slider to the release of the slider according to the time of starting clicking the slider and the time of releasing the slider;
and acquiring a sliding block displacement speed average value, a sliding block displacement speed standard deviation, a sliding block moving angle average value, a sliding block moving angle standard deviation and a sliding block moving distance according to the starting position coordinates, the plurality of intermediate position coordinates, the ending position coordinates, the second duration and the sampling frequency.
8. The apparatus of claim 7, wherein the obtaining unit is configured to, when obtaining the average value of the slide displacement speed, the standard deviation of the slide displacement speed, the average value of the slide movement angle, the standard deviation of the slide movement angle, and the slide movement distance according to the start position coordinates, the plurality of intermediate position coordinates, the end position coordinates, the second duration, and the sampling frequency:
calculating the moving distance of the sliding block according to the starting position coordinates and the ending position coordinates;
Calculating the relative displacement between each position coordinate and the starting position coordinate according to the starting position coordinate, the plurality of intermediate position coordinates and the ending position coordinate; the position coordinates comprise a start position coordinate, a middle position coordinate or an end position coordinate;
calculating the speed and the angle between every two adjacent position coordinates according to the relative displacement between each position coordinate and the starting position coordinate, the second duration and the sampling frequency;
calculating a sliding block displacement speed average value and a sliding block displacement speed standard deviation according to the speed between every two adjacent position coordinates;
and calculating the average value of the sliding block moving angles and the standard deviation of the sliding block moving angles according to the angles between every two adjacent position coordinates.
9. A storage medium having stored thereon a set of instructions which when executed by a processor implement the slider assembly detection method of any of claims 1-5.
10. An electronic device, comprising:
a memory for storing at least one set of instructions;
a processor for executing a set of instructions stored in the memory, by executing the set of instructions, to implement the slider assembly detection method of any one of claims 1-5.
CN202311203312.8A 2023-09-18 2023-09-18 Slider assembly detection method and device, storage medium and electronic equipment Pending CN117055793A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311203312.8A CN117055793A (en) 2023-09-18 2023-09-18 Slider assembly detection method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311203312.8A CN117055793A (en) 2023-09-18 2023-09-18 Slider assembly detection method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117055793A true CN117055793A (en) 2023-11-14

Family

ID=88664636

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311203312.8A Pending CN117055793A (en) 2023-09-18 2023-09-18 Slider assembly detection method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117055793A (en)

Similar Documents

Publication Publication Date Title
CN110222701B (en) Automatic bridge disease identification method
CN110046706B (en) Model generation method and device and server
CN111860318A (en) Construction site pedestrian loitering detection method, device, equipment and storage medium
CN109740549A (en) SAR image object detection system and method based on semi-supervised CNN
CN116311081B (en) Medical laboratory monitoring image analysis method and system based on image recognition
CN111338692A (en) Vulnerability classification method and device based on vulnerability codes and electronic equipment
CN113393454A (en) Method and device for segmenting pathological target examples in biopsy tissues
CN110808995B (en) Safety protection method and device
CN112307994A (en) Obstacle identification method based on sweeper, electronic device and storage medium
CN111476102A (en) Safety protection method, central control equipment and computer storage medium
EP3611695A1 (en) Generating annotation data of tissue images
CN117857088A (en) Network traffic abnormality detection method, system, equipment and medium
CN112953948A (en) Real-time network transverse worm attack flow detection method and device
CN112073396A (en) Method and device for detecting transverse movement attack behavior of intranet
CN117055793A (en) Slider assembly detection method and device, storage medium and electronic equipment
CN116168438A (en) Key point detection method and device and electronic equipment
CN111241930A (en) Method and system for face recognition
CN116071335A (en) Wall surface acceptance method, device, equipment and storage medium
KR102245896B1 (en) Annotation data verification method based on artificial intelligence model and system therefore
KR20230102273A (en) System for learning image processing, method for automatic sampling and labeling using the same
CN114742993A (en) Method, device, processor and storage medium for realizing COVID-19Ag antigen detection result identification based on vision
CN115311680A (en) Human body image quality detection method and device, electronic equipment and storage medium
CN114387266A (en) Training method, device, equipment and storage medium for tubercle bacillus detection model
CN116630752B (en) Construction site target object identification method and device based on AI algorithm
CN111914658B (en) Pedestrian recognition method, device, equipment and medium

Legal Events

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