Webpage data monitoring method and device, medium and product

By simulating user access and locking web page areas, automatic detection of element data changes solves the problems of high manual polling cost and large server polling resource consumption in the existing technology, achieving efficient and low-cost web page data monitoring and avoiding the need for browsing. compatibility issues with server extension development.

CN118535823AInactive Publication Date: 2024-08-23SHANGHAI GANGLIAN E COMMERCE
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410665308.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-27
Publication Date
2024-08-23
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the existing technology, manual polling relies on high labor costs and is low in efficiency, server polling consumes a large amount of network bandwidth and resources, and browser extension-based program development requires high requirements and can easily cause compatibility issues.

Method used

By obtaining configuration information, it simulates users accessing the target URL and locks the target web page area, automatically detects changes in element data, monitors web page data, and avoids compatibility issues with server polling and browser extension development.

Benefits of technology

It reduces labor costs, improves monitoring accuracy and efficiency, reduces server burden, and avoids compatibility issues caused by browser extension development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535823A
    Figure CN118535823A
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of computers, and discloses a webpage data monitoring method and device, a medium and a product. The method comprises the steps that configuration information is obtained, and the configuration information at least comprises a target website and a target area in a target webpage corresponding to the target website; simulating a user to access the target website according to the configuration information, and locking a target area in the target webpage to obtain current element data in the target area; and determining whether the target area is updated or not according to the current element data in the target area. The technical problems that in the related technology, manual monitoring is high in cost, low in accuracy and efficiency, large in server burden, high in technical requirement and capable of avoiding newly developed plug-in tools of an extension program based on a browser, and compatibility is possibly brought can be solved at least.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, medium and product for monitoring web page data. Background Art

[0002] In the accelerated process of enterprise digital transformation, data has become a key resource to promote enterprise development. Monitoring data changes and ensuring the timeliness of data collection are crucial to fully realize the value of data. Currently, the industry has adopted a variety of strategies to monitor data:

[0003] (1) Periodic polling. Periodic polling can include manual polling and server polling. In manual polling, relevant personnel directly observe the web page and refresh it continuously to monitor whether the data on the web page is updated. In server polling, the server needs to send requests to the target website regularly to monitor whether the data on the web page is updated.

[0004] (2) By installing a monitoring plug-in. That is, by installing a monitoring plug-in, the web page is automatically monitored to determine whether the data in the web page is updated. The monitoring plug-in can be an existing plug-in tool or a newly developed plug-in tool using a browser extension. It can be understood that by using the monitoring plug-in, the data in the web page is generally determined by parsing the page elements in the web page and tracking the DOM event changes. In this way, relevant personnel can be notified in a timely manner when the data in the web page changes.

[0005] However, the inventors found that there are at least the following technical problems in the related art:

[0006] For the periodic polling method, since manual polling relies on continuous human resource investment, the labor cost is high; and the monitoring results are easily affected by human factors, and the accuracy and efficiency are low; therefore, when the amount of data is large, it is obviously impractical to use manual polling; when the server is polling, even if the web page is not updated, the server needs to send requests to the target URL regularly, which will consume a lot of network bandwidth and server resources, and may also cause monitoring delays, etc. In addition, frequent polling through the server will cause unnecessary burden on the server.

[0007] As for the method of installing the monitoring plug-in, relevant personnel who do not understand the development of browser extensions have no idea where to start, and the technical requirements are relatively high; and, with the update of browser versions, the newly developed plug-in tools based on browser extensions may bring compatibility issues, which requires relevant personnel to be able to maintain and update the plug-in tools in a timely manner.

[0008] Therefore, it has become an urgent need for the industry to seek a technical solution that can reduce labor costs, improve monitoring accuracy and efficiency, reduce server burden, reduce the technical requirements for relevant personnel, and avoid compatibility issues that may arise from newly developed plug-in tools based on browser extensions. Summary of the invention

[0009] One purpose of the present application is to provide a method, device, medium and product for monitoring web page data, at least to solve the problems in the related technology of high cost, low accuracy and efficiency of manual monitoring, heavy server burden, high technical requirements, and inability to avoid technical problems that may be caused by compatibility of newly developed plug-in tools based on browser extensions.

[0010] To achieve the above objectives, some embodiments of the present application provide the following aspects:

[0011] In the first aspect, some embodiments of the present application also provide a method for monitoring web page data, the method comprising: obtaining configuration information; wherein the configuration information at least includes: a target URL, and a target area in a target web page corresponding to the target URL; based on the configuration information, simulating a user accessing the target URL, and locking the target area in the target web page to obtain current element data in the target area; and determining whether the target area is updated based on the current element data in the target area.

[0012] In a second aspect, some embodiments of the present application further provide an electronic device, comprising: one or more processors; and a memory storing computer program instructions, wherein the computer program instructions, when executed, cause the processor to perform the steps of the method described above.

[0013] In a third aspect, some embodiments of the present application further provide a computer-readable medium having computer program instructions stored thereon, wherein the computer program instructions can be executed by a processor to implement the method as described above.

[0014] In a fourth aspect, some embodiments of the present application further provide a computer program product, comprising a computer program / instruction, which implements the steps of the method described above when executed by a processor.

[0015] Compared with the related art, in the scheme provided by the embodiment of the present application, configuration information is first obtained, wherein the configuration information at least includes: a target website, a target area in a target web page corresponding to the target website; then, according to the configuration information, a user is simulated to access the target website, and the target area in the target web page is locked to obtain the current element data in the target area; according to the current element data in the target area, it is determined whether the target area is updated. In the scheme provided by the embodiment of the present application, since the target website can be automatically accessed and the target area in the target web page can be automatically locked according to the configuration information, a simulated operation of interaction between the user and the target web page can be realized, thereby achieving the purpose of reducing labor costs and improving monitoring accuracy and efficiency; since there is no need to use the original server polling technical solution, the consumption of network bandwidth and server resources can be avoided, the probability of causing monitoring delays can be reduced, and unnecessary burdens on the server can be avoided; since the system used by the monitoring method of the web page data generally has a fixed version, the compatibility issues that may be caused by the newly developed plug-in tool based on the browser extension can be avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0017] Figure 1 An exemplary flow chart of a webpage monitoring method provided according to some embodiments of the present application;

[0018] Figure 2 This is a schematic diagram of an exemplary structure of a webpage monitoring system provided according to some embodiments of the present application;

[0019] Figure 3 This is an exemplary schematic diagram of the management panel in a webpage monitoring method provided according to some embodiments of the present application;

[0020] Figure 4 An exemplary schematic diagram of selecting the target area in a webpage monitoring method provided according to some embodiments of the present application;

[0021] Figure 5 An exemplary flow chart of determining whether the target area is updated according to current element data in the target area in a webpage monitoring method provided according to some embodiments of the present application;

[0022] Figure 6This is an exemplary schematic diagram of performing preset processing in a webpage monitoring method provided according to some embodiments of the present application;

[0023] Figure 7 Another exemplary flow chart of determining whether the target area is updated according to the current element data in the target area in a webpage monitoring method provided according to some embodiments of the present application;

[0024] Figure 8 This is an exemplary structural diagram of an electronic device provided according to some embodiments of the present application. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0026] The following terms are used in this article.

[0027] Selenium is a tool for automated web application testing. It supports bindings for multiple programming languages. In related technologies, Selenium can simulate human operations, such as clicking, inputting text, navigating, etc., to perform automated testing.

[0028] XPATH, commonly used in automated testing (such as Selenium WebDriver), web crawling, and data extraction;

[0029] CSS selectors are commonly used in front-end development to apply styles and select and manipulate elements in JavaScript.

[0030] JS, or JavaScript, is a literally interpreted scripting language.

[0031] First embodiment

[0032] The first embodiment of the present application relates to a method for monitoring web page data. Figure 1 As shown, the method may include the following steps:

[0033] Step S101, obtaining configuration information; wherein the configuration information at least includes: a target website, and a target area in a target webpage corresponding to the target website;

[0034] Step S102, simulating a user accessing the target website according to the configuration information, and locking a target area in the target webpage to obtain current element data in the target area;

[0035] Step S103: determining whether the target area is updated according to the current element data in the target area.

[0036] The following is a detailed description of each of the above steps.

[0037] For step S101, specifically, in some examples, the relevant personnel can set the target URL of the target web page to be monitored by inputting the target URL in advance. Among them, in the stage of setting the target area in the target web page, the relevant personnel can select any area in the target web page by controlling the mouse, keyboard or directly through gesture touch, and the selected range can be increased or decreased according to actual needs until the area selected in the box in the target web page and desired to be monitored is used as the target area. Exemplarily, the driver of the browser that loads the target web page can be but not limited to: chromedriver.exe, etc., and the embodiments of the present application do not specifically limit this.

