Link tracking adaptive sampling method and device, electronic equipment and storage medium

By dynamically adjusting the link tracking sampling rate, using technologies such as multi-dimensional dynamic weighting factors and forest fire algorithms, the problem of inflexible sampling rate adjustment in the existing technology is solved, and more efficient and stable link tracking sampling is achieved.

CN119892670APending Publication Date: 2025-04-25CHINA MOBILE (XIONGAN) ICT CO LTD +3

Patent Information

Application Number
CN202411894672.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

Existing link tracking and sampling strategies are difficult to ensure the comprehensiveness and accuracy of data while maintaining system stability, especially in case of high resource assessment requirements or emergencies.

Method used

By obtaining the multi-dimensional dynamic weighting factors of microservices in the operation and maintenance platform, dynamically adjusting the sampling rate of microservices, using factors such as forest fire algorithms, system load indicators, TPS values ​​and excitation parameters, the sub-sampling rate is determined in real time, and the sampling rate of the next time node is adjusted according to the difference between the sampling rate and the preset rate.

Benefits of technology

Adaptive dynamic intelligent adjustment of link tracking sampling rate is realized, making the sampling process more flexible and responsive, and improving the effectiveness of sampling and the stability of the operation and maintenance platform under different load conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892670A_ABST
    Figure CN119892670A_ABST
Patent Text Reader

Abstract

One or more embodiments of the invention disclose a link tracking adaptive sampling method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring dynamic weight factors of the micro-service in the operation and maintenance platform in multiple dimensions, wherein the dynamic weight factors are factors which dynamically influence the sampling rate; determining a sub-sampling rate corresponding to the dynamic weight factor of the micro-service under the current time node; determining a sampling rate corresponding to the micro-service at the current time node according to a sub-sampling rate and a sampling rate parameter corresponding to each dynamic weight factor of the micro-service at the current time node; and according to the difference between the sampling rate and a preset sampling rate, determining the corresponding sampling rate of the micro-service under the next time node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent operation and maintenance or big data operation and maintenance technology, and in particular to a method and device for link tracking adaptive sampling, an electronic device, and a storage medium. Background Art

[0002] The sampling strategy of link tracing is crucial for accurately identifying system performance bottlenecks and fault diagnosis. The ideal sampling rate should ensure the comprehensiveness and accuracy of the collected data while maintaining system stability, thereby providing support for in-depth analysis and effective monitoring. By adjusting the sampling rate, key call chain information can be captured without sacrificing system performance, enabling detailed observation of service operation status and rapid location of potential problems.

[0003] The sampling rate can be adjusted in two ways: fixed sampling rate or manual sampling rate modification. The former has high requirements for system resource evaluation, which requires sufficient resources, or the collected indicator samples are not sufficient, which is not convenient for locating faults and bottlenecks; the latter cannot respond to emergencies in a timely manner, and manual modification requires human judgment and modification based on resource usage and system stability, which cannot achieve the optimal situation. Therefore, there is an urgent need to provide a better link tracking adaptive sampling solution. Summary of the invention

[0004] The embodiments of this specification provide a link tracking adaptive sampling method and device, an electronic device, and a storage medium to provide a better link tracking adaptive sampling solution.

[0005] In a first aspect, one or more embodiments of this specification provide a link tracking adaptive sampling method, including: Obtain dynamic weight factors of microservices in the operation and maintenance platform in multiple dimensions, where the dynamic weight factors are factors that dynamically affect the sampling rate; Determine the sub-sampling rate corresponding to the dynamic weight factor of the microservice at the current time node; Determine the sampling rate corresponding to the microservice at the current time node according to the sub-sampling rate and sampling rate parameters corresponding to each dynamic weight factor of the microservice at the current time node; According to the difference between the sampling rate and the preset sampling rate, the sampling rate corresponding to the microservice at the next time node is determined.

[0006] Optionally, the dynamic weight factor includes a criticality factor, and determining the sub-sampling rate corresponding to the dynamic weight factor of the microservice at the current time node includes: Obtain the service call chain and service dependency data between the microservices at the current time node, wherein the service call chain is used to represent the call sequence between the microservices, and the service dependency data is used to represent the dependency relationship between the microservices; Based on the forest fire algorithm, the importance of each microservice in the operation and maintenance platform is determined through the service call chain and the service dependency data, and according to the importance, the sub-sampling rate corresponding to the criticality factor of the microservice at the current time node is determined.

[0007] Optionally, the dynamic weight factor includes a system load factor, and determining the sub-sampling rate corresponding to the dynamic weight factor of the microservice at the current time node includes: Obtaining an actual value of a system load indicator of the operation and maintenance platform at a current time node, wherein the system load indicator includes one or more of CPU usage, memory usage, disk usage, and network usage; Determine the load index value corresponding to the system load index at the current time node according to the actual value, threshold value and maximum value of the system load index; Based on the load index value, a sub-sampling rate corresponding to the system load factor of the microservice at the current time node is determined.

[0008] Optionally, the dynamic weight factor includes a TPS factor, and determining the sub-sampling rate corresponding to the dynamic weight factor of the microservice at the current time node includes: Fit the historical TPS values ​​and subsampling rates to construct a TPS-subsampling rate function; Get the actual value of TPS of the operation and maintenance platform at the current time node; The actual value of the TPS is input into the TPS-subsampling rate function to obtain the subsampling rate corresponding to the TPS factor of the microservice at the current time node.

[0009] Optionally, the dynamic weight factor includes an incentive parameter factor, and determining the sub-sampling rate corresponding to the dynamic weight factor of the microservice at the current time node includes: Determine seed services from the microservices included in the operation and maintenance platform, and assign different incentive values ​​to different seed services; When the microservice tracks and reports the call events between the microservices, the incentive value of the tracked microservice is awarded to the tracked microservice, so as to distribute the incentive value of the seed user among the microservices in the operation and maintenance platform; An incentive value of the microservice at the current time node is obtained, and the incentive value is used as a sub-sampling rate corresponding to the incentive parameter factor.

[0010] Optionally, after determining the sampling rate corresponding to the microservice at the current node, the method further includes: Obtaining the storage space of the dynamic weight factor at the current time node; Based on the relationship between the cost impact parameter and the storage space of the sampled data, determine the target cost impact parameter corresponding to the storage space at the current time node; The sampling rate is adjusted using the target cost impact parameter to obtain an adjusted sampling rate.

