CN-121998661-A - Log data quality assessment and quantization model method based on reinforcement learning
Abstract
The invention discloses a log data quality assessment and quantization model method based on reinforcement learning, which comprises the steps of desensitizing, de-duplicating, time stamp alignment and structuring analysis on a server log to form a log sequence, calculating quality indexes such as integrity, consistency and timeliness based on analysis results, entity extraction results and deletion, abnormal statistics, outputting quality scores, setting a quick score device and a reference score device, identifying distribution drift according to score deviation of the quick score device and the reference score device, updating a score model, constructing a state space and an action space, adopting a Q-learning treatment action selection strategy, re-scoring the treated log, and updating strategy parameters according to quality improvement and resource consumption. The method can continuously evaluate the quality of the log data, discover and locate the quality problem, and realize the balance between quality improvement and resource consumption.
Inventors
- CHENG KEFEI
- LI YUXUAN
Assignees
- 重庆邮电大学
Dates
- Publication Date
- 20260508
- Application Date
- 20260105
Claims (4)
- 1. A method for a reinforcement learning-based log data quality assessment and quantification model, comprising the steps of: The method comprises the steps of S1, modeling by a data management and log analysis platform, namely determining log field specifications and quality constraints, collecting a server log, desensitizing, removing duplication, aligning time stamps and structurally analyzing to form a log sequence organized according to time windows; S2, constructing a data set and identifying entities, namely manually marking key entities in a log to form an entity identification data set, training a structured log sequence or estimating parameters by adopting a conditional random field CRF sequence marking model, and extracting entities from a log text; S3, calculating quality indexes and quantitatively scoring, namely carrying out statistics calculation on the quality indexes based on analysis results, entity extraction results, missing and other abnormal conditions to obtain quality scores, wherein the quality indexes at least comprise integrity, consistency and timeliness; S4, quick scoring-reference scoring cooperation, namely setting a quick scoring device to output a predicted quality score and dividing the score into blocks according to a preset block threshold value Triggering a reference scoring device to output a reference quality score; s5, drift detection and dynamic update, wherein when the deviation between the predicted quality score and the reference quality score exceeds a preset tolerance Triggering re-scoring the history window to update the reference quality score when the data distribution drift is detected, and updating the rapid scoring device according to the reference quality score; And S6, feeding back the evaluation result, namely constructing a quality score, a change trend and a drift signal of the quality score as a state space, constructing a treatment action as an action space, adopting Q-learning to learn a treatment action selection strategy and executing the treatment action, and recalculating the quality score on a treated log and feeding back quality improvement and resource consumption to update a Q-learning strategy parameter triggering threshold.
- 2. The method S1 according to claim 1, wherein first determining a log field specification and a quality constraint, with respect to a server log, comprises: (1) Log field specification and quality constraint determination defining a set of mandatory fields Establishing logical constraints such as field type constraints, format constraints and the like, and defining structural analysis success conditions and abnormal record judging rules; (2) Collecting original logs from log sources, performing desensitization treatment on sensitive fields, constructing a duplication removal key to duplicate records, writing the records which cannot be resolved or conflict into an abnormal queue and counting; (3) The method comprises the steps of aligning time stamps, structurally analyzing semi-structured logs to output field records, and recording analysis failure reasons for quality statistics, wherein the time stamp aligning and the structural analysis are to unify time stamp formats and time zones of logs of different sources; (4) Time window organization, in window length Splitting logs to form a window sequence Each window aggregates the log records and statistical features within the window, providing input for subsequent quality assessment and decision making.
- 3. The method of claim 1, wherein the fast scorer is a machine learning predictive model using drift detection and adaptive updating, comprising: (1) Drift determination, definition of deviation When (when) Exceeding a preset tolerance In the time-course of which the first and second contact surfaces, judging that data distribution drift or scoring relation change occurs; (2) Re-calculating a reference quality score for the history window according to the current quality rule after drift triggering to update the training label set; (3) And updating the rapid scoring device, namely retraining or incrementally updating the rapid scoring device based on the updated training data to adapt the predictive scoring to the new data distribution and quality rule.
- 4. The method of claim 1, wherein the governance actions comprise at least acquisition strategy adjustment, re-try of the supplemental acquisition, abnormal record cleaning, missing field completion and entity identification strategy parameter adjustment, wherein missing field completion comprises at least rule-based completion, historical window statistics-based completion or learning model-based completion, and the characterization of the quality change trend comprises at least trend statistics based on a sliding time window, trend discrimination based on a change rate, or trend discrimination based on a drift detection signal.
Description
Log data quality assessment and quantization model method based on reinforcement learning Technical Field The invention belongs to the technical field of data management and data quality management, and particularly relates to a data quality assessment, quality trend monitoring, drift detection and self-adaptive updating method for server logs, and a management strategy learning and management and optimization method based on reinforcement learning. Background Server logs are widely used for operational monitoring, fault diagnosis, audit analysis, and data asset management. The problems of field missing, inconsistent structure, repeated record, disordered time stamp, delayed arrival, abnormal value, analysis failure and the like easily occur in the processes of collecting, transmitting, warehousing and analyzing the log data, so that the quality of the log is reduced and the reliability of downstream analysis is affected. The existing log data quality management scheme adopts a fixed rule, a static threshold value or an off-line sampling inspection mode to carry out quality inspection, only can output quality fraction or alarm information, and is difficult to keep stable and effective under the conditions of dynamic service load and log distribution change. In addition, the log quality assessment has the problems that the real-time performance and the accuracy are difficult to be compatible, the high-precision standard verification is high in calculation cost and difficult to be performed at high frequency, and the low-cost rapid assessment is likely to be misaligned due to time lapse and distribution change, so that the reliability of quality monitoring and treatment decisions is reduced. Therefore, there is a need for a closed loop method that can continuously quantitatively evaluate log quality in a dynamic environment, adaptively update according to drift, and automatically select governance actions based on the evaluation results, to control resource consumption while guaranteeing quality goals. Disclosure of Invention The method comprises the steps of S1, modeling by a data management and log analysis platform, namely determining log field specifications and quality constraints, collecting a server log, desensitizing, removing duplication, aligning time stamps and structurally analyzing to form a log sequence organized according to time windows; S2, constructing a data set and identifying entities, namely manually marking key entities in a log to form an entity identification data set, training a structured log sequence or estimating parameters by adopting a conditional random field CRF sequence marking model, and extracting entities from a log text; S3, calculating quality indexes and quantitatively scoring, namely carrying out statistics calculation on the quality indexes based on analysis results, entity extraction results, missing and other abnormal conditions to obtain quality scores, wherein the quality indexes at least comprise integrity, consistency and timeliness; S3-1, calculating quality indexes, namely respectively calculating integrity based on structural analysis results, entity extraction results and missing or abnormal statistics Consistency and consistencyAnd timeliness ofThe quality index is equal, and dimension sub-indexes and problem positioning information are output; S3-2, generating a quantization score, namely normalizing and summarizing the quality index according to preset weights or rules to form a time window level quality score And forming a quality trend sequence for use in subsequent steps. S4, quick scoring-reference scoring cooperation, namely setting a quick scoring device to output a predicted quality score and dividing the score into blocks according to a preset block threshold valueTriggering a reference scoring device to output a reference quality score; s5, drift detection and dynamic update, wherein when the deviation between the predicted quality score and the reference quality score exceeds a preset tolerance Triggering re-scoring the history window to update the reference quality score when the data distribution drift is detected, and updating the rapid scoring device according to the reference quality score; And S6, feeding back the evaluation result, namely constructing a quality score, a change trend and a drift signal of the quality score as a state space, constructing a treatment action as an action space, adopting Q-learning treatment action selection strategy and executing the treatment action, and recalculating the quality score for a treated log and feeding back quality improvement and resource consumption to update Q-learning parameters or triggering thresholds. S6-1, strategy learning and decision, namely constructing quality scores, quality change trends and drift signals into a state spaceConstructing the treatment action as action spaceConstructing a reward functionAdopting Q-learning control action selection strategyOutputting the treatment act