[0038] Regarding step S102, specifically, in some examples, the target website can be automatically accessed and the target area in the target webpage can be automatically locked according to the configuration information, so as to implement a simulated operation of interaction between the user and the target page.

[0039] For step S103, specifically, in some examples, the target area in the target webpage is monitored and the current element data in the target area is obtained, which can be implemented by an XPATH selector or a CSS selector. Exemplarily, the historical element data in the target area in the target webpage monitored last time can be obtained, and then the historical element data and the current element data in the target area in the target webpage currently monitored are compared, and it is determined whether the target area is updated according to whether the historical element data and the current element data change. It can be understood that if the historical element data and the current element data are the same, the target area is not updated, otherwise, if the historical element data and the current element data are different, the target area is updated.

[0040] In practical applications, the webpage data monitoring method provided in the embodiment of the present application can be applied to: Figure 2 The webpage monitoring system shown in the figure can include: a client, a scheduling module, a monitoring service module and a database.

[0041] The client is used to receive the configuration information, wherein the configuration information at least includes: a target website, a target area in a target webpage corresponding to the target website;

[0042] The scheduling module is connected to the client to obtain the configuration information and trigger the scheduling task according to the configuration information.

[0043] The monitoring service module is connected to the scheduling module, and is used to simulate a user accessing the target website according to the scheduling task, and lock the target area in the target webpage to obtain the current element data in the target area, and then determine whether the target area is updated according to the current element data in the target area. As an example, the scheduling module can send the scheduling task to the monitoring service module in the form of asynchronous MQ message sending.

[0044] The database is connected to the monitoring service module and is used to store and manage relevant data when the target area is updated.

[0045] In addition, it should be noted that the relevant personnel in the embodiment of the present application may be employees of an enterprise or individual users, and the embodiment of the present application does not make any specific limitations on this.

[0046] Exemplarily, corresponding to the relevant personnel being the staff of the enterprise, the method can be applied to the following business scenarios: competitive intelligence, market analysis, customer service, etc. Among them: competitive intelligence includes price changes, new product releases, etc., so that the enterprise can quickly respond to the market based on the competitive intelligence. Market analysis includes such as industry news, industry reports or industry trends, so that the enterprise can make strategic plans based on the market analysis; customer service includes such as tracking customer feedback and comments on social media or forums, so that the enterprise can improve services or products based on the content of the customer service.

[0047] For example, corresponding to the relevant personnel being individual users, the method can be applied to the following business scenarios: news subscription, learning resources, technical support, etc. Among them: based on the news subscription, individual users can easily obtain the latest news or articles; learning resources include monitoring academic resources or online classes, so that individual users such as students or researchers can obtain the fastest and latest learning materials; technical support includes monitoring technical communities or forums, so that individual users can obtain the latest technical trends or solutions.

[0048] It is not difficult to find that, compared with the related art, in the scheme provided by the embodiment of the present application, configuration information is first obtained, wherein the configuration information at least includes: a target website, a target area in a target web page corresponding to the target website; then, according to the configuration information, a user is simulated to access the target website, and the target area in the target web page is locked to obtain the current element data in the target area; according to the current element data in the target area, it is determined whether the target area is updated. In the scheme provided by the embodiment of the present application, since the target website can be automatically accessed and the target area in the target web page can be automatically locked according to the configuration information, a simulated operation of interaction between the user and the target web page can be realized, thereby achieving the purpose of reducing labor costs and improving monitoring accuracy and efficiency; since there is no need to use the original server polling technical solution, the consumption of network bandwidth and server resources can be avoided, the probability of causing monitoring delays can be reduced, and unnecessary burdens on the server can be avoided; since the system used by the monitoring method of the web page data generally has a fixed version, the compatibility issues that may be caused by the newly developed plug-in tool based on the browser extension can be avoided.

[0049] Second embodiment

[0050] The second embodiment of the present application relates to a method for monitoring web page data. The second embodiment is an improvement on the first embodiment, and the specific improvement is: in the second embodiment of the present application, a specific implementation method for obtaining configuration information is provided. The technical solution provided in this embodiment has the advantages of strong scalability and high availability deployment.

[0051] Specifically, in this embodiment, the obtaining of configuration information may include: obtaining configuration information using a pre-established management panel;

[0052] Among them, see Figure 3 As shown, the management panel may at least include: a first input box for receiving the target website, and a second input box for receiving a target area in a target webpage corresponding to the target website.

[0053] Exemplarily, the target URL is: the website address that needs to be monitored.

[0054] Exemplary, combined Figure 4As shown, the expression form of the second input box can be realized by means of an XPATH selector or a CSS selector. In this way, the user can input the key parameters for characterizing the target area in the target web page corresponding to the target URL through the XPATH selector or the CSS selector, so as to facilitate locking the target area in the target web page according to the key parameters of the target area in the configuration information in the later stage. Among them, the relevant personnel can select any area in the target web page by controlling the mouse, keyboard or directly through gesture touch, and the selected range can be increased or decreased according to actual needs until the area selected in the frame in the target web page and desired to be monitored is used as the target area. In actual applications, it is generally possible to select a target area that is not easily changed in position due to the update of the target web page to reduce the risk of monitoring failure due to changes in the structure of the target web page.

[0055] Optionally, in some embodiments, Figure 3 As shown, the management panel may further include at least one of the following:

[0056] The third input box is used to receive the title of the monitoring task;

[0057] A fourth input box is used to receive the country of origin of the target URL;

[0058] The fifth input box is used to receive a preset script;

[0059] The sixth input box is used to receive the monitoring period of the target website;

[0060] A seventh input box, used to receive a detection type for the target website;

[0061] An eighth input box is used to receive a reminder method after monitoring the target website;

[0062] The ninth input box is used to receive settings for matching rules;

[0063] The tenth input box is used to receive settings for exclusion rules;

[0064] The eleventh input box is used to receive settings for the archive type;

[0065] The twelfth input box is used to receive settings for user notification.

[0066] For example, relevant personnel can flexibly configure the title of the monitoring task as needed, and the present application embodiment does not limit this. For example, a monitoring task for price changes of iron metals.

[0067] Exemplarily, the country of origin of the target website received by the fourth input box is used to characterize the source channel of the target website. For example, the country of origin may include a domestic website corresponding to the country and / or a foreign website corresponding to the foreign country. It is understandable that the corresponding overseas server needs to be configured to access the foreign website. In this way, the diverse usage needs of users can be met.

[0068] Exemplarily, the preset script received by the fifth input box corresponds to the preprocessing script in the figure; the preset script may be, but is not limited to, a JS script. By configuring the JS script in the configuration information, it is possible to perform pre-processing operations on some more complex websites.

[0069] Exemplarily, the monitoring period of the target website received by the sixth input box may be, but is not limited to, 20 minutes, 3 hours, etc. Relevant personnel may flexibly set the monitoring period according to actual needs, and this embodiment does not specifically limit this.

[0070] Exemplarily, the detection type of the target website received by the seventh input box is used to characterize the type of the current element data to be monitored. The detection type may include: image type, text type, HTML type, link type, etc.

[0071] Exemplarily, the reminder method received by the eighth input box after monitoring the target website may include: a reminder method of an email service, a reminder method of a communication collaboration platform, a reminder method of a social software, etc.

[0072] Exemplarily, the settings for the matching rules received by the ninth input box may include: text matching, keyword monitoring, time point change, value change, format change, etc.

[0073] Exemplarily, the settings for exclusion rules received by the tenth input box are used to highlight the preferences of the relevant person and to ignore updates of content that the relevant person is not interested in. For example, the exclusion rules may include but are not limited to: ignoring specific text, ignoring specific elements, ignoring specific domain names, ignoring specific changes in keyword appearances, ignoring format changes, ignoring cache changes, ignoring changes in time points, etc.

[0074] Exemplarily, in the settings for the archive type received in the eleventh input box, the archive type may include: text type archive, HTML type archive, picture type archive, and no archive, etc.

[0075] Exemplarily, in the setting for user notification received in the twelfth input box, the user notification may refer to: personnel other than the relevant personnel who perform the configuration operation, and personnel to be notified / copy sent, etc., if necessary.

[0076] It should be noted that, for the specific content in the first input box to the twelfth input box, relevant personnel can flexibly configure it according to needs, and this embodiment does not make any specific limitation on this.