[0011] In a second aspect, an embodiment of the present specification provides a link tracking adaptive sampling device, including: The weight factor module is used to obtain the dynamic weight factors of microservices in the operation and maintenance platform in multiple dimensions, where the dynamic weight factors are factors that dynamically affect the sampling rate; A sub-sampling rate module, used to determine the sub-sampling rate corresponding to the dynamic weight factor of the microservice at the current time node; A sampling rate module, used to determine the sampling rate corresponding to the microservice at the current time node according to the sub-sampling rate and sampling rate parameters corresponding to each dynamic weight factor of the microservice at the current time node; The adjustment module is used to determine the sampling rate corresponding to the microservice at the next time node according to the gap between the sampling rate and the preset sampling rate.

[0012] Optionally, the dynamic weight factor includes a criticality factor, and the sub-sampling rate module includes: A first data acquisition unit is used to acquire a service call chain and service dependency data between the microservices at a current time node, wherein the service call chain is used to represent a call sequence between the microservices, and the service dependency data is used to represent a dependency relationship between the microservices; The first sub-sampling rate unit is used to determine the importance of each microservice in the operation and maintenance platform based on the forest fire algorithm through the service call chain and the service dependency data, and determine the sub-sampling rate corresponding to the criticality factor of the microservice at the current time node according to the importance.

[0013] Optionally, the dynamic weight factor includes a system load factor, and the sub-sampling rate module includes: A second data acquisition unit is used to acquire an actual value of a system load indicator of the operation and maintenance platform at a current time node, where the system load indicator includes one or more of a CPU usage rate, a memory usage rate, a disk usage rate, and a network usage rate; A load index value unit, used to determine the load index value corresponding to the system load index at the current time node according to the actual value, threshold value and maximum value of the system load index; The second sub-sampling rate unit is used to determine the sub-sampling rate corresponding to the system load factor of the microservice at the current time node based on the load indicator value.

[0014] Optionally, the dynamic weight factor includes a TPS factor, and the sub-sampling rate module includes: A fitting function unit is used to fit the historical TPS value and sub-sampling rate to construct a TPS-sub-sampling rate function; A third data acquisition unit is used to obtain the actual value of the TPS of the operation and maintenance platform at the current time node; The third sub-sampling rate unit is used to input the actual value of the TPS into the TPS-sub-sampling rate function to obtain the sub-sampling rate corresponding to the TPS factor of the microservice at the current time node.

[0015] Optionally, the dynamic weight factor includes an excitation parameter factor, and the sub-sampling rate module includes: A seed service unit, used to determine a seed service from the microservices included in the operation and maintenance platform, and to assign different incentive values ​​to different seed services; an incentive value allocating unit, configured to award the incentive value of the tracked microservice to the tracked microservice when the microservice tracks and reports the call events between the microservices, so as to allocate the incentive value of the seed user among the microservices in the operation and maintenance platform; The fourth sub-sampling rate unit is used to obtain the incentive value of the microservice at the current time node, and use the incentive value as the sub-sampling rate corresponding to the incentive parameter factor.

[0016] Optionally, the link tracking adaptive sampling device further includes: A storage space acquisition module, used to obtain the storage space of the dynamic weight factor at the current time node after determining the sampling rate corresponding to the microservice at the current node; An impact parameter module, used to determine a target cost impact parameter corresponding to the storage space at the current time node based on the relationship between the cost impact parameter and the storage space of the sampled data; The sampling rate adjustment module is used to adjust the sampling rate using the target cost impact parameter to obtain an adjusted sampling rate.

[0017] In a third aspect, an embodiment of the present specification provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0018] In a fourth aspect, an embodiment of the present specification provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0019] In a fifth aspect, an embodiment of this specification provides a chip, the chip comprising a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0020] In a sixth aspect, an embodiment of this specification provides a computer program product, which, when executed by a processor, implements the method described in the first aspect.

[0021] In the embodiment of the present specification, the sub-sampling rate at the current time node is determined for the dynamic weight factor of the microservice obtained, and then the sampling rate corresponding to the microservice at the current time node is determined according to the sub-sampling rate and the sampling rate parameter, so as to determine the sampling rate at the next time node according to the difference between the sampling rate and the preset sampling rate. This process realizes adaptive dynamic intelligent adjustment of the sampling rate of the microservice by real-time determination of the sub-sampling rate of the dynamic weight factor, making the link tracking sampling process more flexible and responsive, thereby improving the effectiveness of sampling and the stability of the operation and maintenance platform under different load conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate one or more embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in one or more embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0023] Figure 1 It is a schematic flowchart of a link tracking adaptive sampling method according to an embodiment of this specification.

[0024] Figure 2 It is a schematic diagram of initially setting a sampling rate parameter according to an embodiment of the present specification.

[0025] Figure 3is a schematic diagram of a TPS-subsampling rate function according to an embodiment of this specification.

[0026] Figure 4 It is a schematic diagram of a process of adaptively adjusting a sampling rate based on a dynamic weight factor according to an embodiment of the present specification.

[0027] Figure 5 It is a structural diagram of a link tracking adaptive sampling device according to an embodiment of this specification.

[0028] Figure 6 It is a structural schematic diagram of an electronic device according to an embodiment of this specification. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0030] The terms "first", "second", etc. in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of this specification can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0031] Figure 1 A flow chart of a link tracking adaptive sampling method according to an embodiment of the present disclosure is shown, and the method can be applied to a link tracking adaptive sampling device, and the link tracking adaptive sampling device can be a terminal device, a server or other processing device, etc. Among them, the terminal device can be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc.

[0032] In some possible implementations, the link tracking adaptive sampling method may be implemented by a processor calling computer-readable instructions stored in a memory.

[0033] like Figure 1 As shown, the link tracking adaptive sampling method may include: Step S102: Obtain dynamic weight factors of microservices in the operation and maintenance platform in multiple dimensions.

[0034] The operation and maintenance platform may be an intelligent operation and maintenance platform, which can provide a variety of microservices. This specification does not specifically limit the types of microservices in the intelligent operation and maintenance platform, and can be selected according to actual conditions. Specifically, the type of microservice can be determined according to the application scenario of the intelligent operation and maintenance platform.

[0035] The sampling rate is usually a probability value, ranging from 0 to 1. For example, setting the sampling rate to 0.5 means that only 50% of the requests are sampled. The dynamic weight factor is a factor that dynamically affects the sampling rate. In one example, a dynamic weight factor can be set for a microservice based on historical data, expert evaluation, etc. By setting the dynamic weight factor, it is helpful to evaluate whether the current sampling rate is appropriate based on the operating status of the endpoint tracked by the operation and maintenance platform at the current time node, and then determine the sampling rate of the endpoint at the next time node. Specifically, multiple dynamic weight factors of different dimensions can be set for the microservice to improve the accuracy of link tracking adaptive sampling. The dimensions of the dynamic weight factor can refer to the subsequent embodiments and will not be repeated here.

