Application performance monitoring processing method, device, electronic device and storage medium

Through a storage method that combines hash tables and bitmaps, the dimension explosion problem in the mini-program management background is solved, the processing efficiency and storage capacity of performance monitoring are improved, and monitoring and analysis of custom dimensions are supported.

CN114721896BActive Publication Date: 2025-09-30TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111651029.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-01-04
Filing Date
2021-12-30
Publication Date
2025-09-30
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

The management backend of small programs in the existing technology lacks an effective custom dimension processing solution when facing high-volume business, resulting in dimension explosion problems and affecting performance monitoring efficiency.

Method used

A storage method combining hash tables and bitmaps is adopted, which are used for monitoring data storage in low-load and high-load stages respectively. The hash table is used to speed up storage and search efficiency, the bitmap is used to save storage space, and a circuit breaker mechanism is introduced to prevent dimensionality explosion.

Benefits of technology

It achieves efficient processing of multi-dimensional monitoring data of applications, avoids dimensionality explosion, improves the processing performance and storage efficiency of performance monitoring, and supports monitoring and analysis of custom dimensions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114721896B_ABST
    Figure CN114721896B_ABST
Patent Text Reader

Abstract

The present application provides a performance monitoring and processing method, device, electronic device and computer-readable storage medium for an application; it relates to cloud technology; the method comprises: receiving monitoring data sent by an application in a first monitoring phase, and storing the monitoring data of the first monitoring phase in a hash table; receiving monitoring data sent by the application in a second monitoring phase, and storing the monitoring data of the second monitoring phase in a bitmap; wherein the monitoring data comprises speed measurement data of at least one monitoring indicator of the application in multiple dimensions; based on at least one of the hash table and the bitmap, searching for speed measurement data that meets at least one dimension to be analyzed in the monitoring indicator to be analyzed, and generating a performance analysis result based on the speed measurement data found. Through the present application, the processing performance of the speed measurement data reported by the application can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to computer technology and cloud technology, and in particular to a method, device, electronic device, and computer-readable storage medium for performance monitoring of an application program. Background Art

[0002] Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide or local area network (WAN) to enable data computing, storage, processing, and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology based on the cloud computing business model. It can form a resource pool that can be used on demand with flexibility and convenience. Cloud computing technology will become a crucial support. Backend services for technical network systems, such as video websites, image websites, and more portals, require extensive computing and storage resources. With the rapid development and application of the internet industry, every item will likely have its own unique identification mark and will need to be transmitted to backend systems for logical processing. Data of varying levels will be processed separately, and data from all industries will require a strong system backend, which can only be achieved through cloud computing.

[0003] In related technologies, such as mini-programs targeting businesses with millions of users, custom dimension functionality is generally not provided for multi-dimensional analysis. Furthermore, even if custom dimension functionality is provided to developers, the large scale of mini-programs and the uncontrollable behavior of external developers can lead to dimensionality explosion in the mini-program management backend. For example, in mini-program speed testing, if dimensionality explosion occurs due to anomalies reported by developers, the pressure on the mini-program management backend could be multiplied.

[0004] Therefore, the related art lacks a solution for effectively processing a large amount of dimensional data of an application. Summary of the Invention

[0005] The embodiments of the present application provide a method, device, electronic device, and computer-readable storage medium for performance monitoring of an application program, which can improve the processing performance of speed measurement data reported by the application program.

[0006] The technical solution of the embodiment of the present application is implemented as follows:

[0007] This embodiment of the present application provides a performance monitoring method for an application program, including:

[0008] receiving monitoring data sent by the application in a first monitoring phase, and storing the monitoring data of the first monitoring phase in a hash table;

[0009] receiving monitoring data sent by the application in a second monitoring phase, and storing the monitoring data of the second monitoring phase in a bitmap;

[0010] The monitoring data includes speed measurement data of at least one monitoring indicator of the application in multiple dimensions;

[0011] Based on at least one of the hash table and the bitmap, speed measurement data that meets at least one dimension to be analyzed in the monitoring indicator to be analyzed is searched, and a performance analysis result is generated based on the searched speed measurement data.

[0012] The present invention provides a device for monitoring the performance of an application program, including:

[0013] a limiter, configured to receive monitoring data sent by the application in a first monitoring phase, and store the monitoring data of the first monitoring phase in a hash table;

[0014] receiving monitoring data sent by the application in a second monitoring phase, and storing the monitoring data of the second monitoring phase in a bitmap;

[0015] The monitoring data includes speed measurement data of at least one monitoring indicator of the application in multiple dimensions;

[0016] The analyzer is configured to search for speed measurement data that meets at least one dimension to be analyzed in the monitoring indicator to be analyzed based on at least one of the hash table and the bitmap, and generate a performance analysis result based on the searched speed measurement data.

[0017] In the above scheme, the limiter is also used to determine the first monitoring stage in the following manner: when the number of dimensions of the speed measurement data involved in the monitoring data cumulatively received for the application is lower than the first dimension number threshold, and / or when the access load of the application is lower than the first load threshold, it is determined that the application is in the first monitoring stage.

[0018] In the above scheme, the limiter is also used to determine the second monitoring stage in the following manner: when the number of dimensions of the speed measurement data involved in the cumulatively received monitoring data for the application is not less than the first dimension number threshold, and / or when the access load of the application is not less than the first load threshold, it is determined that the application is in the second monitoring stage.

[0019] In the above solution, the limiter is further used to discard the monitoring data subsequently sent by the application when the number of dimensions of the speed measurement data involved in the monitoring data cumulatively received by the application is higher than the second dimension number threshold.

[0020] In the above scheme, the limiter is also used to use the filtering item corresponding to the monitoring data as a keyword; from the correspondence between the candidate keywords and the candidate hash values, find the hash value corresponding to the keyword, determine the address corresponding to the found hash value; and store the monitoring data in a storage unit corresponding to the found address.

[0021] In the above scheme, a linked list is set in the storage unit; the limiter is also used to store the monitoring data in the linked list of the storage unit when the storage unit corresponding to the found address is not occupied; when the storage unit corresponding to the found address is occupied, the monitoring data is inserted into the corresponding position in the linked list of the storage unit for storage.

[0022] In the above scheme, the limiter is also used to divide the bitmap into multiple paired data segments; wherein the paired data segments include bitmap indexes and data; the storage space corresponding to the bitmap is divided into multiple storage units; wherein different storage units have a corresponding relationship with different bitmap indexes; the filter item of the monitoring data of the second monitoring stage is used as the first bitmap index, and the monitoring data of the second monitoring stage is used as the first data paired with the first bitmap index; from the corresponding relationship, the storage unit corresponding to the first bitmap index is found; and the first data is stored in the storage unit corresponding to the first bitmap index.

[0023] In the above scheme, the performance monitoring processing of the application is implemented through a server cluster; the limiter is also used to receive the monitoring data sent by the application through the first server in the server cluster; and redirect the monitoring data to the second server in the server cluster through the first server, wherein the data stored in different servers in the cluster belong to different monitoring indicators, and the second server is dedicated to storing data corresponding to the monitoring indicators to which the monitoring data belongs.