[0077] In addition, it should be noted that the pre-established management panel may be a management panel pre-established in the system described in the first embodiment. In this way, relevant personnel can directly configure the management panel and obtain the configuration information without triggering any interactive operation in the system.

[0078] It is not difficult to find that in the embodiment of the present application, the acquisition of configuration information may include: using a pre-established management panel to acquire configuration information; wherein the management panel at least includes: a first input box for receiving the target website, and a second input box for receiving a target area in a target webpage corresponding to the target website. By establishing and using the management panel, distributed deployment can be supported, making the operation of relevant personnel relatively simple and clear, and achieving the purpose of improving the robustness, stability and scalability of the system.

[0079] Third embodiment

[0080] The third embodiment of the present application relates to a method for monitoring web page data. The third embodiment is an improvement on the first embodiment, and the specific improvement is: in the third embodiment of the present application, the method for monitoring web page data is implemented by a preset JAVA program. In the embodiment of the present application,

[0081] Specifically, in this embodiment, the preset JAVA program can be implemented based on the selenium-java package.

[0082] In some application examples, relevant personnel may first download a browser driver and the browser based on the system used. The browser driver corresponds to the version of the browser. Then, according to the configuration information and the selenium-java package, a user may be simulated to access the target website, and according to the target website, a target area in the target web page may be locked to obtain the current element data in the target area.

[0083] Exemplarily, part of the code for simulating a user accessing the target website and locking the target area in the target webpage to obtain the current element data in the target area is as follows:

[0084] driver.get("www.qq.com");

[0085] WebElement element=

[0086] driver.findElement(By.XPATH(" / / *[@id=\"qqhome-command-area\"] / div / div / div[2] / div[1]"));

[0087] The meaning of the above code is: control the browser to open the target website through WebDriver to simulate the user accessing the target website; the target website is: "www.qq.com". Then, by using the findElement method and XPATH selector of WebDriver, lock the target area in the target web page on the page, and find the specific HTML element data in the target area, the specific HTML element data is the current element data; in this example, the ID of the specific HTML element data is "qqhome-command-area". The specific HTML element data is located by path through XPATH. The WebElement is used as an interface to obtain the specific HTML element data on the target web page, and perform various operations on the specific HTML element data, such as click operations, text acquisition operations, etc.

[0088] It should be noted that before using the Selenium WebDriver package, the relevant personnel need to ensure that the driver of the browser is in the PATH environment variable of the system, or the relevant personnel need to specify the path of the driver of the browser in the code program. In addition, the relevant personnel also need to add the JAVA package of Selenium as a dependency to the system. Exemplarily, the relevant staff can perform the above operations through build tools such as Maven or Gradle.

[0089] It can be seen that in the above embodiment, a specific implementation method is provided for locking a target area in the target webpage through an XPATH selector to obtain current element data in the target area.

[0090] In some other embodiments, a target area in the target web page may be locked by a CSS selector to obtain current element data in the target area.

[0091] Exemplarily, part of the code for locking the target area in the target webpage to obtain the current element data in the target area is as follows:

[0092] WebElement element=

[0093] driver.findElement(By.cssSelectorbody>div:nth-child(3)>div:

[0094] nth-child(3)>div:nth-child(2)>div:nth-child(1)>div:nth-child(1)

[0095] >div:nth-child(1)>div:nth-child(1)>div:nth-child(2)>div:nth-chi ld(1));

[0096] The meaning of the above code is: by using the findElement method of WebDriver and the CSS selector, the target area in the target web page is locked on the page, and the current element data in the target area is found. Specifically, the CSS selector is used to accurately select the current element data in the target area through the hierarchical structure and the sub-element sequence number in each hierarchy.

[0097] In the embodiment of the present application, specific solutions are respectively listed for locking the target area in the target web page through XPATH selector and CSS selector to obtain the current element data in the target area. In this way, it can assist the simulated user to access the target website and lock the target area in the target web page to achieve the purpose of obtaining the current element data in the target area, and avoid the influence of the absolute position of the current element data on the target page.

[0098] It should be noted that the embodiment of the present application may also be an improvement based on the second embodiment.

[0099] It is understandable that the methods of periodic polling or installing monitoring plug-ins in the related art are mainly implemented based on the front-end development framework. In the embodiment of the present application, the monitoring method of the web page data is specifically implemented by a preset JAVA program. For example, the selenium-java package can be specifically selected to be implemented. In this way, the purpose of cross-platform operation can be achieved, and complex and diverse target web pages can be monitored, which has the advantage of "write once, run in multiple places".

