Page monitoring method and device, electronic equipment and storage medium

By analyzing the difference data obtained from page screenshots, the problem of low accuracy in page monitoring alarms in existing technologies has been solved, enabling refined page anomaly detection and repair.

CN116738091BActive Publication Date: 2025-12-09YONGHUI SUPERMARKET CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310560090.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-17
Publication Date
2025-12-09
Estimated Expiration
2043-05-17

AI Technical Summary

Technical Problem

Existing technologies cannot accurately identify data loss issues in page monitoring, resulting in low alarm accuracy and requiring significant preparation work before monitoring.

Method used

After the page is rendered, a screenshot of the current page is taken to obtain the requested data. This data is then compared with the historical request data corresponding to screenshots of multiple historical pages to perform a difference analysis, and page alerts are issued based on the difference data.

Benefits of technology

It improves the accuracy of page anomaly detection, enabling more precise identification of missing data issues and facilitating subsequent page anomaly repair.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116738091B_ABST
    Figure CN116738091B_ABST
Patent Text Reader

Abstract

The application provides a page monitoring method and device, electronic equipment and storage medium, the page monitoring method is applied to the client, and includes the following steps: after the page rendering is completed, the current page is captured, and the request data corresponding to the current page is acquired; a plurality of historical page screenshots and the historical request data corresponding to each historical page screenshot are acquired; the difference data of the request data corresponding to the current page and the historical request data corresponding to each historical page screenshot is acquired; and page early warning is carried out based on the difference data. According to the application, the current page is captured, the difference data of the request data corresponding to the current page and the historical request data corresponding to each historical page screenshot is acquired, and then the page early warning is carried out based on the difference data, so that the page exception can be detected, the problem of low alarm accuracy when the business data of the page is wrong is solved, and the abnormal point data of the page can be extracted, thereby facilitating subsequent repair of the abnormal problems of the page.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of data processing, and particularly relates to a page monitoring method and device, electronic equipment and storage medium. BACKGROUND

[0002] In an IT system, there are two situations when the system is abnormal. One is that the application service itself is abnormal and cannot normally return data. This situation can be alarmed and followed up through the health interface of the monitoring service. The other situation is that the application service state is normal and the interface can normally return information, but part of the information may be incorrect. For example, a client displays four data, that is, four data should be returned, but the server only returns three data. At this time, the client display will have a blank area, commonly known as a sunroof. The prior art often analyzes the data returned by the backend, for example:

[0003] CN202010365297.7 Interface monitoring method and device based on prometheus, computer equipment and storage medium: after the return value of the interface is structured and stored, the data returned by the interface is compared and analyzed in the future. If the structure changes, an alarm can be given.

[0004] CN201710584725.3 Application interface monitoring method, device, equipment and computer readable medium: an acquisition step is used to acquire application interface call data and store the call data in a log file; a collection step is used to upload all application interface log files to a server; an analysis step is used to analyze the collected log files and display the analysis results in the form of a three-dimensional graph. The present application monitors the calls between the application interfaces of the service itself and the third-party service, thereby analyzing the running quality of each application interface, monitoring the quality of the service, achieving fine-grained monitoring, and proposing a normalized function value calculation method for application interface fault positioning, thereby achieving the purpose of quickly positioning faults.

[0005] CN201811519474.1 A method and system for monitoring transaction system abnormalities based on zabbix: according to the request data, return the custom return code and the explanation information, and write the return code and the explanation information into the file; the return code and the explanation information in the file are detected regularly, if the return code is 0, it is determined that the transaction is normal; if the return code is negative, it is determined that the transaction is abnormal, and the abnormal alarm signal is pushed through the zabbix detection trigger. The application also discloses a system for monitoring transaction system abnormalities based on zabbix, which comprises a data request module, a data processing module, an abnormality judgment module and an abnormality alarm module. The application is based on the monitoring technical means of Zabbix custom script, simulates the POS terminal, simulates the standard sign-in message of UnionPay, initiates the simulation transaction request to the payment system, realizes the monitoring of the transaction process, and can more accurately locate the abnormality of the transaction system.

[0006] Therefore, the corresponding technology has a relatively coarse granularity of monitoring the page, only monitors whether a specific return field or data interface is abnormal, but cannot finely identify problems such as a number shortage, and the prior art has a relatively large amount of preparation work for monitoring, and needs to perform structured processing on the data interface. SUMMARY

[0007] In view of the above-mentioned shortcomings of the prior art, the purpose of the present application is to provide a page monitoring method and device, electronic equipment and storage medium, which are used to solve the problem of low alarm accuracy when the business data of the page is wrong.

[0008] To achieve the above-mentioned purpose and other related purposes, the first aspect of the present application provides a page monitoring method applied to a client, comprising the following steps: after the page rendering is completed, taking a screenshot of the current page, and obtaining the request data corresponding to the current page; obtaining a plurality of historical page screenshots and historical request data corresponding to each of the historical page screenshots; obtaining difference data of the request data corresponding to the current page and the historical request data corresponding to each of the historical page screenshots; and performing page early warning based on the difference data.

