Methods, devices, computer equipment, and media for reporting cloud machine data points
By acquiring and uploading various data points from cloud machine applications, the problem of single data point reporting in existing technologies has been solved, enabling diverse data analysis and optimized allocation of cloud machine resources within the resource management platform.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-04
- Publication Date
- 2026-04-14
AI Technical Summary
The existing methods for reporting cloud machine data are limited and lack diversity, which prevents the resource management platform from acquiring and analyzing cloud machine operation data in a timely manner, thus affecting the allocation of cloud machine resources.
By acquiring data from installation, uninstallation, foreground/background switching, and exception handling of cloud applications, and writing it to a file, the cloud plugin periodically uploads the data to a resource management platform for remote monitoring and data statistical analysis.
It enables the reporting of various cloud machine data points, increasing data diversity and allowing the resource management platform to perform remote monitoring and data statistical analysis, thereby optimizing cloud machine resource allocation.
Smart Images

Figure CN116455982B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of outbound call processing, and in particular to a method, apparatus, computer equipment, and medium for reporting cloud machine embedded data. Background Technology
[0002] The existing methods for reporting cloud machine event tracking data in the market are relatively simple, mainly including event tracking data for cloud machine restarts, logins, and logouts. At the same time, the data is not reported to the resource management platform in a timely manner, resulting in the resource management platform lacking the necessary data analysis for analyzing user operations on cloud machines. Summary of the Invention
[0003] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method, device, computer equipment and medium for reporting cloud machine data points. This invention can obtain and upload multiple data points of any cloud machine application, increasing the diversity of data point reporting. This enables the resource source management platform to remotely monitor and statistically analyze multiple cloud machine data points and allocate cloud machine resources based on the statistical analysis results.
[0004] To address at least one of the aforementioned technical problems, embodiments of the present invention provide a method for reporting cloud server data tracking points, the method comprising:
[0005] Get the event tracking data when any cloud server application is installed, and get the event tracking data when any cloud server application is uninstalled;
[0006] Obtain the event tracking data for any cloud application switching between foreground and background;
[0007] Obtain event tracking data for any cloud server application anomalies;
[0008] The event tracking data during the installation of any cloud application, the event tracking data during the uninstallation of any cloud application, the event tracking data during the switching between foreground and background of any cloud application, and the event tracking data during the abnormality of any cloud application are written to the event tracking data file.
[0009] The cloud plugin reports the event tracking data in the event tracking data file to the resource management platform. The resource management platform is used to remotely monitor and statistically analyze the event tracking data of one or more cloud machine applications and allocate cloud machine resources based on the statistical analysis results.
[0010] Preferably, obtaining the event tracking data during the installation of any cloud application includes:
[0011] The package name and application name of any cloud server application during installation can be obtained using the intent.getDataString() method. The data points collected during the installation of any cloud server application include the package name and application name of that cloud server application.
[0012] Preferably, obtaining the event tracking data when any cloud application is uninstalled includes:
[0013] The package name of any cloud server application at the time of uninstallation is obtained by using the intent.getDataString() method. The data points recorded when the cloud server application is uninstalled include the package name of the cloud server application.
[0014] Preferably, when any cloud application is installed, the cloud system sends an android.intent.action.PACKAGE_ADDED broadcast so that the package name and application name of any cloud application installed can be obtained through the intent.getDataString() method;
[0015] When any cloud application is uninstalled, the cloud system sends an android.intent.action.PACKAGE_REMOVED broadcast so that the package name of any cloud application at the time of uninstallation can be obtained through the intent.getDataString() method.
[0016] Preferably, the step of obtaining the tracking data for switching between foreground and background of any cloud application includes:
[0017] Listen for changes in the window.focus() method using the updateFocusedWindowLocked() method in the Android system;
[0018] When the switching of different APK class names in the lastFocus() and newFocus() methods of the window.focus() method is detected, the lastFocus.getOwningPackage() method is called to obtain the package name of the first cloud server application, and the newFocus.getOwningPackage() method is called to obtain the package name of the second cloud server application. The tracking data for the switching of the foreground and background of any cloud server application includes the package name of the first cloud server application and the package name of the second cloud server application.
[0019] Preferably, the step of obtaining the event tracking data for any cloud application anomaly includes:
[0020] When any ANR or unresponsive error pop-up is detected in any cloud server application, the package name of the cloud server application before handleShowAppErrorUi(), handleShowAnrUi(), and dialog.show() is obtained based on the pop-up code logic of the error pop-up. The event tracking data of any cloud server application exception includes the obtained package name of the cloud server application.
[0021] Preferably, the cloud plugin starts a polling sub-thread to read the tracking data in the tracking data file at preset time intervals and according to the file path of the tracking data file, and reports the tracking data in the tracking data file to the resource management platform via HTTP.
[0022] A device for reporting cloud server data embedding points, the device comprising:
[0023] The first acquisition module is used to acquire the event tracking data during the installation of any cloud application and to acquire the event tracking data during the uninstallation of any cloud application.
[0024] The second acquisition module is used to acquire the data points of any cloud application switching between foreground and background.
[0025] The third acquisition module is used to acquire the event tracking data of any cloud machine application anomaly.
[0026] The writing module is used to write the event tracking data during the installation of any cloud application, the event tracking data during the uninstallation of any cloud application, the event tracking data during the switching between foreground and background of any cloud application, and the event tracking data during the abnormality of any cloud application to the event tracking data file.
[0027] The reporting module is used to report the tracking data in the tracking data file to the resource management platform through the cloud plugin. The resource management platform is used to remotely monitor and statistically analyze the tracking data of one or more cloud machine applications and allocate cloud machine resources based on the statistical analysis results.
[0028] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described in any of the above embodiments.
[0029] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any of the above embodiments.
[0030] The aforementioned method, apparatus, computer equipment, and medium for reporting cloud machine event tracking data acquire event tracking data during the installation of any cloud machine application, and during the uninstallation of any cloud machine application; acquire event tracking data during the foreground / background switching of any cloud machine application; acquire event tracking data during any cloud machine application anomalies; write the event tracking data during installation, uninstallation, foreground / background switching, and anomalies of any cloud machine application to an event tracking data file; and report the event tracking data in the event tracking data file to a resource management platform via a cloud plugin. The resource management platform is used for remote monitoring and statistical analysis of the event tracking data of one or more cloud machine applications, and allocates cloud machine resources based on the statistical analysis results. Therefore, it can obtain and upload multiple event tracking data of any cloud machine application, increasing the diversity of event tracking data reporting, thereby enabling the resource management platform to remotely monitor and statistically analyze multiple cloud machine event tracking data, and allocate cloud machine resources based on the statistical analysis results. Attached Figure Description
[0031] Figure 1 This is a flowchart of a cloud server data reporting method according to an embodiment of the present invention;
[0032] Figure 2 This is an interactive flowchart of a cloud server data reporting method according to an embodiment of the present invention;
[0033] Figure 3 This is a structural block diagram of a cloud server embedded data reporting device according to an embodiment of the present invention;
[0034] Figure 4 This is a schematic diagram of the structural composition of a computer device in an embodiment of the present invention. Detailed Implementation
[0035] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0036] This invention provides a method for reporting cloud server data tracking points. For example... Figure 1 As shown, this method for reporting cloud machine data includes the following steps:
[0037] S101, obtain the event tracking data when any cloud server application is installed, and obtain the event tracking data when any cloud server application is uninstalled.
[0038] In one example, obtaining the event tracking data during the installation of any cloud server application includes: obtaining the package name and application name of any cloud server application during installation using the intent.getDataString() method, wherein the event tracking data during the installation of any cloud server application includes the package name and application name of the any cloud server application.
[0039] In one example, obtaining the event tracking data when any cloud server application is uninstalled includes: obtaining the package name of any cloud server application at the time of uninstallation through the intent.getDataString() method, wherein the event tracking data when any cloud server application is uninstalled includes the package name of the cloud server application.
[0040] When any cloud application is installed, the cloud system sends an android.intent.action.PACKAGE_ADDED broadcast, so that the package name and application name of any cloud application at the time of installation can be obtained through the intent.getDataString() method; when any cloud application is uninstalled, the cloud system sends an android.intent.action.PACKAGE_REMOVED broadcast, so that the package name of any cloud application at the time of uninstallation can be obtained through the intent.getDataString() method.
[0041] Specifically, the tracking data obtained from installing and uninstalling cloud application: In the Android system, both application installation and uninstallation send system broadcasts. After application installation, the Android system sends the `android.intent.action.PACKAGE_ADDED` broadcast. The installed application package name and application name can be obtained using `intent.getDataString()`. When an application is uninstalled, the Android system sends the `android.intent.action.PACKAGE_REMOVED` broadcast. Similarly, `intent.getDataString()` retrieves the uninstalled application package name. Tracking data is written to a file via file writing.
[0042] S102, obtain the data points for switching between the foreground and background of any cloud application.
[0043] In one example, obtaining the event tracking data for the switching between foreground and background of any cloud application includes: monitoring changes in the `window.focus()` method using the `updateFocusedWindowLocked()` method of the Android system; when a switch between different class names of the APK in the `lastFocus()` and `newFocus()` methods of `window.focus()` is detected, calling the `lastFocus.getOwningPackage()` method to obtain the package name of the first cloud application, and calling the `newFocus.getOwningPackage()` method to obtain the package name of the second cloud application. The event tracking data for the switching between foreground and background of any cloud application includes the package name of the first cloud application and the package name of the second cloud application.
[0044] Specifically, foreground / background switching event tracking data for cloud applications: In the Android system's WindowManagerService, the updateFocusedWindowLocked method can monitor changes in the window's focus. Furthermore, lastFocus() and newFocus() can detect switching between APKs, including switching between interfaces with different class names within an APK. Whenever lastFocus() and newFocus() differ, the lastFocus.getOwningPackage() and newFocus.getOwningPackage() methods are called respectively to retrieve the corresponding application's package name, thereby obtaining the event tracking data for foreground / background switching. This data is then written to an event tracking data file via file writing.
[0045] S103, obtain the event tracking data for any cloud server application anomaly.
[0046] In one example, obtaining the event tracking data for any cloud server application anomaly includes: when monitoring an ANR and an error pop-up indicating no response from the app for any cloud server application, obtaining the package name of the cloud server application before handleShowAppErrorUi(), handleShowAnrUi(), and dialog.show() based on the pop-up code logic of the error pop-up, wherein the event tracking data for any cloud server application anomaly includes the obtained package name of the cloud server application.
[0047] Specifically, the tracking data for cloud application anomalies: In the Android system, when a cloud application experiences ANR or becomes unresponsive, the Android system will display an error pop-up indicating that the app is unresponsive. When monitoring ANR and unresponsive error pop-ups, the pop-up code logic is located in ` / frameworks / base / services / core / java / com / android / server / am / AppErrors.java`. Therefore, before `handleShowAppErrorUi()` and `handleShowAnrUi()` in this class, `dialog.show()`, the package name is obtained, and the corresponding application anomaly tracking data is generated via file writing.
[0048] The data for each of the above tracking points is obtained in the following ways:
[0049] The cloud server system intercepts the foreground / background switching of applications: The system framework WindowManagerService monitors the changes in the focus of the current window, calls the getOwningPackage method of lastFocus and newFocus to obtain the package name of the cloud server application switching foreground / background, and generates the instrumentation data through file writing.
[0050] The cloud server system intercepts application exceptions to generate event tracking data: In the system frameworks, when the cloud server application experiences ANR or app exceptions and becomes unresponsive, and an exception pop-up window appears in AppErrors, the system obtains the package name of the abnormal cloud server application and generates the corresponding application exception event tracking data through file writing.
[0051] S104, respectively write the event tracking data during the installation of any cloud application, the event tracking data during the uninstallation of any cloud application, the event tracking data during the switching between foreground and background of any cloud application, and the event tracking data during the abnormality of any cloud application to the event tracking data file.
[0052] S105, the tracking data in the tracking data file is reported to the resource management platform through the cloud plugin. The resource management platform is used for remote monitoring and data statistical analysis of the tracking data of one or more cloud machine applications, and for allocating cloud machine resources based on the data statistical analysis results.
[0053] In one example, the cloud plugin starts a polling sub-thread to read the event tracking data from the event tracking data file at preset time intervals and according to the file path of the event tracking data file, and reports the event tracking data from the event tracking data file to the resource management platform via HTTP.
[0054] Specifically, the system periodically monitors the event tracking data files of the cloud server and reports them to the resource management platform via the edge-cloud channel. For example, the path of the event tracking data file is / data / system / UsageStats.txt. The edge-cloud plugin starts a polling sub-thread that reads the event tracking data file every half hour and uploads it to the resource management platform in a timely manner via HTTP.
[0055] The aforementioned method for reporting cloud machine event tracking data involves acquiring event tracking data during the installation and uninstallation of any cloud machine application; acquiring event tracking data during foreground / background switching of any cloud machine application; and acquiring event tracking data during application anomalies. These event tracking data are then written to an event tracking data file. A cloud plugin is used to report the event tracking data from this file to a resource management platform. This platform remotely monitors and statistically analyzes the event tracking data of one or more cloud machine applications and allocates cloud machine resources based on the results. Therefore, this method enables the acquisition and uploading of multiple event tracking data points for any cloud machine application, increasing the diversity of event tracking data reporting. This allows the resource management platform to remotely monitor and statistically analyze various cloud machine event tracking data points and allocate cloud machine resources based on the statistical analysis results.
[0056] Specifically, the implementation logic of a method for reporting cloud machine data collection points is as follows: Figure 2 As shown. Figure 2 As shown, cloud applications are the terminal applications of cloud machines, i.e., cloud machine applications. Cloud systems are the supporting systems for cloud applications, such as Android systems. End-to-cloud plugins are the cloud plugins for the aforementioned end-to-cloud applications.
[0057] The cloud system acquires event tracking data from scenarios such as foreground / background switching of cloud applications, cloud application errors, cloud application installation, and cloud application uninstallation, and generates event tracking data files. The edge-cloud plugin periodically polls to obtain the event tracking data from the cloud system's event tracking data files and promptly uploads the event tracking data to the resource management platform via HTTP.
[0058] In summary, this application not only provides multiple methods for generating cloud machine event tracking data, but also adds event tracking data for application installation, application uninstallation, application foreground / background switching, and application anomalies, solving the problem of limited event tracking data, such as only single events like cloud machine restart, login, and logout. Furthermore, it adds a function to poll and check event tracking data files and upload them to the resource management platform, facilitating the collection and statistics of event tracking data on the resource management platform.
[0059] This application also provides a device for reporting cloud machine data tracking points, such as... Figure 3As shown, the system includes a first acquisition module 301, a second acquisition module 302, a third acquisition module 303, a writing module 304, and a reporting module 305. The first acquisition module 301 is used to acquire the event tracking data during the installation of any cloud machine application and the event tracking data during the uninstallation of any cloud machine application; the second acquisition module 302 is used to acquire the event tracking data during the foreground / background switching of any cloud machine application; the third acquisition module 303 is used to acquire the event tracking data during any cloud machine application anomalies; the writing module 304 is used to write the event tracking data during the installation of any cloud machine application, the event tracking data during the uninstallation of any cloud machine application, the event tracking data during the foreground / background switching of any cloud machine application, and the event tracking data during any cloud machine application anomalies to an event tracking data file; the reporting module 305 is used to report the event tracking data in the event tracking data file to a resource management platform through a cloud plugin. The resource management platform is used for remote monitoring and data statistical analysis of the event tracking data of one or more cloud machine applications and for allocating cloud machine resources based on the data statistical analysis results.
[0060] For specific limitations regarding the cloud server data reporting device, please refer to the limitations of the cloud server data reporting method described above, which will not be repeated here. Each module in the aforementioned cloud server data reporting device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0061] This invention provides a computer-readable storage medium storing an application program. When executed by a processor, the program implements a cloud server data reporting method according to any one of the above embodiments. The computer-readable storage medium includes, but is not limited to, any type of disk (including floppy disk, hard disk, optical disk, CD-ROM, and magneto-optical disk), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic cards, or optical cards. In other words, the storage device includes any medium that can store or transmit information in a readable form by a device (e.g., a computer, a mobile phone), and can be a read-only memory, a disk, or an optical disk, etc.
[0062] This invention also provides a computer application running on a computer, which is used to execute a method for reporting cloud machine data embedding points according to any of the above embodiments.
[0063] also, Figure 4 This is a schematic diagram of the structural composition of a computer device in an embodiment of the present invention.
[0064] This invention also provides a computer device, such as... Figure 4 As shown. The computer device includes a processor 402, a memory 403, an input unit 404, and a display unit 405, among other components. Those skilled in the art will understand that... Figure 4 The illustrated device structures are not intended to limit all devices and may include more or fewer components than shown, or combine certain components. Memory 403 can be used to store application program 401 and various functional modules. Processor 402 runs application program 401 stored in memory 403, thereby performing various functional applications and data processing of the device. Memory can be internal memory or external memory, or both. Internal memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, or random access memory. External memory may include hard disks, floppy disks, ZIP disks, USB flash drives, magnetic tapes, etc. The memory disclosed in this invention includes, but is not limited to, these types of memory. The memory disclosed in this invention is only an example and not a limitation.
[0065] Input unit 404 is used to receive signal input and user-input keywords. Input unit 404 may include a touch panel and other input devices. The touch panel can collect user touch operations on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel) and drive the corresponding connection device according to a pre-set program; other input devices may include, but are not limited to, one or more of physical keyboards, function keys (such as play control buttons, power buttons, etc.), trackballs, mice, joysticks, etc. Display unit 405 can be used to display user-input information or information provided to the user, as well as various menus of the terminal device. Display unit 405 may be in the form of a liquid crystal display, organic light-emitting diode, etc. Processor 402 is the control center of the terminal device, connecting various parts of the entire device through various interfaces and lines, performing various functions and processing data by running or executing software programs and / or modules stored in memory 403, and calling data stored in memory.
[0066] As one embodiment, the computer device includes: one or more processors 402, a memory 403, and one or more application programs 401, wherein the one or more application programs 401 are stored in the memory 403 and configured to be executed by the one or more processors 402, and the one or more application programs 401 are configured to perform a cloud machine data reporting method in any of the above embodiments.
[0067] Furthermore, the above provides a detailed description of the cloud machine data reporting method, apparatus, computer equipment, and medium provided in the embodiments of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for reporting cloud server embedded data, characterized in that, The reporting method includes: Get the event tracking data when any cloud server application is installed, and get the event tracking data when any cloud server application is uninstalled; Obtain the event tracking data for any cloud application switching between foreground and background; Obtain event tracking data for any cloud application anomalies; The event tracking data during the installation of any cloud application, the event tracking data during the uninstallation of any cloud application, the event tracking data during the switching between foreground and background of any cloud application, and the event tracking data during the abnormality of any cloud application are written to the event tracking data file. The cloud plugin reports the event tracking data in the event tracking data file to the resource management platform. The resource management platform is used to remotely monitor and statistically analyze the event tracking data of one or more cloud machine applications and allocate cloud machine resources based on the statistical analysis results.
2. The method according to claim 1, characterized in that, The acquisition of the event tracking data during the installation of any cloud application includes: The package name and application name of any cloud server application during installation can be obtained using the intent.getDataString() method. The data points collected during the installation of any cloud server application include the package name and application name of that cloud server application.
3. The reporting method according to claim 2, characterized in that, The acquisition of event tracking data during the uninstallation of any cloud application includes: The package name of any cloud server application at the time of uninstallation is obtained by using the intent.getDataString() method. The data points recorded when the cloud server application is uninstalled include the package name of the cloud server application.
4. The reporting method according to claim 3, characterized in that, When any cloud application is installed, the cloud system sends an android.intent.action.PACKAGE_ADDED broadcast so that the package name and application name of any cloud application installed can be obtained through the intent.getDataString() method; When any cloud application is uninstalled, the cloud system sends an android.intent.action.PACKAGE_REMOVED broadcast so that the package name of any cloud application at the time of uninstallation can be obtained through the intent.getDataString() method.
5. The reporting method according to any one of claims 1-4, characterized in that, The acquisition of event tracking data for foreground / background switching of any cloud application includes: Listen for changes in the window.focus() method using the updateFocusedWindowLocked() method in the Android system; When the switching of different APK class names in the lastFocus() and newFocus() methods of the window.focus() method is detected, the lastFocus.getOwningPackage() method is called to obtain the package name of the first cloud server application, and the newFocus.getOwningPackage() method is called to obtain the package name of the second cloud server application. The tracking data for the switching of the foreground and background of any cloud server application includes the package name of the first cloud server application and the package name of the second cloud server application.
6. The reporting method according to claim 5, characterized in that, The acquisition of event tracking data for any cloud server application anomalies includes: When any ANR or unresponsive error pop-up is detected in any cloud server application, the package name of the cloud server application before handleShowAppErrorUi(), handleShowAnrUi(), and dialog.show() is obtained based on the pop-up code logic of the error pop-up. The event tracking data of any cloud server application exception includes the obtained package name of the cloud server application.
7. The reporting method according to claim 1, characterized in that, The cloud plugin starts a polling sub-thread to read the tracking data from the tracking data file at preset time intervals and according to the file path of the tracking data file, and reports the tracking data from the tracking data file to the resource management platform via HTTP.
8. A device for reporting cloud server embedded data, characterized in that, The device includes: The first acquisition module is used to acquire the event tracking data during the installation of any cloud application and to acquire the event tracking data during the uninstallation of any cloud application. The second acquisition module is used to acquire the data points of any cloud application switching between foreground and background. The third acquisition module is used to acquire the event tracking data of any cloud machine application anomaly. The writing module is used to write the event tracking data during the installation of any cloud application, the event tracking data during the uninstallation of any cloud application, the event tracking data during the switching between foreground and background of any cloud application, and the event tracking data during the abnormality of any cloud application to the event tracking data file. The reporting module is used to report the tracking data in the tracking data file to the resource management platform through the cloud plugin. The resource management platform is used to remotely monitor and statistically analyze the tracking data of one or more cloud machine applications and allocate cloud machine resources based on the statistical analysis results.
9. A computer device, 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, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Data uploading method and device for service application, electronic equipment and storage medium
CN111866071A
Data processing method and device, computer equipment and computer readable storage medium
CN114490352A