[0100] Fourth embodiment

[0101] The fourth embodiment of the present application relates to a method for monitoring web page data. The fourth embodiment is an improvement on the first embodiment, and the specific improvement is: in the fourth embodiment of the present application, the diversity of websites corresponding to different target URLs is taken into account, which results in that some target areas cannot directly meet the user's monitoring needs in actual applications. Therefore, the embodiment of the present application provides a solution for pre-positioning and presetting the target areas.

[0102] Specifically, in this embodiment, the step of determining whether the target area is updated according to the current element data in the target area, that is, step S103 may include the following steps: Figure 5 As shown:

[0103] Step S1031, determining whether the target area meets the monitoring condition;

[0104] Step S1032, if it is determined that the target area does not meet the monitoring condition, a preset process is performed on the target area; after the preset process is performed, it is determined whether the target area is updated according to the current element data in the target area;

[0105] Step S1033: If it is determined that the target area meets the monitoring condition, whether the target area is updated is directly determined based on the current element data in the target area.

[0106] Exemplarily, the preset processing may be performed in conjunction with a Js script.

[0107] Optionally, in some embodiments, the preset process may include:

[0108] Step S201, converting the current instance type of the target area into a JavascriptExecutor type;

[0109] Step S202, calling executeScript in the JavascriptExecutor type to execute a preset Js script.

[0110] Exemplarily, part of the code for performing the preset processing is as follows:

[0111] JavascriptExecutor javaScript=(JavascriptExecutor)driver;

[0112] javaScript.executeScript("Js script");

[0113] The meaning of the above code is: the current instance type of the target area is forcibly converted to the JavascriptExecutor type through WebDriver. Then, the executeScript method of JavascriptExecutor is called to execute the Js script. It is worth mentioning that in actual applications, the "Js script" in the above code will be replaced with the Js code string to be actually used.

[0114] It can be understood that the executeScript method can be used to execute any JavaScript script, and can be used in conjunction with WebDriver to simulate a user accessing the target URL and lock the target area in the target web page to obtain the current element data in the target area. By calling the executeScript method and executing the JavaScript script, some operations that cannot be completed through standard WebDriver commands can be conveniently performed on the target web page, directly reaching the target area.

[0115] For example, Figure 6 As shown, when the target area does not meet the monitoring condition, the target area is preset. For example, when the target area selected by the relevant personnel is a section of commercial housing transaction market, since the transaction market of commercial housing in different regions is different, it is necessary to select a specific area (city / district / county, etc.) through the preset processing as shown in the red box, and then directly reach the target area.

[0116] It should be noted that the embodiments of the present application may also be improvements based on the second embodiment and / or the third embodiment.

[0117] It is not difficult to find that, considering the diversity of websites corresponding to different target URLs, this leads to that some target areas cannot directly meet the user's monitoring needs in practical applications. Therefore, the embodiment of the present application provides a scheme for pre-setting and pre-setting the target area. Specifically, by judging whether the target area meets the monitoring conditions; if it is determined that the target area does not meet the monitoring conditions, the target area is pre-set; after the preset processing, it is determined whether the target area is updated according to the current element data in the target area; if it is determined that the target area meets the monitoring conditions, it is directly determined whether the target area is updated according to the current element data in the target area. In this way, the scheme provided by the embodiment of the present application can be applied to various different websites, can achieve the purpose of meeting the user's monitoring needs, and is conducive to improving user satisfaction.

[0118] Fifth embodiment

[0119] The fifth embodiment of the present application relates to a method for monitoring web page data. The fifth embodiment is an improvement based on the first embodiment, and the specific improvement is: in the fifth embodiment of the present application, from another perspective, another specific implementation method for determining whether the target area is updated based on the current element data in the target area is provided.

[0120] Specifically, in this embodiment, the step of determining whether the target area is updated based on the current element data in the target area, that is, step S103, may further include the following steps: Figure 7 As shown:

[0121] Step S1031', determining the type of the current element data; the type includes at least one of the following: picture type, text type, link type, HTML type;

[0122] Step S1032': comparing the historical element data with the current element data according to the type of the current element data to determine whether the target area is updated.

[0123] Optionally, in some embodiments, the historical element data and the current element data are compared according to the type of the current element data to determine whether the target area is updated, that is, step S1032 may further include the following steps:

[0124] Step S10321, if the type of the current element data is a picture type, then perform MD5 comparison between the historical element data and the current element data to determine whether the target area is updated;

[0125] Step S10322: If the type of the current element data is any one of text type, link type, and HTML type, the historical element data and the current element data are compared for equality to determine whether the target area is updated.

[0126] It should be noted that the distinction between step S10321 and step S10322 is only for the convenience of description. In fact, there is no restriction on the order of execution of step S10321 and step S10322.

[0127] Exemplarily, in the process of executing the webpage data monitoring method, if the type of the current element data is a picture type, the step S10321 may further include the following steps:

[0128] Step S103211, maximizing the browser window corresponding to the target webpage until no scroll bar appears on the target webpage;

[0129] Step S103212, locking a target area in the target webpage, taking a screenshot of the target area, and obtaining a current screenshot result;

[0130] Step S103213, obtaining the historical screenshot result obtained by the previous screenshot operation on the target area;

[0131] Step S103214, perform MD5 comparison on the current screenshot result and the historical screenshot result to determine whether the target area is updated. Specifically, if the comparison result obtained after the MD5 comparison is the same, it indicates that the target area has not been updated; if the comparison result obtained after the MD5 comparison is different, it indicates that the target area has been updated.

[0132] Exemplarily, in the process of executing the webpage data monitoring method, if the type of the current element data is any one of a text type, a link type, and an HTML type, the step S10322 may further include the following steps:

[0133] Step S103221, obtaining the current specific content of the current element data in the target area; Step S103222, obtaining the historical specific content of the historical element data in the target area;

[0134] Specifically, if the type of the current element data is text type, the text content of the current element data is obtained; if the type of the current element data is link type, the a tag information of the current element data is obtained; if the type of the current element data is HTML type, the HTML content of the current element data is obtained; similarly, the source of the historical specific content is also the same, to avoid repetition, it will not be repeated here. In addition, the historical element data can be the element data obtained when the target area was monitored last time.

[0135] Step S103223, the current specific content and the historical specific content are compared congruently to determine whether the target area is updated. Specifically, if the comparison result obtained after the congruent comparison is the same, it indicates that the target area has not been updated; if the comparison result obtained after the congruent comparison is different, it indicates that the target area has been updated.

[0136] It should be noted that the embodiments of the present application may also be improvements made on the basis of any one or more embodiments from the first embodiment to the third embodiment.

[0137] It is not difficult to find that in the embodiment of the present application, by providing a specific implementation method for determining whether the target area is updated according to the current element data in the target area, it can support monitoring of multiple types of element data, which is conducive to further meeting the diverse needs of users.

[0138] The step division of the above methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this application; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this application.

[0139] Sixth embodiment

[0140] Some embodiments of the present application also provide an electronic device. The electronic device may be a digital computer in various forms, such as a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, etc. The electronic device may also be a mobile device in various forms, such as a personal digital processing, a cellular phone, a smart phone, a wearable device, and other similar computing devices.

[0141] The electronic device includes: one or more processors; and a memory storing computer program instructions, wherein when the computer program instructions are executed, the processor executes the steps of the method provided in any one or more of the above embodiments. Figure 8 An exemplary structural diagram of the electronic device is disclosed. Figure 8 As shown, the electronic device includes: one or more processors 1101, memory 1102, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Among them, the components shown in this article, their connections and relationships, and their functions are only used as examples, and are not intended to limit the implementation of the present application described and / or required herein.

[0142] The electronic device may further include: an input device 1103 and an output device 1104. The processor 1101, the memory 1102, the input device 1103 and the output device 1104 may be connected via a bus or other means. Figure 8 The example of connecting through bus is taken in the following.

[0143] The input device 1103 can receive input digital or character information, and generate key signal input related to the user settings and function control of the electronic device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a track ball, a joystick and other input devices. The output device 1104 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display and a plasma display. In some embodiments, the display device may be a touch screen.

[0144] To provide interaction with a user, the electronic device may be a computer. The computer has: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball), through which the user can provide input to the computer. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0145] In the embodiments of the present application, a computer program / instruction is stored on a computer-readable medium, and when the computer program / instruction is executed by a processor, the steps of the method provided by any one or more of the above embodiments are implemented. The computer-readable medium may be included in the electronic device described in the above embodiments; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more computer-readable instructions.