[0024] In the above scheme, the analyzer is also used to display the filtering items of the application, wherein the filtering items include multiple types of monitoring indicators and multiple custom dimensions for each of the monitoring indicators; any one type of selected monitoring indicator is used as the monitoring indicator to be analyzed, and at least one custom dimension selected from the monitoring indicator to be analyzed is used as the dimension to be analyzed; when the speed measurement data of the dimension to be analyzed is in the bitmap, the monitoring indicator to be analyzed and the dimension to be analyzed are used as the second bitmap index, and the second data corresponding to the second bitmap index is searched in the storage space corresponding to the bitmap as the speed measurement data that conforms to at least one dimension to be analyzed in the monitoring indicator to be analyzed; when the speed measurement data of the dimension to be analyzed is in the hash table, the monitoring indicator to be analyzed and the dimension to be analyzed are used as keywords, and the third data corresponding to the keyword is searched in the hash table as the speed measurement data that conforms to at least one dimension to be analyzed in the monitoring indicator to be analyzed.

[0025] In the above scheme, the filtering items include at least one of the following directional parameters: the running time of the application, the host device parameters of the application; wherein, the host device parameters include at least one of the following: the network type used by the host device, the operating system run by the host device, and the operator of the communication network used by the host device; the analyzer is also used to use the monitoring indicators to be analyzed, the dimensions to be analyzed and the set directional parameters as a second bitmap index, and search for second data corresponding to the second bitmap index in the storage space corresponding to the bitmap; the analyzer is also used to use the monitoring indicators to be analyzed, the dimensions to be analyzed and the set directional parameters as keywords, and search for third data corresponding to the keywords in the hash table.

[0026] In the above scheme, an embodiment of the present application provides a performance monitoring and processing device for an application, which also includes: a collector for receiving monitoring indicators created by the development object of the application and custom dimensions set for the monitoring indicators; generating an application including a reporting code, wherein the reporting code is used to report the speed measurement data of the monitoring indicators in the custom dimensions; sending the application to a terminal device to receive the monitoring data reported by the application running in the terminal device.

[0027] In the above scheme, the analyzer is used to display the found speed measurement data in the form of an average value curve and / or a reporting number curve when the category of the monitoring indicator of the found speed measurement data is a network category; when the category of the monitoring indicator of the found speed measurement data is a non-network category, the analyzer is used to display the found speed measurement data in the form of a regional map.

[0028] The present invention provides a device for monitoring the performance of an application program, including:

[0029] a memory for storing executable instructions;

[0030] The processor is used to implement the performance monitoring processing method of the application provided in the embodiment of the present application when executing the executable instructions stored in the memory.

[0031] An embodiment of the present application provides a computer-readable storage medium storing executable instructions for implementing a performance monitoring and processing method for an application provided in an embodiment of the present application when executed by a processor.

[0032] The embodiments of the present application have the following beneficial effects:

[0033] For the monitoring data of the first monitoring phase, a hash table storage method is adopted to speed up storage efficiency and subsequent search efficiency; for the monitoring data of the second monitoring phase, a bitmap storage method is adopted, which can realize the storage of a large amount of monitoring data in a smaller storage space, saving a lot of storage space; based on at least one of the hash table and the bitmap, the speed measurement data that meets at least one dimension to be analyzed in the monitoring indicator to be analyzed is searched, and the performance analysis results are generated based on the speed measurement data found, so as to avoid the explosion of dimensional data while providing application developers with convenient and multi-dimensional monitoring of application performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 1 is a schematic diagram of an architecture of an application performance monitoring and processing system 100 provided in an embodiment of the present application;

[0035] Figure 2 2 is a schematic diagram of the structure of the application background management server 200 provided in an embodiment of the present application;

[0036] Figure 3A This is a flowchart of a performance monitoring method for an application program provided in an embodiment of the present application;

[0037] Figure 3B This is a flowchart of a performance monitoring method for an application program provided in an embodiment of the present application;

[0038] Figure 3C This is a flowchart of a performance monitoring method for an application program provided in an embodiment of the present application;

[0039] Figure 4 This is a schematic diagram of the mini-program speed measurement function interface of the mini-program management and monitoring system provided in an embodiment of the present application;

[0040] Figure 5This is a flowchart of the mini-program management and monitoring system provided by an embodiment of the present application;

[0041] Figure 6 This is a schematic diagram of the interface for creating monitoring indicators provided in an embodiment of the present application;

[0042] Figure 7 This is a schematic diagram of the management and monitoring indicator interface provided in an embodiment of the present application;

[0043] Figure 8 This embodiment of the present application provides a system architecture diagram of a mini-program management and monitoring system;

[0044] Figure 9 is a comparative schematic diagram of the dimension set data structure provided in an embodiment of the present application;

[0045] Figure 10 This is a comparative diagram of memory usage of BitMap and Hash value lists provided in the embodiments of the present application;

[0046] Figure 11 This is a schematic diagram of the principle of the hybrid BitMap provided in the embodiment of the present application;

[0047] Figure 12 This is a schematic diagram of the principle of using a hash table for storage provided in an embodiment of the present application;

[0048] Figure 13 This is a schematic diagram of the principle of using a bitmap for storage provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solutions and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limiting this application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0050] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0051] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0053] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0054] 1) Application management background: The application background is a management and monitoring system for applications.

[0055] 2) Message Queue (MQ): An entity based on a queue data structure, such as an asynchronous queue component.

[0056] 3) HLL, HyperLogLog counter creates an independent set for each page to store the IDs of all users who visited this page on the same day to count the number of user visits.

[0057] 4) A hash table (also called a hash table) is a data structure that is directly accessed based on a key value.

[0058] 5) Bitmap: A data structure that uses each bit to store a certain state and is suitable for large-scale data.

[0059] 6) wx.reportPerformance, interface for reporting speed measurement data;

[0060] 7) Regional map, a map reflecting speed measurement data based on the region.

[0061] 8) Mini Programs are applications that can be used without downloading or installing. To provide users with more diverse business services, developers can develop corresponding mini programs for terminal applications (such as instant messaging applications, shopping applications, email applications, etc.). These mini programs can be embedded as sub-applications within the terminal applications. By running the sub-applications within the applications (i.e., the corresponding mini programs), users can receive corresponding business services.

[0062] For example, mini-programs, which target businesses with millions of users, generally don't offer custom dimension functionality in multi-dimensional analysis. This is due to the high volume of mini-programs and the uncontrollable behavior of external developers, which can easily lead to dimensionality explosion on the mini-program backend management server. For example, if a mini-program speed test causes dimensionality explosion due to anomalies reported by developers, the backend pressure could be multiplied many times over.

