CN107644075A - The method and apparatus for collecting page info - Google Patents

The method and apparatus for collecting page info Download PDF

Info

Publication number
CN107644075A
CN107644075A CN201710845988.5A CN201710845988A CN107644075A CN 107644075 A CN107644075 A CN 107644075A CN 201710845988 A CN201710845988 A CN 201710845988A CN 107644075 A CN107644075 A CN 107644075A
Authority
CN
China
Prior art keywords
page
web page
loaded
application
info
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.)
Granted
Application number
CN201710845988.5A
Other languages
Chinese (zh)
Other versions
CN107644075B (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

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of method and apparatus for collecting page info, it is related to field of computer technology.One embodiment of this method includes:The first page information for the Web page that application is loaded into is obtained by the first obtaining step, the first page information includes:The address of Web page and loading time, wherein, first obtaining step includes:The address of the Web page is obtained in incoming parameter when being loaded into Web page from the application during method for being loaded onto network request in invocation protocol class, and records loading time of the time of the method for being loaded onto network request in the calling protocol class as the Web page.The embodiment can collect page info when application interacts with Web page so that when application is collapsed, developer can navigate to the defects of corresponding and problem by the page info.

Description

The method and apparatus for collecting page info
Technical field
The present invention relates to field of computer technology, more particularly to a kind of method and apparatus for collecting page info.
Background technology
At present, App application software is after collapse occurs, it will usually will collapse stack information and facility information when occurring Etc. being reported to server, so that developer consults, there are these data, developers can be with the version iteration of next time In, bug existing for former App application software is positioned and repaired.The mode for collecting crash info at present has two kinds, and one Kind is to be collected by the collapse of application system to complete, and another kind is to collapse to collect and survey software to collect number using third party According to.
In process of the present invention is realized, inventor has found that at least there are the following problems in the prior art:Existing two kinds collapse Collection mode of bursting is the common information for collecting some bases, such as including:Collapse time of origin, App versions and version number, System version, device type, start time, type of error, collapse thread dispatching stack information etc..However, for some specific For defect problem, these information are simultaneously insufficient.Often it is related to therein answer in Hybrid App are applied in mobile mixing With interacting between Web page, once being collapsed in this interaction, existing collapse collection mode then can not Corresponding Web page information is collected, App developer also can not just navigate to the defects of corresponding and problem.
Therefore, needing one kind badly can be when application interacts with Web page, the method and apparatus of collecting page info.
The content of the invention
In view of this, the embodiment of the present invention provides a kind of method and apparatus for collecting page info, can be in application and Web When the page interacts, page info is collected so that when application software is collapsed, developer can be believed by the page Breath navigates to the defects of corresponding and problem.
To achieve the above object, a kind of one side according to embodiments of the present invention, there is provided side for collecting page info Method, including:
The first page information for the Web page that application is loaded into, the first page information are obtained by the first obtaining step Including:The address of Web page and loading time,
Wherein, first obtaining step includes:Will carry in invocation protocol class when being loaded into Web page from the application The address of the Web page is obtained in incoming parameter when entering the method for network request, and records and calls in the protocol class It is loaded onto loading time of the time as the Web page of the method for network request.
Further, the first page information also includes being loaded into type identification, and the loading type identification can indicate Corresponding Web page is that the application is loaded into based on the primary page, or the application is loaded into based on other Web pages, First obtaining step also includes:The loading type identification is recorded to identify for the first kind;
The method provided in an embodiment of the present invention for collecting page info also includes:
The second page information of the Web page is obtained by the second obtaining step, the second page information includes: The address of Web page, it is loaded into the time and is loaded into type identification,
Wherein, second obtaining step includes:
Called when being loaded into Web page from the application described in being obtained in the incoming parameter during method for being loaded into network request The address of Web page, and when recording loading of the time as the Web page for calling the method for being loaded into network request Between, and record the loading type identification and identified for Second Type.
Further, the method provided in an embodiment of the present invention for collecting page info also includes:
After the application crashes, by the application of acquisition from starting to the Web page for occurring to access in collapse time section The first page information and second page information in face add crash info and collected in the crash info that application is collected;
Preserve the crash info.
Further, the method provided in an embodiment of the present invention for collecting page info also includes:
The crash info is reported when the application starts;
If reporting success, the crash info is deleted, otherwise reports described collapse again when starting the application next time Routed information.
To achieve the above object, other side according to embodiments of the present invention, there is provided a kind of collection page info Device, including:
First logging modle, for obtaining the first page information for the Web page that application is loaded into by the first obtaining step, The first page information includes:The address of Web page and loading time,
Wherein, first obtaining step includes:Will carry in invocation protocol class when being loaded into Web page from the application The address of the Web page is obtained in incoming parameter when entering the method for network request, and records and calls in the protocol class It is loaded onto loading time of the time as the Web page of the method for network request.
Further, the first page information that first logging modle obtains also includes being loaded into type identification, institute State and be loaded into type identification and can indicate that corresponding Web page is that the application is loaded into based on the primary page, or described apply base It is loaded into other Web pages, it is first kind mark that first logging modle, which is additionally operable to record the loading type identification, Know;
The device provided in an embodiment of the present invention for collecting page info also includes:
Second logging modle, for obtaining the second page information of the Web page by the second obtaining step, described the Two page infos include:The address of Web page, it is loaded into the time and is loaded into type identification,
Wherein, second obtaining step includes:
Called when being loaded into Web page from the application described in being obtained in the incoming parameter during method for being loaded into network request The address of Web page, and when recording loading of the time as the Web page for calling the method for being loaded into network request Between, and record the loading type identification and identified for Second Type.
Further, the device provided in an embodiment of the present invention for collecting page info also includes:
Data persistence module, for after the application crashes, by the application of acquisition from starting to collapsing The first page information and second page information of the Web page accessed in period add crash info and collected to collapse using what is collected In information of bursting, and preserve the crash info.
Further, the device provided in an embodiment of the present invention for collecting page info also includes:
Communication module, for reporting the crash info when the application starts, if reporting success, the data are held Longization module deletes the crash info, and otherwise the communication module reports the collapse again when starting the application next time Information.
To achieve the above object, other side according to embodiments of the present invention, there is provided a kind of collection page info Electronic equipment, including:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are by one or more of computing devices so that one or more of processing The method that device realizes collection page info provided in an embodiment of the present invention.
To achieve the above object, other side according to embodiments of the present invention, there is provided a kind of computer-readable medium, Computer program is stored thereon with, collection page info provided in an embodiment of the present invention is realized when described program is executed by processor Method.
The method and apparatus provided by the invention for collecting page info, when each application is loaded into Web page, all to Web The address url of the page, is loaded into the time and loading type is recorded, by these information, when application is due to being loaded into Web page And when collapsing, developer's can of application program accurately navigates to system or application program by above- mentioned information In specific defect, it is related perfect so as to carry out.And type is loaded into the application loading in mixing Mobile solution by recording Web page has two ways to make a distinction so that mixing the developer of Mobile solution can easily determine to be loaded into Web page It is which kind of loading mode.At the same time, realize the collapse page info of record and crash info collected using KSCrash Reporting after the integration and integration of information.
Further effect adds hereinafter in conjunction with embodiment possessed by above-mentioned non-usual optional mode With explanation.
Brief description of the drawings
Accompanying drawing is used to more fully understand the present invention, does not form inappropriate limitation of the present invention.Wherein:
Fig. 1 is the method flow diagram of collection page info provided in an embodiment of the present invention;
Fig. 2 is the application flow schematic diagram of the method for collection page info provided in an embodiment of the present invention;
Fig. 3 is the schematic diagram of the device of collection page info provided in an embodiment of the present invention;
Fig. 4 is the schematic diagram of data persistence module provided in an embodiment of the present invention;
Fig. 5 is the schematic diagram of communication module provided in an embodiment of the present invention;
Fig. 6 is that the embodiment of the present invention can apply to exemplary system architecture figure therein;
Fig. 7 is adapted for the structural representation of the computer system of the electronic equipment for realizing the embodiment of the present invention.
Embodiment
The one exemplary embodiment of the present invention is explained below in conjunction with accompanying drawing, including the various of the embodiment of the present invention Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize Arrive, various changes and modifications can be made to the embodiments described herein, without departing from scope and spirit of the present invention.Together Sample, for clarity and conciseness, the description to known function and structure is eliminated in following description.
The present invention provides a kind of method for collecting page info, as shown in figure 1, this method includes:Step S101.In step In S101, the first page information for the Web page that application is loaded into is obtained by the first obtaining step, first page information includes: The address of Web page and loading time, wherein, the first obtaining step includes:When being loaded into Web page from application in invocation protocol class Incoming parameter when being loaded onto the method for network request in obtain the address of Web page, and record calling and be loaded onto net Loading time of the time of the method for network request as Web page.
The method provided by the invention for collecting page info can apply in the application of iOS and android system exploitation. By taking iOS application as an example, the method for being loaded onto network request in above-mentioned protocol class can be webView: shouldStartLoadWithRequest:navigationType:Method.This method belongs to UIWebViewDelegate associations Discuss an alternative in class.WebView is the control for being used to load webpage in iOS system, and one is loaded onto in webView When individual network request, webView is consigner, can now find and follow UIWebViewDelegate agreements and turn into it The object of agency performs this method, can obtain when agent object realizes this method incoming parameter, i.e. now can The url information of Web page is obtained from incoming parameter, at the same time, record calls webView: shouldStartLoadWithRequest:navigationType:During loading of the specific time of method as Web page Between.
The method provided by the invention for collecting page info is when each application is loaded into Web page, all ground to Web page Location url, loading time are recorded, by these information, when application is collapsed due to loading Web page, using journey Developer's can of sequence is by above- mentioned information, which browsed page of user when understanding collapse, and finally collapses at which The individual page, it is related perfect so as to carry out so as to the specific defect accurately navigated in system or application program.
In the present invention, first page information also includes being loaded into type identification, i.e. loading in step S101 to Web page Type is also recorded, and record is loaded into type identification and identified for the first kind.Corresponding Web page can be indicated by being loaded into type identification Face is loaded into using based on the primary page, or application is based on the loading of other Web pages.
The method provided by the invention for collecting page info can apply to mix in Mobile solution Hybrid App, mixing Mobile solution is the combination of native applications and Web applications, and mixing Mobile solution is typically by native applications part and Web application sections It is grouped into.In Mobile solution is mixed, what is carried out between local native applications part and Web page interacts, and passes through the present invention Method can will mixing Mobile solution when being loaded every time to Web page, url to loading and be loaded into the time and remember Record.And there is two ways due to being loaded into Web page in Mobile solution is mixed, a kind of is based on the primary of native applications part Page open Web page, another kind are to open Web page based on a loaded Web page, the load recorded by the present invention Enter type, the developer for mixing Mobile solution can determine which kind of loading mode is loading Web page be every time.
The method provided by the invention for collecting page info also includes:The of Web page is obtained by the second obtaining step Two page infos, second page information include:The address of Web page, it is loaded into the time and is loaded into type identification.Wherein, second obtain The step is taken to be specially:Called when being loaded into Web page from application in the incoming parameter during method for being loaded into network request and obtain Web page The address in face, and loading time of the time for the method for calling loading network request as Web page is recorded, and record is loaded into Type identification identifies for Second Type.
The method of above-mentioned loading network request can be loadRequest:Method, this method belong to iOS system A case method in UIWebView classes.This method is passed to a network request example (request parameters) after calling, should Method can send network request according to information such as the url included in request parameters to server.
When application loads a Web page from the primary Native pages, loadRequest can be all called:Side Method, when calling this method, the url addresses of the Web page of loading can be obtained in the request parameters being passed to from system.With this Meanwhile record and call loadRequest:Loading time of the specific time of method as Web page.Due to only from primary The Native pages can just call loadRequest when loading Web page:Method, therefore, class is loaded onto in page info Type identification record identifies for Second Type, to show that current be loaded into is to load Web page based on the primary page.
In the present invention, as shown in Fig. 2 for two kinds of different loading sides in mixing Mobile solution Hybrid App Formula, the present invention are respectively provided with corresponding page info recording mode, i.e., the Web of application loading is obtained by the first obtaining step The first page information of the page and the second page information that Web page is obtained by the second obtaining step.
In the application process of reality, whether for the Web page being loaded into from primary page, or for being loaded into from Web page Web page, using can all call webView:shouldStartLoadWithRequest:navigationType:Method, its Difference is, loadRequest can be first called when Web page is loaded into based on primary page:Method, then recall webView:shouldStartLoadWithRequest:navigationType:Method, therefore in the above method of the present invention In, can be first in the second obtaining step, by calling loadRequest when loading a Web page from the primary page: Incoming reference record one during method is loaded into the page info that type identification is Second Type mark.Then step is obtained first In rapid, then by calling webView:shouldStartLoadWithRequest:navigationType:The incoming ginseng of method Number scale records one and is loaded into the page info that type identification is first kind mark, therefore, is loaded for one from the primary page There are two page infos in Web page, after page info is reported, can combine specific determination methods, know the Web page Face is loaded into which kind of mode.Such as, it can be determined that:If in the presence of two addresses it is identical, be loaded into time same or like page Face information, and it is loaded into type identification difference, then Web page corresponding to the page info is the Web page from the loading of the primary page Face.It is corresponding, exclude under the above situation, if it is the first kind that type identification is loaded into page info, the page info pair The Web page answered is the Web page from Web page loading.
Likewise, also having in android system and loadRequest:Method and webView: shouldStartLoadWithRequest:navigationType:The same or analogous method of methodological function, thus it is right The application of android system can equally use method provided by the invention, by calling the above-mentioned type method come record system Url in incoming parameter, and record and be loaded into the time and be loaded into type so as to record page info.
In the present invention, be loaded onto type identification be recorded as the first kind mark or Second Type mark can be by page Corresponding mark is added in the information of face to realize, for example, identified for Second Type, can be added in page info outside External is identified, and for the first kind, internal inner marks can be added in page info.
Also include in the method for collection page info provided by the invention:After application crashes, by the application of acquisition from opening Move to the first page information for the Web page for occurring to access in collapse time section and second page information and add crash info collection Using in the crash info of collection, crash info is then preserved.In specific implementation process, whenever user uses application to access Web page, system are all recorded the page info of the Web page of access, and then page info can be carried out necessarily The crash info that application collection is collected in processing screening with crash info in system combines, and is stored in local disk.Collapse Information application of bursting can be the KSCrash crash info collection kits in iOS system.
Also include in the method for collection page info provided by the invention:Crashing information report is serviced when application starts Device, if reporting success, crash info is deleted, otherwise report crash info again in application startup next time.It is i.e. firm in user Start application when, check disk in whether the crash info in need reported, if there is a network request is then sent, will protect The crashing information report in disk be present to server, this request is only sent once, then according to the readjustment of server, to magnetic Information in disk makes corresponding processing, if reporting success, deletes the information in disk, to prevent from repeating reporting, if If reporting failure, then continue the crash info in retention disk, reported again when user opens application next time, until Crash info successfully reports.When occurring due to collapse, using being unstable uncontrollable, collapsed if selection reports when collapsing and occurring Routed information can be influenceed by many factors, and probability of failure can be very big.Therefore, in the present invention, crash info is first stored in this Local disk, the reported data again when user starts application next time.
The method provided by the invention for collecting page info, when each application is loaded into Web page, all to Web page Address url, is loaded into the time and is loaded into type identification and recorded, by these information, when application due to being loaded into Web page and When collapsing, developer's can of application is by above- mentioned information, the tool accurately navigated in system or application program Volume defect is related perfect so as to carry out.And have by recording loading type identification to being loaded into Web page in mixing Mobile solution Two ways makes a distinction so that mixing the developer of Mobile solution can easily determine that it is which kind of is carried to be loaded into Web page Enter mode.At the same time, realize the crash info by the page info of record Yu crash info collection kit integration and Reporting after integration.
The present invention also provides a kind of device for collecting page info, as shown in figure 3, the device includes:First logging modle 501st, the second logging modle 502, data persistence module 503 and communication module 504.
The first page that first logging modle 501 is used to obtain the Web page that application is loaded into by the first obtaining step is believed Breath, first page information include:The address of Web page and loading time, wherein, the first obtaining step includes:It is loaded into from application The address of Web page is obtained in incoming parameter during Web page during the method for being loaded onto network request in invocation protocol class, And record loading time of the time as Web page for calling the method for being loaded onto network request.
In the present invention, the first page information that the first logging modle 501 obtains also includes being loaded into type identification, is loaded into class Type mark can indicate that corresponding Web page is loaded into using based on the primary page, or application is carried based on other Web pages Enter, the first logging modle 501 is additionally operable to record and is loaded into type identification as first kind mark.
In the present invention, the second logging modle 502 is used for the second page letter that Web page is obtained by the second obtaining step Breath, second page information include:The address of Web page, it is loaded into the time and is loaded into type identification, wherein, the second obtaining step bag Include:The address that Web page is obtained in the incoming parameter during method for being loaded into network request is called when being loaded into Web page from application, And loading time of the time for the method for calling loading network request as Web page is recorded, and record is loaded into type identification Identified for Second Type.
Data persistence module 503 is used for after application crashes, by the application of acquisition from starting to collapse time section occurs The first page information and second page information of the Web page of interior access add crash info and collect the crash info that application is collected In, and preserve crash info.
Communication module 504 is used for crashing information report server when application starts, if reporting success, lasting data Change module 503 and delete crash info, otherwise communication module 501 reports crash info again in application startup next time.
As shown in figure 4, data persistence module 503 is used to preserve page info.More specifically, answered whenever user uses With Web page is accessed, the first logging modle 501 and the second logging modle 502 are all carried out the page info of the Web page of access Record, then the processing certain to page info progress of data persistence module 502, which is screened and is written in local disk, preserves. When needing to report page info, by the digital independent of preservation and corresponding compression encryption is carried out, reports server.
In the present invention, after application crashes, data persistence module 503 can be by the page info and system of preservation The information integration that reports of crash info collection module is crash info.In iOS system, the function of crash info collection module can To be realized by KSCrash, data persistence module 503 is using the page info being collected into as the original collection information of KSCrash One supplement, be integrated into crash info, be saved in local disk.
As shown in Figure 4 and Figure 5, communication module 504 is used for when application crashes, will apply from starting to collapse time occurs The page info of the Web page accessed in section reports server.In the present invention, communication module 504 can by page info with Original collection information of crash info collection module reports server together.Due to collapse occur when, using be it is unstable not Controllable, if selection reports crash info to be influenceed by many factors when collapsing and occurring, probability of failure can be very big.Therefore, In the present invention, crash info is first stored in local disk, the reported data again when user starts application next time.
In the present invention, communication module 504 application start when, check local disk in whether the letter in need reported Breath, if in the presence of, network request is sent to server, by the crashing information report stored in local disk to server, this Information is only sent once each using when starting, and is then adjusted back according to the network request of server, in data persistence module Respective handling is made in 503, if reporting success, empties the information in local disk, to prevent from repeating reporting, if reported If failure, then continue the information in retention disk, reported again when user opens application next time, until information reporting Success.
The device provided by the invention for collecting page info, when each application is loaded into Web page, all to Web page Address url, is loaded into the time and is loaded into type identification and recorded, by these information, when application due to being loaded into Web page and When collapsing, developer's can of application program is accurately navigated in system or application program by above- mentioned information Specific defect, it is related perfect so as to carry out.And type identification is loaded into being loaded into Web page in mixing Mobile solution by recording Face has two ways to make a distinction so that mixing the developer of Mobile solution can easily determine that it is which to be loaded into Web page Kind loading mode.At the same time, the integration of the crash info by the page info of record Yu crash info collection kit is realized And reporting after integrating.
Fig. 6 shows the method for the collection page info that can apply the embodiment of the present invention or collects the device of page info Exemplary system architecture 600.
As shown in fig. 6, system architecture 600 can include terminal device 606,602,603, network 604 and server 605. Network 604 between terminal device 606,602,603 and server 605 provide communication link medium.Network 604 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be interacted with using terminal equipment 606,602,603 by network 604 with server 605, to receive or send out Send message etc..Various telecommunication customer end applications, such as the Web page to loading can be installed on terminal device 606,602,603 The application that the page info in face is collected.
Terminal device 606,602,603 can have a display screen and a various electronic equipments that supported web page browses, bag Include but be not limited to smart mobile phone, tablet personal computer, pocket computer on knee and desktop computer etc..
Server 605 can be to provide the server of various services, such as utilize terminal device 606,602,603 to user The storage server that the page info reported is preserved and managed.Developer can check that terminal is set by storage server The standby page info reported.
It should be noted that the method for the collection page info that the embodiment of the present invention is provided typically is held by server 605 OK, correspondingly, the device for collecting page info is generally positioned in server 605.
It should be understood that the number of the terminal device, network and server in Fig. 6 is only schematical.According to realizing need Will, can have any number of terminal device, network and server.
Below with reference to Fig. 7, it illustrates suitable for for realizing the computer system 700 of the electronic equipment of the embodiment of the present invention Structural representation.Electronic equipment shown in Fig. 7 is only an example, to the function of the embodiment of the present invention and should not use model Shroud carrys out any restrictions.
As shown in fig. 7, computer system 700 includes CPU (CPU) 701, it can be read-only according to being stored in Program in memory (ROM) 702 or be loaded into program in random access storage device (RAM) 703 from storage part 708 and Perform various appropriate actions and processing.In RAM 703, also it is stored with system 700 and operates required various programs and data. CPU 701, ROM 702 and RAM 703 are connected with each other by bus 704.Input/output (I/O) interface 705 is also connected to always Line 704.
I/O interfaces 705 are connected to lower component:Importation 706 including keyboard, mouse etc.;Penetrated including such as negative electrode The output par, c 707 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage part 708 including hard disk etc.; And the communications portion 709 of the NIC including LAN card, modem etc..Communications portion 709 via such as because The network of spy's net performs communication process.Driver 710 is also according to needing to be connected to I/O interfaces 705.Detachable media 711, such as Disk, CD, magneto-optic disk, semiconductor memory etc., it is arranged on as needed on driver 710, in order to read from it Computer program be mounted into as needed storage part 708.
Especially, according to embodiment disclosed by the invention, may be implemented as counting above with reference to the process of flow chart description Calculation machine software program.For example, embodiment disclosed by the invention includes a kind of computer program product, it includes being carried on computer Computer program on computer-readable recording medium, the computer program include the program code for being used for the method shown in execution flow chart. In such embodiment, the computer program can be downloaded and installed by communications portion 709 from network, and/or from can Medium 711 is dismantled to be mounted.When the computer program is performed by CPU (CPU) 701, system of the invention is performed The above-mentioned function of middle restriction.
It should be noted that the computer-readable medium shown in the present invention can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer-readable recording medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, system, device or the device of infrared ray or semiconductor, or it is any more than combination.Meter The more specifically example of calculation machine readable storage medium storing program for executing can include but is not limited to:Electrical connection with one or more wires, just Take formula computer disk, hard disk, random access storage device (RAM), read-only storage (ROM), erasable type and may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only storage (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the present invention, computer-readable recording medium can any include or store journey The tangible medium of sequence, the program can be commanded the either device use or in connection of execution system, device.And at this In invention, computer-readable signal media can include in a base band or as carrier wave a part propagation data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium beyond storage medium is read, the computer-readable medium, which can send, propagates or transmit, to be used for By instruction execution system, device either device use or program in connection.Included on computer-readable medium Program code can be transmitted with any appropriate medium, be included but is not limited to:Wirelessly, electric wire, optical cable, RF etc., or it is above-mentioned Any appropriate combination.
Flow chart and block diagram in accompanying drawing, it is illustrated that according to the system of various embodiments of the invention, method and computer journey Architectural framework in the cards, function and the operation of sequence product.At this point, each square frame in flow chart or block diagram can generation The part of one module of table, program segment or code, a part for above-mentioned module, program segment or code include one or more For realizing the executable instruction of defined logic function.It should also be noted that some as replace realization in, institute in square frame The function of mark can also be with different from the order marked in accompanying drawing generation.For example, two square frames succeedingly represented are actual On can perform substantially in parallel, they can also be performed in the opposite order sometimes, and this is depending on involved function.Also It is noted that the combination of each square frame and block diagram in block diagram or flow chart or the square frame in flow chart, can use and perform rule Fixed function or the special hardware based system of operation are realized, or can use the group of specialized hardware and computer instruction Close to realize.
Being described in module involved in the embodiment of the present invention can be realized by way of software, can also be by hard The mode of part is realized.Described module can also be set within a processor, for example, can be described as:A kind of processor bag Include logging modle, data persistence module and communication module.Wherein, the title of these units under certain conditions form pair The restriction of the unit in itself, for example, communication module be also described as " after application crashes, by application program from start to The page info for the Web page for occurring to access in collapse time section reports server in next application program launching ".
As on the other hand, present invention also offers a kind of computer-readable medium, the computer-readable medium can be Included in equipment described in above-described embodiment;Can also be individualism, and without be incorporated the equipment in.Above-mentioned calculating Machine computer-readable recording medium carries one or more program, when said one or multiple programs are performed by the equipment, makes Obtaining the equipment includes:
The first page information for the Web page that application is loaded into is obtained by the first obtaining step, first page information includes: The address of Web page and loading time,
Wherein, the first obtaining step includes:The network that is loaded onto when being loaded into Web page from application in invocation protocol class please The address of Web page is obtained in incoming parameter during the method asked, and records in invocation protocol class and is loaded onto network request Method loading time of the time as Web page.
Above-mentioned embodiment, does not form limiting the scope of the invention.Those skilled in the art should be bright It is white, depending on design requirement and other factors, various modifications, combination, sub-portfolio and replacement can occur.It is any Modifications, equivalent substitutions and improvements made within the spirit and principles in the present invention etc., should be included in the scope of the present invention Within.

Claims (10)

  1. A kind of 1. method for collecting page info, it is characterised in that including:
    The first page information for the Web page that application is loaded into is obtained by the first obtaining step, the first page information includes: The address of Web page and loading time,
    Wherein, first obtaining step includes:When being loaded into Web page from the application net is loaded onto in invocation protocol class Obtain the address of the Web page in incoming parameter during the method for network request, and record call in the protocol class will It is loaded into loading time of the time of the method for network request as the Web page.
  2. 2. according to the method for claim 1, it is characterised in that the first page information also includes being loaded into type identification, The loading type identification can indicate that corresponding Web page is that the application is loaded into based on the primary page, or the application It is loaded into based on other Web pages, first obtaining step also includes:It is the first kind to record the loading type identification Mark;
    Methods described also includes:The second page information of the Web page, the second page are obtained by the second obtaining step Information includes:The address of Web page, it is loaded into the time and is loaded into type identification,
    Wherein, second obtaining step includes:
    Called when being loaded into Web page from the application in the incoming parameter during method for being loaded into network request and obtain the Web page The address in face, and loading time of the time for the method for calling the loading network request as the Web page is recorded, and The loading type identification is recorded to identify for Second Type.
  3. 3. according to the method for claim 2, it is characterised in that also include:
    After the application crashes, by the application of acquisition from starting to the Web page for occurring to access in collapse time section First page information and second page information add crash info and collected in the crash info that application is collected;
    Preserve the crash info.
  4. 4. according to the method for claim 3, it is characterised in that also include:
    The crash info is reported when the application starts;
    If reporting success, the crash info is deleted, otherwise reports the collapse letter again when starting the application next time Breath.
  5. A kind of 5. device for collecting page info, it is characterised in that including:
    First logging modle, it is described for obtaining the first page information for the Web page that application is loaded into by the first obtaining step First page information includes:The address of Web page and loading time,
    Wherein, first obtaining step includes:When being loaded into Web page from the application net is loaded onto in invocation protocol class Obtain the address of the Web page in incoming parameter during the method for network request, and record call in the protocol class will It is loaded into loading time of the time of the method for network request as the Web page.
  6. 6. device according to claim 5, it is characterised in that the first page letter that first logging modle obtains Breath also includes being loaded into type identification, and the loading type identification can indicate that corresponding Web page is that the application is based on primary page What face was loaded into, or the application is loaded into based on other Web pages, and first logging modle is additionally operable to record the load Enter type identification to identify for the first kind;
    Described device also includes:
    Second logging modle, for obtaining the second page information of the Web page, the second page by the second obtaining step Face information includes:The address of Web page, it is loaded into the time and is loaded into type identification,
    Wherein, second obtaining step includes:
    Called when being loaded into Web page from the application in the incoming parameter during method for being loaded into network request and obtain the Web page The address in face, and loading time of the time for the method for calling the loading network request as the Web page is recorded, and The loading type identification is recorded to identify for Second Type.
  7. 7. device according to claim 6, it is characterised in that also include:
    Data persistence module, for after the application crashes, by the application of acquisition from starting to collapse time occurs The first page information and second page information of the Web page accessed in section add crash info and collect the collapse letter that application is collected In breath, and preserve the crash info.
  8. 8. device according to claim 7, it is characterised in that also include:
    Communication module, for reporting the crash info when the application starts, if reporting success, the data persistence Module deletes the crash info, and otherwise the communication module reports the collapse letter again when starting the application next time Breath.
  9. A kind of 9. electronic equipment for collecting page info, it is characterised in that including:
    One or more processors;
    Storage device, for storing one or more programs,
    When one or more of programs are by one or more of computing devices so that one or more of processors are real The now method as described in any in claim 1-4.
  10. 10. a kind of computer-readable medium, is stored thereon with computer program, it is characterised in that described program is held by processor The method as described in any in claim 1-4 is realized during row.
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 true CN107644075A (en) 2018-01-30
CN107644075B 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)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111435326A (en) * 2019-01-15 2020-07-21 北京京东尚科信息技术有限公司 Method and device for analyzing crash logs
CN111639275A (en) * 2019-03-01 2020-09-08 阿里巴巴集团控股有限公司 Routing information processing method and device, electronic equipment and computer storage medium
CN112306856A (en) * 2019-08-02 2021-02-02 北京字节跳动网络技术有限公司 Method and device for collecting application defect information and electronic equipment
CN113065079A (en) * 2021-04-13 2021-07-02 开鑫金服(南京)信息服务有限公司 Method, equipment and storage medium for calling native page based on address protocol
CN113835912A (en) * 2020-06-24 2021-12-24 北京新氧科技有限公司 Application crash information processing method and device

Citations (5)

* 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
US20080052677A1 (en) * 2006-08-04 2008-02-28 Apple Computer, Inc. System and method for mitigating repeated crashes of an application resulting from supplemental code
CN105224363A (en) * 2015-09-23 2016-01-06 北京金山安全软件有限公司 Method and device for loading application program
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

Patent Citations (5)

* 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
US20080052677A1 (en) * 2006-08-04 2008-02-28 Apple Computer, Inc. System and method for mitigating repeated crashes of an application resulting from supplemental code
CN105224363A (en) * 2015-09-23 2016-01-06 北京金山安全软件有限公司 Method and device for loading application program
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
ZHAOWEIXING1989: "UIWebView的一些用法总结", 《HTTPS://BLOG.CSDN.NET/ZHAOWEIXING1989/ARTICLE/DETAILS/13021513》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111435326A (en) * 2019-01-15 2020-07-21 北京京东尚科信息技术有限公司 Method and device for analyzing crash logs
CN111639275A (en) * 2019-03-01 2020-09-08 阿里巴巴集团控股有限公司 Routing information processing method and device, electronic equipment and computer storage medium
CN111639275B (en) * 2019-03-01 2023-04-25 阿里巴巴集团控股有限公司 Routing information processing method, device, electronic equipment and computer storage medium
CN112306856A (en) * 2019-08-02 2021-02-02 北京字节跳动网络技术有限公司 Method and device for collecting application defect information and electronic equipment
CN113835912A (en) * 2020-06-24 2021-12-24 北京新氧科技有限公司 Application crash information processing method and device
CN113835912B (en) * 2020-06-24 2024-02-09 北京新氧科技有限公司 Crash information processing method and device for application program
CN113065079A (en) * 2021-04-13 2021-07-02 开鑫金服(南京)信息服务有限公司 Method, equipment and storage medium for calling native page based on address protocol
CN113065079B (en) * 2021-04-13 2023-10-13 开鑫金服(南京)信息服务有限公司 Method, equipment and storage medium for realizing calling of native page based on address protocol

Also Published As

Publication number Publication date
CN107644075B (en) 2020-11-20

Similar Documents

Publication Publication Date Title
CN107644075A (en) The method and apparatus for collecting page info
CN109828903B (en) Automatic testing method and device, computer device and storage medium
US10104672B2 (en) Method and a system for identifying operating modes of communications in mobile edge computing environment
CN107979508A (en) Micro services test method and device
CN111177617A (en) Web direct operation and maintenance method and device based on operation and maintenance management system and electronic equipment
CN107908485A (en) Interface parameters transmission method, device, equipment and computer-readable recording medium
CN107122301A (en) Interface detection method and device
CN107526676B (en) Cross-system test method and device
CN105718313A (en) Application operation method and device
CN107357914A (en) Information processing method and device
CN104978213B (en) Realize the link acquisition methods and device of application installation package
US8700030B1 (en) Handset diagnostic tool
CN111555940A (en) Client test method and device, electronic equipment and computer readable storage medium
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
CN107704499A (en) A kind of page jump control method and device of application program
CN111752834A (en) Automatic testing method and device
CN110659021A (en) Development and test system for micro application in mobile terminal
CN112182160B (en) Log data processing method and device, storage medium and electronic equipment
CN111046393B (en) Vulnerability information uploading method and device, terminal equipment and storage medium
CN112650689A (en) Test method, test device, electronic equipment and storage medium
CN106302011A (en) Method of testings based on multiterminal and terminal
CN107509215A (en) A kind of wireless authentication automated testing method and system
CN113495498B (en) Simulation method, simulator, device and medium for hardware device
CN110262841A (en) The method and apparatus that a kind of pair of bytecode is enhanced
US8615744B2 (en) Methods and system for managing assets in programming code translation

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