[0009] In an embodiment of the first aspect, after obtaining the difference data, the method further comprises: confirming the type of the difference data; obtaining interface requests corresponding to each of the historical page screenshots, and obtaining the ratio of the type of difference data in each of the interface requests; and when the ratio is less than a ratio threshold, recording the difference data, so as to perform page early warning based on the recorded difference data.

[0010] In an embodiment of the first aspect, the type of the difference data comprises interface request difference and interface return content difference; and the interface return content difference comprises missing field difference, newly added field difference and field value difference.

[0011] In an embodiment of the first aspect, the page pre-warning based on the difference data comprises: recording the difference data through a difference point list; detecting the difference point list cyclically, and when there is difference data in the difference point list, sending the request data corresponding to the current page to a server, and pushing the page pre-warning by the server; wherein the request data comprises a request number, a requested device number, a return value and an error rule.

[0012] In an embodiment of the first aspect, the method further comprises: after the client enters a page, requesting and obtaining configuration information from a server; generating a data request for requesting page data; wherein the data request comprises a request number and a requested device number; sending the data request to a server, and receiving and recording the request data of the page from the server.

[0013] In an embodiment of the first aspect, the configuration information comprises an alarm rule, and the page monitoring method further comprises: judging whether the interface of the current page meets the alarm condition based on the alarm rule; when the interface of the current page meets the alarm condition, sending the request data corresponding to the interface of the current page to a server, and pushing the page pre-warning by the server; wherein the request data comprises a request number, a requested device number, a return value and an error rule.

[0014] In an embodiment of the first aspect, the configuration information comprises page configuration information, and the page configuration information comprises a page blankness threshold value and a blank color value; the obtaining of the request data corresponding to the current page comprises: obtaining the blankness of the current page screenshot based on the blank color value; obtaining the blankness of a plurality of historical page screenshots, and obtaining the average blankness of the historical page screenshots based on the blankness of the plurality of historical page screenshots; obtaining the blankness difference value between the blankness of the current page screenshot and the average blankness of the historical page screenshots; judging whether the blankness difference value reaches the page blankness threshold value, and obtaining the request data corresponding to the current page when the blankness difference value reaches the page blankness threshold value.

[0015] A second aspect of the present application provides a page monitoring device applied to a client, comprising: a page screenshot module for taking a screenshot of a current page after the page is rendered; a data obtaining module for obtaining request data corresponding to the current page; a data analysis module for obtaining a plurality of historical page screenshots and historical request data corresponding to each of the historical page screenshots, obtaining difference data between the request data corresponding to the current page and the historical request data corresponding to each of the historical page screenshots, and performing page pre-warning based on the difference data.

[0016] The third aspect of the present application provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the page monitoring method when executing the computer program.

[0017] The fourth aspect of the present application provides a computer readable storage medium, which stores a computer program, wherein the computer program implements the steps of the page monitoring method when executed by a processor.

[0018] As described above, the page monitoring method, device, electronic device and storage medium of the present application have the following beneficial effects:

[0019] Compared with the prior art, the present application obtains the difference data between the request data corresponding to the current page and the historical request data corresponding to each historical page screenshot based on the current page screenshot, and then performs page early warning based on the difference data, which not only can detect the page exception and solve the problem of low alarm accuracy when the business data of the page is wrong, but also can extract the abnormal point data of the page, which is convenient for subsequent repair of the abnormal problems of the page. BRIEF DESCRIPTION OF DRAWINGS

[0020] Figure 1 A flowchart showing the page monitoring method of the present application in an embodiment.

[0021] Figure 2 A flowchart showing the process of the client obtaining the request data from the server in an embodiment of the page monitoring method of the present application.

[0022] Figure 3 A flowchart showing the specific process of obtaining the request data in an embodiment of the page monitoring method of the present application.

[0023] Figure 4 A flowchart showing the process of performing page early warning in an embodiment of the page monitoring method of the present application.

[0024] Figure 5 A structural schematic diagram showing the page monitoring device of the present application in an embodiment.

[0025] Figure 6 An interaction schematic diagram showing the client and the server in the present application.

[0026] Figures 7 to 10 An interaction flowchart showing the client and the server in the implementation process of the page monitoring method of the present application.

[0027] Figure 11 A structural schematic diagram showing the electronic device of the present application in an embodiment.

[0028] REFERENCE NUMERALS

[0029] 1 electronic device

[0030] 11 processing unit

[0031] 12 memory

[0032] 121 random access memory

[0033] 122 cache memory

[0034] 123 storage system

[0035] 124 program / utility

[0036] 1241 program module

[0037] 13 bus

[0038] 14 input / output interface

[0039] 15 network adapter

[0040] 2 external device

[0041] 3 display

[0042] 100 page monitoring apparatus

[0043] 110 page screenshot module

[0044] 120 data acquisition module

[0045] 130 data analysis module

[0046] 210 service module

[0047] 220 configuration center

[0048] 230 alarm module

[0049] S100-S400 steps

[0050] S11-S13 steps

[0051] S111-S114 steps

[0052] S310-S330 steps DETAILED DESCRIPTION

[0053] Following make the specific embodiment of the present application, the person skilled in the art can easily understand the other advantages and effects of the present application from the disclosure of the present application. The present application can also be implemented or applied by another different embodiment, and the details in the specification can be modified or changed based on different views and applications without departing from the spirit of the present application. It should be noted that the following examples and features in the examples can be combined with each other without conflict.