[0063] However, for mini-program developers, custom dimensions are often a critical feature. For example, the group-based mini-program has multiple pages that require performance monitoring, each with multiple business types. Without custom dimensions, developers would have a poor experience using the speed measurement feature. Related technologies rely on traditional overload protection to randomly discard data when high-dimensional data cannot be aggregated, causing storage write pressure. This cannot guarantee accurate discarding of excess dimensional data.

[0064] In response to the above technical problems, embodiments of the present application provide a method, apparatus, electronic device, and computer-readable storage medium for performance monitoring of an application, which can improve the processing performance of speed measurement data reported by the application. The following describes an exemplary application of the method for performance monitoring of an application provided by an embodiment of the present application. The method for performance monitoring of an application provided by an embodiment of the present application can be implemented by various electronic devices, such as a server. Below, an exemplary application will be described when the electronic device is implemented as a server.

[0065] Below, taking the electronic device as an example, an exemplary application system architecture of the server real-time performance monitoring processing method of the application provided by the embodiment of the present application is described. Figure 1 , Figure 1 This is a schematic diagram of the architecture of the application performance monitoring and processing system 100 provided in an embodiment of the present application, wherein the application performance monitoring and processing system 100 includes a terminal device 400 (the application runs in a client installed on the terminal device 400), an application background management server 200, an application background management terminal device 500, and a network 300. The terminal device 400 and the application background management terminal device 500 are connected to the application background management server 200 via the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two. Detailed descriptions are given below.

[0066] When the application is running in the client installed in the terminal device 400 , the monitoring data is sent to the application background management server 200 .

[0067] The application background management server 200 is used to receive the monitoring data sent by the application in the terminal device 400 in the first monitoring phase, and store the monitoring data of the first monitoring phase in a hash table; receive the monitoring data sent by the application in the terminal device 400 in the second monitoring phase, and store the monitoring data of the second monitoring phase in a bitmap; wherein the monitoring data includes speed measurement data of at least one monitoring indicator of the application in multiple dimensions; based on at least one of the hash table and the bitmap, search for speed measurement data that meets at least one dimension to be analyzed in the monitoring indicator to be analyzed, and generate performance analysis results based on the speed measurement data found.

[0068] The application background management terminal device 500 is used to search for corresponding speed measurement data according to the filter items of the application selected by the developer in the application background management client interface, and generate performance analysis results based on the found speed measurement data.

[0069] In some embodiments, the application background management server 200 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal device can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal device and the server can be directly or indirectly connected through wired or wireless communication, which is not limited in the embodiments of the present application.

[0070] Next, the structure of the electronic device for implementing the performance monitoring processing method of the application provided by the embodiment of the present application is described. As mentioned above, the electronic device provided by the embodiment of the present application can be Figure 1 The application background management server 200 in Figure 2 , Figure 2 2 is a schematic diagram of the structure of the application background management server 200 provided in an embodiment of the present application. Figure 2 The application background management server 200 shown includes: at least one processor 210, a memory 250, and at least one network interface 220. The various components in the application background management server 200 are coupled together via a bus system 240. It is understood that the bus system 240 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 240 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 240 is not described in detail. Figure 2 Various buses are labeled as bus system 240 .

[0071] The processor 210 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0072] The memory 250 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 250 may optionally include one or more storage devices that are physically remote from the processor 210.

[0073] The memory 250 includes volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 250 described in the embodiments of the present application is intended to include any suitable type of memory.

[0074] In some embodiments, the memory 250 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplified below.

[0075] Operating system 251, including system programs for processing various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, and driver layer, which are used to implement various basic services and process hardware-based tasks;

[0076] A network communication module 252 for reaching other computing devices via one or more (wired or wireless) network interfaces 220 , exemplary network interfaces 220 including Bluetooth, WiFi, and USB;

[0077] In some embodiments, the performance monitoring and processing device for an application provided in the embodiments of the present application may be implemented in software. Figure 2 The performance monitoring processing device 255 of an application stored in the memory 250 is shown. This device can be software in the form of a program or plug-in, and includes the following software modules: a limiter 2551, an analyzer 2552, and a collector 2553. These modules are logical and can be arbitrarily combined or further separated according to the functions they implement. The functions of each module will be described below.

[0078] The following will describe the performance monitoring processing method of the application provided by the embodiment of the present application in conjunction with the exemplary application and implementation of the server provided by the embodiment of the present application. Figure 3A , Figure 3A This is a flow chart of the performance monitoring method of the application provided in the embodiment of the present application. Figure 3AThe steps shown are explained by taking the application management background server implementing the performance monitoring processing method of the application provided in the embodiment of the present application as an example.

[0079] In step 101, monitoring data sent by an application in a first monitoring phase is received, and the monitoring data of the first monitoring phase is stored in a hash table.

[0080] In some embodiments, the first monitoring stage is determined in the following manner: when the number of dimensions of the speed measurement data involved in the monitoring data cumulatively received for the application in the hash table, or in the hash table and bitmap is lower than a first dimension number threshold, and / or when the access load of the application is lower than a first load threshold, it is determined that the application is in the first monitoring stage.

[0081] In an embodiment of the present application, by controlling the number of dimensions of the speed measurement data involved in the monitoring data cumulatively received by the application in the hash table, or in the hash table and the bitmap, and the access load of the application is lower than the first load threshold, it is ensured that the number of dimensions of the monitoring data at this time does not constitute a hot spot risk. The query complexity and space complexity of storing the monitoring data in the hash table are low, the storage occupies less memory, and the subsequent query efficiency is also high.

[0082] In some embodiments, storing the monitoring data of the first monitoring phase in a hash table can be achieved in the following manner: using the filter item corresponding to the monitoring data as a keyword; finding the hash value corresponding to the keyword from the correspondence between the candidate keywords and the candidate hash values, and determining the address corresponding to the found hash value; and storing the monitoring data in a storage unit corresponding to the found address.

[0083] In some examples, the filtering items include monitoring indicators and dimensions of the monitoring indicators, and the corresponding hash values ​​are calculated through a hash function based on the keywords selected by the developer (i.e., candidate keywords); among them, the hash function can select the square median method, the folding method, the division with remainder method, and the random number method.

[0084] For example, taking the square median method as an example, assuming that the monitoring indicator is identified as 2003 and the dimension is identified as 1010, then the keyword key = 20031010, and the square sum is 4012410. Then 124 is taken as the hash address, and its corresponding speed measurement data is stored in the storage unit corresponding to the hash address.

[0085] In some examples, a linked list is provided in the storage unit; storing the monitoring data in the storage unit corresponding to the found address can be achieved in the following manner: when the storage unit corresponding to the found address is not occupied, the monitoring data is stored in the linked list of the storage unit; when the storage unit corresponding to the found address is occupied, the monitoring data is inserted into the corresponding position in the linked list of the storage unit for storage.