[0036] Step S104: determining the sub-sampling rate corresponding to the dynamic weight factor of the microservice at the current time node.

[0037] Step S106: Determine the sampling rate corresponding to the microservice at the current time node according to the sub-sampling rates and sampling rate parameters corresponding to each of the dynamic weight factors of the microservice at the current time node.

[0038] Among them, the sub-sampling rate is the sampling rate corresponding to the dynamic weight factor of the microservice. The acquisition method of the sub-sampling rate of different dynamic weight factors in the microservice is different, and reference can be made to the subsequent embodiments. The sampling rate of the microservice can be jointly determined by the sub-sampling rate of the dynamic weight factor of each dimension, and the sampling rate parameter is used to represent the weight corresponding to the dynamic weight factor.

[0039] In one example, a sampling rate parameter of a dynamic weight factor may be assigned to each microservice. Specifically, a weight matrix M may be created, in which each row represents a service and each column represents a dynamic weight factor. Formula 1 shows a weight matrix with three dynamic weight factors.

[0040] (Formula 1) Among them, the element m in the matrix M ijRepresents the weight of the i-th service on the j-th dynamic weight factor (i.e., sampling rate parameter).

[0041] In one example, a fixed sampling frequency can be set, that is, multiple time nodes are obtained at fixed time intervals, the sampling rate is determined at each time node, and the sampling rate of the next time node is determined based on the sampling rate of the time node, so as to achieve real-time and timely adjustment of the sampling rate, which can avoid the negative impact on system stability caused by excessively high sampling rates. At the same time, real-time determination of the sampling rate can also ensure the high quality of the sampled data and reduce the time delay in fault diagnosis and root cause location caused by data quality problems. This can more accurately capture key performance indicators while maintaining the efficient operation and responsiveness of the operation and maintenance platform system, providing a more powerful and flexible tool for monitoring and troubleshooting the operation and maintenance platform system.

[0042] According to the sub-sampling rate of various dynamic weight factors in the microservice at the current time node, the sampling rate of the microservice at the current time node can be determined. In one example, the microservice can include dynamic weight factors such as criticality factor, system load factor, TPS factor or incentive parameter factor, where the criticality factor is used to reflect the importance or basic value of the microservice, the system load factor is used to reflect the current load of the microservice, the TPS factor is used to reflect the frequency of business requests received by the microservice, and the incentive parameter factor is used to reflect the participation of the microservice or track the contribution.

[0043] When a microservice includes four dynamic weight factors, namely, a criticality factor, a system load factor, a TPS factor, and an incentive parameter factor, the sampling rate of the microservice can be determined according to Formula 2.

[0044] w i =p core *m i1 +p load *m i2 +p traffic *m i3 +p incentive *incentive(S i )(Formula 2) Among them, w i represents the sampling rate of the i-th microservice, p core Indicates the subsampling rate corresponding to the criticality factor, m i1 Indicates the sampling rate parameter corresponding to the criticality factor, p load Indicates the subsampling rate corresponding to the system load factor, m i2 Indicates the sampling rate parameter corresponding to the system load factor, p traffic Indicates the subsampling rate corresponding to the TPS factor, m i3 Indicates the sampling rate parameter corresponding to the TPS factor, pincentive represents the subsampling rate corresponding to the incentive parameter factor, incentive(S i ) represents the sampling rate parameter corresponding to the incentive parameter factor.

[0045] To ensure that the sum of the sampling rates of the microservices included in the operation and maintenance platform is 1, the sampling rate of each microservice can be standardized. Formula 3 shows the process of standardizing the sampling rate of the microservice.

[0046] W inormalized = w i / ∑ j w j (Formula 3) where w i represents the sampling rate of the i-th microservice, and W inormalized represents the standardized sampling rate of the i-th microservice, and ∑ j w j represents the total sampling rate of the microservices included in the operation and maintenance platform.

[0047] Each sampling rate parameter can be determined based on historical data, expert evaluation, or other relevant metrics and set when the method of adaptive sampling for link tracing starts running. Figure 2 shows a schematic diagram of the initial setting of the sampling rate parameter. As Figure 2 shown, various sampling rate parameters can be set and adjusted to adapt to different data collection requirements.

[0048] Step S108: Determine the sampling rate corresponding to the microservice at the next time node according to the gap between the sampling rate and the preset sampling rate.

[0049] Before the method of adaptive sampling for link tracing runs, a preset sampling rate that each sampling endpoint expects to collect can be set. For example, each endpoint collects 1 trace per second. After determining the sampling rate of the microservice using the above method of adaptive sampling for link tracing, the sampling rate at the next time node can be determined according to the gap between the preset sampling rate and the actually obtained sampling rate. The actually obtained sampling rate can be represented by s', and the preset sampling rate can be represented by s. If s'>s, it indicates that the current sampling rate for this endpoint is too high and needs to be appropriately reduced; conversely, if s'<s, the sampling rate of this endpoint needs to be increased.

[0050] Considering the volatility of the actual traffic, the situation where s' is equal to s is relatively rare. Therefore, a tolerance threshold k can be set, and the rule can be adjusted to s'>s + k or s'<s - k. After obtaining the new sampling rate s', a period of time can be waited to ensure that the new sampling rate is applied, and then the new value of s' can be observed and this process can be repeated.

[0051] In the embodiment of the present specification, the sub-sampling rate at the current time node is determined for the dynamic weight factor of the microservice obtained, and then the sampling rate corresponding to the microservice at the current time node is determined according to the sub-sampling rate and the sampling rate parameter, so as to determine the sampling rate at the next time node according to the difference between the sampling rate and the preset sampling rate. This process realizes adaptive dynamic intelligent adjustment of the sampling rate of the microservice by real-time determination of the sub-sampling rate of the dynamic weight factor, making the link tracking sampling process more flexible and responsive, thereby improving the effectiveness of sampling and the stability of the operation and maintenance platform under different load conditions.

[0052] In one implementation, the dynamic weight factor includes a criticality factor, and determining the sub-sampling rate corresponding to the dynamic weight factor of the microservice at the current time node includes: Obtain the service call chain and service dependency data between the microservices at the current time node, wherein the service call chain is used to represent the call sequence between the microservices, and the service dependency data is used to represent the dependency relationship between the microservices; Based on the forest fire algorithm, the importance of each microservice in the operation and maintenance platform is determined through the service call chain and the service dependency data, and according to the importance, the sub-sampling rate corresponding to the criticality factor of the microservice at the current time node is determined.

[0053] The criticality factor is a dynamic weight factor used to represent the importance or basic value of a microservice. In one example, a distributed tracing tool can be used to capture the call links between microservices, collect service call chains and service dependency data between microservices, the former is used to represent the call sequence between the microservices, and the latter is used to represent the dependency relationship between the microservices.