[0054] It should be noted that the diagrams provided in the following examples only illustrate the basic concept of the present application in a schematic manner, and only the components related to the present application are shown in the diagrams, not the number, shape and size of the components when actually implemented. The actual implementation of each component may be a random change, and the component layout pattern may be more complex.

[0055] The page monitoring method, device, electronic equipment and storage medium of the present application, during the running of the client, by taking a screenshot of the current page, obtaining the difference data between the request data corresponding to the current page and the historical request data corresponding to each historical page screenshot, and then performing page early warning based on the difference data, not only can detect the page exception, solve the problem of low alarm accuracy when the business data of the page is wrong, but also can extract the abnormal point data of the page, which is convenient for subsequent repair of the abnormal problem of the page.

[0056] As shown in Figure 1 The page monitoring method of the present application includes the following steps:

[0057] Step S100, after the page rendering is completed, taking a screenshot of the current page, and obtaining the request data corresponding to the current page;

[0058] Step S200, obtaining a plurality of historical page screenshots and historical request data corresponding to each of the historical page screenshots;

[0059] Step S300, obtaining the difference data between the request data corresponding to the current page and the historical request data corresponding to each of the historical page screenshots;

[0060] Step S400, performing page early warning based on the difference data.

[0061] The above steps S100 to S400 in the page monitoring method of the present embodiment are described in detail as follows.

[0062] Step S100, after the page rendering is completed, taking a screenshot of the current page, and obtaining the request data corresponding to the current page.

[0063] That is, after the page rendering is completed, the step S100 of the page monitoring method of the embodiment is executed, before the page rendering, the embodiment further includes that the client obtains the request data from the server, after the request data is obtained, the client starts to render the page. As shown in Figure 2 The process of obtaining the request data from the server by the client includes:

[0064] In step S11, after the client starts to enter the page, the configuration information is requested and obtained from the server.

[0065] Specifically, after the client starts to enter the page, the client initiates a request to the monitoring service of the server to obtain the configuration information, and the monitoring service of the server receives the request and returns the configuration information.

[0066] In the embodiment, the configuration information includes page configuration information and alarm rules.

[0067] Specifically, in the embodiment, the page configuration information includes but is not limited to a page blankness threshold and a blank color value; and the alarm rules include but are not limited to an error return code corresponding to an interface, a lack of field information of an interface, and redundant field information of an interface.

[0068] In step S12, the data request for requesting the page data is generated, wherein the data request includes a request number and a requested device number.

[0069] After the client obtains the configuration information from the server, the client generates the data request. That is, the client requests the data corresponding to the page from the server, and before initiating the data request, a unique request number (for example, self-incremented according to the request order) and a device number (marking the current device) are generated for each data request.

[0070] In step S13, the data request is sent to the server, and the request data of the page is received and recorded from the server.

[0071] The client initiates the data request to obtain the data from the server, and the request number and the requested device number are carried in the parameter of each data request. The data service of the server receives the request of the client, starts to assemble the data, and records the request information of the client including the request number, the device number, and the returned data content before returning the data. The client records the time, the sequence number, the device number, and the returned content corresponding to the request sequence number, and then the client checks whether the current request is processed. If not, the specific steps in 3) are executed circularly until the data is received and obtained from the server, at which time the client records the request data of the page.

[0072] After the client obtains the request data from the server, the client starts to render the page.

[0073] After the page rendering is completed, the current page is screenshot, and the request data corresponding to the current page is obtained.

[0074] Specifically, in the embodiment, after the current page is screenshot, and before the request data corresponding to the current page is obtained, the following steps are further included.

[0075] Based on the alarm rule, it is judged whether the interface of the current page meets the alarm condition, and when the interface of the current page meets the alarm condition, the request data corresponding to the current page interface is sent to the server, and the server performs early warning push on the page; wherein the request data includes request number, requested device number, return value and error rule.

[0076] Specifically, in the embodiment, the alarm rule is the alarm rule in the configuration information obtained from the server, and includes but is not limited to the error return code corresponding to the interface, the lack of field information of the interface and the excess field information of the interface.

[0077] The client compares all interfaces of the current page with the alarm rule returned in the configuration information, to confirm whether the error return code is returned, whether the specific field is lacked and whether the specific field is redundant.

[0078] Specifically, it is judged whether the interface of the current page meets the alarm condition.

[0079] 1) whether the return code corresponding to the request conforms to the abnormal return code configured by the configuration center;

[0080] 2) whether the return content corresponding to the request lacks the specific field configured by the configuration center;

[0081] 3) whether the return content corresponding to the request has the specific field configured by the configuration center.

[0082] If the alarm condition is met, the client sends the problematic request and related data to the server for alarm, including request number, device number, return value and error rule. Therefore, the page monitoring method in the embodiment can not only compare and judge the difference of the interface of the current page, but also send the problematic request and related data to the server for alarm or other data analysis.

[0083] The client sends the problematic request and related data to the server for alarm, and the monitoring service of the server receives the request and checks the data transmitted by the client, and the checking condition is whether it is the data returned by the server, and if so, the alarm information is pushed.

