Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The following describes a method for processing page access data in the application in detail with reference to the accompanying drawings. Fig. 1 is a schematic method flow diagram of an embodiment of a method for processing page access data in an application provided in the present application. Although the present application provides method steps as shown in the following examples or figures, more or fewer steps may be included in the method based on conventional or non-inventive efforts. In the case of steps where no necessary causal relationship exists logically, the order of execution of the steps is not limited to that provided by the embodiments of the present application. The method can be executed sequentially or in parallel (for example, in the context of a parallel processor or a multi-thread process) according to the method shown in the embodiment or the figures during the process of processing page access data or system execution in practical applications.
Specifically, as shown in fig. 1, an embodiment of a method for processing page access data in an application provided by the present application may include:
s1: the client opens an HTML5 page externally connected with the business items in the application through a preset container, and acquires access result data of the HTML5 page.
In this embodiment, the client may be an application capable of collecting data from the HTML5 page, for example, the client may be an application program such as pay treasure, wechat, naughty treasure, and the like. In addition, the client can also be a web browser capable of collecting data from HTML5 pages, for example, data can be collected from HTML5 pages in pay for treasure and naught for treasure web pages through the web browser.
As described above, the service items may be service items added to the application program, for example, the city service of the pay bank client includes service items such as vehicle law violation query, bus query, and public accumulation fund query. In this embodiment, the service item may be linked to an HTML5 page in the client in a form of a hyperlink, and a user may access an HTML5 page of the service item through the hyperlink, perform a service operation in the HTML5 page, and obtain related service information. Compared with other types of external pages in the prior art, the local storage characteristic of the HTML5 page can shorten the page starting time and accelerate the networking speed, and in addition, the HTML5 page also has more flexible page analysis rules, stronger information transfer performance and the multimedia characteristic of the webpage, so that the functionality of the HTML5 page can be enhanced, and the experience of a user is improved.
It is understood that the HTML5 page in the embodiment of the present application may also be an upgraded version of the HTML5 page. Of course, other modifications can be made by those skilled in the art in light of the teachings of the present disclosure, and all such modifications as would achieve the same or similar purpose as the present disclosure should be considered within the scope of the present disclosure.
In this embodiment, the client may open the HTML5 page through a preset container. The preset container may be an application program provided in a client for managing the HTML5 page, and the container may perform operations such as preloading, domain name scheduling, rendering, and interaction on the HTML5 page. For example, for an HTML5 page, a client may open the HTML5 page using an HTML5 container, in an embodiment of the present application, the HTML5 container may include components such as preloading, domain name resolution scheduling system HTTP-DNS, SPDY protocol, rendering, and interaction, and through the components, the HTML5 container may perform page management on the HTML5 page.
In one embodiment of the present application, the access result data includes page access feedback information of the HTML5 page obtained through buried point data, and the buried point data and the service item are set in a client in a key-value pair manner.
In this embodiment, the buried point data may include a data collection point and a data collection parameter in the HTML5 page. As described above, since the HTML5 page does not belong to the accessed website or the system development of the application itself, the accessed website or application cannot directly set a collection point in the HTML5 page and collect related data, and in this embodiment, the page access feedback information in the HTML5 page may be collected by setting buried point data in the client. In an embodiment of the present application, the service item may be associated with the buried point data in an application, and in this embodiment, the service item may be a key (key), and the buried point data associated with the service item is a value (value), so that the associated service item and the buried point data may be stored in the client in the form of a key-value pair (key-value). The client can inquire the buried point data associated with the service item according to the acquired service item. In an embodiment of the application, data can be acquired through codes written in advance at a client, for example, if the number of times that a user clicks a bus inquiry button in a pay-for-treasure city service needs to be acquired, when the bus inquiry button is clicked, the operation of the clicked button can be recorded through an OnClick function written in advance. The service items and the embedded point data are stored in the client in a key value pair mode, so that the acquisition speed of the page access feedback information of the HTML5 page can be greatly increased, and the data acquisition points and data acquisition parameters in the embedded point data can be adjusted in real time.
In another embodiment of the present application, the embedded point data may be disposed in a container of the client, and the service item and the embedded point data may be stored in the container in a form of a key-value pair. As described above, a container may be used to manage the HTML5 page, and similarly, by setting the buried point data in the container, the page access feedback information of the HTML5 page may be directly obtained after the HTML5 page of the service item in the application is opened. In this embodiment, the HTML5 page is used for collecting data by using the HTML5 container, so that not only relatively complete data in the HTML5 page can be collected, but also the efficiency of data collection can be improved.
In this embodiment, the HTML5 page of the service item in the application accessed by the user can be opened through the container set by the client, the access result data of the HTML5 page is obtained, and the container technology is applied to the management of the HTML5 page of the service item, so that not only can the network optimization, the memory optimization and the front-end optimization be performed on the HTML5 page, but also the experience of the user can be enhanced.
S2: and the client uploads the access result data to the first server for storage.
In an embodiment of the present application, the access result data may be uploaded under a better network condition, specifically, when it is detected that the network bandwidth is greater than a preset bandwidth threshold, the access result data may be uploaded to a first server to be stored in the embodiment of the present application, and the client may further store the access result data of the HTML5 page in a local database of the client. When the client is in a weak network environment, the efficiency of uploading the access result data is low, and data uploading errors are easily generated. In this embodiment, when it is detected that the network bandwidth is greater than the preset bandwidth threshold, the access result data of the HTML5 page corresponding to the service item may be uploaded. For example, the preset bandwidth threshold may be 1Mbps, and when the client detects that the network bandwidth is greater than 1Mbps, the client may upload the page monitoring log of the HTML5 page corresponding to the service item.
In this embodiment, the access result data can be uploaded in a non-weak network environment, so that the uploading efficiency of the page monitoring log can be improved, and the uploading error rate of the page monitoring log can be reduced.
Of course, in other embodiments of the present application, the client may also upload the access result data at any time, and the present application is not limited herein.
In this embodiment, after receiving the access result data, the first server may store the access result data. Specifically, in one embodiment of the present application, the first server may store the access result data in a database of the first server. In another embodiment of the present application, the first server may store the access result data in a data file system of the first server. Of course, the data storage manner of the first server is not limited to the database storage manner and the data file system storage manner, and those skilled in the art may make other changes as well as the teaching of the technical spirit of the present application, but as long as the realized functions and achieved effects are the same as or similar to those of the present application, all of which shall be covered by the scope of the present application.
S3: and the second server acquires the access result data, performs index statistics on the access result data according to configured index monitoring rules, and generates monitoring index data of the service item.
In this embodiment, the second server may include a hardware device having a data information processing function and necessary software for driving the hardware device to operate, and the second server may further analyze the received access result data, so as to set a corresponding exception handling method, for example, the second server may be a background service server of the payer client. The server may provide a predetermined port through which access result data from the HTML5 page corresponding to the service item may be acquired. For example, the server can perform network data interaction with the client based on a network protocol such as HTTP, TCP/IP or FTP and a network communication module. It should be noted that the first server and the second server may be different data processing units of the same server, or belong to two servers in the same server cluster.
In this embodiment, the access result data may include a page access exception record and a page access normal record. As can be seen from the above, the page abnormal access record belongs to a part of the data in the access result data, and therefore, the access result data of the service item can be screened from the access result data according to a preset screening rule.
In an embodiment of the present application, the acquiring access result data of an HTML5 page circumscribed by a service item in a client application includes:
SS 1: acquiring a plurality of page access records corresponding to a plurality of service items in the client application;
SS 2: screening a plurality of page access abnormal records of the service item from the plurality of page access records;
SS 3: and recording the plurality of page access exceptions as access result data of the service item.
In this embodiment, in order to obtain the monitoring index data of the service item through real-time analysis, the second server may obtain a plurality of page access records corresponding to a plurality of service items, and screen out a plurality of page access abnormal records of the service item from the plurality of page access records. The second server may also perform exception handling on the HTML5 page according to the plurality of page access exception records.
In an embodiment of this embodiment, the page access exception record may include an exception code corresponding to the exception record. The exception code may identify an exception type of the page access exception record, for example, during a page access based on the HTTP network communication protocol, the exception code may include an HTTP request error 400, an HTTP prohibited execution access error 403.1, an HTTP server internal error 500, and the like. In an embodiment of the present application, the page access exception record and the exception code may be stored in the access result data in a one-to-one correspondence manner.
In this embodiment, the second server may further obtain the page access exception record within a preset time period, where the preset time period may be a preset minimum time unit for the second server to perform data screening on the access result data, for example, the preset time period may be set to 1 minute, and then the second server may complete data screening on the access result data once per minute.
In this embodiment, the performing index statistics on the access result data according to the configured index monitoring rule, and generating the monitoring index data of the service item may include:
counting the number of times of the page access abnormity of the specified type according to the plurality of page access abnormity records;
setting the monitoring index data of the service item as any one of the following:
the number of times the page is abnormally accessed;
and the number of the abnormal page access times is in proportion to the total page access times.
In this embodiment, the access result data acquired in S2 may include an abnormal access record caused by an external server corresponding to the HTML5 page. The monitoring index data in this embodiment may be obtained from an exception record caused by the external server. Specifically, in this embodiment, the number of times of the specified type of page access exception may be counted according to the plurality of page access exception records, for example, in the page access process based on the HTTP network communication protocol, the page access exception records with error codes of 400 and 500 may be extracted. After the page access exception record corresponding to the specified exception code is extracted, the number of page access exceptions corresponding to the specified exception code may be counted. Specifically, for example, in the access process of the public deposit inquiry service item in the pay-for-treasure city service, 60 page access exception records with error codes of 400 occurring between 9 point 52 at 13 th/2016 and 9 point 53 at 13 th/2016 are obtained from the page monitoring log, 3 page access exception records with error codes of 403 are obtained, and 30 page access exception records with error codes of 500 are obtained. Accordingly, the number of times of page access abnormality may be used as monitoring index data of a backlog query service item, and based on the above example, the monitoring index data may be the number of times of page access abnormality 90.
In this embodiment, further, the total number of page accesses in the preset time period may be counted according to the access result data. Correspondingly, the proportion of the number of the page access abnormality times to the total number of the page access times can be used as the monitoring index data of the target service item. For example, in the foregoing example, in the access process of the public fund inquiry service item in the pay-for-treasure city service, 10000 access records, which are recorded from 52 at 9 point 13/2016 to 53 at 9 point 13/5/2016 in total, may also be obtained from the page monitoring log, and then, the ratio 90/10000 of the number of abnormal page access times to the total page access times may be used as the monitoring index data of the target service item.
S4: the second server judges whether the monitoring index data is abnormal or not according to a preset abnormal judgment rule; and if so, executing a preset response action on the service item.
In this embodiment, the second server may determine whether the monitoring index data is abnormal according to a preset abnormality determination rule. In an embodiment of the present application, the abnormality determination rule may include: the frequency of the page access abnormity is greater than a first preset threshold value; or the total page access times are greater than a second preset threshold, and the ratio of the abnormal page access times to the total page access times is greater than a third preset threshold. For example, in a vehicle illegal query service item in the service of a pay treasure city, the first preset threshold may be set to 300, that is, when the number of times of page access abnormality occurring per minute is greater than 300, the HTML5 page corresponding to the vehicle illegal query service item may be subjected to abnormality processing. Or, the second preset threshold may be set to 100, and the third preset threshold is 0.3, that is, when the total number of page visits per minute is greater than 100, and the ratio of the number of abnormal page visits to the total number of page visits is greater than 0.3, the HTML5 page corresponding to the vehicle illegal query service item may be subjected to exception processing.
In this embodiment, the preset response action includes disconnecting a link for accessing the HTML5 page through the service item. In an embodiment of the application, when it is determined that the monitoring index data is abnormal, the target service item may be determined as a faulty service item, and the second server may disconnect a link accessing the HTML5 page through the service item, for example, when the vehicle illegal query service item is found to be abnormal, a hyperlink of an HTML5 page corresponding to the vehicle illegal query may be disconnected, so that a user may be prohibited from accessing an HTML5 page corresponding to the vehicle illegal query service item.
In another embodiment of the present application, the preset response action may further include:
and sending a page maintenance reminding message, wherein the page maintenance reminding message comprises identification information corresponding to the service item.
When the monitoring index data is judged to be abnormal, a page maintenance reminding message can be sent, and the page maintenance reminding message can comprise identification information corresponding to the service item. In this embodiment, the page maintenance reminding message may be sent to an external system maintainer, and the page maintenance reminding message may provide a reference for the external system maintainer to remind the system maintainer to maintain the HTML5 page corresponding to the fault service item as soon as possible.
In this embodiment, the method may further include:
and the second server sends the identification information corresponding to the fault service item to the client.
The second server may send, to the client, identification information corresponding to the failed service item after determining that the service item is the failed service item, and in an embodiment of the present application, the identification information of the failed service item may include a service code corresponding to the failed service item.
Of course, the client may obtain the identification information corresponding to the failed service item, and based on the identification information, disconnect the link that accesses the HTML5 page through the service item. Further, the client may also display information that the failed service item is in a maintenance state, so as to provide an alert to a user.
Based on the method for processing page access data in application, the present application also provides a system for processing page access data in application, where the system may include a client, a first server and a second server, where,
the client is used for opening an HTML5 page externally connected with a service item in an application through a preset container and acquiring access result data of the HTML5 page; the access result data are also uploaded to the first server for storage;
a first server for storing the access result data;
the second server is used for acquiring the access result data, carrying out index statistics on the access result data according to a configured index monitoring rule and generating monitoring index data of the service item; the monitoring index data acquisition module is also used for judging whether the monitoring index data is abnormal or not according to a preset abnormal judgment rule; and if so, executing a preset response action on the service item.
According to the method and the system for processing the page access data in the application, the client can open the HTML5 page of the service item in the application through the container and acquire the access result data of the HTML5 page, the server can generate the monitoring index data of the target service item through statistical analysis through the acquired access result data of the HTML5 page, and if the monitoring index data is abnormal, preset response action is executed on the fault service item. The processing method can monitor the access result data of the HTML5 page in real time by connecting the server of the HTML5 page, and count and analyze the abnormal data of the target service item in real time, and acquire the abnormal access data of the page through user feedback in the prior art, and process the abnormal page method through manual operation, can discover the abnormity of the HTML5 page corresponding to the target service item in time, and process the abnormal condition at a higher speed, greatly shorten the abnormal time of the HTML5 page, avoid the abnormal condition from further spreading, and ensure the use experience of the user.
Based on the method for processing page access data in application, in another aspect of the present application, a method for processing page access data in application is further provided from the perspective of a server, and fig. 2 is a flowchart of a method of another embodiment of the method for processing page access data in application provided by the present application, and as shown in fig. 2, the method may include:
s21: acquiring access result data of an HTML5 page externally connected with a service item in the client application;
s22: performing index statistics on the access result data according to a configured index monitoring rule to generate monitoring index data of the service item;
s23: judging whether the monitoring index data is abnormal or not according to a preset abnormal judgment rule; and if so, executing a preset response action on the service item.
Optionally, in an embodiment of the present application, the access result data may include page access feedback information of the HTML5 page obtained through buried point data, where the buried point data and the service item are arranged in the client in a key-value pair manner.
Optionally, in an embodiment of the present application, the acquiring access result data of an HTML5 page circumscribed by a service item in the client application includes:
acquiring a plurality of page access records corresponding to a plurality of service items in the client application;
screening a plurality of page access abnormal records of the service item from the plurality of page access records;
and recording the plurality of page access exceptions as access result data of the service item.
Optionally, in an embodiment of the present application, the page access exception record may include an exception code corresponding to the exception record.
Optionally, in an embodiment of the present application, the performing index statistics on the access result data according to the configured index monitoring rule, and generating the monitoring index data of the service item may include:
counting the number of times of the page access abnormity of the specified type according to the plurality of page access abnormity records;
setting the monitoring index data of the service item as any one of the following:
the number of times the page is abnormally accessed;
and the number of the abnormal page access times is in proportion to the total page access times.
Optionally, in an embodiment of the present application, the preset response action includes disconnecting a link for accessing the HTML5 page through the service item. Optionally, in an embodiment of the present application, a page maintenance reminding message is sent, where the page maintenance reminding message includes identification information corresponding to the service item.
For the above embodiment of the method for processing page access data in the application, reference may be made to the description of the embodiments of S3-S4, and details are not repeated here.
Accordingly, based on the method for processing page access data in the application, another aspect of the present application further provides a server, fig. 3 is a schematic block structure diagram of an embodiment of the server provided in the present application, and as shown in fig. 3, the server 30 may include:
the access data acquiring unit 31 is configured to acquire access result data of an HTML5 page circumscribed by a service item in the client application;
a monitoring index generating unit 32, configured to perform index statistics on the access result data according to a configured index monitoring rule, and generate monitoring index data of the service item;
an abnormality response unit 33, configured to determine whether the monitoring index data is abnormal according to a preset abnormality determination rule; and if so, executing a preset response action on the service item.
Optionally, in an embodiment of the present application, the access result data includes page access feedback information of the HTML5 page obtained through buried point data, and the buried point data and the service item are set in the client in a key-value pair manner. According to the processing method and the server for the page access data in the application, the monitoring index data of the target service item can be generated through statistical analysis according to the acquired access result data of the HTML5 page of the service item, and if the monitoring index data is abnormal, a preset response action is executed on the fault service item corresponding to the abnormal monitoring index data. The processing method can monitor the access result data of the HTML5 page in real time by connecting the server of the HTML5 page, and count and analyze the abnormal data of the target service item in real time, and acquire the abnormal access data of the page through user feedback in the prior art, and process the abnormal page method through manual operation, can discover the abnormity of the HTML5 page corresponding to the target service item in time, and process the abnormal condition at a higher speed, greatly shorten the abnormal time of the HTML5 page, avoid the abnormal condition from further spreading, and ensure the use experience of the user.
Based on the method for processing page access data in application, in another aspect of the present application, a method for processing page access data in application is further provided from a perspective of a client, and fig. 4 is a flowchart of a method of another embodiment of the method for processing page access data in application provided by the present application, and as shown in fig. 4, the method may include:
s41: setting embedding point data in a preset container, and storing a service item and the embedding point data in the preset container in a key value pair mode;
s42: opening an HTML5 page externally connected with a service item in an application through the preset container, and acquiring access result data of the HTML5 page through the buried point data;
s43: and uploading the access result data to a first server for storage.
Optionally, in an embodiment of the present application, the method may further include:
acquiring identification information corresponding to the fault service item;
based on the identification information, a link to access the HTML5 page through the service item is disconnected.
Optionally, in an embodiment of the present application, the uploading the access result data to the first server for storage includes:
and when the network bandwidth is detected to be larger than a preset bandwidth threshold value, uploading the access result data to a first server for storage.
Optionally, in an embodiment of the present application, the method may further include:
and displaying the information that the fault service item is in the maintenance state.
In this embodiment, the warning information may be displayed in a preset prompt interface, for example, when a vehicle illegal query service item in the civic payment service is determined as a faulty service item, current states of the service item being in maintenance, the system being in maintenance, please try again later, and the like may be displayed at a vehicle illegal query entry button of the civic payment service; or after the user clicks the vehicle illegal query button, the information of 'during maintenance' or 'the system is in maintenance, please try again later' and the like is displayed to the user through the display warning information, so that the experience of the user can be greatly improved.
For the above embodiment of the method for processing page access data in the application, reference may be made to the description of the embodiments of S1-S2, and details are not repeated here.
Accordingly, based on the method for processing page access data in the application, another aspect of the present application further provides a client, fig. 5 is a schematic diagram of a module structure of an embodiment of the client provided by the present application, and as shown in fig. 5, the client 50 may include:
a buried point unit 51, configured to set buried point data in a preset container, and store a service item and the buried point data in the preset container in a key value pair manner;
the access data acquisition unit 52 is configured to open an HTML5 page circumscribed by a service item in an application through the preset container, and acquire access result data of the HTML5 page through the buried point data;
and an access data uploading unit 53, configured to upload the access result data to the first server for storage.
Optionally, in an embodiment of the present application, as shown in fig. 5, the client 50 may further include:
a fault identifier obtaining unit 54, configured to obtain identifier information corresponding to a fault service item;
a link closing unit 55, configured to disconnect a link for accessing the HTML5 page through the service item based on the identification information.
Optionally, in an embodiment of the present application, as shown in fig. 5, the client 50 may further include:
and the alarm unit 56 is used for displaying the information that the fault service item is in the maintenance state.
According to the processing method and the client for the page access data in the application, the embedded data can be set at the client, the access result data of the HTML5 page can be obtained from the embedded data, and the access result data can be uploaded to a server. The processing method and the client can access result data from the client, and the access result data can be used as a data base for monitoring index data exception analysis of a target business item, so that the processing method and the client provide a powerful data base for HTML5 page exception analysis.
Although the description of data collection, analysis, and processing such as statistics of monitoring indexes, execution of preset response actions, setting of buried point data, and the like in the embodiments is mentioned in the present disclosure, the present disclosure is not limited to the case where data collection, analysis, and processing are necessarily completely consistent with those described in the embodiments. The embodiments slightly modified from those described in the embodiments can also achieve the same, equivalent or similar effects as those of the embodiments described above, or can be modified to realize the expected effects. Of course, even if the data processing and determining manner is not adopted, the same application can still be realized as long as the data acquisition, data statistical analysis and data exception processing according to the above embodiments of the present application are met, and details are not described herein.
Although the present application provides method steps as described in an embodiment or flowchart, more or fewer steps may be included based on conventional or non-inventive means. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an actual apparatus or client product executes, it may execute sequentially or in parallel (e.g., in the context of parallel processors or multi-threaded processing) according to the embodiments or methods shown in the figures.
The units and systems illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. For convenience of description, the above system is described with the functions divided into various modules, which are described separately. Of course, the functionality of the various modules may be implemented in the same one or more software and/or hardware implementations as the present application. Of course, a module that implements the same function may also be implemented by multiple sub-modules or a combination of sub-modules in a unit module described in this application.
Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may therefore be considered as a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, or the like, and includes several instructions for enabling a computer device (which may be a personal computer, a mobile terminal, a server, or a network device) to execute the method according to the embodiments or some parts of the embodiments of the present application.
The embodiments in the present specification are described in a progressive manner, and the same or similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. The application is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
While the present application has been described with examples, those of ordinary skill in the art will appreciate that there are numerous variations and permutations of the present application without departing from the spirit of the application, and it is intended that the appended claims encompass such variations and permutations without departing from the spirit of the application.