[0054] Microservice logs record the routing and forwarding of all external requests to internal microservices. Therefore, service call chains and service dependency data can be obtained by collecting microservice logs. Specifically, the call relationships between microservices can be collected by analyzing microservice logs. Log information of service calls can be extracted from the log system, including the source service, target service, parameters, timestamp, etc.

[0055] In one example, the importance of each microservice in the operation and maintenance platform can be determined based on the forest fire algorithm through the service call chain and the service dependency data. Specifically, based on the forest fire algorithm, each microservice is regarded as a node, and the call relationship between microservices is regarded as the edge between nodes. A weight is assigned to each node according to the characteristics of the microservice, such as importance, call frequency, and response time.

[0056] After setting the nodes, edges, and node weights, services with high call frequency or high importance can be used as the initial "fault" nodes. Based on the relationship between node weights and edges, the propagation of "faults" in the service network can be simulated. During the simulation, service nodes that are prone to "faults" or spread quickly can be identified. Next, the simulation results can be analyzed to identify key services and determine the importance of each microservice in the operation and maintenance platform.

[0057] Assume that the service network of the operation and maintenance platform contains the following service components and their characteristics: monitorServer (indicating a component of high importance and high call frequency), cmdbServer (indicating a component of medium importance and medium call frequency), eventServer (indicating a component of low call frequency), doccServer or doiaServer (indicating a component with no outbound calls).

[0058] In the "forest fire" model, monitorServer may become the initial "fire source" due to its high importance and high call frequency. During the simulation, monitorServer quickly "ignites" cmdbServer and eventServer. Due to the medium importance of cmdbServer, it may further "ignite" doccServer. Although eventServer calls doiaServer, due to its low call frequency, the propagation may not continue.

[0059] Through the above method, real-time monitoring and determination of the importance of each microservice based on the forest fire algorithm can effectively identify the service components that currently play a key role in the service network, help ensure the comprehensive capture of key data, and provide support for the stability and reliability of the operation and maintenance platform system.

[0060] The following is part of the code for determining the sub-sampling rate corresponding to the criticality factor of the microservice at the current time node: function analyze_key_services(burning_services): key_services = [] for service in burning_services: if service.degree>threshold or service.spread_capacity>threshold: key_services.append(service) return key_services Among them, service.degree indicates the connectivity of microservices, and service.spread_capacity indicates the spreading capacity of microservices. By setting the threshold, service components that play a key role in the network can be identified. Data such as the importance of microservices can be stored in a database management system (clickhouse). The importance can be calculated based on the service connectivity and call status. Microservices can be divided into core key services, important services, and edge services. The default importance of these three services can be set to 1, 0.8, and 0.5 respectively.

[0061] In one implementation, the dynamic weight factor includes a system load factor, and determining the sub-sampling rate corresponding to the dynamic weight factor of the microservice at the current time node includes: Obtaining an actual value of a system load indicator of the operation and maintenance platform at a current time node, wherein the system load indicator includes one or more of CPU usage, memory usage, disk usage, and network usage; Determine the load index value corresponding to the system load index at the current time node according to the actual value, threshold value and maximum value of the system load index; Based on the load index value, a sub-sampling rate corresponding to the system load factor of the microservice at the current time node is determined.

[0062] The system load factor is a dynamic weight factor used to represent the workload of the operation and maintenance platform system during operation. The system load factor can use the values ​​of various system load indicators to represent the size of the workload it bears. The system load indicators include one or more of CPU usage, memory usage, disk usage, and network usage.

[0063] The system load has a significant impact on the stability and sampling rate of microservices. It can be monitored through the service monitoring system (Prometheus) to obtain the actual values ​​of the indicators of the device system load where the microservice is located. The above system load indicators can mainly consider CPU usage and memory usage.

[0064] The load index value is the value of the system load index, which can be calculated based on the current system load. The load index value is a value between -1 and 1. When the load index value is positive, the sampling rate can be increased, and when the load index value is negative, the sampling rate can be reduced. After obtaining the actual value of the system load index at the current time node, you can use Formula 4 to calculate the load index value corresponding to the system load index at the current time node: (Formula 4) Among them, CurrentLoadi is the actual value of the i-th system load indicator at the current time node, ThresholdLoad i is the threshold of the i-th system load indicator, ThresholdLoad i is the safety limit of the system load, and MaxLoadi is the possible maximum value of the i-th system load indicator.

[0065] You can select a base sub-sampling rate BaseRate to monitor and collect the actual values ​​of various system load indicators of the operation and maintenance platform in real time. For each system load indicator, use its actual value, threshold and maximum value to calculate the load indicator value. According to each load indicator value and the corresponding weight coefficient α i Adjust the base sampling rate. If multiple system load indicators affect the sub-sampling rate of the system load factor at the same time, their effects can be multiplied. Ensure that the sub-sampling rate of the final system load factor does not exceed the preset upper limit (such as 100%) and lower limit (such as 1%).

[0066] After obtaining the load index value, Formula 5 can be used to calculate the sub-sampling rate corresponding to the system load factor of the microservice at the current time node.

[0067] (Formula 5) Where BaseRate is the base subsampling rate, BaseRate is a constant between 0 and 1, indicating the initial subsampling rate when no load is considered, n is the number of system load indicators, and α i is the weight coefficient of the i-th system load indicator, α i Used to adjust the sampling rate, α i The value of LoadFactor is set according to the importance of the system load indicator and the degree of impact on system performance. i is the load index value of the i-th system load index, LoadFactor i Calculated based on the current system load.

[0068] Assume that the basic sub-sampling rate is 10%, and only consider two load indicators: CPU usage and memory usage, and the weight coefficient α of each indicator is 0.05. If the current CPU usage is 75% (actual value), the memory usage is 80% (actual value), the threshold is 70%, and the maximum value is 100%, then the calculation process of the sub-sampling rate corresponding to the system load factor of the microservice at the current time node is as follows: The CPU load index value is: 0.05×((75-70) / (100-70)); The memory load index value is: 0.05×((80-70) / (100-70)); Subsampling rate SamplingRate = 0.1 × (1 + 0.05 × ((75-70) / (100-70))) × (1 + 0.05 × ((80-70) / (100-70))) = 0.1 × 1.008333 × 1.016667 ≈ 0.1019395.

[0069] This means that under the current system load of the operation and maintenance platform, the subsampling rate corresponding to the system load factor is about 10.19%. This value exceeds the basic subsampling rate (10%), so it is necessary to adjust the subsampling rate according to the actual situation to ensure that it does not exceed the set subsampling rate range.

[0070] In one implementation, the dynamic weight factor includes a TPS factor, and determining the sub-sampling rate corresponding to the dynamic weight factor of the microservice at the current time node includes: Fit the historical TPS values ​​and subsampling rates to construct a TPS-subsampling rate function; Obtain the actual value of TPS of the operation and maintenance platform at the current time node; The actual value of the TPS is input into the TPS-subsampling rate function to obtain the subsampling rate corresponding to the TPS factor of the microservice at the current time node.

[0071] TPS (Transactions Per Second) stands for transaction volume per second, that is, the number of transactions that the system can process per second. The TPS factor is a dynamic weight factor used to represent the number of transactions processed by the network platform system during operation.

[0072] In performance testing, you can use the stress testing tool manual (JMeter) to set up thread groups to simulate multiple users accessing the application system concurrently to obtain the TPS extreme point of the operation and maintenance platform. During the operation of the operation and maintenance platform, you can monitor it through the service monitoring system (Prometheus) to obtain the actual TPS value. In one example, you can use the historical TPS value and sub-sampling rate for fitting to construct a TPS-sub-sampling rate function, and then you can input the actual TPS value into the function to obtain the sub-sampling rate.

[0073] In the TPS-subsampling rate function, the following parameters can be set: Minimum threshold. To ensure sufficient samples, it can be agreed that when the minimum threshold of TPS is less than or equal to the minimum threshold, the sub-sampling rate of the system load factor is 100%. For example, if the minimum threshold is set to 20, that is, when TPS<20, the sub-sampling rate is 100%.

[0074] Business target value. In Prometheus, record the daily average TPS of business applications. Assume that the average TPS of a single machine for a business application is 60, and the corresponding subsampling rate is 90%.

[0075] Extreme point. When TPS is very large, a large fixed number of samples per second must be guaranteed to keep enough data samples so that the subsampling rate is not adjusted indefinitely as TPS increases. Then, when the actual value of TPS reaches the extreme point, the derivative of the TPS-subsampling rate function is 0, and when it is greater than the extreme point, the sampling rate per second remains unchanged. For example, it can be assumed that the extreme point of TPS is 400.

[0076] In one example, the TPS-subsampling rate function can be set as a quadratic function model, that is, sampling rate = aTPS 2 +bTPS+c, a, b, c are model parameters, which can be obtained by fitting actual data points. According to the historical TPS value and sub-sampling rate, the following relationship can be obtained: 20 2 * a + 20b + c = 1; 60 2 * a + 60b + c = 0.9; 2 * 400 * a + b = 0.

[0077] The image of the TPS-subsampling rate function is as follows Figure 3 As shown, we can calculate: a≈0.000003125, b≈-0.0025, c≈1.05. The final function is sampling rate = 0.000003125TPS 2 -0.0025TPS+1.05. Input the actual value of TPS into the TPS-subsampling rate function to dynamically calculate the subsampling rate corresponding to the TPS factor of the microservice.

[0078] In the above process, the respective sub-sampling rates can be dynamically adjusted through the system load factor and the TPS factor, so that the sampling rate of the microservice determined according to the sub-sampling rate can adapt to the actual operating status of the operation and maintenance platform.

[0079] When tracking service calls in a large distributed system, 100% sampling and monitoring of all service calls will pose a huge challenge to resource allocation. To solve this problem, the Respondent-Driven Sampling (RDS) method can be used to incentivize service components to participate in data sampling, thereby reducing resource consumption and improving data quality and coverage. RDS is a method for collecting data from groups that are difficult to sample directly. A numerical value for sampling incentives is calculated through "reward points" and parameters. In this way, service components can be effectively incentivized to participate in tracking, ensuring high-quality sampling data with limited resources. Specifically, the dynamic weight factor includes an incentive parameter factor, and the determination of the sub-sampling rate corresponding to the dynamic weight factor of the microservice at the current time node includes: Determine seed services from the microservices included in the operation and maintenance platform, and assign different incentive values ​​to different seed services; When the microservice tracks and reports the call events between the microservices, the incentive value of the tracked microservice is awarded to the tracked microservice, so as to distribute the incentive value of the seed user among the microservices in the operation and maintenance platform; An incentive value of the microservice at the current time node is obtained, and the incentive value is used as a sub-sampling rate corresponding to the incentive parameter factor.

[0080] Among them, the seed service is a microservice that plays a core role. The seed service can be determined based on the importance of the microservice and / or the number of calls.

[0081] After determining the seed service, an incentive value can be assigned to the seed service. For example, the initial incentive value of the seed service can be determined based on the importance of the seed service and / or the number of calls. When the seed service tracks calls between microservices, it can use the incentive value to incentivize other microservices to participate in the tracking, and incentivize the microservices that track and report. The incentivized microservice can also use the incentive value to incentivize other service components. The changes in the incentive value (positive numbers indicate increases, negative numbers indicate decreases) can be stored in ClickHouse, which contains service call chains and service dependency data.

[0082] As more microservices are incentivized to participate in tracking, these microservices also obtain their own "incentive values", thus forming an incentive chain to distribute the incentive value of the seed user among the microservices in the operation and maintenance platform.

[0083] Assume that the microservices in the operation and maintenance platform call each other to jointly complete the user's shopping process. First, you can select the order service, payment service, and inventory service as the initial seed services. These services play a core role in the shopping process. Assign a certain amount of "incentive value" to each seed service: 1 incentive value is assigned to the order service, 0.8 incentive value is assigned to the payment service, and 0.6 incentive value is assigned to the inventory service.

[0084] These seed services start tracing their calls to other microservices and reporting the call data to the central tracing system. At the same time, they can use "incentive value" to incentivize other microservices to participate in tracing. When a microservice successfully traces and reports a call to another microservice, it can get a reward value. For example, after the payment service traces the call to the order service, the order service rewards the payment service with 0.2 reward value.

[0085] As more services are incentivized to participate in tracking, they also get their own incentive value and continue the process. For example, the payment service incentivizes the logistics service to participate in tracking and rewards the logistics service with 0.2 reward value. The logistics service then incentivizes the notification service to participate in tracking with 0.1 reward value, and so on.

[0086] After a period of time, the reward value is dynamically changed to: order service has 0.8 incentive value, payment service has 0.8 incentive value, inventory service has 0.6 incentive value, logistics service has 0.1 incentive value, and notification service has 0.1 incentive value.

[0087] After the excitation value is obtained, the sub-sampling rate corresponding to the excitation parameter factor can be obtained according to the excitation value and the excitation parameter used to adjust the excitation value. The excitation parameter is 0.1 by default.