[0086] For example, see Figure 12 , Figure 12 This is a schematic diagram illustrating the principle of using a hash table for storage, as provided in an embodiment of the present application. Assuming the index conditions for the speed measurement data are identical, that is, if the keywords for the speed measurement data are identical, the calculated hash values ​​are identical, and the storage units corresponding to the hash values ​​are identical, a linked list is set up in the storage unit. When node 1201 in the storage unit already stores speed measurement data 615, a pointer is added after node 1201 to point to the next node 1202, and then speed measurement data 677 is stored in node 1202. In this embodiment of the present application, a linked list is used to avoid hash conflicts.

[0087] In step 102, monitoring data sent by the application in the second monitoring phase is received, and the monitoring data of the second monitoring phase is stored in a bitmap.

[0088] In some embodiments, where the monitoring data includes speed measurement data of at least one monitoring indicator of the application in multiple dimensions, the second monitoring stage can be determined as follows: when the number of dimensions of the speed measurement data involved in the cumulative monitoring data received for the application is not less than a first dimension number threshold, and / or when the access load of the application is not less than a first load threshold, the application is determined to be in the second monitoring stage.

[0089] In some embodiments, storing the monitoring data of the second monitoring stage in a bitmap can be achieved in the following manner: dividing the bitmap into multiple paired data segments; wherein the paired data segments include a bitmap index and data; dividing the storage space corresponding to the bitmap into multiple storage units; wherein there is a correspondence between different storage units and different bitmap indexes; using the filter item of the monitoring data of the second monitoring stage as the first bitmap index, and using the monitoring data of the second monitoring stage as the first data paired with the first bitmap index; from the correspondence, finding the storage unit corresponding to the first bitmap index; and storing the first data in the storage unit corresponding to the first bitmap index.

[0090] For example, see Figure 13 , Figure 13It is a schematic diagram of the principle of using a bitmap for storage provided by an embodiment of the present application. In each pair of data segments of the bitmap, data segment 1301 is used as a bitmap index, and data segment 1302 is used as data (i.e., speed measurement data). Among them, the bitmap index represents the condition of the filter item of the data. Use 8 bits of memory space to store data with a monitoring index of 1002 and a dimension of 4001, data with a monitoring index of 1002 and a dimension of 4020, and data with a monitoring index of 1040 and a dimension of 4820; each byte of the data in the paired data segments can represent 610 to 645. When the reported monitoring index is 1002 and the data with a dimension of 4001 is 610, 620, 635, and 640, the bit position corresponding to its data segment 1302 is 1, that is, 01100101 in data segment 1302.

[0091] In the embodiment of the present application, a number is represented by each bit of a byte in a bitmap manner, and only one byte is needed to store 8 numbers. In a scenario of millions of levels, storing a large amount of dimensional data can save a lot of storage space.

[0092] In step 103, based on at least one of the hash table and the bitmap, speed measurement data that meets at least one dimension to be analyzed in the monitoring indicator to be analyzed is searched.

[0093] In some embodiments, see Figure 3B , Figure 3B This is a flow chart of a performance monitoring method for an application provided in an embodiment of the present application, based on Figure 3A , Figure 3B Step 103 shown can be implemented through steps 1031 to 1034, which will be described in conjunction with each step.

[0094] In step 1031 , filter items of the application are displayed, wherein the filter items include multiple types of monitoring indicators and multiple custom dimensions for each monitoring indicator.

[0095] In step 1032 , any selected type of monitoring indicator is used as the monitoring indicator to be analyzed, and at least one selected custom dimension among the monitoring indicators to be analyzed is used as the dimension to be analyzed.

[0096] In step 1033, when the speed measurement data of the dimension to be analyzed is in the bitmap, the monitoring indicator to be analyzed and the dimension to be analyzed are used as the second bitmap index, and the second data corresponding to the second bitmap index is searched in the storage space corresponding to the bitmap as the speed measurement data of at least one dimension to be analyzed that meets the monitoring indicator to be analyzed.

[0097] For example, see Figure 13, search for data with a monitoring indicator of 1040 and a dimension of 4820. The second bitmap index is 10404820. According to the second bitmap index, the corresponding second data can be found as 01100101, that is, the speed measurement data found are 615, 620, and 635.

[0098] In step 1034, when the speed measurement data of the dimension to be analyzed is in the hash table, the monitoring indicator to be analyzed and the dimension to be analyzed are used as keywords, and the third data corresponding to the keyword is searched in the hash table as the speed measurement data of at least one dimension to be analyzed that meets the monitoring indicator to be analyzed.

[0099] In some embodiments, searching for a key can be accomplished by a binary search, i.e., searching for the key starting from the middle of the hash table. If a matching key is found, the search is successful. If the middle element is smaller than the key, the binary search is still used to search the second half of the hash table (assuming the table is in ascending order). Otherwise, if the middle element is larger than the key, the first half of the hash table is searched.

[0100] In some examples, the filter items include at least one of the following directional parameters: the running time of the application, the host device parameters of the application; wherein the host device parameters include at least one of the following: the network type used by the host device, the operating system running on the host device, and the operator of the communication network used by the host device.

[0101] Taking the monitoring indicator to be analyzed and the dimension to be analyzed as the second bitmap index, and searching for the second data corresponding to the second bitmap index in the storage space corresponding to the bitmap, can be achieved in the following way: taking the monitoring indicator to be analyzed, the dimension to be analyzed and the set directional parameter as the second bitmap index, and searching for the second data corresponding to the second bitmap index in the storage space corresponding to the bitmap.

[0102] Using the monitoring indicators to be analyzed and the dimensions to be analyzed as keywords, searching for the third data corresponding to the keywords in the hash table can be achieved in the following way: using the monitoring indicators to be analyzed, the dimensions to be analyzed and the set directional parameters as keywords, searching for the third data corresponding to the keywords in the hash table.

[0103] In step 104, a performance analysis result is generated based on the found speed measurement data.

[0104] In some embodiments, when the category of the monitoring indicator of the speed measurement data found is network type, the speed measurement data found is displayed in the form of an average value curve and / or a reporting number curve; when the category of the monitoring indicator of the speed measurement data found is non-network type, the speed measurement data found is displayed in the form of an area map.

[0105] For some examples, see Figure 4 , Figure 4 401 shows the speed measurement data found in the form of an average value curve and / or a reporting frequency curve. In other examples, it can also be displayed in the form of a reporting frequency curve (not shown in the figure).

[0106] In some embodiments, the speed measurement data found is displayed in the form of a regional map. The regional map may include information such as the region name (e.g., province name), the number of reports corresponding to the region, and the average time consumed by the region. Embodiments of the present application enable application developers to monitor application performance more simply and intuitively.

[0107] In some embodiments, before receiving the monitoring data sent by the application in the first monitoring phase, the following steps can also be performed: receiving the monitoring indicators created by the development objects of the application and the custom dimensions set for the monitoring indicators; generating an application including a reporting code, wherein the reporting code is used to report the speed measurement data of the monitoring indicators in the custom dimensions; sending the application to the terminal device to receive the monitoring data reported by the application running in the terminal device.

