CN117009168A - Application index acquisition method, device, equipment and medium - Google Patents

Application index acquisition method, device, equipment and medium Download PDF

Info

Publication number
CN117009168A
CN117009168A CN202210470108.1A CN202210470108A CN117009168A CN 117009168 A CN117009168 A CN 117009168A CN 202210470108 A CN202210470108 A CN 202210470108A CN 117009168 A CN117009168 A CN 117009168A
Authority
CN
China
Prior art keywords
application
time
target sub
message
rendering
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210470108.1A
Other languages
Chinese (zh)
Inventor
佟领
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Youzhuju Network Technology Co Ltd
Original Assignee
Beijing Youzhuju Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Youzhuju Network Technology Co Ltd filed Critical Beijing Youzhuju Network Technology Co Ltd
Priority to CN202210470108.1A priority Critical patent/CN117009168A/en
Publication of CN117009168A publication Critical patent/CN117009168A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3438Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the disclosure relates to an application index acquisition method, an application index acquisition device and an application index acquisition medium, wherein the method comprises the following steps: and responding to the operation of the target sub-application in the micro front end, acquiring monitoring information, counting the target sub-application based on the monitoring information to obtain resource parameter information of the target sub-application, and obtaining the application index of the target sub-application based on the resource parameter information. Therefore, collection of sub-application performance indexes in the micro front end is achieved, and therefore sub-application performance indexes can be guided to complete performance optimization and improvement, and user experience and user retention rate are improved.

Description