[0084] The process of pushing alarm information is as follows: grouping the devices according to their request numbers, sorting them by request number from smallest to largest, generating a call chain for the client to call to obtain alarm information, and pushing the call chain to the client.

[0085] Users who receive alarm information can locate the fault by querying the previous request chain and error request information, which facilitates subsequent repair of page anomalies.

[0086] Specifically, in this embodiment, the page configuration information includes a page whitespace threshold and a whitespace color value. For example, the client obtains the whitespace threshold and whitespace color value from the configuration center, where the default pure white color is whitespace, i.e., FFFFFF.

[0087] like Figure 3 As shown, after taking a screenshot of the current page, the process of obtaining the request data corresponding to the current page includes:

[0088] Step S111: Obtain the blankness of the current page screenshot based on the blank color value;

[0089] Step S112: Obtain the blankness of multiple historical page screenshots, and obtain the average blankness of the historical page screenshots based on the blankness of multiple historical page screenshots.

[0090] Step S113: Obtain the blankness difference between the blankness of the current page screenshot and the average blankness of the historical page screenshots;

[0091] Step S114: Determine whether the blankness difference reaches the page blankness threshold, and obtain the request data corresponding to the current page when the blankness difference reaches the page blankness threshold.

[0092] In one embodiment of the present invention, the page configuration information may further include: page pixel information, page structure information, and / or page element semantic information. After taking a screenshot of the current page, obtaining the request data corresponding to the current page may further include: obtaining any one of the following: page pixel comparison information, page element semantic comparison information, page layout comparison information, and custom comparison information, without specific limitations here.

[0093] Furthermore, this invention can determine the differences between the current page and the reference page by statistically analyzing the pixel differences at each identical location in the current page and the reference page. The request data corresponding to the current page may include the obtained pixel difference data.

[0094] The application can determine the difference between the current page and the reference page by comparing the page element semantic information of the current page with the page element semantic information of the reference page. The request data corresponding to the current page can include the obtained page element semantic difference data.

[0095] The application can determine the difference between the current page and the reference page by comparing the page structure information of the current page with the page structure information of the reference page. The request data corresponding to the current page can include the obtained page structure information difference data.

[0096] Specifically, the page structure information includes at least one of the style, position or type of the page element in the page; there are multiple specific implementation manners of determining the difference detection result by comparing the page structure information of the current page with the page structure information of the reference page, including but not limited to the following three manners:

[0097] The first manner is to count the position difference degree of the current page element and the reference page element, which are the same in at least one of the style and type, in the current page and the reference page.

[0098] The second manner is to count the style difference degree of the current page element and the reference page element, which are the same in at least one of the position and type, in the current page and the reference page.

[0099] The third manner is to count the type difference degree of the current page element and the reference page element, which are the same in at least one of the position and style, in the current page and the reference page.

[0100] It should be understood that the page element can be any page element in the current page, and the reference page element is the corresponding page element of the any page element in the reference page. The position of the current page element and the reference page element in the first manner and the second manner can be completely same or partially same (for example, 80% same), and the application embodiments do not make specific limitations.

[0101] It should be noted that the page can be a graphical user interface (GUI) screenshot of the to-be-tested software product (for example, a webpage, an application (App), etc.) in different environments, that is, the to-be-tested page can be one or more GUI screenshots, and the embodiments of the present application do not make specific limitations. The environment can be understood as an environment composed of one or more of an operating system, a hardware device, or a webpage browser and a version of the corresponding webpage browser. The standard page is a standard GUI screenshot of the to-be-tested software product, which can be a pre-designed GUI screenshot or a GUI screenshot displayed by the to-be-tested software product in a user-specified environment (for example, a Google browser of a windows system).

[0102] Specifically, in the embodiment, the process of obtaining the request data corresponding to the current page is as follows:

[0103] The client reads all the pixel points of the current page screenshot and calculates the blankness (that is, the ratio of the pixel points of the blank color to all the pixel points) of the current page screenshot, and records the blankness of the current page screenshot. Then the client reads the historical screenshot information and the request information corresponding to the screenshot, and if there is no historical data, the process ends. The client reads the blankness of the historical multiple screenshots (the number of the multiple historical page screenshots can be configured, for example, 30 times), and calculates the average value of the blankness of the historical multiple screenshots. It is judged whether the difference between the blankness of the current page screenshot and the average value of the blankness of the historical multiple screenshots exceeds the page blankness threshold value. If the page blankness threshold value is not exceeded, the process ends, and if the page blankness threshold value is exceeded, it is confirmed that the current page screenshot has differences, and the subsequent step of obtaining the difference value of the current interface is continued.

[0104] Step S200, obtaining multiple historical page screenshots and historical request data corresponding to each of the historical page screenshots.

[0105] The number of the multiple historical page screenshots can be configured.

[0106] Step S300, obtaining the difference data between the request data corresponding to the current page and the historical request data corresponding to each of the historical page screenshots.

[0107] The client pulls out the request data corresponding to the current page screenshot, and compares the difference between the corresponding request data accessed last time or several times (multiple historical page screenshots).

[0108] In the embodiment, as shown in Figure 4 After obtaining the difference data, the following steps are further included:

[0109] Step S310, confirming the type of the difference data;

[0110] In this embodiment, the type of the difference data includes interface request difference and interface return content difference; the interface return content difference includes missing field difference, added field difference and field value difference.

[0111] That is, in this embodiment, the difference data includes:

[0112] 1. Requested interface difference (that is, which interface requests are added and which interface requests are reduced);

[0113] 2. Interface return content difference, which is analyzed by interface return content: a) missing field; b) added field; and c) value different field.

[0114] Step S320, obtaining interface requests corresponding to each of the historical page screenshots, and obtaining a ratio of the type of difference data in each of the interface requests;

[0115] Step S330, when the ratio is less than a ratio threshold, recording the difference data, so as to perform page early warning based on the recorded difference data.

[0116] Step S400, performing page early warning based on the difference data.

[0117] In this embodiment, the page early warning based on the difference data includes:

[0118] 1) recording the difference data through a difference point list;

[0119] 2) cyclically detecting the difference point list, and when there is difference data in the difference point list, sending request data corresponding to the current page to a server, so that the server performs early warning push on the page; wherein the request data includes request number, requested device number, return value and error rule.

[0120] Specifically, in this embodiment, the client pulls all data of the historical page screenshots, creates a new difference point list, and records it as list Y:

[0121] 1) If the difference data is a missing field, in all requests related to the historical screenshots, find the corresponding interface request, analyze whether the ratio of the same missing field is the same, that is, the ratio of the same missing field request to the total number of requests of the interface, if it reaches a certain threshold (configurable, for example, set to 90%), ignore the difference data, if not, record it in list Y;

[0122] 2) If the difference data is a redundant field, in all requests involved in the historical screenshot, find the corresponding interface request, analyze whether the same field is redundant, that is, the same field is missing, the ratio of the number of requests to the total number of requests of the interface, if it reaches a certain threshold (configurable, for example, set to 90%), ignore the difference data, if not, record it in list Y;

[0123] 3) If the difference data is a field value difference, in all requests involved in the historical screenshot, find the corresponding interface request, analyze the ratio of the same field value in all requests, if the maximum ratio value does not exceed the threshold value (configurable, for example, set to 10%), ignore the field, if it exceeds, record it in list Y.

[0124] The client judges whether the Y list is empty:

[0125] 1) If not empty, the client sends the problematic request and related data to the server for alarm, including request number, device number, return value, and error rule.

[0126] 2) The monitoring service of the server receives the request and checks the transmitted information. The checking condition is whether it is the data returned by the server. If it is, push the alarm information.

[0127] Among them, the process of pushing the alarm information is, for example: grouping according to the request device number, and sorting from small to large according to the request number, generating a calling link for the client to call to obtain alarm information, and pushing the calling link to the client.

[0128] 3) The user receiving the alarm information, for example, locates the fault point by querying the request link and error request information in the previous step, which facilitates subsequent repair of abnormal problems of the page.

[0129] Therefore, the page monitoring method of the embodiment can detect page abnormalities, solve the problem of low alarm accuracy when the business data of the page is wrong, and extract abnormal point data of the page, which facilitates subsequent repair of abnormal problems of the page.

[0130] As shown in Figure 5 The embodiment also provides a page monitoring device 100 applied to a client, which comprises a page screenshot module 110, a data acquisition module 120, and a data analysis module 130.

[0131] In the embodiment, the page screenshot module 110 is configured to take a screenshot of the current page after the page is rendered. The function of the page screenshot module 110 is to take a screenshot of the current page after the client-side page is rendered and record the screenshot time.

[0132] In the embodiment, the data acquisition module 120 is configured to acquire request data corresponding to the current page. The data module intercepts client-side data requests (with the device number and request sequence number of the client-side), records the request initiation time, data return time, returned data, and the time when the page starts to be rendered after the data is returned.

[0133] In the embodiment, the data analysis module 130 is configured to acquire a plurality of historical page screenshots and historical request data corresponding to each of the historical page screenshots, acquire difference data between the request data corresponding to the current page and the historical request data corresponding to each of the historical page screenshots, and perform page early warning based on the difference data.

[0134] In the embodiment, as shown in Figure 6 The server includes a service module 210 deployed on a data service, a configuration center 220 and an alarm module 230 deployed on a monitoring service.

[0135] The service module 210 provides service information for the client-side and records the time and content of the data returned to the client-side, including the device number and request sequence number of the client-side. The configuration module stores a part of analysis threshold values and alarm rules and the like, for example, the page blankness threshold value storage, the alarm rules used by the analysis module lack some fields, or the structure is inconsistent, and the like. The client-side sends alarm information to the server, and the information includes the device number, request sequence number, return content, and alarm content and the like. The alarm module 230 finds the information content returned by the server, confirms, and pushes the alarm information to the user after confirmation, for example, the push message of the APP, short message, telephone, and the like.

[0136] Figures 7 to 10 The figure shows the interaction process between the client-side and the server in the implementation process of the page monitoring method of the application.

[0137] As shown in Figure 7 1) the client-side is started and enters a page;

[0138] 2) the client-side analysis module initiates a request to the monitoring service of the server and acquires configuration information.

