Method, device, terminal and storage medium for counting operation events in terminal system
By listening and recording operation event information in the terminal system, the problems of excessive third-party files and complex statistical work caused by importing layout files in the prior art are solved, and the efficiency of statistical operations is improved.
Patent Information
- Application Number
- CN201910762806.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-08-19
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2039-08-19
AI Technical Summary
When the prior art is stating control operation events of terminal applications, it is necessary to import the layout file into the third-party package file, resulting in large third-party files, large workload and complex redundancy.
By listening to the operation events of all controls in the terminal system, the target event information of the target operation event is obtained, and the target event information is recorded in a pre-established event database, and the operation events are counted based on the event database.
It avoids importing layout files during statistical operation events, reduces the size of third-party files, reduces the complexity and workload of statistical work, and improves the efficiency of statistical operations.
Smart Images

Figure CN112395470B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer technology, and in particular, relates to a method and device for counting operation events in a terminal system, a terminal system, and a storage medium. Background Art
[0002] At present, the control operation events of statistical terminal applications are mainly embedded in the third-party package files of statistical events in the host application, and the statistical interface of the relevant operation events in the third-party package files is called, and the statistical control operation event related information is written into the third-party package files according to the pre-agreed statistical event protocol. Finally, the recorded related information is reported to the cloud by judging the preset reporting event permission conditions. Since the statistical operation event protocols of the third-party package files of various statistical operation events are often inconsistent, it is necessary to import all the layout files corresponding to the applications of various statistical operation events into the third-party package files, resulting in large third-party package files, and large and redundant workload related to the statistical control operation events. Summary of the invention
[0003] In view of this, an embodiment of the present application provides a method, device, terminal and storage medium for counting operation events in a terminal system to solve the problem in the prior art that, in the process of counting operation events, the corresponding layout files are imported into third-party package files, resulting in the third-party files being too large, making the workload related to counting operation events large and redundant.
[0004] A first aspect of an embodiment of the present application provides a method for counting operation events in a terminal system, comprising:
[0005] Monitor the operation events of all controls in the terminal system within a preset time period;
[0006] If a target operation event of a target control is monitored, then the target event information corresponding to the target operation event is obtained;
[0007] Recording the target event information in a pre-established event database;
[0008] Based on all event information recorded in the event database, statistics are collected on operation events occurring in all applications in the terminal system within the preset time period; all event information includes all target event information acquired at different times within the preset time period, and the event information includes the application package name.
[0009] Optionally, before the real-time monitoring of operation events of all controls in the terminal system within a preset time period, the method includes:
[0010] An operation event monitoring function is added to all the controls, and the operation event monitoring function is used to monitor the operation events of the preset controls.
[0011] Optionally, if a target operation event of a target control is monitored, obtaining target event information corresponding to the target operation event includes:
[0012] When the operation event monitoring function monitors the operation event of the target control, the control identification information of the target control, the first application package name of the application to which the target control belongs at the current moment, and the first interface package name of the interface where the target control is located at the current moment are obtained;
[0013] Traversing a pre-established control database based on the control identification information to obtain target control information of the target control, wherein the control database stores a mapping relationship between control identification information and control information;
[0014] Based on the target control information, the first application package name, and the first interface package name, event information corresponding to the operation event is determined.
[0015] Optionally, the target control information includes a second application package name and a second interface package name; the second application package name is an application package name of an application to which the target control belongs at a first moment of the preset time length, and the second interface package name is an interface package name of an interface where the target control is located at a first moment of the preset time length, and the first moment is a moment before the current moment;
[0016] The determining, based on the target control information, the first application package name, and the first interface package name, event information corresponding to the operation event includes:
[0017] If the second application package name is the same as the first application package name, and the second interface package name is the same as the first interface package name, it is determined that the operation event occurs in the same interface, and the event information includes the second application package name and the second interface package name;
[0018] If the second application package name is the same as the first application package name, and the second interface package name is different from the first interface package name, it is determined that the operation event occurs in different interfaces within the same application, and the event information includes the second application package name, the second interface package name, and the first interface package name;
[0019] If the second application package name is different from the first application package name, and the second interface package name is different from the first interface package name, it is determined that the operation event occurs between different applications, and the event information includes the first application package name, the first interface package name, the second application package name and the second interface package name.
[0020] Optionally, counting operation events occurring in all applications in the terminal system within the preset time period based on all event information recorded in the event database includes:
[0021] Based on the application package names included in all event information recorded in the event database, statistics are counted of operation events occurring in the applications corresponding to all application package names in the terminal system within the preset time period, where the application package names include the first application package name and the second application package name.
[0022] Optionally, counting operation events occurring in all applications in the terminal system within the preset time period based on all event information recorded in the event database includes:
[0023] Based on the interface package names contained in all event information recorded in the event database, statistics are counted on operation events occurring on the interfaces corresponding to all interface package names in the terminal system within the preset time period, wherein the interface package names include the first interface package name and the second interface package name.
[0024] Optionally, before recording the event information in a pre-established event database, the process includes:
[0025] Obtaining a configuration file corresponding to an application installed in the terminal system;
[0026] Parsing the configuration file to obtain layout files of all application interfaces of each application program;
[0027] The control information in the layout file is obtained, and the control information is stored in a pre-established control database.
[0028] A second aspect of an embodiment of the present application provides an operation event statistics device in a terminal system, comprising:
[0029] A monitoring module is used to monitor the operation events of all controls in the terminal system within a preset time period;
[0030] An acquisition module, used for acquiring target event information corresponding to the target operation event if a target operation event of a target control is monitored;
[0031] A recording module, used for recording the target event information in a pre-established event database;
[0032] A statistics module is used to count the operation events occurring in all applications in the terminal system within the preset time period based on all event information recorded in the event database; all the event information includes all the target event information obtained at different times within the preset time period, and the event information includes the application package name.
[0033] A third aspect of an embodiment of the present application provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for counting operation events in the terminal system as described in any of the above embodiments is implemented.
[0034] A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for counting operation events in a terminal system as described in any of the above embodiments is implemented.
[0035] Compared with the prior art, the embodiments of the present application have the following beneficial effects: by monitoring the operation events of all controls in the terminal system within a preset time period; if the target operation event of the target control is monitored, the target event information corresponding to the target operation event is obtained; the target event information is recorded in a pre-established event database; based on all the event information recorded in the event database, the operation events occurring in all applications in the terminal system within the preset time period are counted. Since the monitored target event information is recorded in a pre-established event database, and based on all the event information recorded in the event database, the operation events occurring in all applications in the terminal system within the preset time period are counted, it is possible to avoid importing the corresponding layout file into a third-party package file in the process of counting operation events, avoid the problem of large workload and redundancy in counting operation events due to the large size of the third-party file, and improve the efficiency of counting operation time. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0037] Figure 1 is a flowchart of an implementation method for counting operation events in a terminal system provided by the first embodiment of the present application;
[0038] Figure 2 yes Figure 1 The specific implementation flow chart of S102;
[0039] Figure 3 yes Figure 2 The specific implementation flow chart of S1023;
[0040] Figure 4is a flowchart of an implementation method for counting operation events in a terminal system provided in the second embodiment of the present application;
[0041] Figure 5 is a flowchart of an implementation method for counting operation events in a terminal system provided in the third embodiment of the present application;
[0042] Figure 6 It is a schematic diagram of a device for counting operation events in a terminal system provided by the present application;
[0043] Figure 7 It is a schematic diagram of a terminal provided by this application. DETAILED DESCRIPTION
[0044] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0045] In order to illustrate the technical solution described in this application, the following is a description through specific embodiments. Figure 1 The figure is a flowchart of the implementation of the operation event statistics method in the terminal system provided by the first embodiment of the present application. The execution subject of this embodiment is the terminal system. The details are as follows:
[0046] S101, monitoring operation events of all controls in the terminal system within a preset time period.
[0047] Specifically, in this embodiment, the operation events of all controls in the terminal system within the preset time are monitored by setting event monitoring functions for all controls in the terminal system in advance. It should be noted that any control in the terminal system is directly or indirectly inherited from the parent class (View class) of all controls. In addition, the preset time can be set according to specific circumstances.
[0048] Therefore, in an optional implementation, the listening object corresponding to each control can be generated by adding the corresponding properties of each control, such as the control category, control layout, etc., to the View class of all controls respectively, and further, the operation event listening function can be set for the listening object of each control.
[0049] It should be noted that in actual use, no matter which application the user operates or which interface in the application, the user's needs are met by triggering the controls on the interface, such as jumping to another interface by operating certain button controls on the interface. In this embodiment, the process of the user triggering the control on the interface is called the operation event, for example, the process of the user clicking the control.
[0050] S102: If a target operation event of a target control is monitored, then target event information corresponding to the target operation event is obtained.
[0051] It should be noted that in this embodiment, when an operation event that triggers a control is monitored, for example, clicking (or pressing a key) on a control, the current control is taken as the target control, and the operation event that currently triggers the control is taken as the target operation event.
[0052] Specifically, in a possible implementation method, the target event information can be determined by obtaining the control identification information of the target control, such as the control ID, the first interface package name of the interface where the target control is currently located, and the first application package name of the application to which the target control currently belongs.
[0053] Specifically, Figure 2 As shown, Figure 1 The specific implementation flow chart of S102 is as follows. Figure 2 It can be seen that S102 includes:
[0054] S1021, when the operation event monitoring function monitors the operation event of the target control, obtain the control identification information of the target control, the first application package name of the application to which the target control belongs at the current moment, and the first interface package name of the interface where the target control is located at the current moment.
[0055] It should be noted that the control identification information of each control is unique and can be used to identify the identity of the control. For example, in this embodiment, the control identification information is the control id, the application package name is the identity information of the application, and the interface package name is the identity information of the interface.
[0056] In this embodiment, the first application package name is used to represent the identity of the application to which the target control belongs at the current moment, and the first interface package name is used to represent the identity of the interface where the target control is located at the current moment.
[0057] S1022: traverse a pre-established control database based on the control identification information to obtain target control information of the target control, wherein the control database stores a mapping relationship between control identification information and control information.
[0058] Specifically, the pre-established control database includes a mapping relationship between control identification information and control information. Specifically, the control information may include the second application package name of the application to which the control belongs at the first moment of the preset duration, the second interface package name of the interface where the control is located at the first moment of the preset duration, the first application package name of the application to which the control belongs at the current moment, the first interface package name of the interface where the space is located at the current moment, layout file information of the interface where the control is located, the control type, and position information of the control in the corresponding interface such as control coordinates, control width, control height, etc. The first moment is the moment before the current moment.
[0059] S1023: Determine event information corresponding to the operation event based on the target control information, the first application package name, and the first interface package name.
[0060] Specifically, in this embodiment, the target control information includes a second application package name and a second interface package name; the second application package name is the application package name of the application to which the target control belongs at the first moment of the preset time length, and the second interface package name is the interface package name of the interface where the target control is located at the first moment of the preset time length, and the first moment is the moment before the current moment.
[0061] Specifically, since the interface package name is the unique identification information of the interface and the application package name is the unique identification information of the application, in this embodiment, it is possible to determine whether the operation event occurs in the same interface or in the same application by determining whether the interface package name of the interface where the control is located and the application package name of the application to which the control belongs are the same before and after the operation event occurs.
[0062] Specifically, Figure 3 As shown, Figure 3 yes Figure 2 The specific implementation flow chart of S1023 is as follows: Figure 3 It can be seen that S1023 includes:
[0063] S301, if the second application package name is the same as the first application package name, and the second interface package name is the same as the first interface package name, it is determined that the operation event occurs in the same interface, and the event information includes the second application package name and the second interface package name.
[0064] Specifically, if it is determined that the operation event occurs in the same interface, it is determined that the application package name and interface package name corresponding to the control before and after the operation event occur are unchanged, and the corresponding event information includes the application package name and interface package name corresponding to the control before and after the operation event occurs. Specifically, the event information includes the second application package name and the second interface package name, or the event information includes the first application package name and the first interface package name.
[0065] S302: If the second application package name is the same as the first application package name, and the second interface package name is different from the first interface package name, it is determined that the operation event occurs in different interfaces within the same application, and the event information includes the second application package name, the second interface package name and the first interface package name.
[0066] Specifically, if it is determined that the operation event occurs in different interfaces of the same application, it is determined that the application package name corresponding to the control before and after the operation event occurs remains unchanged, and the interface package name changes, and the corresponding event information includes the application package name and interface package name corresponding to the control before and after the operation event occurs. Specifically, the event information includes the second application package name, the second interface package name, and the first interface package name, or the event information includes the second application package name, the second interface package name, and the second interface package name.
[0067] S303: If the second application package name is different from the first application package name, and the second interface package name is different from the first interface package name, it is determined that the operation event occurs between different applications, and the event information includes the first application package name, the first interface package name, the second application package name and the second interface package name.
[0068] Specifically, if it is determined that the operation event occurs in different applications, it is determined that the application package name and interface package name corresponding to the control before and after the operation event occur have changed, and the corresponding event information includes the application package name and interface package name corresponding to the control before and after the operation event occurs. Specifically, the event information includes the second application package name, the second interface package name, the first interface package name, and the second interface package name.
[0069] S103, recording the target event information in a pre-established event database.
[0070] Specifically, in this embodiment, in order to facilitate the statistics of operation events of each control within a preset time period, an event database is pre-established to record target event information.
[0071] It is understandable that the target event information can be formatted according to a preset format and then recorded in a pre-established event database. Specifically, there is no specific limitation on the preset format.
[0072] S104, based on all event information recorded in the event database, counting the operation events occurring in all applications in the terminal system within the preset time period; all the event information includes all the target event information acquired at different times within the preset time period, and the event information includes the application package name.
[0073] Specifically, all applications in the terminal system have unique application package names, and according to the application package names included in each event information, operation events occurring in all applications in the terminal system can be statistically obtained. Further, according to the statistical operation events in all applications in the terminal system, it can be determined which application has the most operation events, thereby determining the popularity of the application, etc.
[0074] Specifically, in a possible implementation, the counting of operation events occurring in all applications in the terminal system within the preset time period based on all event information recorded in the event database specifically includes:
[0075] Based on the application package names included in all event information recorded in the event database, statistics are counted on operation events occurring in applications corresponding to all application package names within the preset time period, where the application package names include the first application package name and the second application package name.
[0076] For example, all application package names recorded in the event database are traversed to obtain all application package names within the preset duration and generate a corresponding list. The information in the list is the event information of operation events in the applications corresponding to all application package names within the preset duration. Based on the information in the list, the operation events occurring in the applications corresponding to all application package names within the preset duration are counted respectively.
[0077] Further, in another implementation, the counting of operation events occurring in all applications in the terminal system within the preset time period based on all event information recorded in the event database specifically includes:
[0078] Based on the interface package names included in all event information recorded in the event database, statistics are counted on operation events occurring on the interfaces corresponding to all interface package names within the preset time period, wherein the interface package names include the first interface package name and the second interface package name.
[0079] For example, all interface package names recorded in the event database are traversed to obtain all application package names within the preset duration and generate a corresponding list. The information in the list is the event information of the operation events corresponding to all interface package names within the time period. Based on the information in the list, the operation events occurring on the interfaces corresponding to all interface package names within the preset duration are counted respectively.
[0080] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0081] Through the above analysis, it can be known that the method for counting control events in the terminal system proposed in the present application is to monitor the operation events of all controls in the terminal system within a preset time period; if the target operation event of the target control is monitored, the target event information corresponding to the target operation event is obtained; the target event information is recorded in a pre-established event database; based on all the event information recorded in the event database, the operation events in all applications in the terminal system that occur within the preset time period are counted. Since the monitored target event information is recorded in a pre-established event database, and based on all the event information recorded in the event database, the operation events in all applications in the terminal system that occur within the preset time period are counted, it is possible to avoid importing the corresponding layout file into a third-party package file in the process of counting operation events, avoid the problem of large workload and redundancy in counting operation events due to the large size of the third-party file, and improve the efficiency of counting operation time.
[0082] like Figure 4 FIG. 1 is a flowchart of an implementation method for counting operation events in a terminal system provided by the second embodiment of the present application. Figure 4 It can be seen that this embodiment and Figure 1 Compared with the illustrated embodiment, the specific implementation process of S402 to S405 is the same as the specific implementation process of S101 to S104, except that S401 is also included before S402. Specifically, the specific implementation process of S401 is described in detail as follows.
[0083] S401, adding an operation event monitoring function to all the controls, wherein the operation event monitoring function is used to monitor the operation events of the preset controls.
[0084] Specifically, in this example, the event monitoring function includes a monitoring object and a monitoring class object of the monitoring object, and the monitoring object is an operation event of the control determined by the properties corresponding to each control added in the View class of all controls.
[0085] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0086] Through the above analysis, it can be known that the method for counting control events in the terminal system proposed in the present application monitors the operation events of all controls in the terminal system within a preset time period; if the target operation event of the target control is monitored, the target event information corresponding to the target operation event is obtained; the target event information is recorded in a pre-established event database; based on all the event information recorded in the event database, the operation events occurring in all applications in the terminal system within the preset time period are counted. Since the monitored target event information is recorded in a pre-established event database, and based on all the event information recorded in the event database, the operation events occurring in all applications in the terminal system within the preset time period are counted, it is possible to avoid importing the corresponding layout file into a third-party package file in the process of counting operation events, avoid the problem of large workload and redundancy in counting operation events due to the large size of the third-party file, and improve the efficiency of counting operation time.
[0087] like Figure 5 FIG. 1 is a flowchart of an implementation method for counting operation events in a terminal system provided by the third embodiment of the present application. Figure 5 It can be seen that this embodiment and Figure 4 Compared with the illustrated embodiment, the specific implementation process of S501 to S504 is the same as the specific implementation process of S401 to S404, and the specific implementation process of S508 is the same as the specific implementation process of S405. The difference is that S505 to S507 are also included before S508, and S505 can be executed before S504 or after S504. Specifically, the specific implementation process of S505 to S507 is detailed as follows.
[0088] S505: Obtain a configuration file corresponding to the application installed in the terminal system.
[0089] Specifically, during the startup process of the terminal system, an application management service (PackageManager Service) is started. The application management service is responsible for scanning a specific directory in the terminal system and finding the application file in the specific directory. The application file is a file with an apk suffix. After finding the application file, the application file is parsed to obtain the relevant configuration file of the application. In this example, the configuration file corresponding to the application parsed by the application management service is obtained.
[0090] S506: Parse the configuration file to obtain layout files of all application interfaces of each of the application programs.
[0091] The configuration file can be disassembled by a predetermined disassembly tool, such as the apktool tool. After disassembling the configuration file, the folder storing the layout files of the application interfaces is obtained, and the layout files of all interfaces of each of the applications are obtained from the folder storing the layout files of the application interfaces.
[0092] S507, acquiring control information in the layout file, and storing the control information in a pre-established control database.
[0093] It should be noted that each interface (Activity) of each application in the terminal system corresponds to a layout file, the elements displayed in each interface are located in its corresponding layout file, and each element corresponds to a control in the layout file.
[0094] In this example, each layout file is parsed to obtain the control properties of each control in the layout file. Specifically, the control properties include control identification information, control width, control height, control type, application package name of the application to which the control belongs, interface package name of the interface where the control is located, and layout file name corresponding to the interface where the control is located.
[0095] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0096] Through the above analysis, it can be known that the method for counting control events in the terminal system proposed in the present application monitors the operation events of all controls in the terminal system within a preset time period; if the target operation event of the target control is monitored, the target event information corresponding to the target operation event is obtained; the target event information is recorded in a pre-established event database; based on all the event information recorded in the event database, the operation events occurring in all applications in the terminal system within the preset time period are counted. Since the monitored target event information is recorded in a pre-established event database, and based on all the event information recorded in the event database, the operation events occurring in all applications in the terminal system within the preset time period are counted, it is possible to avoid importing the corresponding layout file into a third-party package file in the process of counting operation events, avoid the problem of large workload and redundancy in counting operation events due to the large size of the third-party file, and improve the efficiency of counting operation time.
[0097] Figure 6 Schematic diagram of the device for counting operation events in the terminal system provided by the present application. Figure 6As shown, the operation event statistics device 6 in the terminal system of this embodiment includes: a monitoring module 601, an acquisition module 602, a recording module 603 and a statistics module 604.
[0098] Monitoring module 601, used to monitor the operation events of all controls in the terminal system within a preset time period;
[0099] The acquisition module 602 is used to acquire target event information corresponding to the target operation event if a target operation event of a target control is monitored;
[0100] Recording model 603, used to record the target event information in a pre-established event database;
[0101] The statistics module 604 is used to count the operation events occurring in all applications in the terminal system within the preset time period based on all event information recorded in the event database; all the event information includes all the target event information obtained at different times within the preset time period, and the event information includes the application package name.
[0102] Preferably, it also includes:
[0103] An adding module is used to add an operation event monitoring function to all the controls, and the operation event monitoring function is used to monitor the operation events of the preset controls.
[0104] Preferably, the acquisition module 602 includes:
[0105] A first acquisition unit is used to acquire, when the operation event monitoring function monitors the operation event of the target control, the control identification information of the target control, the first application package name of the application to which the target control belongs at the current moment, and the first interface package name of the interface where the target control is located at the current moment;
[0106] A second acquisition unit is used to traverse a pre-established control database based on the control identification information to acquire target control information of the target control, wherein the control database stores a mapping relationship between control identification information and control information;
[0107] A determination unit is used to determine event information corresponding to the operation event based on the target control information, the first application package name, and the first interface package name.
[0108] Preferably, the target control information includes a second application package name and a second interface package name; the second application package name is the application package name of the application to which the target control belongs at the first moment of the preset time length, the second interface package name is the interface package name of the interface where the target control is located at the first moment of the preset time length, and the first moment is a moment before the current moment;
[0109] The determining unit comprises:
[0110] a first determining unit, configured to determine that the operation event occurs in the same interface if the second application package name is the same as the first application package name, and the second interface package name is the same as the first interface package name, and the event information includes the second application package name and the second interface package name;
[0111] a second determination unit, configured to determine that the operation event occurs in different interfaces within the same application if the second application package name is the same as the first application package name, and the second interface package name is different from the first interface package name, wherein the event information includes the second application package name, the second interface package name, and the first interface package name;
[0112] The third determination unit is used to determine that the operation event occurs between different applications if the second application package name is different from the first application package name, and the second interface package name is different from the first interface package name, and the event information includes the first application package name, the first interface package name, the second application package name and the second interface package name.
[0113] Preferably, the statistics module 604 is specifically used for:
[0114] Based on the application package names included in all event information recorded in the event database, statistics are counted of operation events occurring in the applications corresponding to all application package names in the terminal system within the preset time period, where the application package names include the first application package name and the second application package name.
[0115] Preferably, the statistics module 604 is specifically used for:
[0116] Based on the interface package names contained in all event information recorded in the event database, statistics are counted on operation events occurring on the interfaces corresponding to all interface package names in the terminal system within the preset time period, wherein the interface package names include the first interface package name and the second interface package name.
[0117] Preferably, it also includes:
[0118] A configuration file acquisition module, used to acquire a configuration file corresponding to an application installed in the terminal system;
[0119] A parsing module, used to parse the configuration file to obtain layout files of all application interfaces of each application program;
[0120] The control information acquisition module is used to acquire the control information in the layout file and store the control information in a pre-established control database.
[0121] Figure 7 is a schematic diagram of a terminal provided by this application. Figure 7 As shown, the terminal 7 of this embodiment includes: a processor 70, a memory 71, and a computer program 72 stored in the memory 71 and executable on the processor 70, such as an operation event statistics program in the terminal system. When the processor 70 executes the computer program 72, the steps in the above-mentioned embodiments of the operation event statistics method in the terminal system are implemented, such as Figure 1 Alternatively, when the processor 70 executes the computer program 72, the functions of each module / unit in the embodiment of the operation event statistics device in the terminal system are realized, for example Figure 6 Functions of modules 601 to 604 are shown.
[0122] Exemplarily, the computer program 72 may be divided into one or more modules / units, which are stored in the memory 71 and executed by the processor 70 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 72 in the terminal 7. For example, the computer program 72 may be divided into a monitoring module, an acquisition module, a recording module, and a statistical module (a module in a virtual device), and the specific functions of each module are as follows:
[0123] A monitoring module is used to monitor the operation events of all controls in the terminal system within a preset time period;
[0124] An acquisition module, used for acquiring target event information corresponding to the target operation event if a target operation event of a target control is monitored;
[0125] A recording module, used for recording the target event information in a pre-established event database;
[0126] A statistics module is used to count the operation events occurring in all applications in the terminal system within the preset time period based on all event information recorded in the event database; all the event information includes all the target event information obtained at different times within the preset time period, and the event information includes the application package name.
[0127] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0128] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0129] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0130] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0131] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple communication units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0132] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0133] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. . Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0134] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for counting operation events in a terminal system, characterized in that: include: Add operation event listening functions to all controls; Monitor the operation events of all controls in the terminal system within a preset time period; When the operation event listening function listens to the operation event of the target control, the control identification information of the target control, the first application package name of the application to which the target control belongs at the current moment, and the first interface package name of the interface where the target control is located at the current moment are obtained; based on the control identification information, a pre-established control database is traversed to obtain the target control information of the target control; the target control information includes a second application package name and a second interface package name; the second application package name is the application package name of the application to which the target control belongs at the first moment of the preset time length, and the second interface package name is the interface package name of the interface where the target control is located at the first moment of the preset time length, and the first moment is the moment before the current moment; wherein the interface package name is the unique identity information of the interface, and the application package name is the unique identity information of the application; If the second application package name is the same as the first application package name, and the second interface package name is the same as the first interface package name, it is determined that the operation event occurs in the same interface, and the event information includes the second application package name and the second interface package name; If the second application package name is the same as the first application package name, and the second interface package name is different from the first interface package name, it is determined that the operation event occurs in different interfaces within the same application, and the event information includes the second application package name, the second interface package name, and the first interface package name; If the second application package name is different from the first application package name, and the second interface package name is different from the first interface package name, it is determined that the operation event occurs between different applications, and the event information includes the first application package name, the first interface package name, the second application package name, and the second interface package name; Recording target event information corresponding to the target operation event in a pre-established event database; Based on all the event information recorded in the event database, statistics are collected on operation events occurring in all applications in the terminal system within the preset time period; all the event information includes all the target event information acquired at different times within the preset time period, and the event information includes the application package name.
2. The method for counting operation events in a terminal system according to claim 1, characterized in that: The operation event monitoring function is used to monitor the operation events of the preset controls.
3. The method for counting operation events in a terminal system according to claim 2, characterized in that: The control database stores a mapping relationship between control identification information and control information.
4. The method for counting operation events in a terminal system according to claim 3, characterized in that: The counting of operation events occurring in all applications in the terminal system within the preset time period based on all event information recorded in the event database includes: Based on the application package names included in all event information recorded in the event database, statistics are counted of operation events occurring in the applications corresponding to all application package names in the terminal system within the preset time period, where the application package names include the first application package name and the second application package name.
5. The method for counting operation events in a terminal system according to claim 3 or 4, characterized in that: The counting of operation events occurring in all applications in the terminal system within the preset time period based on all event information recorded in the event database includes: Based on the interface package names contained in all event information recorded in the event database, statistics are counted on operation events occurring on the interfaces corresponding to all interface package names in the terminal system within the preset time period, wherein the interface package names include the first interface package name and the second interface package name.
6. The method for counting operation events in a terminal system according to any one of claims 1 to 4, characterized in that: Before recording the target event information corresponding to the target operation event in a pre-established event database, the process includes: Obtaining a configuration file corresponding to an application installed in the terminal system; Parsing the configuration file to obtain layout files of all application interfaces of each application program; The control information in the layout file is obtained, and the control information is stored in a pre-established control database.
7. An operation event statistics device in a terminal system, characterized in that: include: Add operation event listening functions to all controls; A monitoring module, used to monitor the operation events of all controls in the terminal system within a preset time period; A first acquisition unit is used to acquire, when the operation event monitoring function monitors the operation event of the target control, the control identification information of the target control, the first application package name of the application to which the target control belongs at the current moment, and the first interface package name of the interface where the target control is located at the current moment; A second acquisition unit is used to traverse a pre-established control database based on the control identification information to acquire target control information of the target control; the target control information includes a second application package name and a second interface package name; the second application package name is the application package name of the application to which the target control belongs at the first moment of the preset time length, and the second interface package name is the interface package name of the interface where the target control is located at the first moment of the preset time length, and the first moment is a moment before the current moment; wherein the interface package name is the unique identity information of the interface, and the application package name is the unique identity information of the application; A first determination unit, configured to determine that the operation event occurs in the same interface if the second application package name is the same as the first application package name, and the second interface package name is the same as the first interface package name, and the event information includes the second application package name and the second interface package name; a second determination unit, configured to determine that the operation event occurs in different interfaces within the same application if the second application package name is the same as the first application package name, and the second interface package name is different from the first interface package name, and the event information includes the second application package name, the second interface package name, and the first interface package name; a third determination unit, configured to determine that the operation event occurs between different applications if the second application package name is different from the first application package name, and the second interface package name is different from the first interface package name, and the event information includes the first application package name, the first interface package name, the second application package name, and the second interface package name; A recording module, used to record target event information corresponding to the target operation event in a pre-established event database; A statistics module is used to count the operation events occurring in all applications in the terminal system within the preset time period based on all the event information recorded in the event database; all the event information includes all the target event information obtained at different times within the preset time period, and the event information includes the application package name.
8. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method for counting operation events in a terminal system according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for counting operation events in a terminal system according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Application program recommendation method and corresponding device
CN105635480A
Page data collection method and device
CN107491488A
Android application similarity detection method, mobile terminal and storage device
CN109933976A