XPath data tampering warning method, device, equipment and readable storage medium
1. An alarm method for tampering XPath data of extensible markup language path language is characterized in that the alarm method for tampering XPath data comprises the following steps:
acquiring XPath data before filtering, which is changed in a webpage;
filtering webpage updating data in the XPath data before filtering based on a preset variable area filter to obtain target XPath data;
and outputting tampering alarm information corresponding to the target XPath data.
2. The XPath data tampering warning method of claim 1, wherein the filtering the web page update data in the pre-filtering XPath data based on a preset volatile area filter to obtain target XPath data comprises:
filtering webpage updating data in the XPath data before filtering based on a preset variable area filter to obtain filtered XPath data;
acquiring webpage updating data in the XPath data before filtering, and detecting the webpage updating data to obtain a detection result;
determining target XPath data based on the detection result and the filtered XPath data.
3. The XPath data tampering alarm method of claim 2 in which the detection result includes a first detection result, and the detecting the web page update data to obtain a detection result includes:
and inputting the webpage updating data to a first preset detection model to obtain a first detection result.
4. The XPath data tampering alarm method of claim 3, wherein before inputting the web page update data to the first predetermined detection model and obtaining the first detection result, the method comprises:
obtaining variation characteristic XPath data to be extracted;
extracting the variation characteristics in the variation characteristic XPath data to be extracted based on a preset self-learning model;
and determining the first preset detection model based on the change characteristics.
5. The method for warning tampering of XPath data as claimed in claim 1, wherein the filtering the web page update data in the pre-filtering XPath data based on a pre-determined volatile area filter to obtain the target XPath data comprises:
obtaining XPath sample data;
identifying the XPath sample data based on a preset identification mode to obtain a variable region;
generating the volatile filter based on the volatile.
6. The method of claim 2, wherein the detection result comprises a second detection result, and the detecting the web page update data to obtain a detection result further comprises:
and inputting the webpage updating data to a second preset detection model to obtain a second detection result.
7. The method of claim 6, wherein inputting the filtered XPath data into a second predetermined inspection model before obtaining a second inspection result comprises:
acquiring an XPath training data set and a detection model to be trained;
training the detection model to be trained based on the XPath training data set to obtain an updated detection model to be trained, and determining whether the updated detection model to be trained meets a preset iteration ending condition;
if the updated detection model to be trained meets the preset iteration end condition, taking the updated detection model to be trained as the second preset detection model;
and if the updated detection model to be trained does not meet the iteration ending condition, returning to the step of performing iterative training on the detection model to be trained based on the XPath training data set until the updated detection model to be trained meets the iteration ending condition.
8. An XPath data tamper alert device, comprising:
the first acquisition module is used for acquiring XPath data before filtering which changes in the webpage;
the filtering module is used for filtering webpage updating data in the XPath data before filtering based on a preset variable area filter to obtain target XPath data;
and the output module is used for outputting the tampering alarm information corresponding to the target XPath data.
9. An XPath data tamper alert device comprising a memory, a processor and an XPath data tamper alert program stored on said memory and operable on said processor, said XPath data tamper alert program when executed by said processor implementing the steps of the XPath data tamper alert method of any one of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon an XPath data tamper alert program, which when executed by a processor, implements the steps of an XPath data tamper alert method as claimed in any one of claims 1 to 7.
Background
With the rapid development and popularization of the internet, the network threat comes along while users enjoy the resource sharing brought by the internet. Once a webpage corresponding to the website is subjected to security events such as tampering, Trojan hanging and the like, and a supervisor of the website cannot timely sense the security events, the website is an information window of an external service of an enterprise, and the enterprise is greatly influenced.
Currently, a detection method for webpage tampering includes: based on the hash watermark comparison technology of the webpage source code, the specific changed DOM (Document Object Model) node XPath (XML Path Language) Path is circularly traversed through hash comparison, and if the information of the XPath Path is found to be changed, webpage tampering alarm is carried out. However, the reasons for the change of the information of the XPath path on the webpage include not only the webpage tampering but also the webpage updating, so that when the webpage tampering alarms, the method not only alarms the webpage tampering, but also alarms the webpage updating, and the webpage updating does not belong to the webpage tampering, so that the webpage tampering alarm has a high false alarm rate.
That is, the prior art has the problem of high false alarm rate when the webpage tampering alarm is performed.
Disclosure of Invention
The present application mainly aims to provide an XPath data tampering alarm method, apparatus, device and readable storage medium, and aims to solve the technical problem of how to reduce the false alarm rate when a web page tampering alarm is performed.
In order to achieve the above object, the present application provides an XPath data tampering alarm method, where the XPath data tampering alarm method includes the steps of:
acquiring XPath data before filtering, which is changed in a webpage;
filtering webpage updating data in the XPath data before filtering based on a preset variable area filter to obtain target XPath data;
and outputting tampering alarm information corresponding to the target XPath data.
Optionally, the filtering, based on a preset volatile area filter, web page update data in the pre-filtering XPath data to obtain target XPath data includes:
filtering webpage updating data in the XPath data before filtering based on a preset variable area filter to obtain filtered XPath data;
acquiring webpage updating data in the XPath data before filtering, and detecting the webpage updating data to obtain a detection result;
determining target XPath data based on the detection result and the filtered XPath data.
Optionally, the detecting result includes a first detecting result, and the detecting the web page update data to obtain a detecting result includes:
and inputting the webpage updating data to a first preset detection model to obtain a first detection result.
Optionally, the inputting the webpage update data to a first preset detection model before obtaining a first detection result includes:
obtaining variation characteristic XPath data to be extracted;
extracting the variation characteristics in the variation characteristic XPath data to be extracted based on a preset self-learning model;
and determining the first preset detection model based on the change characteristics.
Optionally, before filtering the web page update data in the pre-filtering XPath data based on the preset volatile area filter to obtain the target XPath data, the method includes:
obtaining XPath sample data;
identifying the XPath sample data based on a preset identification mode to obtain a variable region;
generating the volatile filter based on the volatile.
Optionally, the detecting result includes a second detecting result, and the detecting the web page update data to obtain the detecting result further includes:
and inputting the webpage updating data to a second preset detection model to obtain a second detection result.
Optionally, the inputting the filtered XPath data to a second preset detection model, before obtaining a second detection result, includes:
acquiring an XPath training data set and a detection model to be trained;
training the detection model to be trained based on the XPath training data set to obtain an updated detection model to be trained, and determining whether the updated detection model to be trained meets a preset iteration ending condition;
if the updated detection model to be trained meets the preset iteration end condition, taking the updated detection model to be trained as the second preset detection model;
and if the updated detection model to be trained does not meet the iteration ending condition, returning to the step of performing iterative training on the detection model to be trained based on the XPath training data set until the updated detection model to be trained meets the iteration ending condition.
Further, to achieve the above object, the present application provides an XPath data tampering warning apparatus comprising:
the first acquisition module is used for acquiring XPath data before filtering which changes in the webpage;
the filtering module is used for filtering webpage updating data in the XPath data before filtering based on a preset variable area filter to obtain target XPath data;
and the output module is used for outputting the tampering alarm information corresponding to the target XPath data.
Furthermore, in order to achieve the above object, the present application also provides an XPath data tampering warning device comprising a memory, a processor and an XPath data tampering warning program stored in the memory and operable on the processor, wherein the XPath data tampering warning program, when executed by the processor, implements the steps of the XPath data tampering warning method as described above.
Further, to achieve the above object, the present application also provides a computer-readable storage medium having stored thereon an XPath data tamper alert program, which when executed by a processor, implements the steps of the XPath data tamper alert method as described above.
Compared with the prior art that if the information of the XPath path is found to be changed, webpage tampering alarm is carried out, so that the false alarm rate is high, the method obtains the XPath data before filtering, which is changed in the webpage; filtering webpage updating data in the XPath data before filtering based on a preset variable area filter to obtain target XPath data; and outputting tampering alarm information corresponding to the target XPath data. XPath data before filtering is filtered through predetermineeing yielding filter, obtain target XPath data, make the webpage update data in the XPath data before filtering filtered by, and output target XPath data corresponding and falsify alarm information, the falsification alarm information that XPath data before filtering that has changed in the direct output webpage corresponds has been avoided, make the warning false positive that has avoided webpage update data to correspond, thereby the false positive rate when having reduced webpage falsification and reporting an emergency and asking for help or increased vigilance.
Drawings
FIG. 1 is a schematic flow chart of a first embodiment of an XPath data tampering warning method in the present application;
FIG. 2 is a functional block diagram of a preferred embodiment of an XPath data tampering warning device of the present application;
fig. 3 is a schematic structural diagram of a hardware operating environment according to an embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Referring to fig. 1, fig. 1 is a schematic flow diagram of a first embodiment of an XPath data tampering alarm method according to the present application.
The embodiment of the present application provides an embodiment of an XPath data tampering warning method, and it should be noted that, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that here. The XPath data tampering alarm method can be applied to a server. For convenience of description, the following omits the steps of performing the subject description XPath data tampering alarm method. The XPath data tampering alarm method comprises the following steps:
step S110, acquiring the XPath data before filtering which changes in the webpage.
In this embodiment, in a web page, there are XPath data that will not change and XPath data that will change, and for the XPath data that will change, when the web page changes, the corresponding XPath data will also change, and the pre-filter XPath data that changes in the web page is obtained. The XPath data is used to determine the position of a certain part in an XML (Extensible Markup Language) document.
It should be noted that, a web page may be crawled by a crawler technology, and in order to avoid the situation that the web page is not found due to being tampered, the situation of the web page needs to be obtained in time, so the web page needs to be crawled at regular intervals, for example, a certain web page needs to be crawled at intervals of 1 second.
Step S120, filtering the webpage updating data in the XPath data before filtering based on a preset variable area filter to obtain target XPath data;
and step S130, outputting tampering alarm information corresponding to the target XPath data.
In this embodiment, the pre-filtering XPath data includes webpage update data and/or webpage tampering data, where the webpage update data is data generated when a webpage is normally updated, and the webpage tampering data is data generated when a webpage is tampered, it can be understood that the webpage tampering data is harmful to the webpage, and the webpage update data does not harm the webpage.
Specifically, based on a preset volatile area filter, webpage updating data in XPath data before filtering is filtered, webpage tampering data in the XPath data before filtering is reserved, target XPath data is obtained, tampering alarm information corresponding to the target XPath data is output, namely tampering alarm information aiming at the webpage tampering data is output, warning is carried out on the tampered condition of the webpage, warning on the normally updated condition of the webpage is avoided, the condition of misinformation is reduced during warning, and the accuracy of warning is improved.
Wherein, for above-mentioned predetermined yielding filter, its mode of generation includes two kinds:
the generation method is as follows: the filtering, based on a preset volatile area filter, the webpage update data in the pre-filtering XPath data to obtain the target XPath data comprises:
step a, obtaining XPath sample data.
In this embodiment, XPath sample data is obtained by acquiring through multiple rounds of sample acquisition processes, that is, by crawling a certain webpage for multiple times by using a crawler technology.
And b, identifying the XPath sample data based on a preset identification mode to obtain the variable region.
In this embodiment, the XPath sample data is identified based on a preset identification manner to obtain the variable region. The variable regions are regions which are frequently changed in the webpage structure, namely the variable regions correspond to webpage update data, and the data corresponding to the variable regions are webpage update data in XPath sample data. The data corresponding to the volatile area comprises the date and time at the top of the webpage, the visit volume of the webpage, the price of the goods in the webpage, the order volume of the goods in the webpage, the number of the login entry of the webpage, the graphical verification code of the login entry of the webpage and the like.
In the process of identifying a variable region in XPath sample data, that is, in the process of determining whether data that changes frequently exists in XPath sample data, it should be noted that the basis for determining whether XPath sample data changes frequently is: and determining whether the updating frequency of the data corresponding to a certain area in the XPath sample data meets a preset updating frequency condition, and determining that the updating frequency of the data corresponding to the certain area in the XPath sample data meets the preset updating frequency condition when the updating frequency meets the preset updating frequency condition. When the updating frequency is greater than or equal to a preset updating frequency threshold value, the updating frequency meets a preset updating frequency condition; and when the updating frequency is less than the preset updating frequency threshold value, the updating frequency does not meet the preset updating frequency condition. The preset update frequency threshold may be set according to specific needs, and this embodiment is not limited specifically. Specifically, after a web page is crawled each time, if data corresponding to a certain area changes, the change of the area is recorded once, that is, the number of times of the change of the area within a certain time is recorded. For example, in 1 hour, the webpage is crawled 3600 times, the data corresponding to a certain area is changed 2000 times, the update frequency of the area is 2000 times/hour, and if the preset update frequency threshold is 1500 times/hour, the update frequency is greater than the preset update frequency threshold because 2000 is greater than 1500, and the area can be determined to be a variable area.
And c, generating the variable region filter based on the variable region.
In this embodiment, the volatile filter is generated based on the volatile, i.e., the volatile filter has the ability to filter data corresponding to the volatile.
The second generation method is as follows:
and manually identifying data corresponding to a certain area in XPath sample data, and marking, namely manually marking the variable area.
As can be appreciated, manual labeling is prone to errors and is slow in labeling speed, and therefore a first generation mode with high recognition accuracy and high recognition speed is suggested to be adopted to generate the variable region filter.
It should be noted that, in order to better avoid the situation that the webpage update data has the webpage tampering data, that is, the webpage update data has the data disguised by the webpage tampering data, the filtering range needs to be further narrowed on the basis of the above-mentioned volatile area filter, so that the webpage tampering data that exists in the webpage update data filtered by the volatile area filter is left by further detection processing, specifically, the filtering of the webpage update data in the XPath data before filtering based on the preset volatile area filter to obtain the target XPath data includes:
step d, filtering the webpage updating data in the XPath data before filtering based on a preset variable area filter to obtain filtered XPath data;
step e, acquiring webpage updating data in the XPath data before filtering, and detecting the webpage updating data to obtain a detection result;
and f, determining target XPath data based on the detection result and the filtered XPath data.
In this embodiment, based on the pre-determined volatile area filter, filter the web page update data in the pre-filtering XPath data, obtain post-filtering XPath data, and based on the pre-determined volatile area filter, filter the web page update data in the pre-filtering XPath data, obtain the web page update data, and continue to perform detection processing on the web page update data, obtain a detection result, thereby determine target XPath data according to the post-filtering XPath data and the detection result, instead of only using the post-filtering XPath data as the target XPath data, the problem that only tampering alarm is performed through the volatile area filter, resulting in missed report is solved.
It should be noted that the detection result is the XPath data passing the detection or failing to pass the detection, and the detected XPath data does not need to be tampered with and alarmed, that is, the target XPath data consists of the XPath data failing to pass the detection and the filtered XPath data.
Two ways of detecting webpage update data exist:
the detection method comprises the following steps:
the detecting result includes a first detecting result, and the detecting the webpage update data to obtain a detecting result includes:
and e1, inputting the webpage updating data to a first preset detection model to obtain a first detection result.
In this embodiment, the webpage update data is input to the first preset detection model to obtain a first detection result. For the first preset detection model, the detection basis of the first preset detection model is an analysis result of analyzing a large number of webpages, and the analysis result is that some regions are determined, and the number of the regions is less than that of the variable regions.
Specifically, the areas are a webpage date area, a numerical value area and a verification code area, and the first preset detection model is determined in the following manner:
the inputting the webpage updating data to a first preset detection model and before obtaining a first detection result, includes:
and e2, acquiring the variation feature XPath data to be extracted.
In this embodiment, the XPath data of the variation feature to be extracted is obtained, and it can be understood that the XPath data of the variation feature to be extracted may be the XPath data before filtering or XPath data prepared in advance.
And e3, extracting the variation features in the variation feature XPath data to be extracted based on a preset self-learning model.
In the present embodiment, the variation feature to be extracted XPath data is used to extract a variation feature by a preset self-learning model. Specifically, for a date area of a webpage, the corresponding change features conform to a date regular expression, and when the change features are changed, the incremental features are presented, and the incremental features meet a date updating rule; for a numerical value region, the corresponding change feature of the numerical value region conforms to a numerical value regular expression, and it needs to be explained that, in XPath data, numerical values have differences in types, and the types include byte, int, long, float, double, borolean, and the like, so that the condition that the numerical value regular expression is satisfied is that XPath data of a certain type exists in XPath data of the change feature to be extracted; for the verification code region, it can be understood that it is in the form of a picture, and its corresponding variation features conform to a regular expression of numbers or letters, and the length and width of the picture are fixed, and for the Recognition of the picture, it can be implemented by an OCR (Optical Character Recognition) technology.
It can be understood that, if the variation feature corresponding to any one of the date area, the numerical value area and the verification code area of the webpage exists in the to-be-extracted variation feature XPath data, the to-be-extracted variation feature XPath data corresponding to the variation feature is marked as a corresponding area attribute.
Step e4, determining the first preset detection model based on the variation characteristics.
In this embodiment, the first preset detection model is determined based on the area attribute corresponding to the change feature, that is, the first preset detection model may further detect the web page update data based on the area attribute corresponding to the change feature, so as to obtain a detection result, that is, for XPath data not including the change feature, the detection result of the first preset detection model is a failed detection, and for XPath data including the change feature, the detection result of the first preset detection model is a passed detection.
And a second detection mode:
the detecting result includes a second detecting result, and the detecting the web page update data to obtain the detecting result further includes:
and e5, inputting the webpage updating data to a second preset detection model to obtain a second detection result.
In this embodiment, the web page update data is input to the second preset detection model to obtain a second detection result. It should be noted that, when determining whether the XPath data of the web page is tampered, the determination result is tampered or not, and only these two types, that is, the detection problem of whether the web page is tampered can be converted into a binary classification problem. For example, if the XPath data included in a certain web page is a set G, the set G can be divided into a subset a and a subset b, where the set a is an untampered XPath data set, and the set b is a tampered XPath data set, then the objective function of the two-classification problem is:
wherein xi is the ith XPath data in the set G.
The second preset detection model is realized through a logistic regression algorithm, and the realization process is as follows:
inputting the filtered XPath data into a second preset detection model, and before obtaining a second detection result, the method comprises the following steps:
step e6, acquiring an XPath training data set and a detection model to be trained;
and e7, training the detection model to be trained based on the XPath training data set to obtain an updated detection model to be trained, and determining whether the updated detection model to be trained meets a preset iteration ending condition.
In this embodiment, an XPath training data set and a to-be-trained detection model based on a logistic regression algorithm are obtained, and the to-be-trained detection model is trained based on the XPath training data set to obtain an updated to-be-trained detection model. The XPath training data set comprises dimensionalities of webpage date, numerical value, verification code, sensitive words, picture tampering, malicious link and structure change, namely the feature vector of the input detection model to be trained is the feature vector of the dimensionalities, namely the second preset detection model obtained by training the detection model to be trained judges whether the XPath data of the webpage is tampered or not through the dimensionalities.
Specifically, the logistic regression is realized by a Sigmoid function, which is a common S-type function and is also called a growth curve, and the value range of the Sigmoid function can be regarded as 0 to 1, and the calculation formula is as follows:
hθ(x)=g(θTx)=1/(1+1/eθTx);
wherein x is a multidimensional vector for representing the characteristic of webpage tampering, and theta is a multidimensional vector for representing the corresponding parameter of x; t is a significance test value for theta.
Where, x is { x1, x2, … xi, … xn }, xi represents the characteristic of web page tampering, θ is { θ 1, θ 2, …, θ i, …, θ n }, and θ i is a corresponding parameter of xi. It will be appreciated that assume that h isθ(x) When the result of the detection of the XPath data is 0, the detection result is not falsified, and when h is equal to 0θ(x) When 1, the XPath dataIs tampering, wherein at hθ(x) When the value of (a) is less than a preset classification threshold value, classifying the value of (b) in hθ(x) 0, in hθ(x) When the value of (a) is greater than or equal to a preset classification threshold value, classifying the value of (b) in hθ(x) And 1, wherein the preset classification threshold value can be set through a training result of training the detection model to be trained.
In the process of training a detection model to be trained, a suitable optimal regression parameter θ needs to be found, specifically, a value θ is solved by a maximum likelihood method, that is, a Cost function of the logistic regression function Sigmoid function is solved, and a formula of the Cost function is as follows:
Jθ=Cost(hθ(xi),yi);
the actual Cost function can be derived from the two equations above as:
Jθ=-yiln(hθ(xi))+(1-yi)ln(1-hθ(xi));
determining whether the updated detection model to be trained meets the preset iteration end condition or not through the optimal regression parameter theta, specifically, JθAnd when the minimum time is reached, the updating of the theta is completed, namely the updated detection model to be trained meets the preset iteration ending condition.
Wherein, to find the minimum JθThe updating of theta needs to be performed by a gradient descent method, which is thetaj:=θj-αJ(θj) (ii) a Where α is a learning rate, and α is required to minimize the number of times of function iteration and ensure that the function value decreases in each iteration process.
Step e8, if the updated detection model to be trained meets the preset iteration end condition, taking the updated detection model to be trained as the second preset detection model;
and e9, if the updated detection model to be trained does not meet the iteration ending condition, returning to the step of performing iterative training on the detection model to be trained based on the XPath training data set until the updated detection model to be trained meets the iteration ending condition.
In this embodiment, if the updated detection model to be trained satisfies the preset iteration end condition, ending the training process of the detection model to be trained, and taking the updated detection model to be trained as a second preset detection model; and if the updated detection model to be trained does not meet the iteration ending condition, continuing training the detection model to be trained, namely returning to the step of performing iterative training on the detection model to be trained based on the XPath training data set, and ending the training process of the detection model to be trained until the updated detection model to be trained meets the iteration ending condition.
Specifically, the process of inputting the webpage updating data to the second preset detection model to obtain the second detection result is as follows: according to the input variable x corresponding to the webpage updating data and the selected regression parameter theta, the possibility that the output variable is 1 is hθ(x) P (y ═ 1 |;,) P1, this indicates that the probability that the web page update data has P1 is true web page tampering, and accordingly, the probability that the web page update data has not been tampered with is 1-P1. Assuming that the threshold for classification is 0.5, if p1>0.5, the web page update data can be predicted to be true web page tampering.
Compared with the prior art that if the information of the XPath path is found to be changed, webpage tampering alarm is carried out, so that the false alarm rate is high, the method obtains the XPath data before filtering, which is changed in the webpage; filtering webpage updating data in the XPath data before filtering based on a preset variable area filter to obtain target XPath data; and outputting tampering alarm information corresponding to the target XPath data. XPath data before filtering is filtered through predetermineeing yielding filter, obtain target XPath data, make the webpage update data in the XPath data before filtering filtered by, and output target XPath data corresponding and falsify alarm information, the falsification alarm information that XPath data before filtering that has changed in the direct output webpage corresponds has been avoided, make the warning false positive that has avoided webpage update data to correspond, thereby the false positive rate when having reduced webpage falsification and reporting an emergency and asking for help or increased vigilance.
Further, referring to fig. 2, the present application also provides an XPath data tamper alert apparatus including:
the first obtaining module 10 is configured to obtain XPath data before filtering that changes in a webpage;
the filtering module 20 is configured to filter, based on a preset volatile area filter, webpage update data in the pre-filtering XPath data to obtain target XPath data;
and the output module 30 is configured to output tamper alarm information corresponding to the target XPath data.
Optionally, the filtering module 20 comprises:
the filtering unit is used for filtering webpage updating data in the XPath data before filtering based on a preset variable area filter to obtain filtered XPath data;
the acquiring unit is used for acquiring webpage updating data in the XPath data before filtering;
the detection unit is used for detecting the webpage updating data to obtain a detection result;
a determining unit configured to determine target XPath data based on the detection result and the filtered XPath data.
Optionally, the detection unit includes:
and the first input subunit is used for inputting the webpage updating data to a first preset detection model to obtain a first detection result.
Optionally, the detection unit further includes:
the first acquiring subunit is used for acquiring the variation feature XPath data to be extracted;
the extraction subunit is used for extracting the variation features in the variation feature XPath data to be extracted based on a preset self-learning model;
a first determining subunit, configured to determine the first preset detection model based on the variation feature.
Optionally, the apparatus for warning about XPath data tampering further includes:
the second acquisition module is used for acquiring XPath sample data;
the identification module is used for identifying the XPath sample data based on a preset identification mode to obtain the variable region;
a generation module to generate the volatile filter based on the volatile.
Optionally, the detection unit further includes:
and the second input subunit inputs the webpage updating data to a second preset detection model to obtain a second detection result.
Optionally, the detection unit further includes:
the second acquiring subunit is used for acquiring an XPath training data set and a detection model to be trained;
the training subunit is configured to train the detection model to be trained based on the XPath training data set to obtain an updated detection model to be trained;
the second determining subunit is used for determining whether the updated detection model to be trained meets a preset iteration ending condition; if the updated detection model to be trained meets the preset iteration end condition, taking the updated detection model to be trained as the second preset detection model; and if the updated detection model to be trained does not meet the iteration ending condition, returning to the step of performing iterative training on the detection model to be trained based on the XPath training data set until the updated detection model to be trained meets the iteration ending condition.
The specific implementation of the apparatus for alarming tampering with XPath data of the present application is substantially the same as that of the embodiments of the method for alarming tampering with XPath data, and is not described herein again.
In addition, the application also provides XPath data tampering alarm equipment. As shown in fig. 3, fig. 3 is a schematic structural diagram of a hardware operating environment according to an embodiment of the present application.
It should be noted that fig. 3 is a schematic structural diagram of a hardware operating environment of an XPath data tampering alarm device.
As shown in fig. 3, the XPath data tampering warning device may include: a processor 1001, such as a CPU, a memory 1005, a user interface 1003, a network interface 1004, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the XPath data tampering warning device may further include an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like.
Those skilled in the art will appreciate that the XPath data tamper alert device structure shown in FIG. 3 does not constitute a limitation of XPath data tamper alert devices and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components.
As shown in fig. 3, the memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an XPath data tampering alerting program. The operating system is a program for managing and controlling hardware and software resources of the XPath data tampering warning device, and supports the operation of the XPath data tampering warning program and other software or programs.
In the XPath data tampering warning device shown in fig. 3, the user interface 1003 is mainly used for connecting a terminal and performing data communication with the terminal, for example, receiving user signaling data sent by the terminal; the network interface 1004 is mainly used for the background server and performs data communication with the background server; the processor 1001 may be configured to call an XPath data tamper alert program stored in the memory 1005 and perform the steps of the XPath data tamper alert method described above.
The specific implementation of the XPath data tampering alarm device of the present application is basically the same as the embodiments of the XPath data tampering alarm method described above, and is not described herein again.
Furthermore, an embodiment of the present application further provides a computer-readable storage medium, where an XPath data tampering warning program is stored on the computer-readable storage medium, and when being executed by a processor, the XPath data tampering warning program implements the steps of the XPath data tampering warning method described above.
The specific implementation of the computer-readable storage medium of the present application is substantially the same as the embodiments of the XPath data tampering alarm method described above, and details are not described here.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, a device, or a network device) to execute the method according to the embodiments of the present application.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.