[0088] In the above process, microservices are encouraged to actively participate in data collection through incentive mechanisms. This method can not only improve the breadth and depth of data collection, but also help to effectively control the cost and complexity of sampling while ensuring the quality of tracking. Furthermore, an ideal balance can be found between resource utilization and data quality, providing strong support for the observability of the operation and maintenance platform system.

[0089] The sampled data will be stored in clickhouse, and the storage space occupied will increase over time. The corresponding indicator values ​​can be collected through prometheus. Therefore, under the condition of fixed cost, the relationship between storage space and call chain sampling rate needs to be considered. In one implementation, after determining the sampling rate corresponding to the microservice at the current node, the method also includes: Obtaining the storage space of the dynamic weight factor at the current time node; Based on the relationship between the cost impact parameter and the storage space of the sampled data, determine the target cost impact parameter corresponding to the storage space at the current time node; The sampling rate is adjusted using the target cost impact parameter to obtain an adjusted sampling rate.

[0090] The storage space may be a space for storing sampled data. The relationship between the cost impact parameter and the storage space for sampled data may be expressed using Formula 6.

[0091] SCRate= MaxRate×(1- CurrentStorageUsage) / TotalStorageCapacity / β (Formula 6) Among them, SCRate is the cost impact parameter, MaxRate is the maximum sampling rate when there is no storage pressure, CurrentStorageUsage is the currently used storage space, TotalStorageCapacity is the total storage capacity, and β is an adjustment factor used to control the rate at which the sampling rate decreases as the storage usage increases.

[0092] It can be seen from Formula 6 that when CurrentStorageUsage is close to TotalStorageCapacity, SamplingRate will be close to 0, reducing data collection to avoid storage overflow; when CurrentStorageUsage is very low, SamplingRate is close to MaxRate, allowing more frequent data collection; the larger the value of β, the faster the sampling rate decreases with the increase in storage usage, and its value can be adjusted according to actual needs.

[0093] Assume that the parameters at the current time node are: MaxRate=1 (indicating 100% sampling), CurrentStorageUsage=500GB, TotalStorageCapacity=1000GB, β=2. Substituting into the formula, we get the target cost parameter SCRate=1×(1-500 / 1000) ×2=1×(0.5) / 2=0.25 under the current storage usage. This formula is used to illustrate the potential relationship between storage space and subsampling rate. In actual applications, the formula parameters may need to be adjusted according to specific circumstances.

[0094] In the above process, the sampling rate of the microservice is adjusted based on the target cost impact parameter, which can maximize the quality of the sampled data while ensuring sufficient disk space.

[0095] Figure 4FIG. 4 shows a schematic diagram of the process of adaptively adjusting the sampling rate based on a multi-dimensional dynamic weight factor. Figure 4 As shown, the operation and maintenance platform provides three microservices S ={ S 1, S 2, S 3}, the calculation of multi-dimensional dynamic weight factors can be obtained: The subsampling rates of the criticality factors are p [ core ]=[0.5,0.3,0.7]; The sub-sampling rates of the system load factor are p [ load ]=[0.2,0.5,0.1]; The subsampling rates of the TPS factors are p [ traffic ]=[0.3,0.2,0.2]; The sub-sampling rates of the excitation parameter factors are incentive ( S 1) = 0.8, incentive ( S 2) = 0.5, incentive ( S 3) = 0.9; Stimulus parameters: p [ incentive ]=0.1; Cost factor parameters: p [ storage ]=0.6.

[0096] By inputting the above parameters into Formula 1, we can get the weight matrix M corresponding to the microservices of the operation and maintenance platform, and finally get the sampling rates of the three microservices. Furthermore, we can store the calculation results in MySQL and cache them in Redis: w 1=( (0.5×1 )+(0.2×1)+(0.3×1)+(0.1×0.8))×0.6=0.108; w 2 = ( (0.3 × 1) + (0.5 × 1) + (0.2 × 1) + (0.1 × 0.5)) × 0.6 = 0.105; w 3=( (0.7×1)+(0.1×1)+(0.2×1)+(0.1×0.9))×0.6 = 0.109.

[0097] After the sampling rate of the microservice is obtained, the sampling rate corresponding to the microservice at the next time node can be determined according to the difference between the sampling rate and the preset sampling rate.

[0098] It can be understood that the above-mentioned various method embodiments mentioned in this specification can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, they will not be repeated in this specification. Those skilled in the art can understand that in the above-mentioned method of the specific implementation method, the specific execution order of each step should be determined according to its function and possible internal logic.

[0099] It should be noted that the link tracking adaptive sampling method provided in the embodiments of this specification may be executed by a link tracking adaptive sampling device, or a control module in the link tracking adaptive sampling device for executing the link tracking adaptive sampling method. In the embodiments of this specification, the link tracking adaptive sampling method executed by the link tracking adaptive sampling device is taken as an example to illustrate the link tracking adaptive sampling device provided in the embodiments of this specification.

[0100] Figure 5 is a schematic diagram of the structure of a link tracking adaptive sampling device according to an embodiment of the present invention. Figure 5 As shown, the link tracking adaptive sampling device 500 includes: The weight factor module 510 is used to obtain dynamic weight factors of microservices in the operation and maintenance platform in multiple dimensions, where the dynamic weight factors are factors that dynamically affect the sampling rate; The sub-sampling rate module 520 is used to determine the sub-sampling rate corresponding to the dynamic weight factor of the microservice at the current time node; The sampling rate module 530 is used to determine the sampling rate corresponding to the microservice at the current time node according to the sub-sampling rate and sampling rate parameters corresponding to each dynamic weight factor of the microservice at the current time node; The adjustment module 540 is used to determine the sampling rate corresponding to the microservice at the next time node according to the difference between the sampling rate and the preset sampling rate.

[0101] Optionally, the dynamic weight factor includes a criticality factor, and the sub-sampling rate module 520 includes: A first data acquisition unit is used to acquire a service call chain and service dependency data between the microservices at a current time node, wherein the service call chain is used to represent a call sequence between the microservices, and the service dependency data is used to represent a dependency relationship between the microservices; The first sub-sampling rate unit is used to determine the importance of each microservice in the operation and maintenance platform based on the forest fire algorithm through the service call chain and the service dependency data, and determine the sub-sampling rate corresponding to the criticality factor of the microservice at the current time node according to the importance.

[0102] Optionally, the dynamic weight factor includes a system load factor, and the sub-sampling rate module 520 includes: A second data acquisition unit is used to acquire an actual value of a system load indicator of the operation and maintenance platform at a current time node, where the system load indicator includes one or more of a CPU usage rate, a memory usage rate, a disk usage rate, and a network usage rate; A load index value unit, used to determine the load index value corresponding to the system load index at the current time node according to the actual value, threshold value and maximum value of the system load index; The second sub-sampling rate unit is used to determine the sub-sampling rate corresponding to the system load factor of the microservice at the current time node based on the load indicator value.