[0139] 3) The configuration module within the server-side monitoring service receives the request and returns configuration information. In this embodiment, the configuration information includes page configuration information and alarm rules. Specifically, in this embodiment, the page configuration information includes page whitespace thresholds and whitespace color values; the alarm rules include the error return code corresponding to the interface, missing field information for the interface, and redundant field information for the interface.

[0140] 4) Before the client's data module requests the data corresponding to the page, it generates a unique request number (auto-incrementing according to the request order) and a device number (marking the current device) for each data request.

[0141] 5) The client's data module initiates a request to obtain data, with each request including the request number and device number as parameters.

[0142] 6) When the server-side data service receives the client's request, it begins to assemble the data. Before returning the data, it records the client's request information, including the request number, device number, and the content of the returned data.

[0143] 7) The client's data module records the time, sequence number, device number, and returned content corresponding to the request sequence number.

[0144] 8) The client's data module checks if all current requests have been processed. If not, it repeats steps 5)-7) until all data is retrieved and recorded.

[0145] 9. The client begins rendering the page.

[0146] like Figure 8 As shown, 10) After the client finishes rendering, the page screenshot module 110 is called to take a screenshot of the current page and record the page name and the relationship between the data request and the page.

[0147] 11) The client calls the analysis module to compare all interfaces on the current page with the alarm rules returned in the configuration information, including whether an incorrect return code was returned, whether a specific field is missing, and whether a specific field is redundant:

[0148] Specifically, determine whether the interface of the current page meets the alarm conditions:

[0149] 1) Check if the return code corresponding to the request matches the exception return code configured in Configuration Center 220;

[0150] 2) Does the returned content of the request lack specific fields configured in Configuration Center 220?

[0151] 3) Does the corresponding request return content contain any additional specific fields configured in Configuration Center 220?

[0152] If the conditions are met, the analysis module of the client sends the problematic request and related data to the backend for alarm, including request number, device number, return value, and error rule. The monitoring service of the server receives the request and checks the information passed. The checking condition is whether it is the data returned by the backend. If it is, the alarm information is pushed.

[0153] The process of pushing the alarm information is, for example, grouping according to the request device number, sorting from small to large according to the request number, generating a call link for the client to call to obtain the alarm information, and pushing the call link to the client.

[0154] The user receiving the alarm information can locate the fault point by querying the request link and error request information, which facilitates subsequent repair of abnormal problems.

[0155] 12) If the alarm condition is met, the client analysis module obtains the blankness threshold and blank color value (default white color is blank, i.e. FFFF) from the configuration center 220.

[0156] As shown in Figure 9 , 13) the client analysis module reads all the pixels of the screenshot page and calculates the blankness (i.e. the ratio of the pixels of the blank color to all the pixels), and records the blankness of the current screenshot.

[0157] 14) The client analysis module reads the historical screenshot information and the request information corresponding to the screenshot: if there is no historical data, the current process ends.

[0158] 15) The client analysis module reads the blankness of the past 30 screenshots (the threshold can be configured, and if not enough, all are used), calculates the average of the past blankness, and judges whether the difference between the current screenshot and the average exceeds the threshold: if it does not exceed the threshold, the current process ends.

[0159] 16) The client analysis module pulls out the request information corresponding to the current screenshot, compares the difference between the corresponding request data of the last time, including: 1, the difference of the requested interface (i.e. which interfaces are added and which interfaces are reduced); 2, the difference of the content returned by the interface, which is analyzed through the content difference: a) missing fields; b) new fields; c) fields with different values.

[0160] As shown in Figure 10 , 17) the client analysis module pulls all the data of the past screenshots, creates a new list Y, and loops the interface return value difference points of the last step:

[0161] a) If the difference point is a missing field, find the corresponding interface request in all requests involved in the historical screenshot, analyze the ratio of the same missing field, that is, the ratio of the number of requests with the same missing field to the total number of requests of the interface, if it reaches a certain threshold (configurable, the method sets the positioning threshold to 90%), ignore the difference point, if it does not reach, record it in list Y;

[0162] b) If the difference point is a redundant field, find the corresponding interface request in all requests involved in the historical screenshot, analyze the ratio of the same redundant field, that is, the ratio of the number of requests with the same redundant field to the total number of requests of the interface, if it reaches a certain threshold (configurable, the method sets the positioning threshold to 90%), ignore the difference point, if it does not reach, record it in list Y;

[0163] c) If the difference point is a different field value, find the corresponding interface request in all requests involved in the historical screenshot, analyze the ratio of the same field value in each request, if the maximum ratio value does not exceed the threshold (configurable, the method sets the positioning threshold to 10%), ignore the field, if it exceeds, record it in a new difference point list, and record it in list Y.

[0164] 18) The client judges whether the list Y is empty:

[0165] 1) If it is not empty, the client sends the problematic request and related data to the server for alarm, including request number, device number, return value, and error rule;

[0166] 2) The monitoring service of the server receives the request and checks the transmitted information, the checking condition is whether it is the data returned by the server, if it is, push the alarm information.

[0167] Among them, the process of pushing the alarm information is, for example: grouping according to the request device number, and sorting from small to large according to the request number, generating a calling link for the client to call to obtain the alarm information, and pushing the calling link to the client.

[0168] 3) The user receiving the alarm information, for example, locates the fault point by querying the request link and error request information of the previous step, which is convenient for subsequent repair of abnormal problems of the page.

[0169] It should be noted that the functions and principles of the page screenshot module 110, the data acquisition module 120 and the data analysis module 130 correspond to the steps of the above-mentioned page monitoring method one by one, so they will not be repeated here.

[0170] It should be noted that the division of each module of the above apparatus is only a logical function division, and all or part of the modules can be integrated into a physical entity or physically separated when actually implemented. The modules can all be implemented in the form of software invoked by a processing element, all in the form of hardware, or part of the modules are implemented in the form of software invoked by a processing element and part of the modules are implemented in the form of hardware. For example, the x module can be a separately arranged processing element, or can be integrated in a chip of the above apparatus, in addition, the x module can also be stored in the form of program code in the memory of the above apparatus, and the function of the x module is invoked and executed by a processing element of the above apparatus. The implementation of other modules is similar. In addition, all or part of the modules can be integrated together or independently implemented. The processing element described herein can be an integrated circuit having a signal processing capability. In the implementation process, each step of the above method or each module can be completed by the integrated logic circuit of the hardware in the processor element or the instruction in the form of software.

[0171] For example, the above modules can be one or more integrated circuits configured to implement the above method, such as one or more application specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs), etc. For another example, when a certain module above is implemented in the form of program code invoked by a processing element, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor capable of invoking program code. For another example, the modules can be integrated together to implement in the form of system on a chip (SOC).

[0172] It should be noted that the page monitoring apparatus 100 of the present application can implement the page monitoring method of the present application, but the implementation apparatus of the page monitoring method of the present application includes but is not limited to the structure of the page monitoring apparatus 100 listed in the embodiment, and any modification and replacement of the prior art structure made according to the principle of the present application are included in the protection scope of the present application.

[0173] The computer readable storage medium of the present application stores a computer program, which, when executed by a processor, implements the following page monitoring method. The storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk, a U disk, a memory card, an optical disk, and various media that can store program codes.

[0174] Any combination of one or more storage media can be employed. The storage media can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the above. More specific examples (a non-exhaustive list) of the computer-readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0175] The computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program codes are carried. Such a propagated data signal can take various forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium that can send, propagate, or transmit the program for use by or in connection with an instruction execution system, apparatus, or device.

[0176] The program code contained on the computer-readable medium can be transmitted by any suitable medium, including, but not limited to, wireless, wired, optical fiber, RF, etc., or any suitable combination of the above.

[0177] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0178] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0179] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0180] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0181] The electronic device of the present application comprises a memory, a processor and a computer program stored on the memory and executable on the processor.

[0182] Preferably, the memory includes: ROM, RAM, disk, U disk, memory card or optical disc and various media that can store program codes.

[0183] The processor is connected with the memory, and is configured to execute the computer program stored in the memory, so that the electronic device executes the steps of the page monitoring method.

[0184] Preferably, the processor can be a general processor, including a central processing unit (CPU), a network processor (NP) and the like; and can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.

[0185] Figure 11 A block diagram of an exemplary electronic device 1 suitable for implementing embodiments of the present application is shown.

[0186] Figure 11 The electronic device 1 shown is merely an example and should not limit the function and scope of use of embodiments of the present application.

[0187] As shown in Figure 11 The electronic device 1 is in the form of a general computing device. Components of the electronic device 1 can include, but are not limited to, one or more processors or processing units 11, a memory 12, a bus 13 connecting different system components, including the memory 12 and the processing unit 11.

[0188] Bus 13 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration bus, a processor or local bus using any of a variety of bus architectures. By way of example, these architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.

[0189] Electronic device 1 typically includes a variety of computer system readable media. These media can be any available media that is accessible by electronic device 1 and includes both volatile and non-volatile media, removable and non-removable media.

[0190] Memory 12 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 121 and / or cache memory 122. Electronic device 1 can further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 123 can be provided for reading from and writing to a non-removable, non-volatile magnetic media (not shown and typically called a "hard drive"). Figure 1 Although not shown, a magnetic disk drive can also be utilized in some embodiments to read from and write to a removable, non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive can be utilized in some embodiments for reading from and writing to a removable, non-volatile optical disk (e.g., a CD-ROM, DVD-ROM or other optical media). In these instances, each drive can be connected to bus 13 by one or more data media interfaces. Memory 12 can include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the application. Figure 1 Program / utility 124 having a set (at least one) of program modules 1241 can be stored in memory 12 by way of example, such as an operating system, one or more application programs, other program modules, and program data, each or some combination thereof, which may

[0191]

[0192] ​The electronic device 1 can also communicate with one or more external devices 2 such as a keyboard or pointing device, a display 3, etc.; other devices that enable a user to interact with the electronic device 1; and / or any devices (e.g., network card, modem, etc.) that enable the electronic device 1 to communicate with one or more other computing devices. Such communication can occur via the input / output (I / O) interface(s) 14. Still yet, the electronic device 1 can communicate with one or more networks, such as a local area network (LAN), a wide area network (WAN), and / or the Internet, through a network adapter 15. As Figure 1 illustrated, the network adapter 15 communicates with the other components of the electronic device 1 via the bus 13. It should be understood that although not shown, other hardware and / or software components could be used in conjunction with the electronic device 1. These include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.