[0108] In an embodiment of the present application, a monitoring application with customized dimensions can be provided to developers according to their own circumstances, thereby improving the speed test experience of developers and synchronizing it to the terminal device of the application.

[0109] In some embodiments, see Figure 3C , Figure 3C This is a flow chart of a performance monitoring method for an application provided in an embodiment of the present application, based on Figure 3A , Figure 3C It is shown that step 105 may be further executed after step 102, and will be described in conjunction with each step.

[0110] In step 105, when the number of dimensions of the speed measurement data involved in the monitoring data cumulatively received by the application in the hash table, or in the hash table and the bitmap, exceeds a second dimension number threshold, the monitoring data subsequently sent by the application is discarded.

[0111] It should be noted that when the number of dimensions of the speed measurement data involved in the monitoring data cumulatively received for the application in the hash table, or in the hash table and bitmap is lower than the first dimension number threshold, it is determined that the application is in the first monitoring stage, and the second dimension number threshold here is greater than the first dimension number threshold.

[0112] For example, when the number of dimensions of the speed measurement data involved in the monitoring data cumulatively received for the application in the hash table, or in the hash table and bitmap is lower than the first dimension number threshold, and / or when the access load of the application is lower than the first load threshold, it is determined that the application is in the first monitoring stage, and the monitoring data of the first monitoring stage is stored in the hash table. Then, the number of dimensions continues to grow. When the number of dimensions of the speed measurement data involved in the monitoring data cumulatively received for the application is equal to or higher than the first dimension number threshold, and / or when the access load of the application is equal to or higher than the first load threshold, it is determined that the application is in the second monitoring stage; and the monitoring data of the second monitoring stage is stored in the bitmap. Furthermore, the number of dimensions continues to grow. When the number of dimensions of the speed measurement data involved in the monitoring data cumulatively received for the application in the hash table, or in the hash table and bitmap is higher than the second dimension number threshold, it is determined that the monitoring data at this time is excessive data or conflicting data caused by a malicious attack, and the fuse mechanism is activated, that is, the monitoring data subsequently sent by the application is discarded. Among them, the hash table and bitmap are integrated into a hybrid BitMap.

[0113] In the embodiment of the present application, it is possible to accurately discard dimensional data that causes excess, thereby avoiding the risk of dimension explosion; and introduce a speed measurement dimension reporting circuit breaker mechanism to prevent malicious personnel from using hash conflicts to attack.

[0114] In some embodiments, the performance monitoring processing of the application is implemented through a server cluster; the monitoring data sent by the application is received by the first server in the server cluster; the monitoring data is redirected to the second server in the server cluster by the first server, wherein the data stored on different servers in the cluster belong to different monitoring indicators, and the second server is dedicated to storing data corresponding to the monitoring indicators to which the monitoring data belongs.

[0115] In an embodiment of the present application, dimension data under the same monitoring indicator is directed to the same server for storage and search through redirection to speed up processing efficiency.

[0116] In some embodiments, the monitoring data of the first monitoring stage and the monitoring data of the second monitoring stage are backed up to a database; when the monitoring data stored in the hash table and the monitoring data in the bitmap are lost, the monitoring data of the first monitoring stage and the monitoring data of the second monitoring stage are obtained from the remote database to restore the monitoring data.

[0117] In some examples, when a server is restarted or migrated, the monitoring data stored in the hash table and the monitoring data in the bitmap are lost, and the data can be obtained from a remote database. It should be noted that the remote database here can be a database of a cloud server.

[0118] In the embodiment of the present application, better data protection is provided by backing up the remote database. When a server inevitably fails, an instant backup can be performed, and the server can be quickly and easily started and run on another server, with reliable security and disaster recovery capabilities.

[0119] Below, an exemplary application of the embodiment of the present application in an actual application scenario will be described. Take the management and monitoring system of the mini program as an example. The management and monitoring system of the mini program uses different storage methods to store the monitoring data of different monitoring stages sent by the mini program, and can support the use of custom dimension functions by millions of mini programs, accurately discard the excessive dimension data caused, and avoid the risk of dimension explosion; based on the filter items selected by the developer of the mini program (i.e., the development object), the monitoring data sent by the mini program is filtered and analyzed, and the developer of the mini program is supported to observe the performance analysis results of the mini program in a variety of visual ways, so that the developer of the mini program can intuitively count the performance analysis of the mini program in multiple dimensions.

[0120] See also Figure 4 , Figure 4 A schematic diagram of the mini-program speed measurement function interface of the mini-program management and monitoring system provided in an embodiment of the present application is shown. The mini-program management and monitoring system reports the performance data of the mini-program (the real-time time consumption of a certain event in the mini-program) by calling the interface for reporting time-consuming data. The mini-program speed measurement function can perform real-time cross-analysis based on filter items such as monitoring indicators, regions, operators, operating systems, network types, models, and custom dimensions. After the mini-program management backend (i.e., the mini-program management and monitoring system) obtains the time consumption of a certain monitoring indicator reported by the mini-program, it can support developers to view the time consumption trend of at least one dimension to be analyzed in the monitoring indicator to be analyzed in "Development-Operation and Maintenance Center-Mini-Program Speed ​​Measurement". See Figure 5 , Figure 5 This is a flowchart of the mini-program management and monitoring system provided by the embodiment of the present application. The specific implementation steps are as follows:

[0121] Step 501: The mini program management and monitoring system obtains the monitoring indicators created by the mini program developer.

[0122] See also Figure 6 , Figure 6It is a schematic diagram of the interface for creating monitoring indicators provided by an embodiment of the present application. It supports developers to create new monitoring indicators in the "Development-Operation and Maintenance Center-Mini Program Speed ​​Test" in the mini program management background, and supports the identification, name and explanation of the monitoring indicators created by developers. After creating a new monitoring indicator, it supports the selection of indicator type, indicator name and indicator explanation. The types of monitoring indicators (i.e. indicator type) include two categories: network type, this type of time consumption is mainly affected by the network environment, including statistical dimensions such as operating system, operator, network environment, and region. Such as: network API time consumption, cloud call time consumption, network data reading and writing time consumption, etc.; non-network type (i.e. loading / rendering type): This type of time consumption is mainly affected by device performance, including statistical dimensions such as operating system and model category. It can be used to measure page switching time consumption, component rendering time consumption, etc.

[0123] After the monitoring indicator is created, the monitoring ID that needs to be reported by the mini program will be displayed in the mini program speed test function interface. Figure 7 , Figure 7 This is a schematic diagram of the management monitoring indicator interface provided by an embodiment of the present application. It supports modifying or creating monitoring indicators in the management monitoring indicator interface. After creating a monitoring indicator, you can also create custom dimensions for the monitoring indicator (not shown in the figure), where custom dimensions include authentication (auth), application (experapply), homepage (home), real name (realname), route-announce (route-announce), and route-auth profile (route-authprofile).

[0124] Step 502: The mini-program management and monitoring system generates a mini-program including a reporting code to receive the speed measurement data reported by the mini-program.