[0103] Optionally, the dynamic weight factor includes a TPS factor, and the sub-sampling rate module 520 includes: A fitting function unit is used to fit the historical TPS value and sub-sampling rate to construct a TPS-sub-sampling rate function; A third data acquisition unit is used to obtain the actual value of the TPS of the operation and maintenance platform at the current time node; The third sub-sampling rate unit is used to input the actual value of the TPS into the TPS-sub-sampling rate function to obtain the sub-sampling rate corresponding to the TPS factor of the microservice at the current time node.

[0104] Optionally, the dynamic weight factor includes an excitation parameter factor, and the sub-sampling rate module 520 includes: A seed service unit, used to determine a seed service from the microservices included in the operation and maintenance platform, and to assign different incentive values ​​to different seed services; an incentive value allocating unit, configured to award the incentive value of the tracked microservice to the tracked microservice when the microservice tracks and reports the call events between the microservices, so as to allocate the incentive value of the seed user among the microservices in the operation and maintenance platform; The fourth sub-sampling rate unit is used to obtain the incentive value of the microservice at the current time node, and use the incentive value as the sub-sampling rate corresponding to the incentive parameter factor.

[0105] Optionally, the link tracking adaptive sampling device 500 further includes: A storage space acquisition module, used to obtain the storage space of the dynamic weight factor at the current time node after determining the sampling rate corresponding to the microservice at the current node; An impact parameter module, used to determine a target cost impact parameter corresponding to the storage space at the current time node based on the relationship between the cost impact parameter and the storage space of the sampled data; The sampling rate adjustment module is used to adjust the sampling rate using the target cost impact parameter to obtain an adjusted sampling rate.

[0106] In the embodiment of the present specification, the sub-sampling rate at the current time node is determined for the dynamic weight factor of the microservice obtained, and then the sampling rate corresponding to the microservice at the current time node is determined according to the sub-sampling rate and the sampling rate parameter, so as to determine the sampling rate at the next time node according to the difference between the sampling rate and the preset sampling rate. This process realizes adaptive dynamic intelligent adjustment of the sampling rate of the microservice by real-time determination of the sub-sampling rate of the dynamic weight factor, making the link tracking sampling process more flexible and responsive, thereby improving the effectiveness of sampling and the stability of the operation and maintenance platform under different load conditions.

[0107] Each module in the above-mentioned link tracking adaptive sampling device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the terminal device or the processor on the server in the form of hardware, or can be stored in the memory in the terminal device or the memory on the server in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.

[0108] Further, corresponding to the link tracking adaptive sampling method described above, based on the same technical concept, one or more embodiments of the present application also provide an electronic device, such as Figure 6 As shown. The electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors 601 and memory 602, and the memory 602 may store one or more storage applications or data. Among them, the memory 602 can be a short-term storage or a persistent storage. The application stored in the memory 602 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the electronic device. Furthermore, the processor 601 can be configured to communicate with the memory 602 to execute a series of computer executable instructions in the memory 602 on the electronic device. The electronic device may also include one or more power supplies 603, one or more wired or wireless network interfaces 604, one or more input and output interfaces 605, and one or more keyboards 606.

[0109] In a specific embodiment, the electronic device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions for the electronic device, and the one or more programs configured to be executed by one or more processors include the following computer executable instructions: Obtain dynamic weight factors of microservices in the operation and maintenance platform in multiple dimensions, where the dynamic weight factors are factors that dynamically affect the sampling rate; Determine the sub-sampling rate corresponding to the dynamic weight factor of the microservice at the current time node; Determine the sampling rate corresponding to the microservice at the current time node according to the sub-sampling rate and sampling rate parameters corresponding to each dynamic weight factor of the microservice at the current time node; According to the difference between the sampling rate and the preset sampling rate, the sampling rate corresponding to the microservice at the next time node is determined.

[0110] In the embodiment of the present specification, the sub-sampling rate at the current time node is determined for the dynamic weight factor of the microservice obtained, and then the sampling rate corresponding to the microservice at the current time node is determined according to the sub-sampling rate and the sampling rate parameter, so as to determine the sampling rate at the next time node according to the difference between the sampling rate and the preset sampling rate. This process realizes adaptive dynamic intelligent adjustment of the sampling rate of the microservice by real-time determination of the sub-sampling rate of the dynamic weight factor, making the link tracking sampling process more flexible and responsive, thereby improving the effectiveness of sampling and the stability of the operation and maintenance platform under different load conditions.

[0111] It should be noted that the embodiment of the electronic device in the present application and the embodiment of the link tracking adaptive sampling method in the present application are based on the same inventive concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned corresponding link tracking adaptive sampling method, and the repeated parts will not be repeated.

[0112] Further, corresponding to the link tracking adaptive sampling method described above, based on the same technical concept, one or more embodiments of the present application further provide a storage medium for storing computer executable instructions. In a specific embodiment, the storage medium may be a USB flash drive, an optical disk, a hard disk, etc. When the computer executable instructions stored in the storage medium are executed by the processor, the following process can be implemented: Obtain dynamic weight factors of microservices in the operation and maintenance platform in multiple dimensions, where the dynamic weight factors are factors that dynamically affect the sampling rate; Determine the sub-sampling rate corresponding to the dynamic weight factor of the microservice at the current time node; Determine the sampling rate corresponding to the microservice at the current time node according to the sub-sampling rate and sampling rate parameters corresponding to each dynamic weight factor of the microservice at the current time node; According to the difference between the sampling rate and the preset sampling rate, the sampling rate corresponding to the microservice at the next time node is determined.

[0113] In the embodiment of the present specification, the sub-sampling rate at the current time node is determined for the dynamic weight factor of the microservice obtained, and then the sampling rate corresponding to the microservice at the current time node is determined according to the sub-sampling rate and the sampling rate parameter, so as to determine the sampling rate at the next time node according to the difference between the sampling rate and the preset sampling rate. This process realizes adaptive dynamic intelligent adjustment of the sampling rate of the microservice by real-time determination of the sub-sampling rate of the dynamic weight factor, making the link tracking sampling process more flexible and responsive, thereby improving the effectiveness of sampling and the stability of the operation and maintenance platform under different load conditions.

[0114] It should be noted that the embodiment of the storage medium in the present application and the method for link tracking adaptive sampling in the present application are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the aforementioned corresponding method for link tracking adaptive sampling, and the repeated parts will not be repeated.

[0115] Furthermore, corresponding to the link tracking adaptive sampling method described above, based on the same technical concept, one or more embodiments of the present application further provide a computer program product, the computer program product includes a computer program, and when the computer program is executed by a processor, the following process can be implemented: Obtain dynamic weight factors of microservices in the operation and maintenance platform in multiple dimensions, where the dynamic weight factors are factors that dynamically affect the sampling rate; Determine the sub-sampling rate corresponding to the dynamic weight factor of the microservice at the current time node; Determine the sampling rate corresponding to the microservice at the current time node according to the sub-sampling rate and sampling rate parameters corresponding to each dynamic weight factor of the microservice at the current time node; According to the difference between the sampling rate and the preset sampling rate, the sampling rate corresponding to the microservice at the next time node is determined.

[0116] In the embodiment of the present specification, the sub-sampling rate at the current time node is determined for the dynamic weight factor of the microservice obtained, and then the sampling rate corresponding to the microservice at the current time node is determined according to the sub-sampling rate and the sampling rate parameter, so as to determine the sampling rate at the next time node according to the difference between the sampling rate and the preset sampling rate. This process realizes adaptive dynamic intelligent adjustment of the sampling rate of the microservice by real-time determination of the sub-sampling rate of the dynamic weight factor, making the link tracking sampling process more flexible and responsive, thereby improving the effectiveness of sampling and the stability of the operation and maintenance platform under different load conditions.

[0117] It should be noted that the embodiment of the computer program product in the present application and the embodiment of the link tracking adaptive sampling method in the present application are based on the same inventive concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned corresponding link tracking adaptive sampling method, and the repeated parts will not be repeated.

[0118] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0119] In the 1990s, it was very clear whether the improvement of a technology was hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0120] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.

[0121] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0122] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing the embodiments of the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0123] Those skilled in the art will appreciate that one or more embodiments of the present application may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0124] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0125] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0126] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0127] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0128] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0129] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0130] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0131] One or more embodiments of the present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present application may also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0132] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0133] The above are only embodiments of this document and are not intended to limit this document. For those skilled in the art, this document may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this document should be included in the scope of the claims of this document.

Claims

1. A link tracking adaptive sampling method, characterized in that: include: Obtain dynamic weight factors of microservices in the operation and maintenance platform in multiple dimensions, where the dynamic weight factors are factors that dynamically affect the sampling rate; Determine the sub-sampling rate corresponding to the dynamic weight factor of the microservice at the current time node; Determine the sampling rate corresponding to the microservice at the current time node according to the sub-sampling rate and sampling rate parameters corresponding to each dynamic weight factor of the microservice at the current time node; According to the difference between the sampling rate and the preset sampling rate, the sampling rate corresponding to the microservice at the next time node is determined.

2. The method according to claim 1, characterized in that The dynamic weight factor includes a criticality factor, and the determining of the sub-sampling rate corresponding to the dynamic weight factor of the microservice at the current time node includes: Obtain the service call chain and service dependency data between the microservices at the current time node, wherein the service call chain is used to represent the call sequence between the microservices, and the service dependency data is used to represent the dependency relationship between the microservices; Based on the forest fire algorithm, the importance of each microservice in the operation and maintenance platform is determined through the service call chain and the service dependency data, and according to the importance, the sub-sampling rate corresponding to the criticality factor of the microservice at the current time node is determined.

3. The method according to claim 1, characterized in that The dynamic weight factor includes a system load factor, and the determining of a sub-sampling rate corresponding to the dynamic weight factor of the microservice at the current time node includes: Obtaining an actual value of a system load indicator of the operation and maintenance platform at a current time node, wherein the system load indicator includes one or more of CPU usage, memory usage, disk usage, and network usage; Determine the load index value corresponding to the system load index at the current time node according to the actual value, threshold value and maximum value of the system load index; Based on the load index value, a sub-sampling rate corresponding to the system load factor of the microservice at the current time node is determined.

4. The method according to claim 1, characterized in that: The dynamic weight factor includes a TPS factor, and determining the sub-sampling rate corresponding to the dynamic weight factor of the microservice at the current time node includes: Fit the historical TPS values ​​and subsampling rates to construct a TPS-subsampling rate function; Get the actual value of TPS of the operation and maintenance platform at the current time node; The actual value of the TPS is input into the TPS-subsampling rate function to obtain the subsampling rate corresponding to the TPS factor of the microservice at the current time node.

5. The method according to claim 1, characterized in that The dynamic weight factor includes an incentive parameter factor, and the determining of the sub-sampling rate corresponding to the dynamic weight factor of the microservice at the current time node includes: Determine seed services from the microservices included in the operation and maintenance platform, and assign different incentive values ​​to different seed services; When the microservice tracks and reports the call events between the microservices, the incentive value of the tracked microservice is awarded to the tracked microservice, so as to distribute the incentive value of the seed user among the microservices in the operation and maintenance platform; An incentive value of the microservice at the current time node is obtained, and the incentive value is used as a sub-sampling rate corresponding to the incentive parameter factor.

6. The method according to any one of claims 1 to 5, characterized in that: After determining the sampling rate corresponding to the microservice at the current node, the method further includes: Obtaining the storage space of the dynamic weight factor at the current time node; Based on the relationship between the cost impact parameter and the storage space of the sampled data, determine the target cost impact parameter corresponding to the storage space at the current time node; The sampling rate is adjusted using the target cost impact parameter to obtain an adjusted sampling rate.

7. A link tracking adaptive sampling device, characterized in that: include: The weight factor module is used to obtain the dynamic weight factors of microservices in the operation and maintenance platform in multiple dimensions, where the dynamic weight factors are factors that dynamically affect the sampling rate; A sub-sampling rate module, used to determine the sub-sampling rate corresponding to the dynamic weight factor of the microservice at the current time node; A sampling rate module, used to determine the sampling rate corresponding to the microservice at the current time node according to the sub-sampling rate and sampling rate parameters corresponding to each dynamic weight factor of the microservice at the current time node; The adjustment module is used to determine the sampling rate corresponding to the microservice at the next time node according to the gap between the sampling rate and the preset sampling rate.

8. An electronic device, characterized in that: include: processor; as well as A memory arranged to store computer executable instructions, the executable instructions being configured to be executed by the processor, the executable instructions comprising instructions for performing the steps in the method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is used to store computer-executable instructions, and the executable instructions enable a computer to execute the method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 6 when being executed by a processor.

Citation Information

Patent Citations

  • Full-link monitoring method and device

    CN111124819A

  • Micro-service link tracking method and system

    CN115883343A

  • Link data sampling rate adjusting method and device, equipment and medium

    CN117596167A

  • Sampling rate determination method and related equipment

    CN118659984A

Cited By

  • Data security sharing method and device for cross-network exchange platform

    CN120979829A