Method and device for generating page performance data, storage medium and electronic device
By acquiring and saving performance node data in stages during the page generation process, the problem of low backend processing efficiency is solved, and more efficient page performance data aggregation and optimization are achieved.
Patent Information
- Application Number
- CN202210151954.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-18
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2042-02-18
AI Technical Summary
The current technology has low efficiency in processing page performance data in the backend, resulting in low work efficiency for R&D personnel.
By acquiring performance node data in stages during the page generation process and saving it to preset storage space, it is then uploaded to the server for optimization.
It improves the aggregation and retrieval efficiency of page performance data, saves backend development personnel investment costs, and provides a more convenient data acquisition experience.
Smart Images

Figure CN114661565B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of page processing, and particularly relates to a page performance data generation method and device, a storage medium and an electronic device. BACKGROUND
[0002] With the development of terminal application programs (Apps) and the increasingly mature technology, more and more attention is paid to the performance of Apps. The most commonly mentioned and highest priority performance indicators, such as page opening speed or program startup speed, are indicators that can improve the user experience by representing the time consumption, and therefore many Apps choose to use the indicators representing the time consumption as important optimization objects of performance optimization. SUMMARY
[0003] The present application provides a page performance data generation method and device, a storage medium and an electronic device, and the specific technical solutions are as follows:
[0004] In a first aspect, the present application provides a page performance data generation method, comprising:
[0005] obtaining data of at least two performance nodes corresponding to each stage respectively in at least two stages included in the generation process of the target page;
[0006] saving the data of the at least two performance nodes corresponding to each stage respectively into a preset storage space; wherein the preset storage space corresponding to each stage is different.
[0007] In an optional solution of the first aspect, before obtaining the data of the at least two performance nodes corresponding to each stage respectively in the at least two stages included in the generation process of the target page, the method further comprises:
[0008] obtaining a generation instruction of the target page;
[0009] determining at least two life cycle points in the generation process of the target page according to the generation instruction of the target page;
[0010] taking the stages corresponding to the at least two life cycle points respectively as the at least two stages included in the generation process of the target page.
[0011] In another optional solution of the first aspect, the generation process of the target page includes a page creation stage, a page loading stage and a page rendering stage.
[0012] The obtaining of the data of the at least two performance nodes corresponding to each stage respectively in the at least two stages included in the generation process of the target page comprises:
[0013] acquire data of a version performance node, a network performance node, a name performance node and a creation time performance node corresponding to a page creation stage of the target page in a generation process;
[0014] acquire data of a protocol performance node, a domain name performance node, a resource performance node and a loading time performance node corresponding to a page loading stage of the target page in the generation process;
[0015] acquire data of a rendering time performance node, an interaction time performance node and a loading type performance node corresponding to a page rendering stage of the target page in the generation process.
[0016] In a further optional implementation of the first aspect, after the data of the at least two performance nodes corresponding to each of the at least two stages in the generation process of the target page is acquired, and before the data of the at least two performance nodes corresponding to each of the stages is saved into the preset storage space respectively, the method further includes:
[0017] acquire attribute data, environment data and extension data corresponding to the page creation stage, the page loading stage and the page rendering stage respectively in the generation process of the target page;
[0018] saving the data of the at least two performance nodes corresponding to each of the stages into the preset storage space respectively includes:
[0019] saving the data of the at least two performance nodes, the attribute data, the environment data and the extension data corresponding to the page creation stage, the page loading stage and the page rendering stage respectively into the preset storage space.
[0020] In a further optional implementation of the first aspect, after the data of the at least two performance nodes corresponding to each of the stages is saved into the preset storage space respectively, the method further includes:
[0021] after the target page disappears, acquire data of at least two performance nodes corresponding to a page disappearance stage of the target page;
[0022] save the data of the at least two performance nodes corresponding to the page disappearance stage into a corresponding preset storage space.
[0023] In a further optional implementation of the first aspect, the at least two performance nodes corresponding to the page disappearance stage include a jump time performance node and a page time consumption performance node; or
[0024] the at least two performance nodes corresponding to the page disappearance stage include a destroy time performance node and a page time consumption performance node.
[0025] In a further alternative of the first aspect, after the data of the at least two performance nodes corresponding to the page disappearance stage of the target page is acquired, before the data of the at least two performance nodes corresponding to the page disappearance stage is saved into the corresponding preset storage space, the method further comprises:
[0026] acquiring attribute data, environment data and extension data corresponding to the page disappearance stage of the target page;
[0027] saving the data of the at least two performance nodes corresponding to the page disappearance stage into the preset storage space comprises:
[0028] saving the data of the at least two performance nodes corresponding to the page disappearance stage and the attribute data, the environment data and the extension data into the preset storage space.
[0029] In a further alternative of the first aspect, after the data of the at least two performance nodes corresponding to the page disappearance stage is saved into the corresponding preset storage space, the method further comprises:
[0030] respectively calling the data of the at least two performance nodes, the attribute data, the environment data and the extension data corresponding to each stage of the target page from the respective preset storage space corresponding to each stage;
[0031] uploading the data of the at least two performance nodes, the attribute data, the environment data and the extension data corresponding to each stage of the target page to a target server.
[0032] In a second aspect, an embodiment of the present application provides a page performance data generation device, comprising:
[0033] a first acquisition module configured to acquire data of at least two performance nodes corresponding to each stage in at least two stages included in a generation process of a target page;
[0034] a first storage module configured to save the data of the at least two performance nodes corresponding to each stage into a preset storage space respectively; wherein the preset storage space corresponding to each stage is different.
[0035] In a further alternative of the second aspect, the device further comprises:
[0036] a second acquisition module configured to acquire a generation instruction of the target page before acquiring the data of the at least two performance nodes corresponding to each stage in the at least two stages included in the generation process of the target page;
[0037] a first processing module configured to determine at least two life cycle points in the generation process of the target page according to the generation instruction of the target page;
[0038] The determining module is configured to determine at least two stages corresponding to at least two life cycle points of the target page respectively.
[0039] In a further optional implementation of the second aspect, the target page comprises a page creation stage, a page loading stage and a page rendering stage in the generation process.
[0040] The first obtaining module specifically comprises:
[0041] obtaining data of a version performance node, a network performance node, a name performance node and a creation time performance node corresponding to the page creation stage in the generation process of the target page;
[0042] obtaining data of a protocol performance node, a domain name performance node, a resource performance node and a loading time performance node corresponding to the page loading stage in the generation process of the target page;
[0043] obtaining data of a rendering time performance node, an interaction time performance node and a loading type performance node corresponding to the page rendering stage in the generation process of the target page.
[0044] In a further optional implementation of the second aspect, the apparatus further comprises:
[0045] The third obtaining module is configured to, after obtaining the data of the at least two performance nodes corresponding to each stage in the at least two stages included in the generation process of the target page, and before saving the data of the at least two performance nodes corresponding to each stage into the preset storage space respectively, obtain attribute data, environment data and extension data corresponding to the page creation stage, the page loading stage and the page rendering stage in the generation process of the target page respectively;
[0046] The first storage module specifically comprises:
[0047] saving the data of the at least two performance nodes, the attribute data, the environment data and the extension data corresponding to the page creation stage, the page loading stage and the page rendering stage into the preset storage space respectively.
[0048] In a further optional implementation of the second aspect, the apparatus further comprises:
[0049] The fourth obtaining module is configured to, after saving the data of the at least two performance nodes corresponding to each stage into the preset storage space respectively, obtain data of at least two performance nodes corresponding to a page disappearance stage of the target page after the target page disappears.
[0050] The second storage module is configured to save the data of the at least two performance nodes corresponding to the page disappearance stage into the corresponding preset storage space.
[0051] In a further implementation form of the second aspect, the at least two performance nodes corresponding to the page disappearance stage include: a jump time performance node and a page time consumption performance node; or
[0052] The at least two performance nodes corresponding to the page disappearance stage include: a destruction time performance node and a page time consumption performance node.
[0053] In a further implementation form of the second aspect, the apparatus further includes:
[0054] The fifth obtaining module is configured to, before saving the data of the at least two performance nodes corresponding to the page disappearance stage to the corresponding preset storage space, obtain attribute data, environment data and extension data of the target page corresponding to the page disappearance stage.
[0055] The second storage module specifically includes:
[0056] The data of the at least two performance nodes corresponding to the page disappearance stage and the attribute data, the environment data and the extension data are saved into the preset storage space.
[0057] In a further implementation form of the second aspect, the apparatus further includes:
[0058] The second processing module is configured to, after saving the data of the at least two performance nodes corresponding to the page disappearance stage to the corresponding preset storage space, respectively call out the data of the at least two performance nodes corresponding to each stage, the attribute data, the environment data and the extension data of the target page corresponding to each stage from the respective preset storage space corresponding to each stage.
[0059] The uploading module is configured to upload the data of the at least two performance nodes corresponding to each stage, the attribute data, the environment data and the extension data of the target page to a target server.
[0060] In a third aspect, the embodiments of the present application further provide an electronic device, including a processor and a memory;
[0061] The processor is connected with the memory;
[0062] The memory is configured to store executable program codes.
[0063] The processor runs a program corresponding to the executable program codes by reading the executable program codes stored in the memory, so as to execute the page performance data generation method provided in the first aspect of the embodiments of the present application or any one of the implementation forms of the first aspect.
[0064] In a fourth aspect, an embodiment of the present application provides a computer storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the page performance data generation method provided by the first aspect or any one of the implementation manners of the first aspect can be implemented.
[0065] In the embodiment of the present application, the data of at least two performance nodes corresponding to each stage of the target page in the generation process can be obtained, and the data of the at least two performance nodes corresponding to each stage can be saved in the preset storage space respectively, so that the electronic device can obtain a plurality of page performance data with correlation according to the generation process of the page. Not only the aggregation of the page performance data is improved, but also the input cost of the background R&D personnel in the process of obtaining the page performance data is saved, and the background R&D personnel can have a more convenient experience. BRIEF DESCRIPTION OF DRAWINGS
[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0067] Figure 1 An architecture schematic diagram of a common page performance data generation system provided by an embodiment of the present application;
[0068] Figure 2 An architecture schematic diagram of a page performance data generation system provided by an embodiment of the present application;
[0069] Figure 3 A flow schematic diagram of a page performance data generation method provided by an embodiment of the present application;
[0070] Figure 4 A life cycle schematic diagram of a page provided by an embodiment of the present application;
[0071] Figure 5 A flow schematic diagram of another page performance data generation method provided by an embodiment of the present application;
[0072] Figure 6 A page performance data generation scene schematic diagram provided by an embodiment of the present application;
[0073] Figure 7 A structure schematic diagram of a page performance data generation apparatus provided by an embodiment of the present application;
[0074] Figure 8A structural schematic diagram of an electronic device is provided in the embodiments of the present application. DETAILED DESCRIPTION
[0075] The technical solutions in the embodiments of the present application will be clearly and completely described in combination with the drawings in the embodiments of the present application.
[0076] The terms "first", "second", "third", and the like in the specification and claims of the present application and the above drawings are used to distinguish different objects, rather than to describe a specific sequence. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed, or can optionally include other steps or units inherent to the process, method, product, or device.
[0077] A common method for obtaining page performance data is that when a user opens a to-be-tested page in an electronic device, a plurality of nodes corresponding to the generation of the to-be-tested page upload the respective collected data in the generation period of the to-be-tested page to a server corresponding to the to-be-tested page, and a background developer cleans and associates the respective collected data of the plurality of nodes to obtain page performance data corresponding to the to-be-tested page.
[0078] Specifically, reference can be made to Figure 1 A structural schematic diagram of a common page performance data generation system provided by the embodiments of the present application is shown.
[0079] As Figure 1 shown, the common page performance data generation system can at least include an electronic device 101 and a server 102, wherein:
[0080] The electronic device 101 can be installed with an application program for generating a page, for example but not limited to including a browser, a shopping type, a life type, or a video type, and the like, and the generated page is displayed to a user in the display interface of the electronic device 101 through user operation. Herein, taking the life type application program A as an example, the user can download and install the life type application program A in the electronic device 101, and enter the main interface generated by the life type application program A through clicking the icon corresponding to the life type application program A and the like, and can but not limited to the user can also select other controls in the main interface generated by the life type application program A through clicking operation to jump to the sub-page generated by the life type application program A corresponding to the selected other controls.
[0081] In the process of generating a page by an application, a plurality of page performance nodes corresponding to the application can collect page performance data in a period of page generation, and each of the page performance nodes sends the collected page performance data to the server 102 corresponding to the application through the network. Taking the life application A mentioned above as an example, when the user clicks the icon corresponding to the life application A, the life application A generates a main interface in the display interface of the electronic device 101, and in the process of generating the main interface, the page performance nodes A1, A2 and A3 corresponding to the life application A can collect corresponding page performance data. Here, taking the page performance data of the application as an example, which is related to the page time consumption, the page performance node A1 can be represented as a page opening node, and the page performance data collected by the page performance node A1 can be the total time consumption of the life application A page from creation to complete generation. The page performance node A2 can be represented as a page start loading node, and the page performance data collected by the page performance node A2 can be the total time consumption of the life application A from page start loading to loading completion. The page performance node A3 can be represented as a page start rendering node, and the page performance data collected by the page performance node A3 can be the total time consumption of the life application A from page start rendering to rendering completion. It should be noted that in the process of collecting the total time consumption, the start time and the end time of the time consumption collected by each of the page performance nodes A1, A2 and A3 can be inconsistent, that is, the start time of the time consumption collected by the page performance data A1 can not be equal to the start time of the time consumption collected by the page performance data A2 and the start time of the time consumption collected by the page performance data A3, and the end time of the time consumption collected by the page performance data A1 can not be equal to the end time of the time consumption collected by the page performance data A2 and the end time of the time consumption collected by the page performance data A3, and thus the total time consumption obtained finally can also be inconsistent due to the inconsistency of the start time and the end time of the time consumption collected by each of the page performance nodes A1, A2 and A3.
[0082] It should be further noted that the page performance nodes A1, A2 and A3 mentioned above can collect time consumption data for the generation process of the main page of the life application A, but are not limited thereto, for example, can also collect time consumption data for the generation process of other subpages of the life application A. Here, the other subpages of the life application A can be understood as other subpages entered by the user by selecting other controls in the main page of the life application A, and the present application is not limited thereto.
[0083] Further, after the plurality of page performance nodes corresponding to the application each collect page performance data, the plurality of page performance nodes can send the collected page performance data to the server 102 corresponding to the application through the network, so that the background R&D personnel can optimize the application according to the page performance data.
[0084] The electronic device 101 involved in the embodiments of the present application can be a smart phone, a tablet computer, a desktop computer, a laptop computer, a notebook computer, an ultra-mobile personal computer (UMPC), a handheld computer, a PC device, a personal digital assistant (PDA), a routing device, a virtual reality device, etc.
[0085] After the server 102 receives the page performance data collected by the plurality of page performance nodes corresponding to the application, the server 102 can first clean the page performance data, and associate the page performance data collected by the plurality of page performance nodes in the cleaning stage. The background R&D personnel can improve and optimize the application in combination with the associated page performance data, so as to obtain an application with better performance. It can be understood that the stage of cleaning the page performance data is also the stage of screening the page performance data. For example, the page performance data collected by the plurality of page performance nodes corresponding to the application in different models of electronic devices 101 is different. The server 102 can first screen the page performance data corresponding to the application in the same electronic device 101 from the received page performance data. The screening method can be but is not limited to judging the electronic device IP address or the user name of the electronic device 101 parsed from the page performance data.
[0086] For example, the application in the same electronic device 101 generates a plurality of pages, and the page performance data collected by the plurality of page performance nodes corresponding to different pages in the generation process is different. The server 102 can first determine the target page generated by the application in the same electronic device 101, and screen the page performance data corresponding to the time stamp of the target page from the plurality of page performance data according to the time stamp of the target page. The screening method can be but is not limited to screening the time period corresponding to the time stamp of the target page from the plurality of page performance data. For example, when the page consumption time termination time corresponding to a time period of the page performance data is consistent with the time stamp of the target page (it can be understood as the same or the time difference is within a preset range), the total consumption time corresponding to the time period can be taken as the page performance data of the target page.
[0087] It can also be understood that the server 102 can also perform drilling analysis on the plurality of page performance data when associating the plurality of page performance data. However, the server 102 needs to consume a large amount of time in the entire stage of cleaning and associating the plurality of page performance data, which is easy to affect the work efficiency of the background R&D personnel.
[0088] The server 102 involved in the embodiments of the present application is specifically but not limited to a hardware server, a virtual server, a cloud server, etc., and can also be a terminal, specifically but not limited to a desktop, a laptop, a notebook computer, an Ultra-mobile Personal Computer (UMPC), a handheld computer, a netbook, a Personal Digital Assistant (PDA), a routing device, a gateway device, etc.
[0089] Based on this, in order to solve the problem of low background processing efficiency in the common technology mentioned above, the present application provides a page performance data generation method, and the page performance data generation method is explained and described in combination with multiple embodiments.
[0090] Please refer to Figure 2 , Figure 2 The architecture schematic diagram of a page performance data generation system provided by the embodiments of the present application is shown.
[0091] As Figure 2 shown, the page performance data generation system can at least include an electronic device 201 and a server 202, wherein:
[0092] The electronic device 201 can be installed with an application program for generating a page, for example but not limited to including a browser, a shopping application program, a life application program, a video application program, etc., and the generated interface is shown to the user in the display interface of the electronic device 201 through user operation. Here, taking the life application program A as an example, the user can download and install the life application program A in the electronic device 201, and enter the main interface generated by the life application program A by clicking the icon corresponding to the life application program A and other operations, and can but not limited to the user can also select other controls in the main interface generated by the life application program A to jump to the sub-page generated by the life application program A corresponding to the selected other controls by clicking operation.
[0093] In the process of generating the page, the application program can obtain data of at least two page performance nodes corresponding to each of at least two stages in the process of generating the page. It can be understood that the process of generating the page can be divided into multiple stages, such as but not limited to a page creation stage, a page loading stage, and a page rendering stage. When the page is in the page creation stage in the process of generating the page, at least two page performance data of the page can be obtained based on at least two page performance nodes corresponding to the page creation stage. When the page is in the page loading stage in the process of generating the page, at least two page performance data of the page can be obtained based on at least two page performance nodes corresponding to the page loading stage. When the page is in the page rendering stage in the process of generating the page, at least two page performance data of the page can be obtained based on at least two page performance nodes corresponding to the page rendering stage.
[0094] It should be noted that the process of generating the page can not be limited to obtaining data of at least two page performance nodes corresponding to each stage in sequence. For example, the page creation stage, the page loading stage, and the page rendering stage are taken as examples. The application program can not be limited to obtaining data of at least two page performance nodes corresponding to the page creation stage first, then obtaining data of at least two page performance nodes corresponding to the page loading stage, and finally obtaining data of at least two page performance nodes corresponding to the page rendering stage. For example, after obtaining data of at least two page performance nodes corresponding to the page creation stage, data of at least two page performance nodes corresponding to the page loading stage and the page rendering stage can be obtained at the same time.
[0095] It should be further noted that at least two page performance nodes corresponding to each stage can be but not limited to completely different. For example, the process of generating the page includes two stages, and page performance nodes corresponding to the first stage can be represented as a, b, and c, and page performance nodes corresponding to the second stage can be represented as c, d, and e.
[0096] Further, after obtaining data of at least two page performance nodes corresponding to each of at least two stages in the process of generating the page, the application program can save the data of at least two performance nodes corresponding to each stage to a preset storage space, respectively. It can be understood that the application program can generate multiple preset storage spaces before generating the page. Each preset storage space can store data of at least two page performance nodes corresponding to one stage, and the multiple preset storage spaces can be but not limited to stored in one space container.
[0097] When the page of the application is generated, the application can upload the page performance node data stored in the preset storage spaces to the server 202 corresponding to the application.
[0098] Here, the electronic device 201 shown in Figure 2 The application of the electronic device 201 can generate three preset storage spaces corresponding to the a stage, the b stage and the c stage before the page A is generated, and after obtaining the page performance data corresponding to the a1 node and the a2 node, the page performance data can be stored in the preset storage space corresponding to the a stage, after obtaining the page performance data corresponding to the b1 node and the b2 node, the page performance data can be stored in the preset storage space corresponding to the b stage, and after obtaining the page performance data corresponding to the c1 node and the c2 node, the page performance data can be stored in the preset storage space corresponding to the c stage.
[0099] When the page A is generated by the application of the electronic device 201, the page performance data in each preset storage space can be uploaded to the server 202 corresponding to the application.
[0100] Of course, it can also be understood that the application of the electronic device 201 can also upload the data corresponding to the generation of the preset storage space to the server 202 corresponding to the application, for example but not limited to uploading the start time and the end time corresponding to the generation of the preset storage space to the server 202 corresponding to the application, to provide more performance data about the page, and the present application is not limited thereto.
[0101] The electronic device 101 involved in the embodiments of the present application can be a smart phone, a tablet computer, a desktop computer, a laptop computer, a notebook computer, an ultra-mobile personal computer (UMPC), a handheld computer, a PC device, a personal digital assistant (PDA), a routing device, a virtual reality device, etc.
[0102] After the server 202 receives the data of at least two page performance nodes corresponding to each stage of the page generation process of the application, the server 202 can directly filter the target data from the plurality of page performance data, and the developers can optimize and improve the page in combination with the target data. Here, taking the application of the electronic device 201 generating a plurality of pages as an example, since the page performance data collected by the plurality of page performance nodes corresponding to different pages in the generation process is different, the server 202 can first determine the target page in the plurality of pages generated by the application of the electronic device 201, and according to the time stamp of the target page generation, the server 202 can filter the page performance data corresponding to the time stamp of the target page generation from the plurality of page performance data of the electronic device 201. The filtering method can be, but is not limited to, filtering the time period corresponding to the time stamp of the target page generation from the plurality of page performance data.
[0103] The server 202 involved in the embodiments of the present application is specifically but not limited to a hardware server, a virtual server, a cloud server, etc., and can also be a terminal, specifically but not limited to a desktop, a laptop, a notebook computer, an ultra-mobile personal computer (UMPC), a handheld computer, a netbook, a personal digital assistant (PDA), a routing device, a gateway device, etc.
[0104] Next, the present application will take the electronic device as the execution subject to explain the generation method of the page performance data in multiple embodiments.
[0105] Please refer to Figure 3 , Figure 3 The flowchart of the generation method of the page performance data provided by the embodiments of the present application is shown.
[0106] As Figure 3 shown, the generation method of the page performance data can at least include the following steps:
[0107] Step 302, obtaining the data of at least two performance nodes corresponding to each stage in the generation process of the target page.
[0108] Specifically, the electronic device can first install an application program for generating a target page, open the application program for generating the target page in the main interface of the electronic device according to a user operation, and generate a target interface. Here, the target interface is taken as an example of the main interface of the application program, the electronic device can open the application icon according to the operation of the user selecting the icon corresponding to the application program, and display the main interface generated by the application program in the interface. It can be understood that the target interface can also be a sub-interface of the application program, for example, the electronic device can also generate a corresponding target interface according to the control selected by the user in the main interface of the application program after displaying the main interface of the application program.
[0109] The target page can include at least two stages in the generation process, for example, the generation process of the target page includes three stages of page creation stage, page loading stage and page rendering stage, the electronic device will experience the page creation stage, the page loading stage and the page rendering stage when generating the target page, wherein the page creation stage can have at least two performance nodes for obtaining performance data of the page in the creation process, and the at least two performance nodes can obtain the performance data of the target page in the creation process when the target page is in the page creation stage. The page loading stage can have at least two performance nodes for obtaining performance data of the page in the loading process, and the at least two performance nodes can obtain the performance data of the target page in the loading process when the target page is in the page loading stage. The page rendering stage can have at least two performance nodes for obtaining performance data of the page in the rendering process, and the at least two performance nodes can obtain the performance data of the target page in the rendering process when the target page is in the page rendering stage.
[0110] It can be understood that the present application is not limited to the three stages of page creation stage, page loading stage and page rendering stage mentioned above, for example, it can also be two stages of page creation stage and page completion stage, and when the target page disappears, the generation process of the target page can also include but is not limited to a page disappearance stage or a page destruction stage. The page disappearance stage can be understood as that the target page jumps to other pages, for example, the user can select other controls in the target interface displayed by the electronic device to generate corresponding other interfaces, and the user can also return to the target interface through the other interfaces. The page destruction stage can be understood as that the target page disappears, and the target page can only be regenerated, for example, the user can close the application program corresponding to the target interface in the electronic device or perform the operation of shutting down the electronic device, etc.
[0111] Step 304, save the data of the at least two performance nodes corresponding to each stage to the preset storage space.
[0112] Specifically, after obtaining the data of the at least two performance nodes corresponding to each stage of the target interface respectively, the electronic device can save the data of the at least two performance nodes corresponding to each stage of the target interface respectively into a preset storage space. It can be understood that, before obtaining the data of the at least two performance nodes corresponding to each stage of the target interface (or during the generation of the target page), the electronic device can generate the storage space for saving the data of the plurality of performance nodes, for example, but not limited to, during the generation of the target page, the electronic device can create a model for storing the plurality of performance data, and the model can include a plurality of storage spaces, each of which can correspond to each stage of the generation of the target page.
[0113] It can also be understood that, the storage space can be arranged under a specified storage path of the electronic device, or arranged in an application program, which is not limited in the present application.
[0114] In the embodiments of the present application, the electronic device can obtain a plurality of page performance data with correlation according to the generation process of the page, which not only improves the aggregation of the page performance data, but also saves the input cost of the background R&D personnel in the process of obtaining the page performance data, and brings a more convenient experience to the background R&D personnel.
[0115] As an option of the present embodiment, before obtaining the data of the at least two performance nodes corresponding to each stage of the generation of the target page, the method further includes:
[0116] obtaining a generation instruction of the target page;
[0117] determining at least two life cycle points in the generation process of the target page according to the generation instruction of the target page;
[0118] taking the stages corresponding to the at least two life cycle points as the at least two stages contained in the generation process of the target page.
[0119] Specifically, the electronic device can first obtain the generation instruction of the target page to determine the target page to be generated. Possibly, when the generation instruction of the target page is a user operation, the electronic device can determine the target application corresponding to the target page and the target page to be generated in the target application according to the user operation, for example, the electronic device can first enter the target application according to the user's operation of clicking the target application icon corresponding to the target page, and then can take the main interface of the target application and / or the sub-interface of the target application as the target interface according to the user's touch operation. Possibly, when the generation instruction of the target page is a default program, the electronic device can automatically determine the target application corresponding to the target page and the target page to be generated in the target application according to the default program.
[0120] It should be noted that the electronic device can obtain the page performance data of all pages generated by the target application including the target page, and can obtain the page performance data corresponding to the target page by screening, etc.
[0121] Further, after the electronic device obtains the generation instruction of the target page, the generation process of the target page is entered, and at least two life cycle points of the target page are determined in the generation process of the target page. For reference, see Figure 4 The life cycle of the page provided by the embodiment of the application is shown in the schematic diagram, as shown in Figure 4 As shown, the life cycle of the page can include but is not limited to four life cycle points, which can be represented as life cycle point D, life cycle point E, life cycle point F and life cycle point G, respectively, and the entire generation process of the page can pass through life cycle point D, life cycle point F, life cycle point F and life cycle point G in turn. The life cycle point D can represent the creation period of the page, the life cycle point E can represent the generation period of the page, the life cycle point F can represent the disappearance period of the page, and the life cycle point G can represent the destruction period of the page.
[0122] Possibly, the at least two life cycle points of the target page determined in the generation process can be the life cycle point D and the life cycle point E mentioned above, that is, corresponding to the two periods from creation to generation of the target page. Possibly, the at least two life cycle points of the target page determined in the generation process can be the life cycle point D, the life cycle point E and the life cycle point F mentioned above, that is, corresponding to the three periods from creation to generation to disappearance of the target page, and it can be indicated that the target page has been jumped to other pages. Possibly, the at least two life cycle points of the target page determined in the generation process can be the life cycle point D, the life cycle point E, the life cycle point F and the life cycle point G mentioned above, that is, corresponding to the four periods from creation to generation, disappearance to destruction of the target page, and it can be indicated that the target page needs to be regenerated.
[0123] Further, after determining the at least two life cycle points of the target page, the electronic device can generate the stages in the generation process of the target page corresponding to the at least two life cycle points respectively as the at least two stages included in the generation process of the target page. It can be understood that each life cycle point of the target page can correspond to one or more stages in the generation process of the target page. Taking the life cycle point D, the life cycle point E, the life cycle point F and the life cycle point G mentioned above as examples, the life cycle point D can represent the creation period of the page, that is, can at least correspond to the creation stage of the page. The life cycle point E can represent the generation period of the page, that is, can at least correspond to the loading stage and the rendering stage of the page. The life cycle point F can represent the disappearance period of the page, that is, can at least correspond to the disappearance stage of the page. The life cycle point G can represent the destruction stage of the page, that is, can at least correspond to the destruction stage of the page.
[0124] Possibly, when the at least two life cycle points determined in the generation process of the target page are the life cycle point D and the life cycle point E mentioned above, it can be determined that the at least two stages included in the generation process of the target page are the page creation stage, the page loading stage and the page rendering stage respectively. Possibly, when the at least two life cycle points determined in the generation process of the target page are the life cycle point D, the life cycle point E and the life cycle point F mentioned above, it can be determined that the at least two stages included in the generation process of the target page are the page creation stage, the page loading stage, the page rendering stage and the page disappearance stage respectively. Possibly, when the at least two life cycle points determined in the generation process of the target page are the life cycle point D, the life cycle point E, the life cycle point F and the life cycle point G mentioned above, it can be determined that the at least two stages included in the generation process of the target page are the page creation stage, the page loading stage, the page rendering stage, the page disappearance stage and the page destruction stage respectively.
[0125] In the embodiments of the present application, the stages passed by the target page can be further accurately obtained through the life cycle points determined in the generation process of the target page, and then the corresponding page performance data is obtained, so as to guarantee the accuracy of the page performance data of each stage in the generation process of the target page.
[0126] As another alternative of the present embodiment, the generation process of the target page includes the page creation stage, the page loading stage and the page rendering stage.
[0127] The data of the at least two performance nodes corresponding to each stage respectively in the at least two stages included in the generation process of the target page is obtained, including:
[0128] obtaining data of a version performance node, a network performance node, a name performance node and a creation time performance node corresponding to the target page in a page creation stage in the generating process;
[0129] obtaining data of a protocol performance node, a domain name performance node, a resource performance node and a loading time performance node corresponding to the target page in a page loading stage in the generating process;
[0130] obtaining data of a rendering time performance node, an interaction time performance node and a loading type performance node corresponding to the target page in a page rendering stage in the generating process.
[0131] Specifically, when it is determined that the target page in the generating process contains at least two stages of a page creation stage, a page loading stage and a page rendering stage, data of a plurality of performance nodes corresponding to the page creation stage, the page loading stage and the page rendering stage respectively can be obtained.
[0132] The page performance nodes corresponding to the target page in the page creation stage can include, but are not limited to, the version performance node, the network performance node, the name performance node and the creation time performance node. It can be understood that the version performance node can be used to detect the current version number of the application program used to generate the target page, the network performance node can be used to detect the network standard of the application program used to generate the target page, the name performance node can be used to detect the page name of the target page, and the creation time performance node can be used to detect the total time consumption of the target page from the page creation stage to the complete generation of the target page.
[0133] Of course, the page performance nodes corresponding to the target page in the page creation stage in the present application can also include other page performance nodes, such as a system performance node that can be used to detect the electronic device system and system version of the application program used to generate the target page. It can also be understood that the page creation stage can be the first stage in the generating process of the target page, and the page performance nodes corresponding to the page creation stage can also include a page performance node used to detect the time consumption of the electronic device in generating a preset storage space, for example, a model for storing page performance data can be created in the process of the electronic device generating the target page, and the page performance nodes corresponding to the page creation stage can also include a performance node used to record the start time of the model for storing page performance data and a performance node used to record the end time of the model for storing page performance data. Here, the end time of the model can be understood as the corresponding time when the plurality of page performance data of the target page is saved to the different storage spaces of the model, and the present application is not limited thereto.
[0134] The page performance nodes corresponding to the target page in the page loading stage can include, but are not limited to, a protocol performance node, a domain name performance node, a resource performance node, and a loading time performance node. It can be understood that the protocol performance node, the domain name performance node, and the resource performance node mentioned above can correspond to each process in the page loading stage of the target page. For example, the protocol performance node can be used to detect the transmission protocol in the loading process of the target page, the domain name performance node can be used to detect the domain name accessed in the loading process of the target page, the resource performance node can be used to detect the network resource downloaded in the loading process of the target page, and the loading time performance node can be used to detect the total time consumption from the start of the page loading stage to the complete generation of the target page.
[0135] Of course, the page performance nodes corresponding to the target page in the page loading stage in the present application can also include other page performance nodes, such as a performance node that can be used to detect the loading type in the loading process of the target page. Here, the loading type can be understood as the other page advancing to the target page, the other page backing up to the target page, or the other page switching to the target page, and the like.
[0136] It can also be understood that the total time consumption of the target page from the page creation stage to the complete generation of the target page in the present application can be equal to the total time consumption of the target page from the page loading stage to the complete generation of the target page, that is, the start time of the creation stage of the target page is the same as the start time of the loading stage of the target page. Possibly, the total time consumption of the target page from the page creation stage to the complete generation of the target page in the present application can not be equal to the total time consumption of the target page from the page loading stage to the complete generation of the target page, that is, the start time of the creation stage of the target page is earlier than the start time of the loading stage of the target page.
[0137] The page performance nodes corresponding to the target page in the page rendering stage can include, but are not limited to, a rendering time performance node, an interaction time performance node, and a loading type performance node. It can be understood that the rendering time performance node can be used to detect the total time consumption of the target page from the start of the page rendering stage to the complete generation of the target page, the interaction time performance node can be used to detect the time consumption of the user operation in the process from the complete generation of the target page to the jump to the other page or to detect the time consumption of the user operation in the process from the complete generation of the target page to the closing of the target page, and the loading type performance node can be used to detect the loading type of each rendering object in the rendering process of the target page.
[0138] It should be noted that the other page performance nodes corresponding to the target page in the page rendering stage can also correspond to each process in the page rendering stage of the target page, such as, but not limited to, a route performance node, a protocol performance node, a domain name performance node, and a resource performance node, and the like, which will not be described here.
[0139] It can also be understood that the total time consumed from the beginning of the page creation stage to the completion of the target page in the present application can be equal to the total time consumed from the beginning of the page rendering stage to the completion of the target page, that is, the beginning time of the creation stage of the target page is the same as the beginning time of the rendering stage of the target page. Possibly, the total time consumed from the beginning of the page creation stage to the completion of the target page in the present application can not be equal to the total time consumed from the beginning of the page rendering stage to the completion of the target page, that is, the beginning time of the creation stage of the target page is earlier than the beginning time of the rendering stage of the target page.
[0140] As another optional of the present embodiment, after obtaining the data of at least two performance nodes corresponding to each of the at least two stages included in the generation process of the target page, before saving the data of the at least two performance nodes corresponding to each of the stages into the preset storage space, respectively, the method further comprises:
[0141] respectively obtaining attribute data, environment data and extension data corresponding to the page creation stage, the page loading stage and the page rendering stage in the generation process of the target page;
[0142] respectively saving the data of the at least two performance nodes corresponding to each of the stages into the preset storage space, comprising:
[0143] respectively saving the data of the at least two performance nodes, the attribute data, the environment data and the extension data corresponding to the page creation stage, the page loading stage and the page rendering stage into the preset storage space.
[0144] Specifically, after the electronic device obtains the data of the version performance node, the network performance node, the name performance node and the creation time performance node corresponding to the page creation stage of the target page, it can also obtain the attribute data, the environment data and the extension data corresponding to the page creation stage of the target page. The attribute data corresponding to the page creation stage can include at least one of the error code, the startup type, the jump type, the external link website or the page name corresponding to the page creation stage of the target page, the environment data corresponding to the page creation stage can include at least one of the request network times, the number of loaded pictures or the background processing times corresponding to the page creation stage of the target page, and the extension data corresponding to the page creation stage can include a plurality of types of extension data packets, such as extension data packet A1, extension data packet B1 or extension data packet C1, etc.
[0145] When the electronic device obtains the data of the protocol performance node, the domain name performance node, the resource performance node and the loading time performance node corresponding to the target page in the page loading stage, the electronic device can further obtain attribute data, environment data and extension data corresponding to the target page in the page loading stage. The attribute data corresponding to the page loading stage can include at least one of error code, startup type, jump type, external link website or page name corresponding to the target page in the page loading stage. The environment data corresponding to the page loading stage can include at least one of request network times, loading picture quantity or background processing times corresponding to the target page in the page loading stage. The extension data corresponding to the page loading stage can include various types of extension data packets, such as extension data packet A2, extension data packet B2 or extension data packet C2.
[0146] When the electronic device obtains the data of the rendering time performance node, the interaction time performance node and the loading type performance node corresponding to the target page in the page rendering stage, the electronic device can further obtain attribute data, environment data and extension data corresponding to the target page in the page rendering stage. The attribute data corresponding to the page rendering stage can include at least one of error code, startup type, jump type, external link website or page name corresponding to the target page in the page rendering stage. The environment data corresponding to the page rendering stage can include at least one of request network times, loading picture quantity or background processing times corresponding to the target page in the page rendering stage. The extension data corresponding to the page rendering stage can include various types of extension data packets, such as extension data packet A3, extension data packet B3 or extension data packet C3.
[0147] Further, the electronic device can save all page performance nodes corresponding to the page creation stage, all page performance nodes corresponding to the page loading stage and all page performance nodes corresponding to the page rendering stage into the storage space preset for each stage, respectively.
[0148] Please refer to Figure 5 , Figure 5 A flowchart of another method for generating page performance data provided by an embodiment of the present application is shown.
[0149] As Figure 5 shown, the method for generating page performance data can include at least the following steps:
[0150] Step 502: Obtain data of at least two performance nodes corresponding to each stage in at least two stages included in the generation process of the target page.
[0151] Specifically, step 502 is consistent with step 302, and will not be described in detail here.
[0152] At step 504, the data of the at least two performance nodes corresponding to each stage is respectively saved into a preset storage space.
[0153] Specifically, step 504 is consistent with step 304, and thus will not be described in detail here.
[0154] At step 506, after the target page disappears, the data of the at least two performance nodes corresponding to the page disappearance stage of the target page is obtained.
[0155] Specifically, after the electronic device generates the target page, the interactive operation or interactive instruction of the user can be obtained based on the target page. Possibly, the electronic device can display the page corresponding to the user operation in the target page according to the finger sliding operation (or mouse sliding operation) of the user, so as to facilitate the user to browse the target page. Possibly, the electronic device can also jump from the target page to other pages or close the target page according to the finger clicking operation (or mouse clicking operation) of the user.
[0156] When the electronic device detects that the target page disappears according to the obtained user operation or instruction, the data of the at least two performance nodes corresponding to the page disappearance stage of the target page can be obtained. The at least two performance nodes corresponding to the page disappearance stage can include a jump time performance node and a page time consumption performance node, that is, the target page jumps to other pages according to the obtained user operation or instruction, and here the jump time performance node can be used to detect the time consumption of the target page jumping to other pages, and the page time consumption performance node can be used to detect the page display time consumption of the target page from complete generation to jumping to other pages.
[0157] It can be understood that the target page in the page disappearance stage can correspond to the jump time performance node and the page time consumption performance node mentioned above, but is not limited to this, and can also include page performance nodes corresponding to each process of the page disappearance stage, such as a routing performance node, a protocol performance node, a domain name performance node, and a resource performance node, and thus will not be described in detail here.
[0158] The at least two performance nodes corresponding to the page disappearance stage can also include a destruction time performance node and a page time consumption performance node, that is, the target page is closed according to the obtained user operation or instruction, and here the destruction time performance node can be used to detect the time consumption of the target page in the destruction process, and the page time consumption performance node can be used to detect the page display time consumption of the target page from complete generation to the entire closing process.
[0159] Of course, the at least two performance nodes corresponding to the page disappearance stage in the present application can also include a jump time performance node, a destroy time performance node, and the page time consumption performance node, that is, according to the interactive operation or interactive instruction of the user, the target page is first jumped to other pages, and then the target page is closed or the target page and the jumped other pages are closed, which is not limited thereto.
[0160] It can also be understood that the disappearance stage of the target page can be determined according to the stage corresponding to the life cycle point of the target page mentioned above. Possibly, when the life cycle point for indicating the disappearance period of the page is determined in the generation process of the target page, the stage corresponding to the life cycle point can be taken as the page disappearance stage. Possibly, when the life cycle point for indicating the disappearance period of the page and the life cycle point for indicating the destruction period of the page are determined in the generation process of the target page, the stages corresponding to the two life cycle points can be taken as the page disappearance stage together. At this time, the at least two performance nodes corresponding to the page disappearance stage can also include a jump time performance node, a destroy time performance node, and the page time consumption performance node.
[0161] Step 508, saving the data of the at least two performance nodes corresponding to the page disappearance stage to the corresponding preset storage space.
[0162] Specifically, after obtaining the data of the at least two performance nodes corresponding to the page disappearance stage of the target interface, the electronic device can save the data of the at least two performance nodes to the preset storage space. It can be understood that the electronic device can generate a storage space for saving the data of the plurality of performance nodes before the data of the at least two performance nodes corresponding to the page disappearance stage of the target page (or during the generation process of the target page). For example, but not limited to, the electronic device creates a model for storing a plurality of performance data during the generation process of the target page. The model can include a plurality of storage spaces, and each storage space can correspond to each stage in the generation process of the target page.
[0163] It can also be understood that the storage space can be set under a specified storage path of the electronic device, or can be set in an application, which is not limited thereto.
[0164] As an option of the present embodiment, before saving the data of the at least two performance nodes corresponding to the page disappearance stage to the corresponding preset storage space after obtaining the data of the at least two performance nodes corresponding to the page disappearance stage of the target page, the method further includes:
[0165] Obtaining attribute data, environment data, and extension data corresponding to the page disappearance stage of the target page;
[0166] The data of the at least two performance nodes corresponding to the page disappearance stage is saved into a preset storage space, including:
[0167] The data of the at least two performance nodes corresponding to the page disappearance stage and attribute data, environment data and extension data are saved into a preset storage space.
[0168] Specifically, after the electronic device acquires the data of the at least two page performance nodes corresponding to the page disappearance stage of the target page, the attribute data, environment data and extension data corresponding to the page disappearance stage of the target page can also be acquired. The attribute data corresponding to the page disappearance stage can include at least one of error code, start type, jump type, external link website or page name of the target page corresponding to the page disappearance stage, the environment data corresponding to the page disappearance stage can include at least one of request network number, loaded picture number or background processing number of the target page corresponding to the page disappearance stage, and the extension data corresponding to the page disappearance stage can include various types of extension data packets, such as extension data packet A4, extension data packet B4 or extension data packet C4, etc.
[0169] Further, the electronic device can save all page performance nodes corresponding to the page disappearance stage into a preset storage space corresponding to the page disappearance stage.
[0170] Herein Figure 6 A page performance data generation scene provided by the embodiment of the present application is shown. As shown in Figure 6 The electronic device can generate a target page storage space in the generation process of the target page, which can be associated with two storage subspaces, which can be respectively represented as storage subspace 1 corresponding to stage 1 in the generation process of the target page and storage subspace 2 corresponding to stage 2 in the generation process of the target page. The storage subspace 1 can be used to store the page performance data 1, attribute data 1, environment data 1 and extension data 1 acquired in stage 1 in the generation process of the target page, and the storage subspace 2 can be used to store the page performance data 2, attribute data 2, environment data 2 and extension data 2 acquired in stage 2 in the generation process of the target page. It can be understood that the target page storage space can also store the start storage time and the end storage time of the target page storage space, and the above-mentioned page performance data 1, attribute data 1, environment data 1, extension data 1, page performance data 2, attribute data 2, environment data 2, extension data 2, start storage time and end storage time of the target page storage space can be uploaded to the server corresponding to the target page, so as to facilitate the optimization and improvement of the target page by the researchers.
[0171] Please refer to Figure 7 , Figure 7A structural schematic diagram of a page performance data generation apparatus is shown.
[0172] As shown in Figure 7 The page performance data generation apparatus 700 can at least include a first obtaining module 701 and a first storage module 702, wherein:
[0173] The first obtaining module 701 is configured to obtain data of at least two performance nodes corresponding to each stage respectively in at least two stages included in a generation process of a target page.
[0174] The first storage module 702 is configured to save the data of the at least two performance nodes corresponding to each stage into a preset storage space respectively, wherein the preset storage spaces corresponding to each stage are different.
[0175] In some possible embodiments, the apparatus further includes:
[0176] The second obtaining module is configured to obtain a generation instruction of the target page before obtaining the data of the at least two performance nodes corresponding to each stage respectively in the at least two stages included in the generation process of the target page.
[0177] The first processing module is configured to determine at least two life cycle points in the generation process of the target page according to the generation instruction of the target page.
[0178] The determining module is configured to determine stages corresponding to the at least two life cycle points respectively as the at least two stages included in the generation process of the target page.
[0179] In some possible embodiments, the generation process of the target page includes a page creation stage, a page loading stage and a page rendering stage.
[0180] The first obtaining module 701 specifically includes:
[0181] The first obtaining module 701 specifically includes:
[0182] The first obtaining module 701 specifically includes:
[0183] The first obtaining module 701 specifically includes:
[0184] In some possible embodiments, the apparatus further includes:
[0185] The third obtaining module is configured to, after obtaining the data of the at least two performance nodes corresponding to each stage respectively in the generating process of the target page, and before saving the data of the at least two performance nodes corresponding to each stage into the preset storage space respectively, obtain attribute data, environment data and extension data corresponding to a page creation stage, a page loading stage and a page rendering stage respectively in the generating process of the target page.
[0186] The first storage module 702 specifically includes:
[0187] The data of the at least two performance nodes corresponding to each stage respectively, the attribute data, the environment data and the extension data corresponding to the page creation stage, the page loading stage and the page rendering stage respectively are saved into the preset storage space.
[0188] In some possible embodiments, the apparatus further includes:
[0189] The fourth obtaining module is configured to, after saving the data of the at least two performance nodes corresponding to each stage into the preset storage space respectively, obtain data of at least two performance nodes corresponding to a page disappearance stage after the target page disappears.
[0190] The second storage module is configured to save the data of the at least two performance nodes corresponding to the page disappearance stage into the corresponding preset storage space.
[0191] In some possible embodiments, the at least two performance nodes corresponding to the page disappearance stage include a jump time performance node and a page time consumption performance node; or
[0192] The at least two performance nodes corresponding to the page disappearance stage include a destroy time performance node and a page time consumption performance node.
[0193] In some possible embodiments, the apparatus further includes:
[0194] The fifth obtaining module is configured to, after obtaining the data of the at least two performance nodes corresponding to the page disappearance stage of the target page, and before saving the data of the at least two performance nodes corresponding to the page disappearance stage into the corresponding preset storage space, obtain attribute data, environment data and extension data corresponding to the page disappearance stage of the target page.
[0195] The second storage module specifically includes:
[0196] The data of the at least two performance nodes corresponding to the page disappearance stage and the attribute data, the environment data and the extension data are saved into the preset storage space.
[0197] In some possible embodiments, the apparatus further includes:
[0198] The second processing module is configured to, after saving the data of the at least two performance nodes corresponding to the page disappearance stage to the corresponding preset storage space, respectively call out the data of the at least two performance nodes, attribute data, environment data and extension data of the target page corresponding to each stage from the respective preset storage space corresponding to each stage.
[0199] The uploading module is configured to upload the data of the at least two performance nodes, attribute data, environment data and extension data of the target page corresponding to each stage to the target server.
[0200] Please refer to Figure 8 , Figure 8 A structural schematic diagram of an electronic device is shown.
[0201] As Figure 8 shown, the electronic device 800 can include at least one processor 801, at least one network interface 804, a user interface 803, a memory 805 and at least one communication bus 802.
[0202] The communication bus 802 can be used to realize the connection and communication of the above-mentioned components.
[0203] The user interface 803 can include a key, and the optional user interface can further include a standard wired interface, a wireless interface.
[0204] The network interface 804 can include, but is not limited to, a Bluetooth module, an NFC module, a Wi-Fi module, etc.
[0205] The processor 801 can include one or more processing cores. The processor 801 connects various parts in the electronic device 800 through various interfaces and lines, executes various functions of the routing device 800 and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 805, and calling data stored in the memory 805. Optionally, the processor 801 can be realized by at least one of DSP, FPGA and PLA. The processor 801 can integrate CPU, GPU and modem, etc. in combination of one or several. Among them, the CPU mainly processes operating systems, user interfaces and application programs, etc.; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; and the modem is used for processing wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 801, but realized by a separate chip.
[0206] The memory 805 can include a RAM and can also include a ROM. Optionally, the memory 805 includes a non-transitory computer-readable medium. The memory 805 can be used to store instructions, programs, codes, code sets, or instruction sets. The memory 805 can include a program storage area and a data storage area, where the program storage area can store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, etc.; the data storage area can store data involved in the various method embodiments above, etc. The memory 805 can optionally be at least one storage device located away from the aforementioned processor 801. As shown in FIG. 8, the memory 805 as a computer storage medium can include an operating system, a network communication module, a user interface module, and a page performance data generation application. Figure 8 The processor 801 can be used to invoke the page performance data generation application stored in the memory 805 and specifically perform the following operations:
[0207] Specifically, the processor 801 can be used to invoke the page performance data generation application stored in the memory 805 and specifically perform the following operations:
[0208] Obtain data of at least two performance nodes corresponding to each of at least two stages included in the generation process of the target page;
[0209] Save the data of the at least two performance nodes corresponding to each of the stages to a preset storage space respectively; where the preset storage spaces corresponding to each of the stages are different.
[0210] In some possible embodiments, before the processor 801 obtains the data of at least two performance nodes corresponding to each of at least two stages included in the generation process of the target page, the processor 801 is further used to perform:
[0211] Obtain a generation instruction of the target page;
[0212] Determine at least two life cycle points in the generation process of the target page according to the generation instruction of the target page;
[0213] Take the stages corresponding to the at least two life cycle points respectively as the at least two stages included in the generation process of the target page.
[0214] In some possible embodiments, the generation process of the target page includes a page creation stage, a page loading stage, and a page rendering stage.
[0215] When the processor 801 obtains the data of at least two performance nodes corresponding to each of at least two stages included in the generation process of the target page, the processor 801 specifically performs:
[0216] obtaining data of a version performance node, a network performance node, a name performance node and a creation time performance node corresponding to a page creation stage of the target page in a generation process;
[0217] obtaining data of a protocol performance node, a domain name performance node, a resource performance node and a loading time performance node corresponding to a page loading stage of the target page in the generation process;
[0218] obtaining data of a rendering time performance node, an interaction time performance node and a loading type performance node corresponding to a page rendering stage of the target page in the generation process.
[0219] In some possible embodiments, after the processor 801 obtains the data of the at least two performance nodes corresponding to each of the at least two stages included in the generation process of the target page, and before the processor 801 respectively saves the data of the at least two performance nodes corresponding to each of the stages into the preset storage space, the processor 801 is further configured to perform the following operations:
[0220] respectively obtaining attribute data, environment data and extension data corresponding to the page creation stage, the page loading stage and the page rendering stage of the target page in the generation process;
[0221] respectively saving the data of the at least two performance nodes corresponding to each of the stages into the preset storage space, including:
[0222] respectively saving the data of the at least two performance nodes, the attribute data, the environment data and the extension data corresponding to the page creation stage, the page loading stage and the page rendering stage into the preset storage space.
[0223] In some possible embodiments, after the processor 801 respectively saves the data of the at least two performance nodes corresponding to each of the stages into the preset storage space, the processor 801 is further configured to perform the following operations:
[0224] after the target page disappears, obtaining data of at least two performance nodes corresponding to a page disappearance stage of the target page;
[0225] saving the data of the at least two performance nodes corresponding to the page disappearance stage into a corresponding preset storage space.
[0226] In some possible embodiments, the at least two performance nodes corresponding to the page disappearance stage include a jump time performance node and a page time consumption performance node; or
[0227] the at least two performance nodes corresponding to the page disappearance stage include a destruction time performance node and a page time consumption performance node.
[0228] In some possible embodiments, after obtaining the data of the at least two performance nodes corresponding to the page disappearance stage of the target page, the processor 801 is further configured to perform the following before saving the data of the at least two performance nodes corresponding to the page disappearance stage to the corresponding preset storage space:
[0229] obtain attribute data, environment data, and extension data corresponding to the page disappearance stage of the target page;
[0230] saving the data of the at least two performance nodes corresponding to the page disappearance stage to the preset storage space includes:
[0231] saving the data of the at least two performance nodes corresponding to the page disappearance stage and the attribute data, the environment data, and the extension data to the preset storage space.
[0232] In some possible embodiments, after saving the data of the at least two performance nodes corresponding to the page disappearance stage to the corresponding preset storage space, the processor 801 is further configured to perform the following:
[0233] respectively calling the data of the at least two performance nodes corresponding to each stage, the attribute data, the environment data, and the extension data of the target page from the respective preset storage space corresponding to each stage;
[0234] uploading the data of the at least two performance nodes corresponding to each stage, the attribute data, the environment data, and the extension data of the target page to the target server.
[0235] The embodiments of the present application further provide a computer readable storage medium, which stores instructions. When the instructions are run on a computer or a processor, the computer or the processor performs one or more steps of the above-mentioned embodiments. Figure 3 or Figure 5 The constituent modules of the above-mentioned electronic device, if realized in the form of software function units and sold or used as independent products, can be stored in the computer readable storage medium.
[0236] In the above embodiments, all or part of the methods can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the methods can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in or transmitted by a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through a wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available media sets. The available media can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital versatile disc (DVD)), or a semiconductor medium (for example, a solid state disk (SSD)), etc.
[0237] Those of ordinary skill in the art understand that all or part of the processes in the above-described embodiments can be implemented by a computer program instructing relevant hardware, which can be stored in a computer-readable storage medium. The program can include the processes of the above-described embodiments when executed. The storage medium includes ROM, RAM, magnetic or optical disks, and various media that can store program codes. In the absence of conflicts, the technical features in the embodiments and implementations can be combined arbitrarily.
[0238] The above-described embodiments are merely preferred embodiments of the present application and do not limit the scope of the present application. Those of ordinary skill in the art can make various modifications and improvements to the technical solutions of the present application without departing from the design spirit of the present application, which should fall within the protection scope of the claims of the present application.
Claims
1. A method of generating page performance data, characterized by, The method comprises the following steps: acquiring data of at least two performance nodes corresponding to each stage in at least two stages included in a generation process of a target page, wherein the generation process of the target page comprises a page creation stage, a page loading stage and a page rendering stage; saving the data of the at least two performance nodes corresponding to each stage into a preset storage space respectively, wherein the preset storage spaces corresponding to each stage are different; after the saving of the data of the at least two performance nodes corresponding to each stage into the preset storage space respectively, the method further comprises the following steps: acquiring data of at least two performance nodes corresponding to a page disappearance stage of the target page after the target page disappears; saving the data of the at least two performance nodes corresponding to the page disappearance stage into a corresponding preset storage space, wherein the page disappearance stage of the target page is determined according to a stage corresponding to a life cycle point of the target page; after the acquiring of the data of the at least two performance nodes corresponding to the page disappearance stage of the target page and before the saving of the data of the at least two performance nodes corresponding to the page disappearance stage into the corresponding preset storage space, the method further comprises the following steps: acquiring attribute data, environment data and extension data corresponding to the page disappearance stage of the target page, wherein the attribute data comprises at least one of error code, start type, jump type, external link website or page name corresponding to the page creation stage of the target page, and the environment data comprises at least one of request network number, loaded image number or background processing number corresponding to the page creation stage of the target page; the saving of the data of the at least two performance nodes corresponding to the page disappearance stage into the corresponding preset storage space comprises the following step: saving the data of the at least two performance nodes corresponding to the page disappearance stage and the attribute data, the environment data and the extension data into the preset storage space.
2. The method of claim 1, wherein, before the acquiring of the data of the at least two performance nodes corresponding to each stage in the at least two stages included in the generation process of the target page, the method further comprises the following steps: acquiring a generation instruction of the target page; determining at least two life cycle points in the generation process of the target page according to the generation instruction of the target page; taking stages corresponding to the at least two life cycle points as the at least two stages included in the generation process of the target page.
3. The method of claim 1, wherein, the acquiring of the data of the at least two performance nodes corresponding to each stage in the at least two stages included in the generation process of the target page comprises the following steps: acquiring data of a version performance node, a network performance node, a name performance node and a creation time performance node corresponding to the page creation stage in the generation process of the target page; acquiring data of a protocol performance node, a domain name performance node, a resource performance node and a loading time performance node corresponding to the page loading stage in the generation process of the target page; acquiring data of a rendering time performance node, an interaction time performance node and a loading type performance node corresponding to the page rendering stage in the generation process of the target page.
4. The method of claim 3, wherein, Before the saving of the data of the at least two performance nodes corresponding to each stage into the preset storage space, the method further comprises: acquiring attribute data, environment data and extension data corresponding to the page creation stage, the page loading stage and the page rendering stage respectively; the saving of the data of the at least two performance nodes corresponding to each stage into the preset storage space comprises: the saving of the data of the at least two performance nodes, the attribute data, the environment data and the extension data corresponding to the page creation stage, the page loading stage and the page rendering stage respectively into the preset storage space.
5. The method of claim 1, wherein, The at least two performance nodes corresponding to the page disappearance stage comprise a jump time performance node and a page time consumption performance node; or The at least two performance nodes corresponding to the page disappearance stage comprise a destroy time performance node and the page time consumption performance node.
6. The method of claim 1, wherein, After the saving of the data of the at least two performance nodes corresponding to the page disappearance stage into the corresponding preset storage space, the method further comprises: calling the data of the at least two performance nodes, the attribute data, the environment data and the extension data corresponding to each stage from the preset storage space corresponding to each stage respectively; uploading the data of the at least two performance nodes, the attribute data, the environment data and the extension data corresponding to each stage to a target server.
7. An apparatus for generating page performance data, the apparatus comprising: comprises: a first acquisition module, configured to acquire data of at least two performance nodes corresponding to each stage in at least two stages included in a generation process of a target page, the target page comprising a page creation stage, a page loading stage and a page rendering stage; a first storage module, configured to save the data of the at least two performance nodes corresponding to each stage into a preset storage space respectively; wherein the preset storage space corresponding to each stage is different; The device further comprises: a fourth acquisition module, configured to acquire data of at least two performance nodes corresponding to a page disappearance stage of the target page after the disappearance of the target page, after the saving of the data of the at least two performance nodes corresponding to each stage into the preset storage space; a second storage module, configured to save the data of the at least two performance nodes corresponding to the page disappearance stage into a corresponding preset storage space, the page disappearance stage of the target page being determined according to a stage corresponding to a life cycle point of the target page; The device further comprises: The fifth obtaining module is configured to, after the data of the at least two performance nodes corresponding to the page disappearance stage of the target page is obtained and before the data of the at least two performance nodes corresponding to the page disappearance stage is saved into the corresponding preset storage space, obtain attribute data, environment data and extension data corresponding to the page disappearance stage of the target page, wherein the attribute data includes at least one of error code, startup type, jump type, external link website or page name corresponding to the page creation stage of the target page, and the environment data includes at least one of request network number, loaded picture number or background processing number corresponding to the page creation stage of the target page. The second storage module is configured to save the data of the at least two performance nodes corresponding to the page disappearance stage and the attribute data, environment data and extension data into the preset storage space.
8. The apparatus of claim 7, wherein, The device further comprises: The second obtaining module is configured to, before the data of the at least two performance nodes corresponding to each stage of the at least two stages included in the generation process of the target page is obtained, obtain the generation instruction of the target page. The first processing module is configured to determine at least two life cycle points in the generation process of the target page according to the generation instruction of the target page. The determining module is configured to take each corresponding stage of the at least two life cycle points as the at least two stages included in the generation process of the target page.
9. The apparatus of claim 7, wherein, The first obtaining module specifically comprises: The first obtaining module specifically comprises: The first obtaining module specifically comprises: The first obtaining module specifically comprises:
10. The apparatus of claim 9, wherein, The device further comprises: The third obtaining module is configured to, after the data of the at least two performance nodes corresponding to each stage of the at least two stages included in the generation process of the target page is obtained and before the data of the at least two performance nodes corresponding to each stage is saved into the preset storage space, respectively obtain attribute data, environment data and extension data corresponding to the page creation stage, page loading stage and page rendering stage in the generation process of the target page. The first storage module specifically comprises: The first storage module specifically comprises:
11. The apparatus of claim 7, wherein, The at least two performance nodes corresponding to the page disappearance stage include a jump time performance node and a page time consumption performance node; or The at least two performance nodes corresponding to the page disappearance stage include a destruction time performance node and the page time consumption performance node.
12. The apparatus of claim 7, wherein, The device further comprises: a second processing module, configured to, after saving the data of the at least two performance nodes corresponding to each of the page disappearance stages to the corresponding preset storage spaces, respectively call the data of the at least two performance nodes corresponding to each of the stages, attribute data, environment data and extension data of the target page from the respective preset storage spaces corresponding to each of the stages; an uploading module, configured to upload the data of the at least two performance nodes corresponding to each of the stages, attribute data, environment data and extension data of the target page to a target server.
13. An electronic device, comprising: comprising a processor and a memory; the processor is connected with the memory; the memory is configured to store executable program codes; the processor runs a program corresponding to the executable program codes by reading the executable program codes stored in the memory, so as to execute the page performance data generation method according to any one of claims 1-6.
14. A computer readable storage medium having stored thereon a computer program, characterized in that, the computer program is executed by the processor to implement the page performance data generation method according to any one of claims 1-6.
Citation Information
Patent Citations
Page performance data generation method and device, computer storage medium and terminal
CN113569168A