[0125] The mini program management and monitoring system receives the monitoring indicators created by the mini program development object and the custom dimensions set for the monitoring indicators; generates a mini program including a reporting code, wherein the reporting code is used to report the speed data of the monitoring indicators in the custom dimensions; sends the mini program to the content distribution network (CDN), and the terminal device can download and run it in the client through the CDN to receive the speed data reported by the terminal device during the operation of the mini program.

[0126] Among them, the reporting code of the applet calls the "wx.reportPerformance" API interface and passes in the generated monitoring indicator ID to achieve time-consuming monitoring. The code for reporting monitoring indicators is as follows:

[0127] / / Judge whether the interface is available, the basic library 2.9.2 starts to support

[0128] if(wx.canIUse('reportPerformance')){

[0129] wx.reportPerformance(id, val, dimensions)

[0130] / / id: monitoring indicator ID

[0131] / / val: the time taken this time

[0132] / / dimensions: custom dimensions

[0133] }

[0134] Step 503: The mini-program management and monitoring system presents the performance analysis results of the data for developers to observe.

[0135] After reporting is complete, the Mini Program management backend displays the reported data. In addition to basic average and report count curves, it also includes a regional map. Developers can also customize their own dimensions for detailed analysis, displaying performance analysis results for these custom dimensions.

[0136] See also Figure 8 , Figure 8 The embodiment of this application provides a system architecture diagram of a mini-program management and monitoring system. Among them, the mini-program management and monitoring system includes a collector, a limiter, and an analyzer. While providing developers with custom dimension functions, the mini-program management and monitoring system can stably limit the number of custom dimensions for each indicator in each mini-program. Among them, the work of the mini-program management and monitoring system is mainly divided into two parts: 1. Dimension data server storage optimization; 2. Reporting route optimization and reporting circuit breaker mechanism. Among them, the specific steps of the mini-program management and monitoring system are as follows:

[0137] Step 801: The limiter receives data reported by the collector.

[0138] In some embodiments, due to the large number of mini-programs, caching the dimension set of all mini-programs and then performing real-time matching will put a lot of pressure on memory and performance. Figure 9 , Figure 9It is a comparative diagram of the dimension set data structure provided by the embodiment of the present application. Among them, the string list: the query complexity is O(M*logN), and the space occupancy is O(M*N), where M and N represent the number of rows and columns of data respectively, which occupies a huge amount of memory and has a relatively large performance overhead. Hash value list (i.e. hash table): the query complexity is reduced to O(logN), and the space complexity is set to O(N), where N is the number of data. BitMap: the query complexity is O(1), and the space complexity is fixed. Therefore, the performance of BitMap is the best overall. The memory usage of Hash value list and BitMap is further analyzed below.

[0139] See also Figure 10 , Figure 10 This is a comparative diagram of memory usage between the BitMap and Hash value lists provided in the embodiments of this application. When the bitmap (BitMap) size is 8Kbit and the number of data is less than 512, the Hash list has a greater memory advantage. The Hash value list is more suitable for cold data (saving memory when the number of dimensions is small), and the BitMap is more suitable for hot data (better access performance). Therefore, the embodiments of this application achieve storage optimization through a hybrid BitMap.

[0140] See also Figure 11 , Figure 11 This is a schematic diagram of the principle of the hybrid BitMap provided in the embodiment of the present application.

[0141] For example, when a mini program first reports data, it uses a hash value list for storage. A binary search is used to determine whether the current dimension value exists. If the current dimension value exists, its corresponding data value is stored. Subsequent data observations using the hash value list have a time complexity of O(logn). When the number of dimensions of a mini program exceeds 512kb or the cumulative number of visits exceeds 10 million per day, memory is requested and stored using BitMap. HashMap (which stores data based on the hash value of the key) uses an open-link method to avoid conflicts.

[0142] In the embodiment of the present application, these dimensional data are stored in a hybrid BitMap manner to ensure memory and performance to the greatest extent.

[0143] Step 802: Server 1 in the limiter performs consistent Hash redirection on the received data.

[0144] In some embodiments, redirection is implemented by a server cluster in the limiter, and server 1 (i.e., the first server) in the server cluster receives the data reported by the mini-program. Server 1 performs a consistent hash based on the monitoring indicators of the mini-program to redirect the request, for example, redirecting to server 2, so as to ensure that the dimension data under a monitoring indicator falls on the same server as much as possible (in the absence of hot spot risks). In addition, server 1 will determine whether the Hash value of the dimension is a dimension within the limit (i.e., restricted) through the data in the context HashMap in the memory. When the number of Hash values ​​of the dimension exceeds a certain threshold (i.e., a dimension within the limit), the report of the mini-program will be "fuse-broken" and its data will be discarded.

[0145] Since hash conflicts may occur in both hash value lists and BitMaps, leading to the misplacement of excessive data, we introduce the HLL (HyperLogLog) counter to perform cardinality statistics for each mini-program in order to prevent malicious attacks caused by hash conflicts in dimension values. When the dimension cardinality of a mini-program exceeds a threshold, the mini-program's report is directly "fuse-broken" to avoid the risk of service attacks and its data is discarded.

[0146] Step 803: The limiter asynchronously updates the data to the remote database. While discarding excess data, the context HashMap synchronizes the incremental updates to the remote key-value (KV) database through the asynchronous queue in the limiter for backup to prevent machine restart or migration.

[0147] Step 804: The limiter sends the asynchronous data to the analyzer for the analyzer to perform multi-dimensional analysis.

[0148] Step 805: When a machine is restarted or migrated, server 1 obtains data from the remote database. When a machine in the server cluster is restarted or migrated, data is obtained from the remote database.

[0149] In the embodiment of the present application, custom dimensions of the mini-program speed measurement function are supported for millions of mini-programs, helping mini-program developers to more easily monitor issues related to mini-program performance, eliminating the need for a lot of extra work in monitoring mini-program performance and focusing on business development.

[0150] The following continues to describe the exemplary structure of the application program performance monitoring processing device 255 provided in the embodiment of the present application as a software module. In some embodiments, such as Figure 2 As shown, the software modules stored in the performance monitoring processing device 255 of the application program in the memory 250 may include:

[0151] The limiter 2551 is used to receive the monitoring data sent by the application in the first monitoring phase, and store the monitoring data of the first monitoring phase in a hash table; receive the monitoring data sent by the application in the second monitoring phase, and store the monitoring data of the second monitoring phase in a bitmap; wherein the monitoring data includes speed measurement data of at least one monitoring indicator of the application in multiple dimensions; the analyzer 2552 is used to search for speed measurement data that meets at least one dimension to be analyzed in the monitoring indicator to be analyzed based on at least one of the hash table and the bitmap, and generate a performance analysis result based on the speed measurement data found.

[0152] In some embodiments, the limiter 2551 is also used to determine the first monitoring stage in the following manner: when the number of dimensions of the speed measurement data involved in the monitoring data cumulatively received for the application is lower than a first dimension number threshold, and / or when the access load of the application is lower than a first load threshold, it is determined that the application is in the first monitoring stage.