Application index acquisition method, device, equipment and medium
Technical Field
The disclosure relates to the technical field of data processing, and in particular relates to a method, a device, equipment and a medium for acquiring an application index.
Background
In general, micro front-ends are an architectural style that is composed of multiple front-end applications delivered independently. In particular, front-end applications are broken down into smaller, simpler pieces that can be independently developed, tested, deployed, while still appearing to the user as cohesive, single products.
In the related art, for example, a browser may obtain information related to performance in a current page through an API (Application Programming Interface) for front-end performance monitoring (API), however, loading of sub-applications under the micro front-end is controlled by a main application, and performance statistics cannot be performed by using the API for front-end performance monitoring, so that performance indexes of all sub-applications under the micro front-end are missing, and thus targeted optimization processing cannot be performed through the performance indexes.
Disclosure of Invention
In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides an application index obtaining method, an apparatus, a device, and a medium.
The embodiment of the disclosure provides an application index obtaining method, which comprises the following steps:
responding to the operation of the target sub-application in the micro front end, and acquiring monitoring information;
counting the target sub-applications based on the monitoring information to obtain resource parameter information of the target sub-applications;
and obtaining the application index of the target sub-application based on the resource parameter information.
The embodiment of the disclosure also provides an application index obtaining device, which comprises:
the response triggering module is used for responding to the operation of the target sub-application in the micro front end and acquiring monitoring information;
The statistics module is used for carrying out statistics on the target sub-application based on the monitoring information to obtain resource parameter information of the target sub-application;
and the processing module is used for obtaining the application index of the target sub-application based on the resource parameter information.
The embodiment of the disclosure also provides an electronic device, which comprises: a processor; a memory for storing the processor-executable instructions; the processor is configured to read the executable instruction from the memory and execute the instruction to implement an application index obtaining method provided by an embodiment of the present disclosure.
The embodiment of the present disclosure also provides a computer-readable storage medium storing a computer program for executing the application index acquisition method as provided by the embodiment of the present disclosure.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages: according to the application index obtaining scheme provided by the embodiment of the disclosure, the monitoring information is obtained in response to the operation of the target sub-application in the micro front end, the target sub-application is counted based on the monitoring information, the resource parameter information of the target sub-application is obtained, and the application index of the target sub-application is obtained based on the resource parameter information. Therefore, collection of sub-application performance indexes in the micro front end is achieved, and sub-application performance indexes are used for guiding sub-application to complete performance optimization and improvement, and user experience and user retention rate are improved.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
Fig. 1 is a flow chart of an application index obtaining method according to an embodiment of the present disclosure;
fig. 2 is a flowchart of another method for obtaining an application index according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of an application display provided by an embodiment of the present disclosure;
FIG. 4 is a schematic illustration of another application presentation provided by an embodiment of the present disclosure;
fig. 5 is a schematic diagram of an application index obtaining method according to an embodiment of the present disclosure;
FIG. 6 is an exemplary diagram of an application index display provided by an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an application index obtaining device according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
In practical application, the front-end application is decomposed into a few smaller and simpler small blocks which can be independently developed, tested and deployed, and the front-end application is still a cohesive single product in the view of a user, for example, a cloud management platform is taken as a main application, and functions such as resource management, operation and service are taken as micro-front-end architecture of sub-applications, so that the main application controls the life cycle of the sub-applications, therefore, performance statistics of the micro-front-end application cannot be realized in a mode of collecting performance information of a current page through a browser interface in the related technology, and performance indexes of all sub-applications under the micro-front-end are lost, so that targeted optimization processing can not be performed through the performance indexes.
In view of the above problems, the present disclosure provides an application index obtaining method, by responding to an operation on a target sub-application in a micro front end, obtaining monitoring information, counting the target sub-application based on the monitoring information, obtaining resource parameter information of the target sub-application, and obtaining an application index of the target sub-application based on the resource parameter information.
Therefore, collection of sub-application performance indexes in the micro front end is achieved, and therefore sub-application performance indexes can be guided to complete performance optimization and improvement, and user experience and user retention rate are improved.
Specifically, fig. 1 is a schematic flow chart of an application index obtaining method according to an embodiment of the present disclosure, where the method may be performed by an application index obtaining device, and the device may be implemented by software and/or hardware, and may be generally integrated in an electronic device. As shown in fig. 1, the method includes:
and step 101, responding to the operation of the target sub-application in the micro front end and acquiring monitoring information.
Wherein, under the micro front end architecture, one main application contains one or more sub-applications. The target sub-application may be any one of the sub-applications. The monitoring information includes one or more of an operation notification message, a load notification message, a listening message, a rendering end message, a user operation message, a sub-application uninstall message, and the like.
In an embodiment of the present disclosure, in response to an operation on a target sub-application in a micro front end, obtaining monitoring information includes: and acquiring monitoring information based on the triggering operation of the user on the target sub-application control on the micro front-end page. The micro front-end page is used for displaying the main application and the sub-application, the target sub-application control is used for representing the target sub-application, and the target sub-application control is not limited in expression form, for example, the target sub-application control can be an icon or text information. For example, when a user clicks to open a target sub-application, a lifecycle hook function such as "BeforeLoad" is triggered to generate an operation notification message, and for example, when downloading of a resource corresponding to the target sub-application is finished, a lifecycle hook function "BeforeMount" is triggered to generate a loading notification message, and the like.
Specifically, in the process of displaying a plurality of sub-applications in the micro front-end page, triggering operation of a user on the micro front-end page can be detected, when operations such as clicking, hovering and the like of a target sub-application control by the user are detected, an operation notification message can be triggered, then loading notification messages are triggered when the downloading of the corresponding resources of the target sub-application is finished, and monitoring information such as monitoring messages is triggered when the loading of the resources is finished.
And 102, counting the target sub-applications based on the monitoring information to obtain the resource parameter information of the target sub-applications.
In the embodiment of the disclosure, different monitoring information is obtained, and the resource parameter information of the target sub-application is different. The resource parameter information comprises one or more of resource beginning downloading time, resource downloading ending time, resource beginning loading time, resource loading ending time, screen element beginning rendering time and screen element ending rendering time.
In the embodiment of the present disclosure, there are various ways of counting the target sub-application based on the monitoring information to obtain the resource parameter information of the target sub-application, and in some embodiments, the time for starting to download the resource of the target sub-application is recorded based on the operation notification message; in other embodiments, the resource start loading time of the target sub-application is recorded based on the loading notification message.
In still other embodiments, the resource start download time of the target sub-application is recorded based on the operation notification message, the resource start load time of the target sub-application is recorded based on the loading notification message, and the screen element start rendering time and the screen element end rendering time of the target sub-application are acquired based on the listening message.
The above three ways are merely examples of counting the target sub-application based on the monitoring information to obtain the resource parameter information of the target sub-application, and the present disclosure does not specifically limit the way of counting the target sub-application based on the monitoring information to obtain the resource parameter information of the target sub-application.
And step 103, obtaining the application index of the target sub-application based on the resource parameter information.
In the embodiment of the disclosure, different resource parameter information is acquired, and the application indexes of the calculated target sub-applications are different, so that corresponding resource parameter information can be acquired for the required application indexes according to the application scene requirements to calculate.
In the embodiment of the present disclosure, the application index refers to one or more of a resource download time, a white screen time and a first screen time; the resource downloading time refers to the time from the beginning of downloading the sub-application resource to the beginning of loading the resource; the white screen time refers to the time from the start of downloading the sub-application resource to the start of having content on the sub-application page; the first screen time refers to the time from the beginning of the download of the sub-application resource to the end of rendering of the first screen content of the sub-application.
In the embodiment of the present disclosure, there are various ways of obtaining the application index of the target sub-application based on the resource parameter information, and in some embodiments, the resource downloading time is determined according to the resource downloading starting time and the resource loading starting time; in other embodiments, the white screen time is determined based on the resource start download time and the screen element start rendering time, and the first screen time is determined based on the resource start download time and the screen element end rendering time. The above three ways are only examples of obtaining the application index of the target sub-application based on the resource parameter information, and the present disclosure does not specifically limit the ways of obtaining the application index of the target sub-application based on the resource parameter information.
In a specific embodiment of the disclosure, difference calculation is performed based on a resource start downloading time and a resource start loading time to obtain a resource downloading time, difference calculation is performed based on the resource start downloading time and a screen element start rendering time to obtain a white screen time, difference calculation is performed based on the resource start downloading time and the screen element end rendering time to obtain a first screen time, and the resource downloading time, the white screen time and the first screen time are reported to a server.
According to the application index obtaining scheme provided by the embodiment of the disclosure, the monitoring information is obtained in response to the operation of the target sub-application in the micro front end, the target sub-application is counted based on the monitoring information, the resource parameter information of the target sub-application is obtained, and the application index of the target sub-application is obtained based on the resource parameter information. Therefore, collection of sub-application performance indexes in the micro front end is achieved, and sub-application performance indexes can be used for guiding sub-application to complete performance optimization and improvement, and user experience and user retention rate are improved
In some embodiments, the monitoring information includes: operation notification message, loading notification message and monitoring message; counting the target sub-application based on the monitoring information to obtain resource parameter information of the target sub-application, wherein the method comprises the following steps: recording the resource starting downloading time of the target sub-application based on the operation notification message, recording the resource starting loading time of the target sub-application based on the loading notification message, and acquiring the screen element starting rendering time and the screen element ending rendering time of the target sub-application based on the monitoring message.
In the embodiment of the present disclosure, the operation notification message refers to a notification message generated by performing a related operation on the micro front end page, and in the embodiment of the present disclosure, the operation notification message refers to a notification message generated by performing a related operation on a target sub-application in the micro front end page. The resource downloading start time refers to the time when the resource corresponding to the target sub-application starts downloading.
In an embodiment of the present disclosure, receiving an operation notification message for a target sub-application in a main application includes: and receiving an operation notification message based on the triggering operation of the user on the target sub-application control on the micro front-end page. The micro front-end page is used for displaying the main application and the sub-application, the target sub-application control is used for representing the target sub-application, and the target sub-application control is not limited in expression form, for example, the target sub-application control can be an icon or text information. When a user clicks to open a target sub-application, a life cycle hook function such as 'BeforeLoad' is triggered to generate an operation notification message, so that a function before sub-application loading is called to record the resource starting downloading time of the target sub-application.
Specifically, in the process of displaying a plurality of sub-applications in the micro front-end page, triggering operation of a user on the micro front-end page can be detected, when operations such as clicking, hovering and the like of a target sub-application control by the user are detected, an operation notification message can be received, and the time for starting downloading of resources of the target sub-application is recorded.
The loading notification message refers to a notification message generated when loading the resource of the application, and in the embodiment of the present disclosure, the loading notification message refers to a notification message generated when loading the resource corresponding to the target sub-application. The resource loading start time refers to the time corresponding to the time when the resource corresponding to the target sub-application starts to be loaded.
In the embodiment of the disclosure, when the downloading of the resource corresponding to the target sub-application is finished, a lifecycle hook function BeforeMount is triggered to generate a loading notification message, so that a function before the sub-application is called to mount is used for recording the starting loading time of the resource of the target sub-application.
In the embodiment of the present disclosure, after receiving the load notification message for the target sub-application, the starting loading time of the resource of the target sub-application may be recorded, and the number of target sub-applications may be plural.
The screen element rendering start time refers to a time corresponding to the time when the rendering element starts to appear in the display screen. The screen element end rendering time refers to the corresponding time when the rendering of the last element in the display screen ends.
In the embodiment of the disclosure, various modes for acquiring the screen element start rendering time of the target sub-application based on the monitoring message can be selected and set according to application requirements, and in some embodiments, the start appearance time of the element in the document object model of the target sub-application is acquired based on the monitoring message and is used as the screen element start rendering time; in other embodiments, the resource loading end notification message is obtained based on the listening message, and the screen element start rendering time of the target sub-application is recorded. The above two ways are merely examples, and embodiments of the present disclosure do not specifically limit the manner in which the screen element start rendering time of the target sub-application is acquired.
In the embodiment of the disclosure, the screen element end rendering time of the target sub-application is acquired by selecting different modes based on different scenes, in some embodiments, the rendering end message of the target sub-application is received within a preset time period based on the monitoring message, and the receiving time is recorded as the screen element end rendering time. In other embodiments, based on the monitoring message, it is determined that the user operation message is received within a preset period of time and the rendering end message of the target sub-application is not received, and the operation time corresponding to the user operation message is recorded as the screen element end rendering time.
In still other embodiments, determining that the user operation message and the rendering end message of the target sub-application are not received within a preset time period based on the monitoring message, acquiring element stop change time in a document object model of the target sub-application, and calculating based on the element stop change time and the preset time period to obtain screen element end rendering time.
In still other embodiments, determining that a listening result of the document object model of the target sub-application is not received within a preset period of time, that a rendering end message of the target sub-application is not received, and that a user operation message is not received, and receiving an uninstall message of the target sub-application, recording an uninstall time corresponding to the uninstall message of the target sub-application, and ending the rendering time with the uninstall time as a screen element based on the listening message.
The above four ways are merely examples, and the embodiments of the present disclosure do not specifically limit the way in which the screen element end rendering time of the target sub-application is acquired.
In the above scheme, based on the operation notification message, the resource start downloading time of the target sub-application is recorded, based on the loading notification message, the resource start loading time of the target sub-application is recorded, and based on the monitoring message, the screen element start rendering time and the screen element end rendering time of the target sub-application are obtained, so that the collection of sub-application performance indexes is realized, the sub-application is guided to complete performance optimization promotion through the sub-application performance indexes, and the user experience and the user retention rate are promoted.
In some embodiments, obtaining a screen element start rendering time for the target sub-application based on the snoop message includes: and acquiring the starting appearance time of the element in the document object model of the target sub-application based on the monitoring message, and taking the starting appearance time of the element in the document object model as the screen element starting rendering time.
The document object model refers to a standard programming interface for processing an extensible markup language, provides an access model for the whole document, takes the document as a tree structure, and each node of the tree represents a webpage label or text items in the label. The document object model tree structure accurately describes the interrelationship between tags in a web document.
In the embodiment of the disclosure, in the process of rendering a screen, the element start appearance time in the document object model represents the start of rendering, so that the element start appearance time is recorded as the screen element start rendering time. Therefore, the white screen time can be accurately acquired, and the accuracy of sub-application performance index acquisition is further improved.
In some embodiments, obtaining the screen element end rendering time of the target sub-application based on the snoop message includes: and determining that the rendering end message of the target sub-application is received within a preset time period based on the monitoring message, and recording the time of receiving the rendering end message as the screen element end rendering time.
In some embodiments, obtaining the screen element end rendering time of the target sub-application based on the snoop message includes: and determining that the user operation message is received within a preset time period and the rendering end message of the target sub-application is not received based on the monitoring message, and recording the operation time corresponding to the user operation message as the screen element end rendering time.
In some embodiments, obtaining the screen element end rendering time of the target sub-application based on the snoop message includes: and determining that the user operation message and the rendering end message of the target sub-application are not received within a preset time period based on the monitoring message, acquiring element stop change time in a document object model of the target sub-application, and calculating based on the element stop change time and the preset time period to acquire screen element end rendering time.
In some embodiments, obtaining the screen element end rendering time of the target sub-application based on the snoop message includes: determining that a monitoring result of a document object model of the target sub-application is not received within a preset time period, a rendering end message of the target sub-application is not received, a user operation message is not received, an unloading message of the target sub-application is received, an unloading time corresponding to the unloading message of the target sub-application is recorded, and the unloading time is used as a screen element end rendering time.
The preset time period can be selected and set according to service scene requirements, so that the sub-application loading timeout time can be set according to self service requirements, the method is more suitable for a non-communication network environment scene, and the accuracy of performance index acquisition is further improved. In addition, different target sub-applications can also set different preset time periods, so that the flexibility of performance index collection is further improved.
Wherein, the rendering end message refers to a message generated by the target sub-application when the rendering ends; the user operation message refers to a message generated when operations such as clicking are performed on the rendering content of the target sub-application in the rendering process; the uninstall message refers to a message generated when an uninstall operation is performed on the target sub-application.
In the embodiment of the present disclosure, a preset period, such as 1 second, 3 seconds, and the like, is preset first, and in the preset period, a rendering end message of the target sub-application is received, and a receiving time recorded when the rendering end message is received is taken as a screen element end rendering time.
In the embodiment of the disclosure, in a preset time period, a rendering end message of a target sub-application is not received and a user operation message is not received, if a monitoring result of a document object model of the target sub-application is that an element in the document object model is unchanged, rendering is ended, element stop change time in the document object model of the target sub-application is obtained, and time obtained by subtracting the preset time period from the element stop change time is taken as first screen content rendering end time.
In the embodiment of the present disclosure, a rendering end message of a target sub-application is not received within a preset period of time, and if a user operation message is received, that is, a user may perform a related operation on rendering content of the target sub-application, to indicate that rendering has ended, so that an operation time corresponding to the user operation message is recorded as a screen element ending rendering time.
In the embodiment of the disclosure, in a preset period of time, no rendering end message of the target sub-application is received, no user operation message is received, and no monitoring result of the document object model of the target sub-application is received, if an unloading message of the target sub-application is received, that is, the user can perform unloading processing on the rendering content of the target sub-application, so that rendering is ended, and an unloading time corresponding to the unloading message of the target sub-application is recorded as a screen element ending rendering time.
According to the scheme, the screen element end rendering time can be flexibly acquired based on different scenes, so that accuracy of acquiring the first screen time is improved, and user experience is further improved.
In some embodiments, the application index includes at least one of a resource download time, a white screen time, and a first screen time, and the obtaining the application index of the target sub-application based on the resource parameter information includes: determining the resource downloading time according to the resource downloading starting time and the resource loading starting time, determining the white screen time according to the resource downloading starting time and the screen element rendering starting time, and determining the first screen time according to the resource downloading starting time and the screen element rendering ending time.
Specifically, difference calculation is performed based on the resource start downloading time and the resource start loading time to obtain resource downloading time, difference calculation is performed based on the resource start downloading time and the screen element start rendering time to obtain white screen time, difference calculation is performed based on the resource start downloading time and the screen element end rendering time to obtain first screen time, and the resource downloading time, the white screen time and the first screen time are reported to a server.
In the scheme, the resource downloading time, the white screen time and the first screen time can be acquired and reported to the server, so that the sub-application can be guided to complete performance optimization promotion through the sub-application performance index, and the user experience and the user retention rate are promoted.
In some embodiments, the application index obtaining method may further include: and deleting the application index of the target sub-application if the application index of the target sub-application does not accord with the preset data format condition.
In some embodiments, the preset data format conditions include a resource download time of Yu Baibing hours; and/or the white screen time is less than the first screen time; and/or the value corresponding to the application index is greater than or equal to a preset value; and/or the number of index categories corresponding to the application indexes is equal to a preset category number threshold value.
Specifically, whether the resource downloading time of the target sub-application is smaller than Yu Baibing time and/or the white screen time is smaller than first screen time is judged, whether the value corresponding to the application index of the target sub-application is larger than or equal to a preset numerical value is judged, and/or whether the index category number corresponding to the application index is equal to a preset category number threshold is judged.
Specifically, under the condition that the application index of the target sub-application does not accord with the preset data format condition, deleting the application index of the target sub-application.
In the scheme, the application indexes which do not accord with the preset data format conditions are deleted, so that the accuracy of the application indexes is further improved, the accuracy of subsequent optimization is further improved, and the user experience and the user retention rate are further improved.
Fig. 2 is a flow chart of another method for obtaining an application index according to an embodiment of the present disclosure, where the method for obtaining an application index is further optimized based on the above embodiment. As shown in fig. 2, the method includes:
step 201, based on the operation notification message, recording the resource start downloading time of the target sub-application.
Fig. 3 is a schematic diagram of an application display provided by an embodiment of the present disclosure, where the schematic diagram of a micro front-end page includes a main application 11 and a plurality of sub-applications 111 to 11n, where n is a positive integer greater than 1, and when a user triggers any sub-application, such as the sub-application 111, an operation notification message may be received to record a resource start download time of a target sub-application.
Step 202, based on the loading notification message, recording the resource starting loading time of the target sub-application.
After step 202, step 203, step 204 or step 205 or step 207 may be performed, and the execution sequence of steps 204-207 may be determined according to actual situations, which is only an example in fig. 2.
Step 203, acquiring the starting appearance time of the element in the document object model of the target sub-application based on the monitoring message, and taking the starting appearance time of the element in the document object model as the screen element starting rendering time.
In the embodiment of the disclosure, in the process of rendering a screen, the element start appearance time in the document object model represents the start of rendering, so that the element start appearance time is recorded as the screen element start rendering time. Therefore, the white screen time can be accurately acquired, and the accuracy of sub-application performance index acquisition is further improved.
And 204, determining that the rendering end message of the target sub-application is received within a preset time period based on the monitoring message, and recording the time of the rendering end message as the rendering end time of the screen element.
Step 205, determining that the user operation message is received within a preset time period and the rendering end message of the target sub-application is not received based on the monitoring message, and recording the operation time corresponding to the user operation message as the screen element end rendering time.
And 206, determining that the user operation message and the rendering end message of the target sub-application are not received within a preset time period based on the monitoring message, acquiring the element stop change time in the document object model of the target sub-application, and calculating based on the element stop change time and the preset time period to obtain the screen element end rendering time.
Step 207, determining that a monitoring result of the document object model of the target sub-application is not received within a preset time period, that a rendering end message of the target sub-application is not received, that a user operation message is not received, and that an unloading message of the target sub-application is received, recording an unloading time corresponding to the unloading message of the target sub-application, and taking the unloading time as a screen element end rendering time.
Fig. 4 is a schematic diagram of another application display provided by the embodiment of the present disclosure, and fig. 3 and fig. 4 respectively show schematic diagrams of display pages before and after a triggering operation on a target sub-application, where a user starts to download resources after performing the triggering operation on any currently displayed sub-application 111, and starts to load resources when the downloading of the resources is finished, so that rendering processing starts when the loading of the resources is finished. As shown in fig. 4, the display page is a sub-application rendering result.
Step 208, determining a resource downloading time according to the resource downloading starting time and the resource loading starting time, determining a white screen time based on the resource downloading starting time and the screen element rendering starting time, and determining a first screen time based on the resource downloading starting time and the screen element rendering ending time.
In the embodiment of the disclosure, the resource downloading time refers to the time from the beginning of downloading of the sub-application resource to the beginning of loading of the resource, the white screen time refers to the time from the beginning of downloading of the sub-application resource to the beginning of having content on the sub-application page, and the first screen time refers to the time from the beginning of downloading of the sub-application resource to the end of rendering of the first screen content of the sub-application.
Specifically, difference calculation is performed based on the resource downloading starting time and the resource loading starting time to obtain resource downloading time, difference calculation is performed based on the resource downloading starting time and the first screen content rendering starting time to obtain white screen time, and difference calculation is performed based on the resource downloading starting time and the first screen content rendering ending time to obtain first screen time.
In the embodiment of the disclosure, the resource downloading time, the white screen time and the first screen time are used as the application indexes of the target sub-application and reported to the server.
It should be noted that, the method can also be adjusted by itself according to different service or data dimension requirements, and different application indexes are selected and reported to the server.
Step 209, deleting the application index of the target sub-application if the application index of the target sub-application does not meet the preset data format condition.
In the embodiment of the disclosure, whether the resource downloading time of the target sub-application is smaller than Yu Baibing time and/or the white screen time is smaller than first screen time is judged, whether the value corresponding to the application index of the target sub-application is larger than or equal to a preset numerical value is judged, and/or whether the index category number corresponding to the application index is equal to a preset category number threshold value is judged.
Specifically, under the conventional condition, the resource downloading time is less than Yu Baibing time and the white screen time is less than the first screen time, if the resource downloading time of the target sub-application is greater than or equal to the white screen time or the white screen time is greater than or equal to the first screen time, determining that the application index of the target sub-application does not accord with the preset data format condition, and deleting the application index of the target sub-application.
In practical application, the resource downloading time, the white screen time and the first screen time cannot be negative, and when any one of the resource downloading time, the white screen time and the first screen time is smaller than a preset value, such as 0, it is determined that the application index of the target sub-application does not accord with the preset data format condition, and the application index of the target sub-application is deleted.
Specifically, under the conventional condition, the resource downloading time, the white screen time and the first screen time coexist, if the acquired application index does not include one application index of the resource downloading time, the white screen time and the first screen time, the application index of the target sub-application is determined to be not in accordance with the preset data format condition, and the application index of the target sub-application is deleted.
The application index obtaining scheme provided by the embodiment of the disclosure records the resource start downloading time of the target sub-application based on the operation notification message, records the resource start loading time of the target sub-application based on the loading notification message, monitors the document object model of the target sub-application, obtains the start appearance time of an element in the document object model of the target sub-application based on the monitoring message, takes the start appearance time of the element in the document object model as the screen element start rendering time, determines the rendering end message of the target sub-application received in a preset time period based on the monitoring message, records the rendering end message as the screen element end rendering time, determines the receiving operation message of a user and does not receive the rendering end message of the target sub-application in a preset time period based on the monitoring message, records the operation time corresponding to the user operation message as the screen element end rendering time, determines the non-receiving operation message of the user and the rendering end message of the target sub-application in the preset time period based on the monitoring message, calculates the screen element stop change time and the preset time period to obtain the screen element end rendering time based on the monitoring message, determines the non-receiving end message of the target sub-application in the preset time period, and the non-receiving the non-application and the target sub-application to unload the non-application, and the target sub-application receiving the non-application and the non-receiving end message as the loading end information, and the target sub-application receiving end information, and the target application receiving end loading end information, and determining the white screen time based on the resource downloading starting time and the screen element rendering starting time, determining the first screen time based on the resource downloading starting time and the screen element rendering ending time, and deleting the application index of the target sub-application if the application index of the target sub-application does not accord with the preset data format condition. Therefore, the preset time period can be set according to the service requirement of the user, the accuracy of performance index acquisition is improved, the screen element end rendering time can be flexibly acquired based on different scenes, the accuracy of the first screen acquisition time is improved, the application index which does not accord with the preset data format condition is deleted, the accuracy of the application index is further improved, the accuracy of subsequent optimization is further improved, and the user experience and the user retention rate are further improved.
As an example of a scenario, as shown in fig. 5, comprises an interaction of a user 10, a terminal 20 and a server 30, wherein the terminal 20 comprises a main application 21, a sub-application listener 22 and a sub-application 23.
Specifically, in step 1.1, the user 10 opens the sub-application 23 on a click in the main application 21 displayed on the terminal 20; step 1.2, triggering a life hook function BeforeLoad, so as to trigger a sub application front loading function SubAppBeforeLoad; step 1.3, the sub-application listener 22 records the resource start download time; step 1.4, triggering a life cycle hook function BeforeMount when the resource downloading is finished, so as to trigger a sub application pre-mount function SubAppBeforeMount; step 1.5, the sub-application listener 22 records the resource start loading time; step 1.6, triggering a change observer to monitor the change of the element in the document object model DOM (Document Object Model) corresponding to the sub-application, and acquiring the element change starting time in the document object model as the screen element rendering starting time.
Specifically, step 2.1, receiving a rendering end message of a target sub-application within a preset time period, and recording the receiving time as the rendering end time of a screen element; and 2.2, calculating based on the resource downloading starting time, the resource loading starting time, the screen element rendering starting time and the screen element rendering ending time, obtaining an application index of the target sub-application, and reporting the application index to the server.
Specifically, step 3.1, in a preset time period, a rendering end message of the target sub-application is not received; step 3.2, triggering sub-application content re-rendering events (mouse, keyboard and other operations) by the user; step 3.3, receiving a user operation message, and recording the operation time corresponding to the user operation message as the rendering time of ending the screen element; and 3.4, calculating based on the resource downloading starting time, the resource loading starting time, the screen element rendering starting time and the screen element rendering ending time, obtaining the application index of the target sub-application and reporting the application index to the server.
Specifically, step 4.1, in a preset time period, no user operation message is received and no rendering end message of the target sub-application is received; and 4.2, monitoring that elements in the document object model corresponding to the sub-application are unchanged by using the observer, recording the current time, taking the time obtained by subtracting the preset time period from the current time as the screen element end rendering time, and calculating based on the resource start downloading time, the resource start loading time, the screen element end rendering time and the screen element end rendering time to obtain an application index of the target sub-application and reporting the application index to the server 23 in step 4.3.
The server 23 may analyze the application index of the target sub-application when receiving the application index, for example, as shown in fig. 6, and compare and display the resource downloading time of the sub-applications A, B and C by drawing a graph, so as to more intuitively see the comparison relationship between the application index of the sub-applications A, B and C at different time points, namely, the resource downloading time.
Therefore, the application index of each sub-application can be accurately acquired and reported to the server for analysis, so that each sub-application is optimized, and the user experience and the user retention rate are further improved.
Fig. 7 is a schematic structural diagram of an application index obtaining device according to an embodiment of the present disclosure, where the device may be implemented by software and/or hardware, and may be generally integrated in an electronic device. As shown in fig. 7, the apparatus includes:
the response triggering module 301 is configured to obtain monitoring information in response to an operation on a target sub-application in the micro front end;
the statistics module 302 is configured to perform statistics on the target sub-application based on the monitoring information, so as to obtain resource parameter information of the target sub-application;
and the processing module 303 is configured to obtain an application index of the target sub-application based on the resource parameter information.
Optionally, the monitoring information includes: operation notification messages, loading notification messages and listening messages, the statistics module 302 is specifically configured to:
a first recording unit, configured to record a resource start downloading time of the target sub-application based on the operation notification message;
the second recording unit is used for recording the resource starting loading time of the target sub-application based on the loading notification message;
the first acquisition unit is used for acquiring the rendering time of the screen element of the target sub-application based on the monitoring message;
and the second acquisition unit is used for acquiring the screen element end rendering time of the target sub-application based on the monitoring message.
Optionally, the first obtaining unit is specifically configured to:
acquiring the starting occurrence time of the element in the document object model of the target sub-application based on the monitoring message;
and taking the starting appearance time of the element in the document object model as the rendering starting time of the screen element.
Optionally, the second obtaining unit is specifically configured to:
determining that a user operation message and a rendering end message of the target sub-application are not received within a preset time period based on the monitoring message, and acquiring element stop change time in a document object model of the target sub-application;
And calculating based on the element stop change time and the preset time period to obtain the screen element end rendering time.
Optionally, the second obtaining unit is specifically further configured to:
and determining that the rendering end message of the target sub-application is received within a preset time period based on the monitoring message, and recording the time of receiving the rendering end message as the rendering end time of the screen element.
Optionally, the second obtaining unit is specifically further configured to:
and determining that the user operation message is received within a preset time period and the rendering end message of the target sub-application is not received based on the monitoring message, and recording the operation time corresponding to the user operation message as the rendering end time of the screen element.
Optionally, the second obtaining unit is specifically further configured to:
determining that a monitoring result of a document object model of the target sub-application is not received within a preset time period, a rendering end message of the target sub-application is not received, a user operation message is not received, and an unloading message of the target sub-application is received;
and recording the unloading time corresponding to the unloading message of the target sub-application, and taking the unloading time as the rendering time of ending the screen element.
Optionally, the application index includes at least one of a resource download time, a white screen time and a first screen time, and the processing module 303 is specifically configured to:
determining the resource downloading time according to the resource downloading starting time and the resource loading starting time;
determining white screen time according to the resource downloading starting time and the screen element rendering starting time;
and determining the first screen time according to the resource downloading starting time and the screen element rendering ending time.
Optionally, the apparatus further includes:
and the deleting module is used for deleting the application index of the target sub-application if the application index of the target sub-application does not accord with the preset data format condition.
Optionally, the preset data format condition includes:
the resource download time is Yu Baibing time less; and/or
The white screen time is smaller than the first screen time; and/or
The value corresponding to the application index is larger than or equal to a preset value; and/or
And the number of index categories corresponding to the application indexes is equal to a preset category number threshold value.
The application index obtaining device provided by the embodiment of the disclosure can execute the application index obtaining method provided by any embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of the executing method.
Embodiments of the present disclosure also provide a computer program product comprising a computer program/instruction which, when executed by a processor, implements the application index acquisition method provided by any of the embodiments of the present disclosure.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure. Referring now in particular to fig. 8, a schematic diagram of an electronic device 400 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device 400 in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 8 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 8, the electronic device 400 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 401, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage means 408 into a Random Access Memory (RAM) 403. In the RAM403, various programs and data necessary for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM403 are connected to each other by a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
In general, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, magnetic tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. While fig. 8 shows an electronic device 400 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communications device 409, or from storage 408, or from ROM 402. When the computer program is executed by the processing device 401, the above-described functions defined in the application index acquisition method of the embodiment of the present disclosure are performed.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (Hyper Text Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: in the playing process of the video, receiving information display triggering operation of a user; acquiring at least two target information associated with the video; displaying first target information in the at least two target information in an information display area of a playing page of the video, wherein the size of the information display area is smaller than that of the playing page; and receiving a first switching trigger operation of a user, and switching the first target information displayed in the information display area into second target information in the at least two target information.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, the present disclosure provides an application index acquisition method, including:
responding to the operation of the target sub-application in the micro front end, and acquiring monitoring information;
counting the target sub-applications based on the monitoring information to obtain resource parameter information of the target sub-applications;
and obtaining the application index of the target sub-application based on the resource parameter information.
According to one or more embodiments of the present disclosure, in the application index obtaining method provided by the present disclosure, the monitoring information includes: operation notification message, loading notification message and monitoring message; the counting the target sub-application based on the monitoring information to obtain the resource parameter information of the target sub-application, including:
recording the resource downloading starting time of the target sub-application based on the operation notification message;
recording the resource starting loading time of the target sub-application based on the loading notification message;
and acquiring the rendering time of the screen element start and the rendering time of the screen element end of the target sub-application based on the monitoring message.
According to one or more embodiments of the present disclosure, in the application index obtaining method provided by the present disclosure, the obtaining, based on the listening message, a rendering start time of a screen element of the target sub-application includes:
Acquiring the starting occurrence time of the element in the document object model of the target sub-application based on the monitoring message;
and taking the starting appearance time of the element in the document object model as the rendering starting time of the screen element.
According to one or more embodiments of the present disclosure, in the application index obtaining method provided by the present disclosure, the obtaining, based on the listening message, a screen element end rendering time of the target sub-application includes:
determining that a user operation message and a rendering end message of the target sub-application are not received within a preset time period based on the monitoring message, and acquiring element stop change time in a document object model of the target sub-application;
and calculating based on the element stop change time and the preset time period to obtain the screen element end rendering time.
According to one or more embodiments of the present disclosure, in the application index obtaining method provided by the present disclosure, the obtaining, based on the listening message, a screen element end rendering time of the target sub-application includes:
and determining that the rendering end message of the target sub-application is received within a preset time period based on the monitoring message, and recording the time of receiving the rendering end message as the rendering end time of the screen element.
According to one or more embodiments of the present disclosure, in the application index obtaining method provided by the present disclosure, the obtaining, based on the listening message, a screen element end rendering time of the target sub-application includes:
and determining that the user operation message is received within a preset time period and the rendering end message of the target sub-application is not received based on the monitoring message, and recording the operation time corresponding to the user operation message as the rendering end time of the screen element.
According to one or more embodiments of the present disclosure, in the application index obtaining method provided by the present disclosure, the obtaining, based on the listening message, a screen element end rendering time of the target sub-application includes:
determining that a monitoring result of a document object model of the target sub-application is not received within a preset time period, a rendering end message of the target sub-application is not received, a user operation message is not received, and an unloading message of the target sub-application is received;
and recording the unloading time corresponding to the unloading message of the target sub-application, and taking the unloading time as the rendering time of ending the screen element.
According to one or more embodiments of the present disclosure, in the application index obtaining method provided by the present disclosure, the application index includes at least one of a resource downloading time, a white screen time and a first screen time, and the obtaining, based on the resource parameter information, the application index of the target sub-application includes:
determining the resource downloading time according to the resource downloading starting time and the resource loading starting time;
determining white screen time according to the resource downloading starting time and the screen element rendering starting time;
and determining the first screen time according to the resource downloading starting time and the screen element rendering ending time.
According to one or more embodiments of the present disclosure, in the application index obtaining method provided by the present disclosure, the method further includes:
and deleting the application index of the target sub-application if the application index of the target sub-application does not accord with the preset data format condition.
According to one or more embodiments of the present disclosure, in the application index obtaining method provided by the present disclosure, the preset data format condition includes:
the resource download time is Yu Baibing time less; and/or
The white screen time is smaller than the first screen time; and/or
The value corresponding to the application index is larger than or equal to a preset value; and/or
And the number of index categories corresponding to the application indexes is equal to a preset category number threshold value.
According to one or more embodiments of the present disclosure, the present disclosure provides an application index obtaining apparatus, including:
the response triggering module is used for responding to the operation of the target sub-application in the micro front end and acquiring monitoring information;
the statistics module is used for carrying out statistics on the target sub-application based on the monitoring information to obtain resource parameter information of the target sub-application;
and the processing module is used for obtaining the application index of the target sub-application based on the resource parameter information.
According to one or more embodiments of the present disclosure, in the application index obtaining device provided by the present disclosure, the monitoring information includes: the statistics module is specifically used for operating the notification message, loading the notification message and monitoring the message:
a first recording unit, configured to record a resource start downloading time of the target sub-application based on the operation notification message;
the second recording unit is used for recording the resource starting loading time of the target sub-application based on the loading notification message;
The first acquisition unit is used for acquiring the rendering time of the screen element of the target sub-application based on the monitoring message;
and the second acquisition unit is used for acquiring the screen element end rendering time of the target sub-application based on the monitoring message.
According to one or more embodiments of the present disclosure, in the application index obtaining apparatus provided by the present disclosure, the first obtaining unit is specifically configured to:
acquiring the starting occurrence time of the element in the document object model of the target sub-application based on the monitoring message;
and taking the starting appearance time of the element in the document object model as the rendering starting time of the screen element.
According to one or more embodiments of the present disclosure, in the application index obtaining apparatus provided by the present disclosure, the second obtaining unit is specifically configured to:
determining that a user operation message and a rendering end message of the target sub-application are not received within a preset time period based on the monitoring message, and acquiring element stop change time in a document object model of the target sub-application;
and calculating based on the element stop change time and the preset time period to obtain the screen element end rendering time.
According to one or more embodiments of the present disclosure, in the application index obtaining apparatus provided by the present disclosure, the second obtaining unit is specifically configured to:
and determining that the rendering end message of the target sub-application is received within a preset time period based on the monitoring message, and recording the time of receiving the rendering end message as the rendering end time of the screen element.
According to one or more embodiments of the present disclosure, in the application index obtaining apparatus provided by the present disclosure, the second obtaining unit is specifically configured to:
and determining that the user operation message is received within a preset time period and the rendering end message of the target sub-application is not received based on the monitoring message, and recording the operation time corresponding to the user operation message as the rendering end time of the screen element.
According to one or more embodiments of the present disclosure, in the application index obtaining apparatus provided by the present disclosure, the second obtaining unit is specifically configured to:
determining that a monitoring result of a document object model of the target sub-application is not received within a preset time period, a rendering end message of the target sub-application is not received, a user operation message is not received, and an unloading message of the target sub-application is received;
And recording the unloading time corresponding to the unloading message of the target sub-application, and taking the unloading time as the rendering time of ending the screen element.
According to one or more embodiments of the present disclosure, in the application index obtaining apparatus provided by the present disclosure, the application index includes at least one of a resource downloading time, a white screen time and a first screen time, and the processing module is specifically configured to:
determining the resource downloading time according to the resource downloading starting time and the resource loading starting time;
determining white screen time according to the resource downloading starting time and the screen element rendering starting time;
and determining the first screen time according to the resource downloading starting time and the screen element rendering ending time.
According to one or more embodiments of the present disclosure, in the application index obtaining apparatus provided by the present disclosure, the apparatus further includes:
and the deleting module is used for deleting the application index of the target sub-application if the application index of the target sub-application does not accord with the preset data format condition.
According to one or more embodiments of the present disclosure, in the application index obtaining apparatus provided by the present disclosure, the preset data format condition includes:
The resource download time is Yu Baibing time less; and/or
The white screen time is smaller than the first screen time; and/or
The value corresponding to the application index is larger than or equal to a preset value; and/or
And the number of index categories corresponding to the application indexes is equal to a preset category number threshold value.
According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement any of the application index obtaining methods provided in the present disclosure.
According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium storing a computer program for executing any one of the application index acquisition methods provided by the present disclosure.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (13)

1. An application index obtaining method is characterized by comprising the following steps:
responding to the operation of the target sub-application in the micro front end, and acquiring monitoring information;
Counting the target sub-applications based on the monitoring information to obtain resource parameter information of the target sub-applications;
and obtaining the application index of the target sub-application based on the resource parameter information.
2. The application index acquiring method according to claim 1, wherein the monitoring information includes: operation notification message, loading notification message and monitoring message; the counting the target sub-application based on the monitoring information to obtain the resource parameter information of the target sub-application, including:
recording the resource downloading starting time of the target sub-application based on the operation notification message;
recording the resource starting loading time of the target sub-application based on the loading notification message;
and acquiring the rendering time of the screen element start and the rendering time of the screen element end of the target sub-application based on the monitoring message.
3. The application index acquiring method according to claim 2, wherein the acquiring the screen element start rendering time of the target sub-application based on the listening message includes:
acquiring the starting occurrence time of the element in the document object model of the target sub-application based on the monitoring message;
And taking the starting appearance time of the element in the document object model as the rendering starting time of the screen element.
4. The application index acquiring method according to claim 2, wherein the acquiring the screen element end rendering time of the target sub-application based on the listening message includes:
determining that a user operation message and a rendering end message of the target sub-application are not received within a preset time period based on the monitoring message, and acquiring element stop change time in a document object model of the target sub-application;
and calculating based on the element stop change time and the preset time period to obtain the screen element end rendering time.
5. The application index acquiring method according to claim 2, wherein the acquiring the screen element end rendering time of the target sub-application based on the listening message includes:
and determining that the rendering end message of the target sub-application is received within a preset time period based on the monitoring message, and recording the time of receiving the rendering end message as the rendering end time of the screen element.
6. The application index acquiring method according to claim 2, wherein the acquiring the screen element end rendering time of the target sub-application based on the listening message includes:
And determining that the user operation message is received within a preset time period and the rendering end message of the target sub-application is not received based on the monitoring message, and recording the operation time corresponding to the user operation message as the rendering end time of the screen element.
7. The application index acquiring method according to claim 2, wherein the acquiring the screen element end rendering time of the target sub-application based on the listening message includes:
determining that a monitoring result of a document object model of the target sub-application is not received within a preset time period, a rendering end message of the target sub-application is not received, a user operation message is not received, and an unloading message of the target sub-application is received;
and recording the unloading time corresponding to the unloading message of the target sub-application, and taking the unloading time as the rendering time of ending the screen element.
8. The method for obtaining the application index according to claim 2, wherein the application index includes at least one of a resource download time, a white screen time and a first screen time, and the obtaining the application index of the target sub-application based on the resource parameter information includes:
Determining the resource downloading time according to the resource downloading starting time and the resource loading starting time;
determining white screen time according to the resource downloading starting time and the screen element rendering starting time;
and determining the first screen time according to the resource downloading starting time and the screen element rendering ending time.
9. The application index acquiring method according to any one of claims 1 to 8, characterized by further comprising:
and deleting the application index of the target sub-application if the application index of the target sub-application does not accord with the preset data format condition.
10. The application index acquiring method according to claim 9, wherein the preset data format conditions include:
the resource download time is Yu Baibing time less; and/or
The white screen time is smaller than the first screen time; and/or
The value corresponding to the application index is larger than or equal to a preset value; and/or
And the number of index categories corresponding to the application indexes is equal to a preset category number threshold value.
11. An application index obtaining apparatus, comprising:
the response triggering module is used for responding to the operation of the target sub-application in the micro front end and acquiring monitoring information;
The statistics module is used for carrying out statistics on the target sub-application based on the monitoring information to obtain resource parameter information of the target sub-application;
and the processing module is used for obtaining the application index of the target sub-application based on the resource parameter information.
12. An electronic device, the electronic device comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement the application index acquisition method according to any one of the preceding claims 1-10.
13. A computer-readable storage medium, characterized in that the storage medium stores a computer program for executing the application index acquisition method according to any one of the preceding claims 1 to 10.
CN202210470108.1A 2022-04-28 2022-04-28 Application index acquisition method, device, equipment and medium Pending CN117009168A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210470108.1A CN117009168A (en) 2022-04-28 2022-04-28 Application index acquisition method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210470108.1A CN117009168A (en) 2022-04-28 2022-04-28 Application index acquisition method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN117009168A true CN117009168A (en) 2023-11-07

Family

ID=88571494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210470108.1A Pending CN117009168A (en) 2022-04-28 2022-04-28 Application index acquisition method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN117009168A (en)

Similar Documents

Publication Publication Date Title
CN111475298B (en) Task processing method, device, equipment and storage medium
CN111897740B (en) User interface testing method and device, electronic equipment and computer readable medium
CN111198859B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN113505302A (en) Method, device and system for supporting dynamic acquisition of buried point data and electronic equipment
CN109492163B (en) List display recording method and device, terminal equipment and storage medium
CN111694629A (en) Information display method and device and electronic equipment
CN111813685B (en) Automatic test method and device
CN111552613A (en) Thread timeout processing method and device and electronic equipment
CN111596992A (en) Navigation bar display method and device and electronic equipment
CN111198853A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN111309323B (en) Parameter initialization method and device and electronic equipment
CN117009168A (en) Application index acquisition method, device, equipment and medium
CN111274104B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN111552705A (en) Data processing method and device based on chart, electronic equipment and medium
CN112311842A (en) Method and device for information interaction
CN111787043A (en) Data request method and device
CN111813641B (en) Method, device, medium and equipment for collecting crash information
CN110099122B (en) Method and apparatus for sending network request
CN115827415B (en) System process performance test method, device, equipment and computer medium
CN109766246B (en) Method and apparatus for monitoring applications
CN109933685B (en) Audio data statistical method, device, equipment and storage medium
CN115373932A (en) Component operation monitoring method and device
CN115422019A (en) Statistical method, device, equipment and product for page display time consumption in application program
CN116401173A (en) Test case generation method and device, medium and electronic equipment
CN117939241A (en) Video special effect editing method, device, electronic equipment and storage medium

Legal Events

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