Disclosure of Invention
In view of the above problems, the present invention has been made to provide a website survival detection apparatus and a website survival detection system and a corresponding website survival detection method that overcome or at least partially solve the above problems. A further object of the present invention is to improve the reliability of the website survival detection result.
It is a further object of this invention to match the survival results of a web site with the access profile of the web site.
According to one aspect of the invention, a method for detecting website survival is provided. The website survival detection method comprises the following steps: acquiring website access result data uploaded by a plurality of task nodes, wherein each task node is configured to send an access request to a detection target website and generate website access result data according to the response of the target website to the access request; performing data fusion processing on the website access result data to obtain a website survival judgment value; comparing the survival judgment value of the website with a preset survival judgment threshold value; and determining the survival detection result of the detection target website according to the comparison result.
Optionally, the data fusion processing on the website access result data includes: determining the number of task nodes with abnormal uploading information and access results according to the website access result data; and when the uploading information meets the preset judgment condition, taking the number of the task nodes with abnormal access results as a website survival judgment value.
Optionally, the upload information includes the number of the plurality of task nodes, and the preset determination condition includes: the number of the plurality of task nodes is larger than the preset number of nodes.
Optionally, the upload information includes a time for each task node to upload data, and the preset determination condition includes: and the time for obtaining the website access result data of the first task node exceeds a preset time value.
Optionally, the data fusion processing on the website access result data includes: determining task nodes with abnormal access results according to the website access result data; and weighting and calculating according to the weight values set for the task nodes in advance, and taking the obtained weight values as the survival judgment values of the websites.
Optionally, before performing data fusion processing on the website access result data, the method further includes: and filtering website access result data uploaded by invalid task nodes, wherein the invalid task nodes are task nodes with the abnormal rate of accessing the website exceeding a preset value in a preset time period.
Optionally, the obtaining of the website access result data uploaded by the plurality of task nodes includes: respectively receiving website access result data uploaded by a plurality of task nodes; and storing the website access result data serving as elements into a preset associated data container, wherein each element takes the identification number of the corresponding task node as an index.
Optionally, after determining that the survival of the website is abnormal when the survival judgment value of the website is greater than the survival judgment threshold, the method further includes: and outputting alarm information of abnormal website access.
According to another aspect of the invention, a device for detecting the survival of the website is also provided. The website survival detection device comprises: the data acquisition module is configured to acquire website access result data uploaded by a plurality of task nodes, each task node is configured to send an access request to a detection target website, and website access result data are generated according to the response of the target website to the access request; the data processing module is configured to perform data fusion processing on the website access result data to obtain a website survival judgment value; and the analysis module is configured to compare the survival judgment value of the website with a preset survival judgment threshold value and determine a survival detection result of the detection target website according to the comparison result.
Optionally, the data processing module is further configured to: determining the number of task nodes with abnormal uploading information and access results according to the website access result data; and when the uploading information meets the preset judgment condition, taking the number of the task nodes with abnormal access results as a website survival judgment value.
Optionally, the upload information includes the number of the plurality of task nodes, and the preset determination condition includes: the number of the plurality of task nodes is larger than the preset number of nodes.
Optionally, the upload information includes a time for each task node to upload data, and the preset determination condition includes: and the time for obtaining the website access result data of the first task node exceeds a preset time value.
Optionally, the data processing module is further configured to: determining task nodes with abnormal access results according to the website access result data; and weighting and calculating according to the weight values set for the task nodes in advance, and taking the obtained weight values as the survival judgment values of the websites.
Optionally, the above apparatus for detecting website survival further comprises: and the data filtering module is configured to filter website access result data uploaded by the failed task node, wherein the failed task node is a task node with the abnormal rate of accessing the website exceeding a preset value in a preset time period.
Optionally, the data acquisition module is further configured to: respectively receiving website access result data uploaded by a plurality of task nodes; and storing the website access result data serving as elements into a preset associated data container, wherein each element takes the identification number of the corresponding task node as an index.
Optionally, the above apparatus for detecting website survival further comprises: and the alarm module is configured to output alarm information of abnormal website access after the analysis module determines that the survival of the website is abnormal according to the fact that the survival judgment value of the website is greater than the survival judgment threshold.
According to another aspect of the invention, a website survival detection system is also provided. The website survival detection system comprises: each task node is configured to send an access request to a detection target website and generate website access result data according to the response of the target website to the access request; any of the above described web site survival detection apparatus.
The website survival detection method provided by the invention utilizes the website access results of the plurality of task nodes to perform data fusion processing to obtain the website survival judgment value, and the website survival judgment value is used as the website survival detection result, so that the distributed characteristics of the plurality of task nodes are fully utilized, the misinformation of a single task node caused by the problem of the single task node is avoided, and the reliability of the website survival detection result is improved.
Furthermore, in the website survival detection method, the weights of different task nodes in data processing are adjusted in the data fusion process, so that the method accords with the actual condition of accessing the website through a network, the website survival result is matched with the access condition of the website, the actual use feeling is improved, and the fault can be conveniently and quickly processed in time.
Furthermore, data fusion can be separated from a later-period alarm service, so that the alarm work is relatively independent, a large amount of integration of data by using an alarm module is not needed, and the pressure of the alarm module is reduced.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments thereof, taken in conjunction with the accompanying drawings.
Detailed Description
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
FIG. 1 is a schematic diagram of a website survival detection system according to one embodiment of the invention. The website liveness detection system may generally include: the device 200 for detecting website survival comprises a plurality of task nodes 120 and a website survival detection device, wherein each task node 120 is configured to send an access request to a detection target website 110 and generate website access result data according to a response of the target website 100 to the access request, and the website access result data can comprise whether the access is normal, the access time and the like. The website survival detection apparatus 200 collects the access result data of the plurality of task nodes 120, and then fuses the collected data to perform website survival judgment, where the judgment basis may include multiple types.
FIG. 2 is a schematic diagram of an apparatus 200 for website liveness detection according to an embodiment of the present invention, which may generally include: a data acquisition module 210, a data processing module 220, and an analysis module 230. In some optional embodiments, other components can be flexibly added according to the application environment and the functions of the system.
The data obtaining module 210 is configured to obtain website access result data uploaded by the plurality of task nodes 120. The website access result data is used for sending an access request to the detection target website 110 through each task node 120, and website access result data is generated according to the response of the target website 110 to the access request. The task node 120 sends the access request to simulate the normal access behavior of the user, for example, the target website 110 may be accessed at regular time according to a fixed detection period, or the target website 110 may be accessed according to a start detection command, that is, the task node 120 generates website access result data in a plurality of flexible ways.
An optional process of the data obtaining module 210 is to receive website access result data uploaded by the plurality of task nodes 120 respectively; and storing the website access result data serving as elements into a preset associated data container, wherein each element takes the identification number of the corresponding task node as an index. For example, website access result data uploaded by a plurality of task nodes is subjected to certain preprocessing, such as unpacking and repackaging, and then the preprocessed data is put into a data container (map), and an index (key) of the data container can be an identifier (id) of each task node. For example, for the website www.so.com, when data of a first task node is sent, a container is created in the map with the task node id as a key, the container is used for collecting data of all task nodes, and subsequently received data are stored in the map. Map is an associative container organized as a set of { keys, values } into a binary tree where the keys are not allowed to be repeated. The data structure model of Map is a binary tree, in which data is sorted according to key values, data can be searched by key values, and Map provides subscript access.
The data processing module 220 is configured to perform data fusion processing on the website access result data to obtain a website survival judgment value. The data fusion processing of the data processing module 220 may perform a series of logical operations such as integration, filtering, and judgment on the website access result data uploaded by the plurality of task nodes 120. For example, the data processing module 220 may determine the number of task nodes with abnormal uploading information and access results according to the website access result data; and when the uploading information meets the preset judgment condition, taking the number of the task nodes with abnormal access results as a website survival judgment value. The uploading information may include: the number of preset task nodes, the time for each task node to upload data and the like, and the corresponding preset judgment conditions comprise: the number of the plurality of task nodes is larger than the preset number of nodes, the time for acquiring the website access result data of the first task node exceeds a preset time value, and the like.
The data processing module 220 may use the number of task nodes with an abnormal access result as a website survival determination value when the number of the plurality of task nodes is greater than a preset number of nodes, and may also use the number of task nodes with an abnormal access result as a website survival determination value when the time for obtaining the website access result data of the first task node exceeds a preset time value.
In another optional embodiment, the data processing module 220 may further determine, according to the website access result data, a task node whose access result is abnormal; and weighting and calculating according to the weight values set for the task nodes in advance, and taking the obtained weight values as the survival judgment values of the websites. The weighted value may be determined according to the number of visits to the detection target website 110 by the area where the corresponding task node is located, so as to calculate that the website survival judgment value is in accordance with the actual website visit situation.
The analysis module 230 may be configured to compare the website survival determination value with a preset survival determination threshold and determine a survival detection result of the target website according to the comparison result, for example, when the website survival determination value is greater than the preset survival determination threshold, it is determined that the current target website is abnormally accessed, and an alarm needs to be given to the website.
Fig. 3 is a schematic diagram of an apparatus 200 for website survival detection according to another embodiment of the present invention, in which the apparatus 200 for website survival detection is additionally provided with a data filtering module 240 and/or an alarm module 250.
In order to facilitate timely notifying the target website for processing after determining that the access abnormality of the detected target website occurs, the alarm module 240 may further output alarm information of the website access abnormality after the analysis module 230 determines that the survival abnormality of the website is abnormal according to the fact that the website survival judgment value is greater than the survival judgment threshold. For example, the alarm is given by sending information to the communication number bound to the target website or sending a mail to a bound mailbox. The alarm module 240 can be independently set, so that only the alarm is required to be responsible for alarm work, and the fusion operation of data is handed to the above components. Therefore, the method is independent from a data analysis component, the calculation load is reduced, and the alarm efficiency is improved.
In order to avoid a failure of a certain task node, for example, a failure in accessing a target website when an external network is not connected, the data filtering module 240 may further filter website access result data uploaded by a failed task node, where the failed task node is a task node whose abnormal rate of accessing the website exceeds a preset value within a preset time period. For example, if the number of websites which cannot access the monitoring points in a certain period exceeds a certain number, the task node can be actively judged to be invalid in the next period, so that false alarms caused by problems of the task node can be avoided to a certain extent, and the occurrence of false alarms is reduced.
The embodiment of the present invention further provides a website survival detection method, which can be executed by any one of the website survival detection apparatuses 200 described in the above embodiments, so as to improve the reliability of the website survival detection result. Fig. 4 is a schematic diagram of a method for detecting website survival according to an embodiment of the present invention, as shown in the figure, the method for detecting website survival includes the following steps:
step S402, website access result data uploaded by a plurality of task nodes are obtained;
step S404, carrying out data fusion processing on the website access result data to obtain a website survival judgment value;
step S406, comparing the survival judgment value of the website with a preset survival judgment threshold value;
step S408, determining the survival detection result of the detection target website according to the comparison result.
And sending an access request to the detection target website by each task node according to the website access result data, and generating according to the response of the target website to the access request. An optional data acquisition manner of step S402 is: respectively receiving website access result data uploaded by a plurality of task nodes; and storing the website access result data serving as elements into a preset associated data container, wherein each element takes the identification number of the corresponding task node as an index. The associated data container can facilitate the query and processing of subsequent data, and improves the efficiency.
Step S404, determining the number of task nodes with uploaded information and abnormal access results according to the website access result data; and when the uploading information meets the preset judgment condition, taking the number of the task nodes with abnormal access results as a website survival judgment value.
The uploading information may include the number of the plurality of task nodes, and the corresponding preset judgment condition includes: the number of the plurality of task nodes is larger than the preset number of nodes. For example, the number of all task nodes is 10, and after 8 task nodes return website access result data each time, the number of task nodes with abnormal access results can be used as a website survival judgment value.
The uploading information may further include time for each task node to upload data, and the corresponding preset judgment condition includes: and the time for obtaining the website access result data of the first task node exceeds a preset time value. For example, at a preset period of time, the task nodes initiate an access request to the detection target website and generate corresponding website access result data, and if the time for uploading the website access data at the first task node exceeds the time of one period, the number of the task nodes with abnormal access results can be directly used as the website survival judgment value.
In other alternative embodiments, step S404 may further determine, according to the website access result data, that the access result is an abnormal task node; and weighting and calculating according to the weight values set for the task nodes in advance, and taking the obtained weight values as the survival judgment values of the websites. The weighted value can be determined according to the number of visits of the area where the corresponding task node is located to the detection target website, so that the condition that the survival judgment value of the website accords with the condition of actually visiting the website can be calculated conveniently.
When the website survival judgment value is obtained by performing the weighting calculation, the calculation of the website survival judgment value may still be started when the number of task nodes and the time for uploading data by the task nodes meet respective judgment conditions.
For interference of the detection result of the abnormal task node, website access result data uploaded by the failed task node may be filtered before step S404, where the abnormal rate of the failed task node accessing the website exceeds a preset value within a preset time period. For example, if the number of websites which cannot access the monitoring points in a certain period exceeds a certain number, the task node can be actively judged to be invalid in the next period, so that false alarms caused by problems of the task node can be avoided to a certain extent, and the occurrence of false alarms is reduced.
Step S408 may determine that the survival of the website is abnormal if the survival determination value of the website is greater than the preset survival determination threshold. In order to facilitate timely processing of access abnormity, alarm information of website access abnormity can be output after survival abnormity of the website is determined. For example, the alarm is given by sending information to the communication number bound to the target website or sending a mail to a bound mailbox.
Turning now to the flow of the survival check 360 search for web sites, FIG. 5 is an alternative flow diagram of a method for web site survival check according to one embodiment of the present invention. Before the website survival detection method is executed, a task node firstly simulates a user to visit a detection target website and generates a website visit result data according to a visit result to upload the website visit result data to a middleware and a website survival detection device, and executes the following steps:
step S502, receiving the data uploaded to the task node, after receiving the data, performing preprocessing operations such as unpacking and repacking the data, and putting the preprocessed website access result data into a map, wherein the key is defined as the id of the corresponding task node. For example, for the website www.so.com, when the data of the first task node is sent, in the map, the id of the first task node is used as a key to create a container, the container is used to collect the data of all task nodes, and the data of the task nodes uploading data later are all put into the map for judgment and analysis;
step S504, determining that all nodes in the container have uploaded the website access result data, if yes, performing step S508, if no, performing step S506, for example, for the website www.so.com, setting 10 task nodes for access detection, and if 10 task nodes upload the website access result data, performing the next determination;
step S506, determining that the time from the current time to the first task node to upload the data exceeds a preset time threshold, if so, performing step S508, and if not, returning to perform step S502, for example, initiating an access request to the detection target website every a preset period at the task node and generating corresponding website access result data, and if the time to upload the website access data at the first task node exceeds the time of a period, performing the next determination;
step S508, determining whether the number of task nodes with access abnormality in the received data reaches a preset abnormality threshold, if yes, executing step S510, and if no, returning to execute step S502;
step S510, determining whether all task nodes are valid, if not, executing step S512, if it is determined that the website access is abnormal, outputting access abnormality warning information, for example, analyzing each task node in advance, if the number of websites that a certain task node cannot access in a certain access period reaches a certain number, it may be considered that the external connection of the task node has a problem, and it is determined that the task node has failed, and the failed task node needs to be removed from the determination basis, so as to avoid false alarm due to the reason of the task node;
step S512, judging whether the access abnormal quantity in the effective task nodes exceeds a preset threshold value, if not, determining that the website access is normal, if so, determining that the website access is abnormal, and outputting access abnormal alarm information.
In addition to using the number of task nodes with abnormal access as a judgment basis, an alternative method is to configure a weight for each task node in advance, when the access of the task node fails, the weight values are accumulated, and the sum of the weights is used as a website survival judgment value for judgment. At this time, the website survival determination can be performed only by modifying the determination threshold values of step S508 and step S512 accordingly.
Taking the above www.so.com as an example, suppose there are 6 task nodes of beijing, shanghai, guangzhou, hangzhou, chengdu, and west ampere simultaneously monitored, if there are more than 3 task nodes abnormal, the website is determined to be abnormal, and if a certain beijing, shanghai, and guangzhou point data come first and are all abnormal, the website is determined to be abnormal at this time, so that the user can be quickly informed that the currently monitored website www.so.com is likely to access abnormally. If five node data of Beijing, Shanghai, Guangzhou and Hangzhou all come up at a certain detection time and all are normal, and the data of the Xian telecommunication does not come up all the time, the website can also be judged to be normal. If the error rate of the website connected in a certain period of the Xian telecom exceeds a certain threshold value, the value of the point is considered to be unreliable, and when the node is judged in the next period, the node is considered to be abnormal and is excluded from the judgment threshold value.
By using the website survival detection method provided by the embodiment of the invention, the website survival judgment value is obtained by carrying out data fusion processing by using the website access results of the plurality of task nodes, and the website survival judgment value is used as the website survival detection result, so that the distributed characteristics of the plurality of task nodes are fully utilized, the false alarm caused by the self problem of a single task node is avoided, and the reliability of the website survival detection result is improved.
Further, in the data fusion process, the method for detecting the survival of the website of the embodiment adjusts the weights of different task nodes in the data processing, so that the method conforms to the actual situation of accessing the website through the network, the survival result of the website is matched with the access situation of the website, the actual use feeling is improved, and the fault can be conveniently and rapidly processed in time.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the website survival detection apparatus and website survival detection system according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
Thus, it should be appreciated by those skilled in the art that while a number of exemplary embodiments of the invention have been illustrated and described in detail herein, many other variations or modifications consistent with the principles of the invention may be directly determined or derived from the disclosure of the present invention without departing from the spirit and scope of the invention. Accordingly, the scope of the invention should be understood and interpreted to cover all such other variations or modifications.