[0146] The memory 1102 can be used as a non-transient computer-readable storage medium, which can be used to store non-transient software programs, non-transient computer executable programs and modules. The processor 1101 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 1102, so as to implement the program instructions / modules corresponding to the method provided by any one or more embodiments in the embodiments of the present application.

[0147] The memory 1102 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 1102 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 1102 may optionally include a memory remotely arranged relative to the processor 1101, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0148] It should be noted that the computer-readable medium described in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.

[0149] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.

[0150] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0151] In the above-described embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. For example, it can be implemented by using an application specific integrated circuit (ASIC), a general-purpose computer or any other similar hardware device. In certain embodiments, the software program of the present application can be executed by a processor to implement the above steps or functions. Similarly, the software program of the present application (including relevant data structures) can be stored in a computer-readable recording medium, for example, a RAM memory, a magnetic or optical drive or a floppy disk and similar devices. In addition, some steps or functions of the present application can be implemented by hardware, for example, as a circuit that cooperates with a processor to perform each step or function.

[0152] The computer program product provided in the embodiment of the present application includes one or more computer programs / instructions, and when the computer program / instructions are executed by the processor, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from a computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.

[0153] The flow chart or block diagram in the accompanying drawings shows the possible architecture, function and operation of the equipment, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated system for hardware that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0154] The scope of the present application is defined by the appended claims rather than the above description, and it is intended that all changes that fall within the meaning and scope of the equivalent elements of the claims are included in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim may also be implemented by one unit or device through software or hardware. The words "first", "second", etc. are only used to distinguish the description, and do not indicate any particular order, nor can they be understood as indicating or implying relative importance.

[0155] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily mention changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims, and the above embodiments should be regarded as exemplary and non-restrictive.

Claims

1. A method for monitoring web page data, characterized in that: The method comprises: Acquire configuration information; wherein the configuration information at least includes: a target website, and a target area in a target webpage corresponding to the target website; According to the configuration information, simulating a user accessing the target website, and locking a target area in the target webpage to obtain current element data in the target area; It is determined whether the target area is updated according to the current element data in the target area.

2. The method according to claim 1, characterized in that The obtaining of configuration information includes: obtaining configuration information using a pre-established management panel; Wherein, the management panel at least includes: A first input box is used to receive the target website, and The second input box is used to receive a target area in a target webpage corresponding to the target URL.

3. The method according to claim 1, characterized in that The web page data monitoring method is specifically implemented through a preset JAVA program.

4. The method according to claim 1, characterized in that: The determining, according to the current element data in the target area, whether the target area is updated comprises: Determining whether the target area meets the monitoring condition; If it is determined that the target area does not meet the monitoring condition, the target area is subjected to a preset process; after the preset process is performed, it is determined whether the target area is updated according to the current element data in the target area; If it is determined that the target area meets the monitoring condition, whether the target area is updated is directly determined according to the current element data in the target area.

5. The method according to claim 4, characterized in that The preset processing includes: Convert the current instance type of the target region to the JavascriptExecutor type; Call executeScript in the JavascriptExecutor type to execute the preset Js script.

6. The method according to any one of claims 1 to 5, characterized in that The determining, according to the current element data in the target area, whether the target area is updated comprises: Determine the type of the current element data; the type includes at least one of the following: image type, text type, link type, HTML type; According to the type of the current element data, the historical element data is compared with the current element data to determine whether the target area is updated.

7. The method according to claim 6, characterized in that The comparing the historical element data with the current element data according to the type of the current element data to determine whether the target area is updated includes: If the type of the current element data is a picture type, performing an MD5 comparison between the historical element data and the current element data to determine whether the target area is updated; If the type of the current element data is any one of a text type, a link type, and an HTML type, the historical element data and the current element data are compared for equality to determine whether the target area is updated.

8. An electronic device, characterized in that: The electronic device comprises: one or more processors; and A memory storing computer program instructions, which, when executed, cause the processor to perform the steps of the method as claimed in any one of claims 1 to 11.

9. A computer readable medium having a computer program / instructions stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Webpage local content tracking and reminding method

    CN107239546A

  • Webpage data crawling method and device

    CN110968753A

  • Data processing method, device and equipment and readable storage medium

    CN112883253A

  • Method and device for analyzing internet site information

    JP2009116457A