[0193] In summary, the present application can detect page abnormalities and solve the problem of low alarm accuracy when the business data of the page is wrong by obtaining the difference data between the request data corresponding to the current page and the historical request data corresponding to each historical page screenshot based on the current page screenshot and then performing page early warning based on the difference data. In addition, the abnormal point data of the page can be extracted, which facilitates subsequent repair of the abnormal problems of the page. Therefore, the present application effectively overcomes various shortcomings in the prior art and has high industrial utilization value.

[0194] The above embodiments only exemplarily illustrate the principles and effects of the present application, and are not used to limit the present application. Any person skilled in the art can modify or change the above embodiments without departing from the spirit and scope of the present application. Therefore, all equivalent modifications or changes completed by those skilled in the art without departing from the spirit and technical thought of the present application should be covered by the claims of the present application.

Claims

1. A page monitoring method applied to a client, characterized in that, The method comprises the following steps: After the page rendering is completed, the current page is screenshot, and the request data corresponding to the current page is obtained; Obtain a plurality of historical page screenshots and historical request data corresponding to each of the historical page screenshots; Obtain the difference data between the request data corresponding to the current page and the historical request data corresponding to each of the historical page screenshots; Based on the difference data, a page warning is performed; Further comprising: after the client enters the page, requesting and obtaining configuration information from the server; Generating a data request for requesting the page data; wherein the data request includes a request number and a requested device number; Sending the data request to the server, and receiving and recording the request data of the page from the server; The configuration information includes page configuration information, and the page configuration information includes a page blankness threshold and a blank color value; the request data corresponding to the current page is obtained based on the blank color value; Obtaining the blankness of the current page screenshot based on the blank color value; Obtaining the blankness of a plurality of historical page screenshots, and obtaining the average blankness of the historical page screenshots based on the blankness of the plurality of historical page screenshots; Obtaining the blankness difference between the blankness of the current page screenshot and the average blankness of the historical page screenshots; Judging whether the blankness difference reaches the page blankness threshold, and obtaining the request data corresponding to the current page when the blankness difference reaches the page blankness threshold.

2. The page monitoring method of claim 1, wherein, After obtaining the difference data, further comprising: Confirming the type of the difference data; Obtaining the interface request corresponding to each of the historical page screenshots, and obtaining the ratio of the difference data of the type in each of the interface requests; When the ratio is less than a ratio threshold, recording the difference data for page warning based on the recorded difference data.

3. The page monitoring method of claim 2, wherein, The type of the difference data includes interface request difference and interface return content difference; the interface return content difference includes missing field difference, added field difference and field value difference.

4. The page monitoring method according to claim 2 or 3, characterized by, The page warning based on the difference data comprises: Recording the difference data through a difference point list; Cyclically detecting the difference point list, and when there is difference data in the difference point list, sending the request data corresponding to the current page to the server, and performing a warning push on the page by the server; wherein the request data includes a request number, a requested device number, a return value and an error rule.

5. The page monitoring method of claim 1, wherein, The configuration information includes an alarm rule, and the page monitoring method further comprises: Judging whether the interface of the current page meets the alarm condition based on the alarm rule; When the interface of the current page meets the alarm condition, sending the request data corresponding to the current page interface to the server, and performing a warning push on the page by the server; wherein the request data includes a request number, a requested device number, a return value and an error rule.

6. A page monitoring apparatus applied to a client, characterized in that, Comprising: A page screenshot module for screenshotting the current page after the page rendering is completed; A data acquisition module for obtaining the request data corresponding to the current page; The data analysis module is configured to acquire a plurality of historical page screenshots and historical request data corresponding to each of the historical page screenshots, acquire difference data between request data corresponding to the current page and the historical request data corresponding to each of the historical page screenshots, and perform page early warning based on the difference data. Further comprising: After the client enters the page, the server is requested and configuration information is acquired; Generate a data request for requesting page data; wherein the data request includes a request number and a requested device number; Send the data request to the server, and receive and record the request data of the page from the server; The configuration information includes page configuration information, and the page configuration information includes a page blankness threshold and a blank color value; the request data corresponding to the current page includes: Based on the blank color value, the blankness of the current page screenshot is acquired; The blankness of a plurality of historical page screenshots is acquired, and the average blankness of the historical page screenshots is acquired based on the blankness of the plurality of historical page screenshots; The blankness difference between the blankness of the current page screenshot and the average blankness of the historical page screenshots is acquired; Determine whether the blankness difference reaches the page blankness threshold, and acquire the request data corresponding to the current page when the blankness difference reaches the page blankness threshold.

7. An electronic device comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the page monitoring method of any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the page monitoring method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • An application interface monitoring method, apparatus, device, and computer-readable medium

    CN109271289B

  • Method and system for monitoring abnormality of transaction system based on zabbix

    CN109547262A

  • Prometheus-based interface monitoring method and device, computer equipment and storage medium

    CN111651318A

  • Method and system for webpage state monitoring based on web page

    CN107832428A