A log sampling method and system based on adaptive adjustment mechanism
Patent Information
- Application Number
- CN202510539400.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2045-04-27
AI Technical Summary
[0004]本发明的目的在于提供一种基于自适应调节机制的日志采样方法和系统,以解决上述背景技术中提到的现有日志处理方法效率低下、占用大量存储空间以及无法快速适配业务需求变化的问题
(1)本发明划分核心系统并预设系统关键字特征,对日志进行特征标记,能够在日志采样和存储前进行筛选,减少数据冗余,提高后续日志分析的效率。
Smart Images

Figure CN120491892B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of log collection technology, and in particular to a log sampling method and system based on an adaptive adjustment mechanism. Background Technology
[0002] With the large-scale deployment and application of microservice architectures in the internet field, the efficient processing of massive log data in numerous microservice architectures, middleware, and related systems has become a key challenge to ensure system stability. Currently, the log processing method typically involves storing all logs in the system before analyzing them, which has the following drawbacks: 1. When there is a large number of microservice architectures or middleware, a massive amount of logs will be generated. Storing all of these logs will occupy a lot of storage space, and storing useless logs will also waste storage resources. Second, the existing log processing method fails to filter and distinguish logs, which makes it impossible to quickly identify the cause of the anomaly or locate the fault point when performing anomaly analysis through logs. This is time-consuming, labor-intensive and inefficient. Third, the existing log processing method stores all logs and has a fixed sampling strategy, which makes it impossible to adjust the sampling frequency according to real-time business indicators, making it difficult to flexibly respond to emergencies or adapt to changing business needs.
[0003] Therefore, we need to develop a log sampling method and system based on an adaptive adjustment mechanism that can filter logs before storage, reduce data redundancy, and improve the efficiency of subsequent log analysis; at the same time, it can dynamically adjust the log sampling frequency to balance storage resource usage and quickly adapt to changes in business needs. Summary of the Invention
[0004] The purpose of this invention is to provide a log sampling method and system based on an adaptive adjustment mechanism to solve the problems mentioned in the background art, such as low efficiency, large storage space consumption, and inability to quickly adapt to changes in business needs.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: According to one aspect of the present invention, a log sampling method based on an adaptive adjustment mechanism is provided, the method comprising the following steps: The core system is divided and identified, and system keyword features are preset. Logs are then marked with these features according to preset rules. Calculate the storage urgency item and the traffic suppression item, and calculate the dynamic sampling rate based on the storage urgency item and the traffic suppression item; Log sampling is performed based on the feature markers and the dynamic sampling rate; The system stores the sampled logs, monitors the storage system's capacity status in real time, and adjusts the dynamic sampling rate accordingly.
[0006] According to one aspect of the present invention, a log sampling system based on an adaptive adjustment mechanism is provided, the system comprising: a log marking module, a sampling rate calculation module, a log sampling module, and a storage monitoring module. Wherein: The aforementioned log tagging module is used to segment and obtain the core system, preset system keyword features, and tag logs according to preset rules. The sampling rate calculation module described above is used to calculate the storage urgency item and the traffic suppression item, and to calculate the dynamic sampling rate based on the storage urgency item and the traffic suppression item; The aforementioned log sampling module is used to perform log sampling based on the feature markers and the dynamic sampling rate; The aforementioned storage monitoring module is used to store the sampled logs, monitor the capacity status of the storage system in real time, and adjust the dynamic sampling rate.
[0007] Based on the aforementioned scheme, the division and obtaining of the core system refers to dividing the system based on the key business dimension and the key infrastructure dimension to obtain the core system; whereby the key business is the company's main business and the key infrastructure is the key central control node through which system calls flow.
[0008] Based on the aforementioned scheme, the system keyword features include system error codes and abnormal metadata. The system error codes adopt a four-segment specification: the first segment is the response code type, with error response codes starting with "E"; the second segment is the error source, with gateway-type responses being 0 and other business systems encoded from 1 to Z; the third segment is the information type, including data information errors, business system errors, system information errors, file information errors, database information errors, and other types of errors; the fourth segment is the response code sequence number, with an encoding range of 00001-zzzzz. Therefore, whether a response code is a system error code can be identified by parsing the response code: when a response code starting with "E" is identified, it can be determined that the current response code is a system error code.
[0009] Based on the aforementioned scheme, the step of feature tagging of logs according to preset rules specifically includes: Determine whether the current log belongs to the logs of the core system; If so, mark the current log as being stored in its entirety; If it does not belong to the category, then determine whether the current log contains the system keyword feature; If included, mark the current log as stored in its entirety; If it is not included, it will not be marked.
[0010] Based on the aforementioned scheme, the storage urgency factor is calculated based on the current storage system usage and the storage system's maximum capacity, using the following formula: ; Wherein, S represents the storage urgency item; This refers to the current usage of the storage system; This represents the upper limit of the storage system's capacity.
[0011] Based on the aforementioned scheme, the flow suppression term is calculated according to the flow fluctuation rate and flow sensitivity, specifically as follows: Determine the rate of change of flow fluctuation based on the flow rate of the current sliding window and the flow rate of the previous sliding window: ; Wherein, σ is the rate of change of the flow fluctuation; The base flow fluctuation value is used, and the rate of change of the flow fluctuation of the previous sliding window is used as the base flow fluctuation value of the current sliding window after each sliding window. The flow sequence within the current sliding window; The flow sequence within the previous sliding window; Based on the traffic fluctuation rate and the storage urgency item, calculate the traffic sensitivity: ; Wherein, β(t) is the flow sensitivity at time t, and β(t) > 0; The base flow sensitivity is used, and the flow sensitivity of the previous time step is used as the base flow sensitivity of the current time step in each calculation; S is the storage urgency term; Based on the aforementioned flow sensitivity, the flow suppression term is obtained: ; Where L is the flow suppression term; λ(t) is the log input rate at time t.
[0012] Based on the aforementioned scheme, the calculation of the dynamic sampling rate is specifically as follows: ; Where r(t) is the dynamic sampling rate at time t; α is the preset base sampling rate, and 0 < α < 1; S is the storage urgency term; and L is the traffic suppression term.
[0013] Based on the aforementioned scheme, the step of performing log sampling based on the feature markers and the dynamic sampling rate specifically involves: Determine if the current log contains a full-storage flag; If so, the sampling executor will be called directly to perform full log sampling; If not, the dynamic sampling rate is sent to the sampling executor, and the log is sampled according to the dynamic sampling rate.
[0014] Based on the aforementioned scheme, when monitoring the capacity status of the storage system in real time, if the capacity of the storage system reaches a preset upper limit, the dynamic sampling rate controller is notified to amplify the storage weight by square the storage urgency item and adjust the sampling rate.
[0015] According to one aspect of the present invention, an electronic device is provided, the electronic device including a processor and a memory; wherein the memory is used to store executable instructions of the processor, the processor being configured to execute a log sampling method based on an adaptive adjustment mechanism as described in the first aspect by executing the executable instructions.
[0016] According to one aspect of the present invention, a computer storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements a log sampling method based on an adaptive adjustment mechanism as described in the first aspect.
[0017] As can be seen from the above technical solution, compared with the prior art, the present invention has at least the following advantages and positive effects: (1) The present invention divides the core system and presets system keyword features, and marks the logs with features, which can filter the logs before sampling and storage, reduce data redundancy, and improve the efficiency of subsequent log analysis.
[0018] (2) The present invention calculates the dynamic sampling rate based on storage urgency items and traffic suppression items, thereby constructing a dual adaptive adjustment mechanism that includes storage-driven vertical adjustment and traffic-driven horizontal adjustment, which can quickly adapt to different business needs during log sampling and reduce the occupation of storage resources.
[0019] (3) The present invention performs log sampling based on log feature marking and dynamic sampling rate. After the log is stored, the capacity status of the storage system is monitored in real time and the dynamic sampling rate is adjusted. This can ensure the data fidelity of log sampling while balancing storage capacity. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below only involve some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1A flowchart of a log sampling method based on an adaptive adjustment mechanism provided by an embodiment of the present invention is shown; Figure 2 A flowchart illustrating a method for calculating a dynamic sampling rate provided by an embodiment of the present invention is shown; Figure 3 This invention provides a flowchart of a method for dynamic log sampling and storage according to an embodiment of the present invention. Figure 4 A schematic diagram of the structure of a log sampling system based on an adaptive adjustment mechanism provided in an embodiment of the present invention is shown; in, Figure 4 The annotations in the accompanying drawings are explained as follows: 400 - A log sampling system based on an adaptive adjustment mechanism; 401 - Log marking module; 4011 - Pre-configuration unit; 4012 - Feature marking unit; 402 - Sampling rate calculation module; 4021 - Capacity assessment unit; 4022 - Traffic awareness unit; 4023 - Sampling rate calculation unit; 403 - Log sampling module; 4031 - Full sampling unit; 4032 - Dynamic sampling unit; 404 - Storage monitoring module; 4041 - Capacity monitoring unit; 4042 - Capacity alarm unit. Detailed Implementation
[0022] To more clearly explain the purpose, technical solutions, and advantages of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein. On the contrary, these embodiments are provided so that the present invention will be more comprehensive and complete, and fully convey the concept of the exemplary embodiments to those skilled in the art.
[0023] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a full understanding of embodiments of the invention. However, those skilled in the art will recognize that the technical solutions of the invention can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of the invention.
[0024] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0025] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily need to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0026] The present invention will now be described in detail with reference to specific embodiments.
[0027] Example 1 like Figure 1 As shown in the figure, this embodiment of the invention provides a log sampling method based on an adaptive adjustment mechanism. The specific steps of the method are as follows: S1: Divide and obtain the core system, preset system keyword features, and mark the logs with features according to preset rules; In this embodiment, the division and obtaining of the core system refers to dividing the system based on the dimensions of key business and key infrastructure to obtain the core system; wherein, the key business is the company's main business; the key infrastructure is the key central control node through which system calls flow; the core system includes a gateway system, a membership system, and a points system.
[0028] Furthermore, the system keyword features include system error codes and abnormal metadata; wherein, the system error codes adopt a four-segment specification: the first segment is the response code type, with error response codes starting with E; the second segment is the error source, with gateway-type responses being 0, and other business systems encoded from 1 to Z; the third segment is the information type, including data information errors, business system errors, system information errors, file information errors, database information errors, and other types of errors; the fourth segment is the response code sequence number, with an encoding range of 00001-zzzzz; therefore, whether it is a system error code can be identified by parsing the response code: when a response code starting with E is identified, it can be determined that the current response code is a system error code.
[0029] Furthermore, the logs are characterized according to preset rules, specifically including: Determine whether the current log belongs to the logs of the core system; If so, mark the current log as being stored in its entirety; If it does not belong to the category, then determine whether the current log contains the system keyword feature; If included, mark the current log as stored in its entirety; If it is not included, it will not be marked.
[0030] In this embodiment, by dividing the core system and pre-setting system keyword features, the logs are marked with features, which can be filtered before log sampling and storage. This not only reduces data redundancy and storage resource consumption, and avoids the waste of storage resources caused by storing irrelevant logs, but also improves the efficiency of subsequent log analysis, quickly locates the specific cause of the anomaly and finds the desired fault point.
[0031] S2: Calculate the storage urgency item and the traffic suppression item, and calculate the dynamic sampling rate based on the storage urgency item and the traffic suppression item; Preferably, in this embodiment, the dynamic sampling rate is calculated using storage urgency terms and traffic suppression terms, thereby enabling adaptive adjustment of log sampling under the dual regulation of storage drive and traffic drive. Specifically, as shown... Figure 2 As shown, the method for calculating the dynamic sampling rate specifically includes: S201: Calculate storage urgency items based on the current usage of the storage system and the upper limit of the storage system's capacity; Specifically, the calculation formula for the storage urgency item is as follows: ; Wherein, S represents the storage urgency item; This refers to the current usage of the storage system; This represents the upper limit of the storage system's capacity. S202: Determine the rate of change of flow fluctuation based on the flow of the current sliding window and the flow of the previous sliding window; Specifically, the formula for calculating the rate of change of flow fluctuation is as follows: ; Wherein, σ is the rate of change of the flow fluctuation; The base flow fluctuation value is used, and the rate of change of the flow fluctuation of the previous sliding window is used as the base flow fluctuation value of the current sliding window after each sliding window. The flow sequence within the current sliding window; The flow sequence within the previous sliding window; S203: Calculate the traffic sensitivity based on the traffic fluctuation rate and the storage urgency item; Specifically, the flow sensitivity determines the system's response speed to changes in flow, and higher flow sensitivity makes the effect of suppressing flow growth through sampling rate adjustment more significant. This is manifested in the following ways: When the traffic sensitivity is high, the sampling rate will be adjusted to drop rapidly under high traffic conditions, which is beneficial to the balance of storage capacity, but may result in the loss of more logs; When the traffic sensitivity is low, the sampling rate will be adjusted gradually when the traffic changes are small, thereby ensuring high log data fidelity, but this may increase the risk of storage overflow.
[0032] Specifically, the formula for calculating the flow sensitivity is as follows: ; Wherein, β(t) is the flow sensitivity at time t, and β(t) > 0; The base flow sensitivity is used, and the flow sensitivity of the previous time step is used as the base flow sensitivity of the current time step in each calculation; S is the storage urgency term; S204: Based on the aforementioned flow sensitivity, a flow suppression term is obtained; In this embodiment, a nonlinear response is achieved by using the flow suppression term to reduce the sampling rate as the flow rate increases. The specific calculation formula for the flow suppression term is as follows: ; Where L is the flow suppression term; λ(t) is the log input rate at time t.
[0033] S205: Calculate the dynamic sampling rate based on the storage urgency term and the traffic suppression term; Specifically, the formula for calculating the dynamic sampling rate is as follows: ; Where r(t) is the dynamic sampling rate at time t; α is the preset base sampling rate, and 0 < α < 1; S is the storage urgency term; and L is the traffic suppression term.
[0034] S3: Perform log sampling based on the feature markers and the dynamic sampling rate; Further, after completing log feature labeling and sampling rate calculation, log sampling begins; specifically, as follows: Figure 3 As shown, the specific process of dynamic log sampling and storage includes: S301: Determine if the current log has a full storage flag; S302: If so, directly call the sampling executor to perform full log sampling; S303: If not, the dynamic sampling rate is sent to the sampling executor, and the log is sampled according to the dynamic sampling rate; S304: Stores the sampled logs and adjusts the sampling rate in real time based on traffic changes and storage capacity.
[0035] S4: Store the sampled logs, monitor the storage system's capacity status in real time, and adjust the dynamic sampling rate.
[0036] Furthermore, after storing the sampled logs, this invention sets up a real-time monitoring mechanism. By monitoring the capacity status of the storage system in real time, and when the capacity of the storage system reaches a preset upper limit, the dynamic sampling rate controller is promptly notified to amplify the storage weight by squared the storage urgency item, thereby reducing the sampling rate and preventing storage overflow. The preset upper limit can be set according to actual conditions; for example, it can be the maximum capacity limit of the storage system, or a point where the maximum capacity limit of the storage system is about to be reached, etc. This embodiment does not impose any restrictions.
[0037] The log sampling method based on an adaptive adjustment mechanism described in this invention can not only filter logs before sampling and storage, reducing data redundancy and improving the efficiency of subsequent log analysis; it can also quickly adjust the sampling rate under the dual adjustment of storage-driven and traffic-driven approaches, thereby adapting to different business needs; at the same time, by monitoring the capacity status of the storage system in real time and adjusting the dynamic sampling rate, the data fidelity of log sampling can be guaranteed while balancing storage capacity.
[0038] Example 2 like Figure 4 As shown, this embodiment of the invention provides a log sampling system 400 based on an adaptive adjustment mechanism. The system includes: a log marking module 401, a sampling rate calculation module 402, a log sampling module 403, and a storage monitoring module 404; wherein: The log tagging module 401 is used to divide and obtain the core system, preset system keyword features, and tag logs according to preset rules. Log marking module 401 includes: an early configuration unit 4011 and a feature marking unit 4012; wherein: The aforementioned preliminary configuration unit 4011 is configured to: divide the system based on key business dimensions and key infrastructure dimensions to obtain the core system, and preset system keyword features; wherein, the system keyword features include system error codes and abnormal metadata; The aforementioned feature marking unit 4012 is configured to: mark logs for features according to preset rules, specifically including the following steps: Determine whether the current log belongs to the logs of the core system; If so, mark the current log as being stored in its entirety; If it does not belong to the category, then determine whether the current log contains the system keyword feature; If included, mark the current log as stored in its entirety; If it is not included, it will not be marked.
[0039] The sampling rate calculation module 402 is used to calculate the storage urgency item and the traffic suppression item, and calculate the dynamic sampling rate based on the storage urgency item and the traffic suppression item; The sampling rate calculation module 402 includes: a capacity assessment unit 4021, a flow sensing unit 4022, and a sampling rate calculation unit 4023; wherein: The aforementioned capacity assessment unit 4021 is configured to: calculate storage urgency items based on the current usage of the storage system and the upper limit of the storage system's capacity; The aforementioned flow sensing unit 4022 is configured to: determine the flow fluctuation rate and flow sensitivity based on the flow of the current sliding window, and calculate a flow suppression term; wherein the specific calculation process of the flow suppression term includes: Determine the rate of change of flow fluctuation based on the flow of the current sliding window and the flow of the previous sliding window; Calculate the traffic sensitivity based on the traffic fluctuation rate and storage urgency term; Based on the flow sensitivity, the flow suppression term is obtained.
[0040] The sampling rate calculation unit 4023 is configured to calculate the dynamic sampling rate based on the storage urgency item calculated in the capacity assessment unit 4021 and the traffic suppression item calculated in the traffic awareness unit 4022.
[0041] Log sampling module 403 is used to perform log sampling based on the feature markers and the dynamic sampling rate; Log sampling module 403 includes: a full sampling unit 4031 and a dynamic sampling unit 4032; wherein: The aforementioned full sampling unit 4031 is configured to: perform full sampling of logs marked with full storage based on the sampling executor; The aforementioned dynamic sampling unit 4032 is configured to control the sampling executor to dynamically sample the logs according to the dynamic sampling rate calculated in the sampling rate calculation unit 4023.
[0042] Storage monitoring module 404 is used to store the sampled logs, monitor the capacity status of the storage system in real time, and adjust the dynamic sampling rate. Storage monitoring module 404 includes: a capacity monitoring unit 4041 and a capacity alarm unit 4042; wherein: The capacity monitoring unit 4041 is configured to: monitor the capacity status of the storage system in real time after the log is stored, and notify the capacity alarm unit 4042 when the capacity of the storage system reaches a preset upper limit. The capacity alarm unit 4042 is configured to receive a capacity limit notification sent by the capacity monitoring unit 4042 and feed it back to the dynamic sampling rate controller, so that the dynamic sampling rate controller amplifies the storage weight by the square of the storage urgency item and adjusts the sampling rate.
[0043] In this embodiment, the log marking module 401 marks the logs with features to achieve filtering before log sampling and storage, thereby reducing data redundancy. The sampling rate calculation module 402 calculates the dynamic sampling rate and performs log sampling based on the log feature marking and the dynamic sampling rate. The storage monitoring module 404 monitors the capacity status of the storage system in real time after the logs are stored and adjusts the dynamic sampling rate accordingly. This ensures the data fidelity of the log sampling while balancing the storage capacity.
[0044] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the claims. It should be understood that the invention is not limited to the precise structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A log sampling method based on an adaptive adjustment mechanism, characterized in that, Includes the following steps: The core system is divided and identified, and system keyword features are preset. Logs are then marked with these features according to preset rules. Calculate the storage urgency item and the traffic suppression item, and calculate the dynamic sampling rate based on the storage urgency item and the traffic suppression item; The calculation of the flow suppression term specifically includes: Determine the rate of change of flow fluctuation based on the flow of the current sliding window and the flow of the previous sliding window; Based on the traffic fluctuation rate and the storage urgency item, calculate the traffic sensitivity: ; in, Let be the flow sensitivity at time t, and >0; The base flow sensitivity is used, and the flow sensitivity of the previous moment is used as the base flow sensitivity of the current moment in each calculation. For the storage urgent item; The rate of change of the flow fluctuation; Based on the aforementioned flow sensitivity, the flow suppression term is obtained: ; in, For the flow suppression term; Let be the log input rate at time t; The calculation of the dynamic sampling rate is specifically as follows: ; in, The dynamic sampling rate at time t; The base sampling rate is the preset value, and 0 < <1; and 0≤ ≤1; and 0 < ≤1; Log sampling is performed based on the feature markers and the dynamic sampling rate; The system stores the sampled logs, monitors the storage system's capacity status in real time, and adjusts the dynamic sampling rate accordingly.
2. The log sampling method according to claim 1, characterized in that, The step of marking logs with features according to preset rules specifically includes: Determine whether the current log belongs to the logs of the core system; If so, mark the current log as being stored in its entirety; If it does not belong to the category, then determine whether the current log contains the system keyword feature; If included, mark the current log as stored in its entirety; If it is not included, it will not be marked.
3. The log sampling method according to claim 1, characterized in that, The storage urgency factor is calculated based on the current storage system usage and the storage system's maximum capacity, using the following formula: ; in, For the storage urgent item; This refers to the current usage of the storage system; This represents the upper limit of the storage system's capacity.
4. The log sampling method according to claim 1, characterized in that, The process of performing log sampling based on the feature markers and the dynamic sampling rate specifically involves: Determine if the current log contains full data; If so, the sampling executor will be called directly to perform full log sampling; If not, the dynamic sampling rate is sent to the sampling executor, and the log is sampled according to the dynamic sampling rate.
5. A log sampling system based on an adaptive adjustment mechanism, characterized in that, include: The log tagging module is used to segment and obtain the core system, preset system keyword features, and tag logs according to preset rules. The sampling rate calculation module is used to calculate the storage urgency item and the traffic suppression item, and to calculate the dynamic sampling rate based on the storage urgency item and the traffic suppression item; The log sampling module is used to perform log sampling based on the feature markers and the dynamic sampling rate; The storage monitoring module is used to store the sampled logs, monitor the capacity status of the storage system in real time, and adjust the dynamic sampling rate. The calculation of the flow suppression term specifically includes: Determine the rate of change of flow fluctuation based on the flow of the current sliding window and the flow of the previous sliding window; Based on the traffic fluctuation rate and the storage urgency item, calculate the traffic sensitivity: ; in, Let be the flow sensitivity at time t, and >0; The base flow sensitivity is used, and the flow sensitivity of the previous moment is used as the base flow sensitivity of the current moment in each calculation. For the storage urgent item; The rate of change of the flow fluctuation; Based on the aforementioned flow sensitivity, the flow suppression term is obtained: ; in, For the flow suppression term; Let be the log input rate at time t; The calculation of the dynamic sampling rate is specifically as follows: ; in, The dynamic sampling rate at time t; The base sampling rate is the preset value, and 0 < <1; and 0≤ ≤1; and 0 < ≤1.
6. An electronic device, characterized in that, include: One or more processors; A memory for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the log sampling method as described in any one of claims 1 to 4.
7. A computer storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the log sampling method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Method and device for controlling system logs
CN103838659A
Log processing method and device, electronic equipment and storage medium
CN113791946A