[0153] In some embodiments, the limiter 2551 is also used to determine the second monitoring stage in the following manner: when the number of dimensions of the speed measurement data involved in the cumulatively received monitoring data for the application is not less than a first dimension number threshold, and / or when the access load of the application is not less than a first load threshold, it is determined that the application is in the second monitoring stage.

[0154] In some embodiments, the limiter 2551 is further used to discard the monitoring data subsequently sent by the application when the number of dimensions of the speed measurement data involved in the monitoring data cumulatively received for the application is higher than a second dimension number threshold.

[0155] In some embodiments, the limiter 2551 is also used to use the filter item corresponding to the monitoring data as a keyword; from the correspondence between the candidate keywords and the candidate hash values, find the hash value corresponding to the keyword, determine the address corresponding to the found hash value; and store the monitoring data in a storage unit corresponding to the found address.

[0156] In some embodiments, a linked list is provided in the storage unit; the limiter 2551 is also used to store the monitoring data in the linked list of the storage unit when the storage unit corresponding to the found address is not occupied; when the storage unit corresponding to the found address is occupied, the monitoring data is inserted into the corresponding position in the linked list of the storage unit for storage.

[0157] In some embodiments, the limiter 2551 is also used to divide the bitmap into multiple paired data segments; wherein the paired data segments include a bitmap index and data; divide the storage space corresponding to the bitmap into multiple storage units; wherein different storage units have a corresponding relationship with different bitmap indexes; use the filter item of the monitoring data of the second monitoring stage as the first bitmap index, and use the monitoring data of the second monitoring stage as the first data paired with the first bitmap index; from the corresponding relationship, find out the storage unit corresponding to the first bitmap index; store the first data in the storage unit corresponding to the first bitmap index.

[0158] In some embodiments, the performance monitoring processing of the application is implemented through a server cluster; the limiter 2551 is also used to receive the monitoring data sent by the application through the first server in the server cluster; and redirect the monitoring data to the second server in the server cluster through the first server, wherein the data stored in different servers in the cluster belong to different monitoring indicators, and the second server is dedicated to storing data corresponding to the monitoring indicators to which the monitoring data belongs.

[0159] In some embodiments, the analyzer 2552 is also used to display the filter items of the application, wherein the filter items include multiple types of monitoring indicators and multiple custom dimensions for each of the monitoring indicators; any one type of selected monitoring indicator is used as the monitoring indicator to be analyzed, and at least one custom dimension selected from the monitoring indicator to be analyzed is used as the dimension to be analyzed; when the speed measurement data of the dimension to be analyzed is in the bitmap, the monitoring indicator to be analyzed and the dimension to be analyzed are used as a second bitmap index, and the second data corresponding to the second bitmap index is searched in the storage space corresponding to the bitmap as the speed measurement data that conforms to at least one dimension to be analyzed in the monitoring indicator to be analyzed; when the speed measurement data of the dimension to be analyzed is in the hash table, the monitoring indicator to be analyzed and the dimension to be analyzed are used as keywords, and the third data corresponding to the keyword is searched in the hash table as the speed measurement data that conforms to at least one dimension to be analyzed in the monitoring indicator to be analyzed.

[0160] In some embodiments, the filter items include at least one of the following directional parameters: the running time of the application, the host device parameters of the application; wherein the host device parameters include at least one of the following: the network type used by the host device, the operating system run by the host device, and the operator of the communication network used by the host device; the analyzer 2552 is also used to use the monitoring indicators to be analyzed, the dimensions to be analyzed and the set directional parameters as a second bitmap index, and search for second data corresponding to the second bitmap index in the storage space corresponding to the bitmap; the analyzer 2552 is also used to use the monitoring indicators to be analyzed, the dimensions to be analyzed and the set directional parameters as keywords, and search for third data corresponding to the keywords in the hash table.

[0161] In some embodiments, a performance monitoring and processing device for an application provided by an embodiment of the present application further includes: a collector 2553, for receiving monitoring indicators created by the development object of the application and custom dimensions set for the monitoring indicators; generating an application including a reporting code, wherein the reporting code is used to report the speed measurement data of the monitoring indicators in the custom dimensions; and sending the application to a terminal device to receive the monitoring data reported by the application running in the terminal device.

[0162] In some embodiments, the analyzer 2552 is used to display the found speed measurement data in the form of an average value curve and / or a reporting number curve when the category of the monitoring indicator of the found speed measurement data is a network category; when the category of the monitoring indicator of the found speed measurement data is a non-network category, the speed measurement data is displayed in the form of an area map.

[0163] The present invention provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the application performance monitoring method described above in the present invention.

[0164] The embodiment of the present application provides a computer-readable storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will execute the method provided by the embodiment of the present application, for example, Figure 3A 、 3B , 3C shows the performance monitoring processing method of the application.

[0165] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or various devices including one or any combination of the above memories.

[0166] In some embodiments, executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0167] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinating files (e.g., files storing one or more modules, subroutines, or code portions).

[0168] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.

[0169] In summary, through the embodiments of the present application, different storage methods are adopted for monitoring data in different monitoring stages, so that the memory and performance of the application background management server are guaranteed to the greatest extent; based on at least one of the hash table and the bitmap, the speed measurement data that meets at least one dimension to be analyzed in the monitoring indicator to be analyzed is searched, and the performance analysis results are generated based on the speed measurement data found, while avoiding the explosion of dimensional data, providing application developers with convenient and multi-dimensional monitoring of application performance; supporting custom dimensions of application speed measurement functions in the millions, and being able to provide developers with monitoring applications with custom dimensions according to their own circumstances, thereby improving the developer's speed measurement experience and eliminating a lot of extra work in monitoring application performance.

[0170] The above description is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, and improvements made within the spirit and scope of the present application are included in the scope of protection of the present application.

Claims

1. A performance monitoring method for an application, characterized in that: include: receiving monitoring data sent by the application in a first monitoring phase, and storing the monitoring data of the first monitoring phase in a hash table; receiving monitoring data sent by the application in a second monitoring phase, and storing the monitoring data of the second monitoring phase in a bitmap; Wherein, the monitoring data includes speed measurement data of at least one monitoring indicator of the application in multiple dimensions; when the number of dimensions of the speed measurement data involved in the cumulative monitoring data received for the application is lower than a first dimension number threshold, and / or when the access load of the application is lower than a first load threshold, it is determined that the application is in the first monitoring stage; when the number of dimensions of the speed measurement data involved in the cumulative monitoring data received for the application is not lower than the first dimension number threshold, and / or when the access load of the application is not lower than the first load threshold, it is determined that the application is in the second monitoring stage; Based on at least one of the hash table and the bitmap, speed measurement data that meets at least one dimension to be analyzed in the monitoring indicator to be analyzed is searched, and a performance analysis result is generated based on the searched speed measurement data.

2. The method according to claim 1, characterized in that The method further comprises: When the number of dimensions of the speed measurement data involved in the monitoring data cumulatively received by the application is higher than a second dimension number threshold, the monitoring data subsequently sent by the application is discarded.

3. The method according to claim 1, characterized in that The storing the monitoring data of the first monitoring phase in a hash table includes: Using the screening items corresponding to the monitoring data as keywords; Finding the hash value corresponding to the candidate keyword from the correspondence between the candidate keyword and the candidate hash value, and determining the address corresponding to the found hash value; The monitoring data is stored in a storage unit corresponding to the found address.

4. The method according to claim 3, characterized in that A linked list is provided in the storage unit; The storing of the monitoring data into a storage unit corresponding to the found address includes: When the storage unit corresponding to the found address is not occupied, storing the monitoring data in a linked list of the storage unit; When the storage unit corresponding to the found address is occupied, the monitoring data is inserted into the corresponding position in the linked list of the storage unit for storage.

5. The method according to claim 1, wherein The storing the monitoring data of the second monitoring stage in a bitmap includes: Divide the bitmap into multiple pairs of data segments; Wherein, the paired data segments include a bitmap index and data; Dividing a storage space corresponding to the bitmap into a plurality of storage units; There is a corresponding relationship between different storage units and different bitmap indexes; Using the filtered item of the monitoring data of the second monitoring phase as the first bitmap index, and using the monitoring data of the second monitoring phase as the first data paired with the first bitmap index; From the corresponding relationship, searching for a storage unit corresponding to the first bitmap index; The first data is stored in the storage unit corresponding to the first bitmap index.

6. The method according to claim 1, characterized in that The performance monitoring process of the application is implemented through a server cluster; The method further comprises: receiving, through a first server in the server cluster, monitoring data sent by the application; redirecting the monitoring data to a second server in the server cluster through the first server; The data stored in different servers in the cluster belong to different monitoring indicators, and the second server is dedicated to storing data corresponding to the monitoring indicators to which the monitoring data belong.

7. The method according to claim 1, characterized in that The searching, based on at least one of the hash table and the bitmap, for speed measurement data that meets at least one dimension to be analyzed in the monitoring indicator to be analyzed includes: Displaying filter items of the application, wherein the filter items include multiple types of monitoring indicators and multiple custom dimensions for each of the monitoring indicators; Any selected type of monitoring indicator is used as the monitoring indicator to be analyzed, and at least one selected custom dimension among the monitoring indicators to be analyzed is used as the dimension to be analyzed; When the speed measurement data of the dimension to be analyzed is in the bitmap, the monitoring indicator to be analyzed and the dimension to be analyzed are used as a second bitmap index, and second data corresponding to the second bitmap index is searched in the storage space corresponding to the bitmap to serve as the speed measurement data of at least one dimension to be analyzed that meets the monitoring indicator to be analyzed; When the speed measurement data of the dimension to be analyzed is in the hash table, the monitoring indicator to be analyzed and the dimension to be analyzed are used as keywords, and the third data corresponding to the keyword is searched in the hash table as the speed measurement data of at least one dimension to be analyzed that meets the monitoring indicator to be analyzed.

8. The method according to claim 7, characterized in that The filter item includes at least one of the following targeting parameters: the running time of the application, and the host device parameters of the application; wherein the host device parameters include at least one of the following: the network type used by the host device, the operating system running on the host device, and the operator of the communication network used by the host device; The using the monitoring indicator to be analyzed and the dimension to be analyzed as a second bitmap index, and searching for second data corresponding to the second bitmap index in a storage space corresponding to the bitmap, includes: Using the monitoring indicator to be analyzed, the dimension to be analyzed, and the set directional parameter together as a second bitmap index, and searching for second data corresponding to the second bitmap index in a storage space corresponding to the bitmap; The step of using the monitoring indicator to be analyzed and the dimension to be analyzed as keywords and searching the hash table for third data corresponding to the keywords includes: The monitoring indicator to be analyzed, the dimension to be analyzed and the set directional parameter are collectively used as keywords, and the third data corresponding to the keywords is searched in the hash table.

9. The method according to claim 1, characterized in that Before receiving the monitoring data sent by the application in the first monitoring phase, the method further includes: Receive monitoring indicators created by a development object of the application and custom dimensions set for the monitoring indicators; Generate an application including a reporting code, wherein the reporting code is used to report the speed measurement data of the monitoring indicator in the custom dimension; The application is sent to a terminal device to receive monitoring data reported by the application running in the terminal device.

10. The method according to claim 1, characterized in that Generating a performance analysis result based on the found speed measurement data includes: When the category of the monitoring indicator of the speed measurement data found is network category, the speed measurement data found is displayed in the form of an average value curve and / or a reporting number curve; When the category of the monitoring indicator of the found speed measurement data is non-network category, the found speed measurement data is displayed in the form of an area map.

11. A performance monitoring and processing device for an application program, characterized in that: include: a limiter, configured to receive monitoring data sent by the application in a first monitoring phase, and store the monitoring data of the first monitoring phase in a hash table; receiving monitoring data sent by the application in a second monitoring phase, and storing the monitoring data of the second monitoring phase in a bitmap; Wherein, the monitoring data includes speed measurement data of at least one monitoring indicator of the application in multiple dimensions; when the number of dimensions of the speed measurement data involved in the cumulative monitoring data received for the application is lower than a first dimension number threshold, and / or when the access load of the application is lower than a first load threshold, it is determined that the application is in the first monitoring stage; when the number of dimensions of the speed measurement data involved in the cumulative monitoring data received for the application is not lower than the first dimension number threshold, and / or when the access load of the application is not lower than the first load threshold, it is determined that the application is in the second monitoring stage; The analyzer is configured to search for speed measurement data that meets at least one dimension to be analyzed in the monitoring indicator to be analyzed based on at least one of the hash table and the bitmap, and generate a performance analysis result based on the searched speed measurement data.

12. The device according to claim 11, characterized in that The limiter is also used to: Using the screening items corresponding to the monitoring data as keywords; Finding the hash value corresponding to the candidate keyword from the correspondence between the candidate keyword and the candidate hash value, and determining the address corresponding to the found hash value; The monitoring data is stored in a storage unit corresponding to the found address.

13. An electronic device, characterized in that: include: a memory for storing executable instructions; The processor is configured to implement the performance monitoring processing method of the application program according to any one of claims 1 to 10 when executing the executable instructions stored in the memory.

14. A computer-readable storage medium, characterized in that Executable instructions are stored, and when the executable instructions are executed by a processor, the performance monitoring processing method of the application program according to any one of claims 1 to 10 is implemented.

15. A computer program product, characterized in that The computer program product includes computer instructions, and when the computer instructions are executed by a processor, the computer program product implements the performance monitoring processing method of the application program according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Data processing method and device

    CN108572958A

  • Data storage method and device, electronic equipment and storage medium

    CN110209348A