CN107644075B - Method and device for collecting page information - Google Patents

Method and device for collecting page information Download PDF

Info

Publication number
CN107644075B
CN107644075B CN201710845988.5A CN201710845988A CN107644075B CN 107644075 B CN107644075 B CN 107644075B CN 201710845988 A CN201710845988 A CN 201710845988A CN 107644075 B CN107644075 B CN 107644075B
Authority
CN
China
Prior art keywords
information
web page
application
page
loading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710845988.5A
Other languages
Chinese (zh)
Other versions
CN107644075A (en
Inventor
吴迪
程剑锋
袁连松
马宝岩
王孝满
朱孝瑾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710845988.5A priority Critical patent/CN107644075B/en
Publication of CN107644075A publication Critical patent/CN107644075A/en
Application granted granted Critical
Publication of CN107644075B publication Critical patent/CN107644075B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a method and a device for collecting page information, and relates to the technical field of computers. One embodiment of the method comprises: acquiring first page information of a Web page loaded by an application through a first acquisition step, wherein the first page information comprises: an address and a loading time of a Web page, wherein the first obtaining step includes: and acquiring the address of the Web page from an incoming parameter when the application calls a method of the network request to be loaded in a protocol class when the application loads the Web page, and recording the time of calling the method of the network request to be loaded in the protocol class as the loading time of the Web page. According to the method and the device, the page information can be collected when the application interacts with the Web page, so that when the application crashes, developers can locate corresponding defects and problems through the page information.

Description

Method and device for collecting page information
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for collecting page information.
Background
At present, after a crash occurs, App application software generally reports stack information and device information and the like when the crash occurs to a server for developers to look up, and with the data, the developers can locate and repair bugs existing in the former App application software in the next version iteration. There are two current ways to collect crash information, one is done by crash collection of the application system, and the other is to use third party crash collection analysis software to collect data.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art: the two existing crash collection methods are only used for collecting some basic common information, including: crash occurrence time, App version and version number, system version, device type, boot time, error type, crash thread call stack information, and the like. However, this information is not sufficient for some specific defect problems. Interaction between an application and a Web page in a mobile Hybrid application (Hybrid App) is often involved, once the interaction is broken down, the corresponding Web page information cannot be collected in the conventional breakdown collection mode, and developers of the App cannot locate corresponding defects and problems.
Therefore, a method and apparatus for collecting page information when an application interacts with a Web page is needed.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for collecting page information, which can collect page information when an application interacts with a Web page, so that a developer can locate corresponding defects and problems through the page information when an application software crashes.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of collecting page information, including:
acquiring first page information of a Web page loaded by an application through a first acquisition step, wherein the first page information comprises: the address and load time of the Web page,
wherein the first acquiring step comprises: and acquiring the address of the Web page from an incoming parameter when the application calls a method of the network request to be loaded in a protocol class when the application loads the Web page, and recording the time of calling the method of the network request to be loaded in the protocol class as the loading time of the Web page.
Further, the first page information further includes a loading type identifier, where the loading type identifier can indicate whether the corresponding Web page is loaded by the application based on a native page or is loaded by the application based on other Web pages, and the first obtaining step further includes: recording the loading type identifier as a first type identifier;
the method for collecting page information provided by the embodiment of the invention also comprises the following steps:
acquiring second page information of the Web page through a second acquisition step, wherein the second page information comprises: the address of the Web page, the load time and the load type identification,
wherein the second acquiring step comprises:
and acquiring the address of the Web page from the incoming parameter when the method of the network loading request is called when the Web page is loaded by the application, recording the time of calling the method of the network loading request as the loading time of the Web page, and recording the loading type identifier as a second type identifier.
Further, the method for collecting page information provided by the embodiment of the present invention further includes:
after the application crashes, adding the acquired first page information and second page information of the Web page accessed by the application from the starting to the time period of the occurrence of the crash into the crash information collected by the crash information collection application;
and saving the crash information.
Further, the method for collecting page information provided by the embodiment of the present invention further includes:
reporting the crash information when the application is started;
and if the reporting is successful, deleting the crash information, otherwise reporting the crash information again when the application is started next time.
To achieve the above object, according to another aspect of embodiments of the present invention, there is provided an apparatus for collecting page information, including:
a first recording module, configured to acquire first page information of a Web page loaded by an application through a first acquisition step, where the first page information includes: the address and load time of the Web page,
wherein the first acquiring step comprises: and acquiring the address of the Web page from an incoming parameter when the application calls a method of the network request to be loaded in a protocol class when the application loads the Web page, and recording the time of calling the method of the network request to be loaded in the protocol class as the loading time of the Web page.
Further, the first page information acquired by the first recording module further includes a loading type identifier, where the loading type identifier can indicate whether the corresponding Web page is loaded by the application based on a native page or is loaded by the application based on another Web page, and the first recording module is further configured to record that the loading type identifier is a first type identifier;
the device for collecting page information provided by the embodiment of the invention also comprises:
a second recording module, configured to acquire second page information of the Web page through a second acquisition step, where the second page information includes: the address of the Web page, the load time and the load type identification,
wherein the second acquiring step comprises:
and acquiring the address of the Web page from the incoming parameter when the method of the network loading request is called when the Web page is loaded by the application, recording the time of calling the method of the network loading request as the loading time of the Web page, and recording the loading type identifier as a second type identifier.
Further, the apparatus for collecting page information provided in the embodiment of the present invention further includes:
and the data persistence module is used for adding the acquired first page information and second page information of the Web page accessed by the application from the starting to the collapse time period into the collapse information collected by the collapse information collection application after the application is collapsed, and storing the collapse information.
Further, the apparatus for collecting page information provided in the embodiment of the present invention further includes:
and the communication module is used for reporting the crash information when the application is started, deleting the crash information by the data persistence module if the reporting is successful, and reporting the crash information again when the application is started next time if the reporting is not successful.
To achieve the above object, according to another aspect of embodiments of the present invention, there is provided an electronic device for collecting page information, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for collecting page information provided by the embodiment of the invention.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a computer readable medium having stored thereon a computer program, which when executed by a processor, implements the method of collecting page information provided by the embodiments of the present invention.
According to the method and the device for collecting the page information, when the application loads the Web page, the address url, the loading time and the loading type of the Web page are recorded, and through the information, when the application crashes due to the loading of the Web page, developers of the application program can accurately position specific defects in a system or the application program through the information, so that the correlation is improved. And two modes of loading the Web page of the application in the hybrid mobile application are distinguished by recording the loading type, so that a developer of the hybrid mobile application can conveniently determine which loading mode the Web page is loaded in. Meanwhile, the recorded page information and the crash information of the crash information collection application KSCrash are integrated and reported after integration.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a flowchart of a method for collecting page information according to an embodiment of the present invention;
FIG. 2 is a schematic application flow diagram of a method for collecting page information according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating an apparatus for collecting page information according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a data persistence module provided by an embodiment of the invention;
fig. 5 is a schematic diagram of a communication module provided by an embodiment of the invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
FIG. 7 is a block diagram of a computer system suitable for use with the electronic device to implement an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The invention provides a method for collecting page information, as shown in fig. 1, the method comprises: step S101. In step S101, first page information of a Web page loaded by an application is acquired by a first acquisition step, the first page information including: the method comprises the following steps of obtaining the address and the loading time of a Web page, wherein the first obtaining step comprises the following steps: the method comprises the steps of obtaining an address of a Web page from an incoming parameter when a method of a network request to be loaded in a protocol class is called when an application loads the Web page, and recording the time of calling the method of the network request to be loaded as the loading time of the Web page.
The method for collecting the page information can be applied to the development of iOS and Android systems. Taking the application of iOS as an example, the method of the above protocol class to be loaded with the network request may be a webView, a shouldStartLoadWithRequest, and a navigationsetype. The method belongs to an optional method in the UIWebViewDelegate protocol class. WebView is a control used for loading a webpage in an iOS system, when webView is about to load a network request, webView is a client, an object which follows UIWebViewDelegate protocol and becomes a proxy of the webViewDelegate protocol is found to execute the method, an incoming parameter is obtained when the proxy object realizes the method, namely url information of the Web page can be obtained from the incoming parameter, and meanwhile, the specific time for calling the webView, namely, the shouldStartLoadWithRequest, and the specific time for calling the webView, namely, the method is recorded as the loading time of the Web page.
The method for collecting page information records the address url and the loading time of the Web page when the Web page is loaded by the application every time, and through the information, when the application crashes due to the loading of the Web page, a developer of the application program can know which pages are browsed by a user during the crash and which page is crashed finally through the information, so that specific defects in a system or the application program are accurately positioned, and the correlation is improved.
In the present invention, the first page information further includes a loading type identifier, that is, the loading type of the Web page is also recorded in step S101, and the recording loading type identifier is the first type identifier. The load type identifier can indicate whether the corresponding Web page is loaded by the application based on the native page or the other Web page.
The method for collecting page information provided by the invention can be applied to Hybrid mobile application Hybrid App, the Hybrid mobile application is a combination of native application and Web application, and the Hybrid mobile application generally consists of a native application part and a Web application part. In the mixed mobile application, the interaction between the local native application part and the Web page can record the url and the loading time of the mixed mobile application when the Web page is loaded each time by the method of the invention. And because the Web page is loaded in the hybrid mobile application in two modes, one mode is that the Web page is opened based on the native page of the native application part, and the other mode is that the Web page is opened based on the loaded Web page, through the loading type recorded by the invention, the developer of the hybrid mobile application can determine which loading mode the Web page is loaded each time.
The method for collecting page information provided by the invention also comprises the following steps: acquiring second page information of the Web page through a second acquisition step, wherein the second page information comprises: address, load time, and load type identification of the Web page. Wherein the second acquiring step specifically comprises: and acquiring the address of the Web page from the incoming parameter when the method of the network loading request is called when the Web page is loaded by the application, recording the time of calling the method of the network loading request as the loading time of the Web page, and recording the loading type identifier as a second type identifier.
The method for loading the network request may be loadRequest: the method belongs to an example method in an iOS system UIWebView class. After the method is called, a network request instance (request parameter) is transmitted, and the method sends a network request to a server according to information such as url contained in the request parameter.
Whenever an application loads a Web page from a Native page, the loadRequest is called: according to the method, when the method is called, the url address of the loaded Web page can be acquired from the request parameter transmitted by the system. Meanwhile, the record calls loadRequest: the specific time of the method is taken as the loading time of the Web page. Since the loadRequest is only called when the Web page is loaded from the Native page: the method, therefore, records the load type identifier as a second type identifier in the page information to indicate that this load is loading the Web page based on the native page.
In the present invention, as shown in fig. 2, for two different loading modes in the Hybrid mobile application Hybrid App, the present invention provides corresponding page information recording modes, that is, a first obtaining step obtains first page information of a Web page loaded by an application, and a second obtaining step obtains second page information of the Web page.
In the actual application process, whether the web page is loaded from a native page or the web page is loaded from a web page, the application calls webView, the shouldStartLoadWithRequest, the navigationType, the difference is that the loadRequest is called first when the web page is loaded based on the native page: and then calling a webView, a shouldStartLoadWithRequest, a navigationType, a method, so that when loading a Web page from a native page in the method, in the second acquisition step, by calling the loadRequest: the incoming parameter records a page information with the loading type identifier as the second type identifier. Then in the first acquisition step, a piece of page information with a loading type identifier as a first type identifier is recorded by calling an incoming parameter of a webView, a shouldStartLoadWithrequest, and a navigationType, so that two pieces of page information exist in a Web page loaded from a native page, and after the page information is reported, a specific judgment method can be combined to know which way the Web page is loaded. For example, it can be judged that: if two pieces of page information with the same address, the same loading time or similar exist and the loading type identifications of the two pieces of page information are different, the Web page corresponding to the page information is the Web page loaded from the original page. Correspondingly, excluding the above situation, if the loading type identifier in the page information is the first type, the Web page corresponding to the page information is the Web page loaded from the Web page.
Similarly, the Android system also has a load request: the method and the webView, the shouldStartLoadWithRequest, the navigationType and the method with the same or similar functions can be used for recording url in parameters transmitted by the system by calling the method of the type and recording loading time and the loading type so as to record page information.
In the present invention, recording the loading type identifier as the first type identifier or the second type identifier may be implemented by adding a corresponding identifier to the page information, for example, for the second type identifier, an external identifier may be added to the page information, and for the first type, an internal identifier may be added to the page information.
The method for collecting page information provided by the invention also comprises the following steps: after the application crashes, adding the acquired first page information and second page information of the Web page accessed by the application from the starting to the time period of the occurrence of the crash into the crash information collected by the crash information collection application, and then storing the crash information. In a specific implementation process, each time a user accesses a Web page by using an application, the system records page information of the accessed Web page, and then certain processing and screening can be performed on the page information, and the page information is integrated with crash information collected by a crash information collection application in the system and stored in a local disk. The crash information collection application may be a KSCrash crash information collection tool in an iOS system.
The method for collecting page information provided by the invention also comprises the following steps: and reporting the crash information to the server when the application is started, deleting the crash information if the application is successfully reported, and reporting the crash information again when the application is started next time if the application is not successfully reported. When a user just starts an application, whether crash information needing to be reported exists in a disk is checked, if the crash information exists, a network request is sent, the crash information stored in the disk is reported to a server, the request is sent only once, then corresponding processing is carried out on the information in the disk according to the callback of the server, if the reporting is successful, the information in the disk is deleted to prevent repeated reporting, if the reporting is failed, the crash information in the disk is continuously reserved, and the crash information is reported again when the user opens the application next time until the crash information is reported successfully. Because the application is unstable and uncontrollable when the crash occurs, if the crash information is selected to be reported when the crash occurs, the failure probability is very high. Therefore, in the invention, the crash information is firstly stored in the local disk, and the data is reported when the user starts the application next time.
The method for collecting page information records the address url, the loading time and the loading type identifier of the Web page when the Web page is loaded by the application every time, and through the information, when the application crashes due to the loading of the Web page, developers of the application can accurately locate specific defects in a system or an application program through the information, thereby carrying out related perfection. And two modes of loading the Web page in the hybrid mobile application are distinguished by recording the loading type identifier, so that a developer of the hybrid mobile application can conveniently determine which loading mode the Web page is loaded in. Meanwhile, the recorded page information and the crash information of the crash information collecting tool are integrated and reported after the integration.
The present invention also provides an apparatus for collecting page information, as shown in fig. 3, the apparatus comprising: a first recording module 501, a second recording module 502, a data persistence module 503, and a communication module 504.
The first recording module 501 is configured to acquire first page information of a Web page loaded by an application through a first acquisition step, where the first page information includes: the method comprises the following steps of obtaining the address and the loading time of a Web page, wherein the first obtaining step comprises the following steps: the method comprises the steps of obtaining an address of a Web page from an incoming parameter when a method of a network request to be loaded in a protocol class is called when an application loads the Web page, and recording the time of calling the method of the network request to be loaded as the loading time of the Web page.
In the present invention, the first page information obtained by the first recording module 501 further includes a loading type identifier, where the loading type identifier can indicate whether the corresponding Web page is loaded based on a native page or based on another Web page, and the first recording module 501 is further configured to record that the loading type identifier is the first type identifier.
In the present invention, the second recording module 502 is configured to obtain second page information of the Web page through a second obtaining step, where the second page information includes: the address, the loading time and the loading type identification of the Web page, wherein the second acquisition step comprises the following steps: and acquiring the address of the Web page from the incoming parameter when the method of the network loading request is called when the Web page is loaded by the application, recording the time of calling the method of the network loading request as the loading time of the Web page, and recording the loading type identifier as a second type identifier.
The data persistence module 503 is configured to, after the application crashes, add the acquired first page information and second page information of the Web page accessed by the application from the start to the time when the application crashes to the crash information collected by the crash information collection application, and store the crash information.
The communication module 504 is configured to report the crash information to the server when the application is started, and if the reporting is successful, the data persistence module 503 deletes the crash information, otherwise, the communication module 501 reports the crash information again when the application is started next time.
As shown in FIG. 4, the data persistence module 503 is used to save page information. More specifically, each time a user accesses a Web page using an application, the first recording module 501 and the second recording module 502 both record page information of the accessed Web page, and then the data persistence module 502 performs certain processing and screening on the page information and writes the page information into a local disk for storage. When the page information needs to be reported, the stored data is read, and is correspondingly compressed and encrypted, and the page information is reported to the server.
In the present invention, after the application crashes, the data persistence module 503 may integrate the saved page information and the reported information of the crash information collection module in the system into crash information. In the iOS system, the function of the crash information collection module may be implemented by KSCrash, and the data persistence module 503 integrates the collected page information as a supplement to the original collected information of KSCrash, and stores the integrated information in the local disk.
As shown in fig. 4 and 5, the communication module 504 is configured to report, when the application crashes, page information of a Web page accessed by the application from the start to the time when the crash occurs to the server. In the present invention, the communication module 504 may report the page information to the server along with the original collection information of the crash information collection module. Because the application is unstable and uncontrollable when the crash occurs, if the crash information is selected to be reported when the crash occurs, the failure probability is very high. Therefore, in the invention, the crash information is firstly stored in the local disk, and the data is reported when the user starts the application next time.
In the invention, when an application is started, a communication module 504 checks whether information needing to be reported exists in a local disk, if the information exists, a network request is sent to a server, crash information stored in the local disk is reported to the server, the information is only sent once when the application is started every time, then corresponding processing is carried out in a data persistence module 503 according to the network request callback of the server, if the reporting is successful, the information in the local disk is cleared to prevent repeated reporting, if the reporting is failed, the information in the disk is continuously reserved, and the information is reported again when a user opens the application next time until the information is reported successfully.
The device for collecting page information records the address url, the loading time and the loading type identifier of the Web page when the Web page is loaded by the application every time, and through the information, when the application crashes due to the loading of the Web page, developers of the application program can accurately position specific defects in a system or the application program through the information, so that the correlation is improved. And two modes of loading the Web page in the hybrid mobile application are distinguished by recording the loading type identifier, so that a developer of the hybrid mobile application can conveniently determine which loading mode the Web page is loaded in. Meanwhile, the recorded page information and the crash information of the crash information collecting tool are integrated and reported after the integration.
Fig. 6 illustrates an exemplary system architecture 600 to which the method of collecting page information or the apparatus for collecting page information of the embodiments of the present invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 606, 602, 603, a network 604, and a server 605. The network 604 is used to provide a medium for communication links between the terminal devices 606, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 606, 602, 603 to interact with a server 605, via a network 604, to receive or send messages, etc. The terminal devices 606, 602, 603 may have installed thereon various communication client applications, such as an application that collects page information of loaded Web pages.
The terminal devices 606, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 605 may be a server providing various services, for example, a storage server storing and managing page information reported by users using the terminal devices 606, 602, and 603. The developer can check the page information reported by the terminal equipment through the storage server.
It should be noted that the method for collecting page information provided by the embodiment of the present invention is generally executed by the server 605, and accordingly, the apparatus for collecting page information is generally disposed in the server 605.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use with the electronic device implementing an embodiment of the present invention. The electronic device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a logging module, a data persistence module, and a communication module. The names of the units do not form a limitation on the units themselves in some cases, for example, the communication module may also be described as "reporting page information of a Web page accessed from the start of an application to a server during a period from when the application crashes to when the application crashes" to the next time the application starts.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
acquiring first page information of a Web page loaded by an application through a first acquisition step, wherein the first page information comprises: the address and load time of the Web page,
wherein the first acquiring step comprises: the method comprises the steps of obtaining an address of a Web page from an incoming parameter when a method of a network request to be loaded in a protocol class is called when an application loads the Web page, and recording the time of calling the method of the network request to be loaded in the protocol class as the loading time of the Web page.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (6)

1. A method of collecting page information, comprising:
acquiring first page information of a Web page loaded by an application through a first acquisition step, wherein the first page information comprises: the method comprises the steps that the address and the loading time of the Web page and a loading type identifier can indicate whether the corresponding Web page is loaded by the application based on a native page or other Web pages;
wherein the first acquiring step comprises: acquiring an address of a Web page from an incoming parameter when a method of a network request to be loaded in a protocol class is called when the application loads the Web page, recording the time of calling the method of the network request to be loaded in the protocol class as the loading time of the Web page, and recording the loading type identifier as a first type identifier;
acquiring second page information of the Web page loaded by the application through a second acquisition step, wherein the second page information comprises: the address, loading time and loading type identification of the Web page;
wherein the second acquiring step comprises: acquiring an address of the Web page from an incoming parameter when the method of the network loading request is called when the Web page is loaded by the application, recording the time of calling the method of the network loading request as the loading time of the Web page, and recording the loading type identifier as a second type identifier; and after the application crashes, adding the acquired first page information and second page information of the Web page accessed by the application from the starting to the time period of the occurrence of the crash into the crash information collected by the crash information collection application and storing the crash information.
2. The method of claim 1, further comprising:
reporting the crash information when the application is started;
and if the reporting is successful, deleting the crash information, otherwise reporting the crash information again when the application is started next time.
3. An apparatus for collecting page information, comprising:
a first recording module, configured to acquire first page information of a Web page loaded by an application through a first acquisition step, where the first page information includes: the method comprises the steps that the address and the loading time of the Web page and a loading type identifier can indicate whether the corresponding Web page is loaded by the application based on a native page or other Web pages;
wherein the first acquiring step comprises: acquiring an address of a Web page from an incoming parameter when a method of a network request to be loaded in a protocol class is called when the application loads the Web page, recording the time of calling the method of the network request to be loaded in the protocol class as the loading time of the Web page, and recording the loading type identifier as a first type identifier;
a second recording module, configured to obtain, by a second obtaining step, second page information of the Web page loaded by the application, where the second page information includes: the address, loading time and loading type identification of the Web page;
wherein the second acquiring step comprises: acquiring an address of the Web page from an incoming parameter when the method of the network loading request is called when the Web page is loaded by the application, recording the time of calling the method of the network loading request as the loading time of the Web page, and recording the loading type identifier as a second type identifier;
and the data persistence module is used for adding the acquired first page information and second page information of the Web page accessed by the application from the starting to the time period of the collapse into the collapse information collected by the collapse information collection application and storing the information after the application collapses.
4. The apparatus of claim 3, further comprising:
and the communication module is used for reporting the crash information when the application is started, deleting the crash information by the data persistence module if the reporting is successful, and reporting the crash information again when the application is started next time if the reporting is not successful.
5. An electronic device for collecting page information, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-2.
6. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-2.
CN201710845988.5A 2017-09-19 2017-09-19 Method and device for collecting page information Active CN107644075B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710845988.5A CN107644075B (en) 2017-09-19 2017-09-19 Method and device for collecting page information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710845988.5A CN107644075B (en) 2017-09-19 2017-09-19 Method and device for collecting page information

Publications (2)

Publication Number Publication Date
CN107644075A CN107644075A (en) 2018-01-30
CN107644075B true CN107644075B (en) 2020-11-20

Family

ID=61111851

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710845988.5A Active CN107644075B (en) 2017-09-19 2017-09-19 Method and device for collecting page information

Country Status (1)

Country Link
CN (1) CN107644075B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101114253A (en) * 2006-07-26 2008-01-30 腾讯科技(深圳)有限公司 Program crashing information report method and system thereof
CN105224363A (en) * 2015-09-23 2016-01-06 北京金山安全软件有限公司 A kind of method of loading application programs and device
CN106126685A (en) * 2016-06-29 2016-11-16 北京小米移动软件有限公司 Page loading method and device
CN106354577A (en) * 2016-08-22 2017-01-25 上海亿账通互联网科技有限公司 Crash information storage method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8020149B2 (en) * 2006-08-04 2011-09-13 Apple Inc. System and method for mitigating repeated crashes of an application resulting from supplemental code

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101114253A (en) * 2006-07-26 2008-01-30 腾讯科技(深圳)有限公司 Program crashing information report method and system thereof
CN105224363A (en) * 2015-09-23 2016-01-06 北京金山安全软件有限公司 A kind of method of loading application programs and device
CN106126685A (en) * 2016-06-29 2016-11-16 北京小米移动软件有限公司 Page loading method and device
CN106354577A (en) * 2016-08-22 2017-01-25 上海亿账通互联网科技有限公司 Crash information storage method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
UIWebView的一些用法总结;zhaoweixing1989;《https://blog.csdn.net/zhaoweixing1989/article/details/13021513》;20131025;第1-5页 *

Also Published As

Publication number Publication date
CN107644075A (en) 2018-01-30

Similar Documents

Publication Publication Date Title
CN108346028B (en) Business approval processing method, device and system
CN111597065A (en) Method and device for collecting equipment information
CN111177617A (en) Web direct operation and maintenance method and device based on operation and maintenance management system and electronic equipment
US20210351978A1 (en) Implementation of compliance settings by a mobile device for compliance with a configuration scenario
CN110019263B (en) Information storage method and device
CN107644075B (en) Method and device for collecting page information
CN111897740A (en) User interface testing method and device, electronic equipment and computer readable medium
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN111177112A (en) Database blocking method and device based on operation and maintenance management system and electronic equipment
CN109087097B (en) Method and device for updating same identifier of chain code
CN111367500A (en) Data processing method and device
CN107368407B (en) Information processing method and device
CN109218041B (en) Request processing method and device for server system
CN110022244B (en) Method and apparatus for transmitting information
CN109388536B (en) Data collection method and device
CN113778729A (en) Method and device for determining abnormal information, electronic equipment and storage medium
CN114371979A (en) Container resource monitoring method, device, equipment, medium and program product
CN112181701A (en) Method and device for positioning abnormal service request
CN113778350A (en) Log printing method and device
CN112631590A (en) Component library generation method and device, electronic equipment and computer readable medium
CN114428805A (en) Page display method, device, equipment and computer readable medium
CN111209035A (en) Configuration method and configuration system for software development
CN113434382A (en) Database performance monitoring method and device, electronic equipment and computer readable medium
CN113760587A (en) Method and device for processing data
CN112749078A (en) Buried point testing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant