Data sampling and performance monitoring method and system, electronic equipment and storage medium

By using the same target sampling algorithm and target sampling rate in the microservice system to sample the complete business data, the problem of inconsistent data discarding and retention during Trace ID transmission in the microservice system is solved, and a complete tracking of business process performance is achieved. and analysis.

CN119512877APending Publication Date: 2025-02-25SHANGHAI ZHUYUN INFORMATION TECH CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411669942.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

In large microservice business systems, since each microservice may use different APM technology stacks, the same Trace ID may be passed between multiple microservices, some microservices may retain sampled data, while others may Microservices may discard it, resulting in the final sampled results being unable to align, thus failing to fully track and analyze performance issues of the entire business process.

Method used

The same target sampling algorithm and target sampling rate are used to sample the complete business data of each microservice system in multiple microservice systems to ensure that all groups of sampled data belonging to the same business process are either sampled and discarded, or All are retained to avoid the problem of incomplete data and ensure that the sampling results can be aligned.

Benefits of technology

Through this method, sampled data corresponding to the complete business process can be obtained, which fully tracks and analyzes the performance problems of the entire business process, and solves the problem of data misalignment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512877A_ABST
    Figure CN119512877A_ABST
Patent Text Reader

Abstract

The invention provides a data sampling and performance monitoring method and system, electronic equipment and a storage medium. The method comprises the steps that complete business data of each micro-service system in a plurality of micro-service systems are acquired, and for the complete business data of any micro-service system in the plurality of micro-service systems, the complete business data of the micro-service system is used for representing business execution conditions of the micro-service system when the business system executes a plurality of business processes; based on the target sampling algorithm and the target sampling rate, data sampling is carried out on the complete business data of each micro-service system in the multiple micro-service systems to obtain multiple sets of sampling data, and the multiple sets of sampling data comprise at least part of business data in the complete business data corresponding to the multiple micro-service systems; and aggregating the plurality of groups of sampling data to obtain data sets in one-to-one correspondence with at least part of the business processes in the plurality of business processes. According to the method, the sampling data corresponding to the complete business process can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and more specifically to a data sampling and performance monitoring method, system, electronic device and storage medium. Background Art

[0002] With the emergence of distributed systems and microservice architectures, a user's request will go through multiple systems, and the calling relationship between different services is very complex, which also brings challenges to interface troubleshooting, performance analysis, and link topology sorting. In the field of application performance monitoring (APM), in order to detect the performance between code logic, code tracking is usually used, among which the Trace / Span mechanism is a solution commonly used in the industry. In the Trace / Span mechanism, Trace represents a complete business process, such as the user login process. This process may include steps such as front-end page loading, user information input, back-end login API call, cache session operation, database information query and update. Span represents each sub-node in the business process. In order to associate these sub-nodes, they are assigned a common Trace ID. With this Trace ID, we can list all sub-processes in the entire business process in chronological order.

[0003] Due to the huge amount of APM data, not all APM data is usually collected in actual business. Instead, a specific sampling rate (such as 10%) is set to reduce the impact of APM on system performance. Taking user login as an example, if there are 100 logins, the system may only record APM information for 10 of them.

[0004] For large-scale microservice business systems, since each microservice may use a different APM technology stack, the sampling implementation differences of different technology stacks may result in the same Trace ID being transmitted between multiple microservices. Some microservices may retain the sampling data, while others may discard it. In this way, the final sampling results cannot be aligned, which in turn makes it impossible to fully track and analyze the performance issues of the entire business process.

[0005] In view of this, the present invention is proposed. Summary of the invention

[0006] The present invention is proposed in view of the above problems. According to one aspect of the present invention, a data sampling method is provided, the method is used to perform data sampling on a business system, the business system is composed of multiple microservice systems; The method comprises: Acquire complete business data of each microservice system in the multiple microservice systems, wherein, for the complete business data of any microservice system in the multiple microservice systems, the complete business data of the microservice system is used to represent the business execution status of the microservice system when the business system executes multiple business processes; Based on a target sampling algorithm and a target sampling rate, data sampling is performed on the complete business data of each microservice system in the multiple microservice systems to obtain multiple groups of sampled data, where the multiple groups of sampled data include at least part of the business data in the complete business data corresponding to each of the multiple microservice systems; The multiple groups of sampled data are aggregated to obtain a data set corresponding to at least part of the multiple business processes.

[0007] Exemplarily, for each microservice system of the multiple microservice systems, a data collection framework is provided in the microservice system, and a data sampling rate of the data collection framework is 100%; Among them, the complete business data of the microservice system is collected by the data collection framework in the microservice system.

[0008] Exemplarily, the method further includes: The target sampling rate is generated in response to a sampling rate setting instruction input by a user.

[0009] Exemplarily, the method further includes: In response to a selection operation of a user, the target sampling algorithm is determined from a plurality of preset sampling algorithms.

[0010] Exemplarily, for the complete business data of any microservice system among the multiple microservice systems, the complete business data includes multiple groups of business data corresponding one-to-one to the multiple business processes, each group of business data has a label corresponding thereto, and the labels corresponding to the multiple groups of business data are different; for any business process among the multiple business processes, the business data corresponding to the business process in the complete business data of each microservice system among the multiple microservice systems have the same label; The aggregating the multiple groups of sampling data includes: The sampled data with the same label in the multiple groups of sampled data are aggregated to obtain a data set corresponding to at least part of the business processes in the multiple business processes.

[0011] According to another aspect of the present invention, a performance monitoring method is provided, the method being used to monitor the performance of a business system, the business system being composed of a plurality of microservice systems; the method comprising: Using the above data sampling method to perform data sampling on the business system; Based on the data obtained by the data sampling, the performance of the business system is monitored.

[0012] According to another aspect of the present invention, a data sampling system is provided. The system includes one or more modules, and the one or more modules are used to execute the steps in the above data sampling method.

[0013] According to another aspect of the present invention, a performance monitoring system is provided. The system includes one or more modules, and the one or more modules are used to execute the steps in the above-mentioned performance monitoring method.

[0014] According to another aspect of the present invention, an electronic device is provided, including a processor and a memory, wherein a computer program is stored in the memory, and the processor is used to execute the computer program to implement the data sampling method or performance monitoring method as described above.

[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, storing a computer program / instruction, which implements the above-mentioned data sampling method or performance monitoring method when executed by a processor.

[0016] In the above technical solution, the same target sampling algorithm and target sampling rate are used to sample the complete business data of each microservice system in multiple microservice systems. Therefore, for each group of sampled data belonging to the same business process (i.e. the same Trace ID), either all are sampled and discarded, or all are retained. This can avoid the problem of incomplete data caused by the discarding of part of the data in the same business process, and ensure that the sampling results can be aligned. In short, this solution can obtain sampling data corresponding to the complete business process. Applying this solution to the APM field can achieve complete tracking and analysis of the performance issues of the entire business process.

[0017] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above and other purposes, features and advantages of the present invention will become more apparent by describing the embodiments of the present invention in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0019] Figure 1A schematic flow chart of a data sampling method according to an embodiment of the present invention is shown; Figure 2 A schematic flow chart of a performance monitoring method according to an embodiment of the present invention is shown; Figure 3 A schematic block diagram of an electronic device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical scheme and advantages of the present invention more obvious, the exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described herein. Based on the embodiments of the present invention described in the present invention, all other embodiments obtained by those skilled in the art without creative work should fall within the protection scope of the present invention.

[0021] Microservice refers to a system that is split into multiple functions. These split functions can provide independent services and are called microservices. Microservice is a software development technology and a variant of the service-oriented architecture (SOA) architecture style. Its main idea is to divide a single application into a group of small services, which coordinate and cooperate with each other to provide ultimate value to users. Each service runs in its own independent process, and services communicate with each other using a lightweight communication mechanism (usually a RESTful interface based on HTTP). Each service is built around a specific business and can be independently deployed to a production environment, a quasi-production environment, etc. A large-scale microservice business system can be regarded as a business system composed of multiple microservice systems. When the business system executes a specific business process, each sub-node (Span) of the business process is completed by multiple microservice systems. In order to facilitate the connection of each sub-node in the same business process, each sub-node is assigned the same Trace ID. As described above, each microservice may use a different APM technology stack. The sampling implementation differences of different technology stacks may cause the same Trace ID to be transmitted between multiple microservices. Some microservices may retain the sampling data, while some microservices may discard it, so that the final sampling results cannot be aligned. For example, when the business process is a user login process, for the same business process, when sampling, some microservice systems may retain the sampling data of the business process, and some microservice systems may not retain the sampling data of the business process. This results in incomplete sampling data for the business process (for example, lack of sampling data for the front-end page loading process), which in turn leads to the inability to fully track and analyze the performance problems of the entire business process. In view of this, the present invention provides a data sampling and performance monitoring method, system, electronic device and storage medium. The data sampling method can align the sampling results of each microservice system, so that the sampling data corresponding to the complete business process can be obtained, which helps to fully track and analyze the performance problems of the entire business process. The data sampling method, performance monitoring method, data sampling system, performance monitoring system, electronic device and storage medium are described in detail below.

[0022] According to one aspect of an embodiment of the present invention, a data sampling method is provided. The data sampling method is used to perform data sampling on a business system, where the business system is composed of multiple microservice systems.

[0023] Figure 1 FIG. 2 is a schematic flow chart of a data sampling method according to an embodiment of the present invention. Figure 1 As shown, the method may include the following steps S110, S120 and S130.

[0024] In step S110, complete business data of each microservice system among the multiple microservice systems is obtained, wherein, for the complete business data of any microservice system among the multiple microservice systems, the complete business data of the microservice system is used to represent the business execution status of the microservice system when the business system executes multiple business processes.

[0025] Optionally, the complete business data of each microservice system can be collected through a specially configured program or framework. For example, a data collection framework (i.e., an APM framework) can be configured in each microservice system to collect data of the corresponding microservice system. Of course, the complete business data of each microservice system can also be collected through other programs or frameworks.

[0026] In this example, the complete business data of each microservice system is obtained. Different from the method of obtaining the business data of the microservice system by sampling from a large amount of data in the related art, the complete data of the microservice system in the process of executing multiple business processes is obtained in this example, and the complete business data includes the business data corresponding to each business process one by one.

[0027] In step S120, based on the target sampling algorithm and the target sampling rate, data sampling is performed on the complete business data of each microservice system in the multiple microservice systems to obtain multiple groups of sampled data, where the multiple groups of sampled data include at least part of the business data in the complete business data corresponding to each of the multiple microservice systems.

[0028] The target sampling algorithm in this example can be any data sampling algorithm that is currently available or will be developed in the future. For example, a hash algorithm, a system sampling algorithm, etc. In a specific embodiment, a hash algorithm is used for data sampling. The target sampling rate can be set according to actual needs and will not be described in detail.

[0029] In step S130, the multiple groups of sampled data are aggregated to obtain a data set corresponding to at least part of the multiple business processes.

[0030] After obtaining multiple sets of sampled data, the multiple sets of sampled data can be aggregated, that is, the data belonging to the same business process can be combined together, which makes it easier to fully track and analyze the performance issues of the entire business process.

[0031] In the above technical solution, the same target sampling algorithm and target sampling rate are used to sample the complete business data of each microservice system in multiple microservice systems. Therefore, for each group of sampled data belonging to the same business process (i.e. the same Trace ID), either all of them are sampled and discarded, or all of them are retained. This can avoid the problem of incomplete data caused by the discarding of part of the data in the same business process, and ensure that the sampling results can be aligned. In short, this solution can obtain sampling data corresponding to the complete business process. Applying this solution to the APM field can achieve complete tracking and analysis of the performance issues of the entire business process.

[0032] Exemplarily, for each microservice system in multiple microservice systems, a data collection framework is set in the microservice system, and the data sampling rate of the data collection framework is 100%; wherein, the complete business data of the microservice system is collected by the data collection framework in the microservice system.

[0033] The data collection framework may be an APM framework in a microservice system. In this example, by setting the data sampling rate of the data collection framework to 100%, it is possible to ensure that the business data in the microservice system is fully acquired, thereby facilitating alignment of the sampled data obtained in subsequent steps.

[0034] Exemplarily, the method further includes: generating a target sampling rate in response to a sampling rate setting instruction input by a user.

[0035] In this example, the user can set the target sampling rate as needed. The setting method includes but is not limited to the user entering a specific value in the sampling rate setting box, the user selecting the target sampling rate from multiple preset sampling rates, etc., which is not limited in this example.

[0036] In the solution of this example, the target sampling rate can be set according to user needs. Therefore, the user can select a suitable sampling rate according to specific application scenarios and needs, thereby ensuring that the amount of data obtained by sampling can meet the user's needs.

[0037] Exemplarily, the method further includes: in response to a selection operation of a user, determining a target sampling algorithm from a plurality of preset sampling algorithms.

[0038] Multiple preset sampling algorithms include but are not limited to hash algorithms, system sampling algorithms, etc., which are not described in detail.

[0039] In this example, users can select an appropriate target sampling algorithm based on current needs, which helps improve the targetedness of the adopted sampling algorithm (that is, the data collection process can be optimized for the current scenario), improve data quality and processing efficiency, reduce resource consumption, enhance the adaptability and flexibility of the system, and ensure that the sampling results are more in line with needs, thereby improving overall performance and user experience.

[0040] Optionally, for the complete business data of any microservice system among multiple microservice systems, the complete business data includes multiple groups of business data corresponding one-to-one to multiple business processes, each group of business data has a label corresponding to it, and the labels corresponding to the multiple groups of business data are different; for any business process among the multiple business processes, the business data corresponding to the business process in the complete business data of each microservice system in the multiple microservice systems have the same label; based on the target sampling algorithm and the target sampling rate, data sampling is performed on the complete business data of each microservice system in the multiple microservice systems, which can specifically include the following steps: for business data belonging to the same label, based on the label and the target sampling rate, determine whether each group of business data corresponding to the label is sampled.

[0041] Optionally, the label of the business data is the Trace ID corresponding to the business data. Based on the label and the target sampling rate, determining whether each group of business data corresponding to the label is sampled may include the following steps: based on a preset conversion algorithm, converting the label of the business data into an integer and taking the modulus to obtain a label value; determining whether the label value is less than the target sampling rate; when the label value is less than the target sampling rate, retaining each group of business data corresponding to the label; otherwise, discarding each group of business data corresponding to the label. Therefore, as long as the Trace ID is the same, no matter which microservice system it comes from, it will either be sampled and discarded or retained, avoiding the problem of incomplete Span in a Trace.

[0042] In a specific embodiment, since the Trace ID is generally a decimal or hexadecimal string, in this embodiment, it can be converted into an integer, and then the integer is modulo to obtain a smaller integer (i.e., the label value). Then, it can be determined whether the corresponding business data is retained based on the label value. The specific method has been described in detail above and will not be repeated here. The algorithm in this embodiment can be expressed as follows: ifx=IntTraceID(traceID)%(sampleRate* 10000); x>sampleRate { KeepTrace(traceID) }else{ DropTrace(traceID) } Exemplarily, for the complete business data of any microservice system among multiple microservice systems, the complete business data includes multiple groups of business data corresponding one-to-one to multiple business processes, each group of business data has a label corresponding thereto, and the labels corresponding to the multiple groups of business data are different; for any business process among the multiple business processes, the business data corresponding to the business process in the complete business data of each microservice system in the multiple microservice systems have the same label; step S130, aggregating the multiple groups of sampled data, can specifically include the following steps: aggregating the sampled data with the same label in the multiple groups of sampled data to obtain a data set corresponding one-to-one to at least part of the business processes among the multiple business processes.

[0043] It can be understood that multiple groups of sampled data are multiple groups of business data obtained through sampling. As described above, each group of business data has a corresponding label. The label of the sampled data can be the label of the Span in the business process corresponding to the sampled data, that is, the Trace ID. Of course, it can also be other labels predefined by the user, which will not be repeated.

[0044] It can be understood that the sampled data with the same label corresponds to the same business process. In this embodiment, the sampled data with the same label can be aggregated. Since the data belonging to the same business process is either completely discarded or completely retained during the sampling process, data corresponding to a complete business process can be obtained by data aggregation here. That is, each data set is complete data corresponding to a business process.

[0045] The above technical solution can obtain complete data belonging to a business process, thereby facilitating complete tracking and analysis of performance issues of the entire business process.

[0046] A specific scheme of the present invention is described below through a specific embodiment. In this technical scheme, a system for implementing a data sampling method obtains complete business data of each of multiple microservice systems through the same Trace Agent. The APM frameworks introduced by multiple microservice systems do not set a sampling rate to ensure that they can send complete business data to the Trace Agent. On the Trace Agent, a target sampling rate (for example, 10%) can be set. During specific sampling, the complete business data of each of the multiple microservice systems can be sampled based on the hash algorithm and the above-mentioned target sampling rate. In this case, the business data belonging to the same Trace ID is sampled by the same hash algorithm, that is, whether to sample the data is determined based on its hash value. Therefore, as long as the Trace ID is the same, no matter which microservice system it comes from, it will either be sampled and discarded or retained, avoiding the problem of incomplete Span in a Trace.

[0047] According to another aspect of an embodiment of the present invention, a performance monitoring method is provided, which is used to monitor the performance of a business system, where the business system is composed of multiple microservice systems. Figure 2 FIG. 2 is a schematic flow chart of a performance monitoring method according to an embodiment of the present invention. Figure 2 As shown, the method includes the following steps S210 and S220.

[0048] In step S210, the data sampling method described above is used to perform data sampling on the business system. The specific implementation scheme of performing data sampling on the business system using the data sampling method has been described in detail above and will not be repeated here.

[0049] In step S220, the performance of the business system is monitored based on the data obtained by data sampling.

[0050] According to another aspect of an embodiment of the present invention, a data sampling system is provided. The system includes one or more modules, and the one or more modules are used to execute the steps in the above data sampling method.

[0051] Optionally, the system may include an acquisition module, a first sampling module and an aggregation module.

[0052] The acquisition module is used to obtain the complete business data of each microservice system in multiple microservice systems, wherein, for the complete business data of any microservice system in multiple microservice systems, the complete business data of the microservice system is used to represent the business execution status of the microservice system when the business system executes multiple business processes.

[0053] The sampling module is used to perform data sampling on the complete business data of each microservice system in multiple microservice systems based on a target sampling algorithm and a target sampling rate to obtain multiple groups of sampled data, where the multiple groups of sampled data include at least part of the business data in the complete business data corresponding to each of the multiple microservice systems.

[0054] The aggregation module is used to aggregate multiple groups of sampled data to obtain a data set that corresponds one-to-one to at least part of the business processes in the multiple business processes.

[0055] By applying the data sampling method mentioned above, this solution can obtain complete data corresponding to a business process, so as to more accurately track and analyze the performance issues of the entire business process.

[0056] According to another aspect of an embodiment of the present invention, a performance monitoring system is provided. The system includes one or more modules, and the one or more modules are used to execute the steps in the above performance monitoring method.

[0057] Optionally, the performance monitoring system may include a second sampling module and a monitoring module.

[0058] The second sampling module is used to perform data sampling on the business system using the data sampling method described above.

[0059] The monitoring module is used to monitor the performance of the business system based on the data obtained by data sampling.

[0060] According to yet another aspect of the embodiments of the present invention, an electronic device is provided. Figure 3 FIG. 2 shows a schematic block diagram of an electronic device according to an embodiment of the present invention. Figure 3 As shown, the electronic device 300 includes: a processor 310 and a memory 320. The memory 320 stores a computer program, and the processor 310 is used to execute the computer program to implement the above-mentioned data sampling method or performance monitoring method.

[0061] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided. The storage medium stores a computer program / instruction, and when the computer program / instruction is executed by a processor, the above-mentioned data sampling method or performance monitoring method is implemented. The storage medium may include, for example, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, or any combination of the above storage media. The computer-readable storage medium may be any combination of one or more computer-readable storage media.

[0062] A person skilled in the art can easily understand the implementation structure, working principle and beneficial effects of the data sampling system, performance monitoring system, electronic device and computer-readable storage medium by reading the above data sampling method and performance monitoring method. For the sake of brevity, no further description is given here.

[0063] Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above example embodiments are merely exemplary and are not intended to limit the scope of the present invention thereto. Various changes and modifications may be made therein by one of ordinary skill in the art without departing from the scope and spirit of the present invention. All such changes and modifications are intended to be included within the scope of the present invention as required by the appended claims.

[0064] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0065] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.

[0066] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0067] Similarly, it should be understood that in order to streamline the present invention and help understand one or more of the various inventive aspects, in the description of the exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, the method of the present invention should not be interpreted as reflecting the following intention: the claimed invention requires more features than the features explicitly stated in each claim. More specifically, as reflected in the corresponding claims, the inventive point is that the corresponding technical problem can be solved with less than all the features of a single disclosed embodiment. Therefore, the claims following the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present invention.

[0068] Those skilled in the art will understand that, except for mutually exclusive features, all features disclosed in this specification (including the accompanying claims, abstract and drawings) and all processes or units of any method or device disclosed in this specification may be combined in any combination. Unless otherwise explicitly stated, each feature disclosed in this specification (including the accompanying claims, abstract and drawings) may be replaced by an alternative feature that provides the same, equivalent or similar purpose.

[0069] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims, any one of the claimed embodiments may be used in any combination.

[0070] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some modules in a data sampling system, a performance monitoring system, and an electronic device according to an embodiment of the present invention. The present invention may also be implemented as a device program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program for implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0071] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.

[0072] The above is only a specific embodiment of the present invention or an explanation of a specific embodiment. The protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. The protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A data sampling method, characterized in that: Used to sample data from a business system, where the business system consists of multiple microservice systems; The method comprises: Acquire complete business data of each microservice system in the multiple microservice systems, wherein, for the complete business data of any microservice system in the multiple microservice systems, the complete business data of the microservice system is used to represent the business execution status of the microservice system when the business system executes multiple business processes; Based on a target sampling algorithm and a target sampling rate, data sampling is performed on the complete business data of each microservice system in the multiple microservice systems to obtain multiple groups of sampled data, where the multiple groups of sampled data include at least part of the business data in the complete business data corresponding to each of the multiple microservice systems; The multiple groups of sampled data are aggregated to obtain a data set corresponding to at least part of the multiple business processes.

2. The data sampling method according to claim 1, characterized in that: For each microservice system in the multiple microservice systems, a data collection framework is provided in the microservice system, and a data sampling rate of the data collection framework is 100%; Among them, the complete business data of the microservice system is collected by the data collection framework in the microservice system.

3. The data sampling method according to claim 1, characterized in that: The method further comprises: The target sampling rate is generated in response to a sampling rate setting instruction input by a user.

4. The data sampling method according to claim 1, characterized in that: The method further comprises: In response to a selection operation of a user, the target sampling algorithm is determined from a plurality of preset sampling algorithms.

5. The data sampling method according to any one of claims 1 to 4, characterized in that: For the complete business data of any microservice system in the multiple microservice systems, the complete business data includes multiple groups of business data corresponding to the multiple business processes one by one, each group of business data has a label corresponding thereto, and the labels corresponding to the multiple groups of business data are different; for any business process in the multiple business processes, the business data corresponding to the business process in the complete business data of each microservice system in the multiple microservice systems have the same label; The aggregating the multiple groups of sampling data includes: The sampled data with the same label in the multiple groups of sampled data are aggregated to obtain a data set corresponding to at least part of the business processes in the multiple business processes.

6. A performance monitoring method, characterized in that: The method is used to monitor the performance of a business system, wherein the business system is composed of multiple microservice systems; the method comprises: Using the data sampling method described in any one of claims 1 to 5 to perform data sampling on the business system; Based on the data obtained by the data sampling, the performance of the business system is monitored.

7. A data sampling system, characterized in that: The method comprises one or more modules, wherein the one or more modules are used to execute the steps in the method according to any one of claims 1 to 5.

8. A performance monitoring system, characterized in that: The method comprises one or more modules, wherein the one or more modules are used to execute the steps in the method according to claim 6.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and the processor is used to execute the computer program to implement the method according to any one of claims 1 to 5 or the method according to claim 6.

10. A computer-readable storage medium, characterized in that: A computer program / instruction is stored, and when the computer program / instruction is executed by a processor, the method according to any one of claims 1 to 5 or the method according to claim 6 is implemented.