Anomaly location method and device based on data source to log cross comparison
By dividing the redo log data in the medical data collection process into five log stages and conducting cross comparisons, the problem of real-time data collection failure caused by data loss and network interruption is solved, and fast and accurate abnormal location and repair are achieved. Improved the accuracy of data collection.
Patent Information
- Application Number
- CN202410918287.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-07-10
AI Technical Summary
In medical data collection, real-time data collection fails due to data loss and network interruption. Existing technology is difficult to quickly and accurately locate the problem, resulting in low troubleshooting efficiency and difficulty in repair.
Using an anomaly locating method based on cross-comparison of data sources and logs, the redo log data is divided into five log stages and stored. By cross-comparing the differential data and operation records of the five log stages, the source of data anomalies can be quickly located. damage stage.
It can quickly and accurately locate data loss in medical data collection, guide subsequent repair and compensation, and improve the accuracy and efficiency of data collection.
Smart Images

Figure CN118468194B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data collection, and in particular relates to an anomaly locating method and device based on cross-comparison of data sources to logs. Background Art
[0002] End-to-end medical data collection in the medical field refers to the village and town medical and health institutions at the lower level of a certain region (province, city, district, county) as one end. According to the data standards specifications of the upstream province and city, the medical data generated by the lower-level health institutions in the region are collected and reported to the upstream institutions at the other end in real time. The collected medical big data can be used for data analysis, data application, data fusion, etc.
[0003] The Change Data Capture (CDC) technology based on database logs is a technical solution widely used in data migration, data distribution, and data collection. Data migration is used for database backup, disaster recovery, etc. Data distribution refers to distributing a data source to multiple downstreams for business decoupling. Data collection is the integration of scattered heterogeneous data sources into the data warehouse to eliminate data silos, data dispersion, and other problems. In the data collection of the medical field, CDC technology is usually used to achieve real-time collection of medical data.
[0004] The LogMiner tool provided by Oracle can easily obtain the redo log files (archive log files) of the Oracle database and obtain the specific content therein to obtain the corresponding CDC change data. In the actual acquisition process, occasional data loss may occur during the data collection process due to network interruptions, program exceptions, etc., resulting in failure of real-time data collection. It is also possible that there are constant data changes in a certain data table on the data source side, and the change log files are constantly appended. The amount of log data generated during the collection process will become extremely large, which will also cause the failure of real-time data collection. Therefore, how to troubleshoot technical problems such as data loss, interruption, and exceptions is an urgent problem to be solved. Developers and operation and maintenance personnel try to manually troubleshoot, but the troubleshooting efficiency is low, time-consuming, and it is difficult to accurately locate the specific links where technical problems occur in the collection. Summary of the invention
[0005] In view of the above, the purpose of the present invention is to provide an anomaly location method and device based on cross-comparison from data source to log, which can quickly and accurately locate the specific lossy stage of data loss in medical data collection, so as to facilitate the guidance of subsequent repair and compensation of the located lossy stage.
[0006] To achieve the above-mentioned purpose of the invention, an embodiment provides an anomaly location method based on cross-comparison of data sources to logs, comprising the following steps:
[0007] Obtain the redo log data of the read data source, divide the redo log data into files corresponding to the five log stages and store them, and standardize the file output log format. The five log stages are log file acquisition stage, log reading stage, log parsing stage, parsing result aggregation stage, and aggregation result push stage.
[0008] The medical data read from the data source and the medical data written to the data source are compared to obtain differential data. The differential data are searched based on the five storage files corresponding to the five log stages, and the operation records of the differential data are determined based on the file output log format. The abnormal lossy stage is located by cross-comparing the differential data and their operation records in the five storage files.
[0009] Preferably, the file of each stage is named as: / logs / {date} / {application name} / {task number} / {log stage} / {table name}.log file.
[0010] Preferably, the file output log format is: {date}{log level}|{operation type}:{primary key / unique index}|finish{log area action};
[0011] The operation type represents the type of operation on the data, including adding, deleting, and modifying;
[0012] The primary key / unique index represents the primary key / unique index of each row or each type of data, which is a unique characteristic value;
[0013] Log area actions include log file acquisition, log reading, log parsing, parsing result aggregation, and summary result push.
[0014] Preferably, a LogMiner tool is used to obtain redo log data of a read data source.
[0015] Preferably, the medical data read from the data source and the medical data written to the data source are compared to obtain difference data, including:
[0016] Divide the time range corresponding to the data source into multiple time intervals as the current time interval;
[0017] Iterative data comparison process: within the current time zone, query the target feature value field from the read data source and the write data source respectively, and concatenate the queried target feature value field with the current time interval and perform hash calculation to obtain two hash result values corresponding to each time interval. When the two hash result values are not equal, the current time interval corresponding to the two unequal hash result values is divided twice to obtain multiple sub-time intervals, and the sub-time interval is used as the current time interval;
[0018] The data comparison process is repeated until the difference data is directly determined based on two unequal hash result values.
[0019] Preferably, the difference data is directly determined according to two unequal hash result values:
[0020] Determine two sets of medical data corresponding to two unequal hash result values, and directly determine the difference data by analyzing the two sets of medical data.
[0021] Preferably, the method of locating the abnormal lossy stage by cross-comparing the difference data and operation records in the five storage files includes:
[0022] When it is determined that the difference data found in the five storage files are the same, the operation records corresponding to the same difference data in the five storage files are cross-compared. The operation records that are different from other storage files are determined as lossy records through the cross-comparison results, and the log stage of the storage files corresponding to the lossy records is located as the lossy stage.
[0023] To achieve the above-mentioned purpose of the invention, the embodiment further provides an anomaly locating device based on cross comparison of data source to log, including:
[0024] The data partitioning and storage module is used to obtain the redo log data of the read data source, divide the redo log data into files corresponding to the five log stages and store them, and standardize the file output log format. The five log stages are log file acquisition stage, log reading stage, log parsing stage, parsing result aggregation stage, and aggregation result push stage.
[0025] The data cross-comparison and positioning module is used to compare the medical data read from the data source and the medical data written to the data source to obtain difference data, search for the difference data based on the five storage files corresponding to the five log stages, and determine the operation records of the difference data based on the file output log format, and locate the abnormal lossy stage by cross-comparing the difference data and their operation records in the five storage files.
[0026] To achieve the above-mentioned purpose of the invention, an embodiment further provides a computing device, including a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement the above-mentioned anomaly location method based on cross-comparison from data source to log.
[0027] To achieve the above-mentioned purpose of the invention, an embodiment further provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the above-mentioned anomaly location method based on cross-comparison from data source to log is implemented.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] The real-time data collection process is divided into five log stages, and the redo log data is divided and written into files corresponding to the five log stages and stored. This allows for more detailed segmentation of the log files. On this basis, the file output log format is standardized. After determining the difference data based on the medical data that reads the data source and writes the data source, the difference data is searched based on the five storage files corresponding to the five log stages, and the operation records of the difference data are determined based on the file output log format. By cross-comparing the difference data and their operation records in the five storage files, the lossy stage where the abnormality occurs is located, the abnormal data collection stage can be quickly located, and timely response and compensation can be guided, thereby improving the accuracy of data collection. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the embodiments of the present invention 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 of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0031] Figure 1 It is a flow chart of an anomaly location method based on cross comparison of data source to log provided in an embodiment;
[0032] Figure 2 It is a schematic diagram of using the LogMiner tool to obtain redo log data of a read data source provided by an embodiment;
[0033] Figure 3 1. It is a schematic diagram of five-stage division of redo log data of reading a data source provided by an embodiment;
[0034] Figure 4 is a flow chart of cross-comparison abnormal location provided by an embodiment;
[0035] Figure 5 It is a structural schematic diagram of an anomaly locating device based on cross comparison of data source to log provided in an embodiment;
[0036] Figure 6 It is a schematic diagram of the structure of a computing device provided in an embodiment. DETAILED DESCRIPTION
[0037] To make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation methods described herein are only used to explain the present invention and do not limit the scope of protection of the present invention.
[0038] The inventive concept of the present invention is to provide an anomaly location solution based on cross-comparison of data sources to logs. When data missing or network interruption occurs during real-time data synchronization between heterogeneous data sources from the source end to the target end in the medical field (such as Oracle database to TiDB database), the anomaly location solution can quickly locate the problem, respond quickly and compensate in time, thereby improving the accuracy of data collection.
[0039] like Figure 1 As shown, the embodiment provides an anomaly location method based on cross comparison of data source to log, including the following steps:
[0040] S1, obtain the redo log data of the read data source, divide the redo log data into files corresponding to the five log stages and store them, and standardize the file output log format.
[0041] In the embodiment, the read data source is the medical data of the device at one end of the data collection, which can be the medical data of the downstream medical institution, and the medical data can be stored through the Oracle database, TiDB database, etc. In the data collection process, there is also a corresponding write data source, which is the medical data that needs to be written by the device at the other end of the data collection, which can be the medical data collected by the upstream medical management center, and these medical data can also be stored through the Oracle database, TiDB database, etc. In the prior art, the real-time collection process from reading the data source to writing the data source will be collected into a log file, which will result in a large amount of log file data, and it will become very difficult to troubleshoot problems.
[0042] In the embodiment, the log process corresponding to the real-time data collection is defined as being divided into five log stages, namely, the log file acquisition stage (scan), the log reading stage (read), the log analysis stage (anlysis), the analysis result summary stage (report), and the summary result push stage (push). This enables a finer-grained segmentation of the log file, which facilitates subsequent anomaly location.
[0043] In the embodiment, firstly, the redo log data of the read data source is obtained. The LogMiner tool provided by Oracle can be used to obtain the redo log data of the read data source from the Oracle database. The data change capture (CDC) content corresponding to these redo log data includes new data, updated data, deleted data, and DDL. The corresponding symbols are +I, +U, -D, +D, where DDL refers to the data definition language in SQL, and the modification requirements can be defined by oneself. The process is as follows: Figure 2 shown.
[0044] In the specific implementation, a log reading program is planned on the physical machine where the application is deployed to read the redo log (redolog) data and divide the data for storage. Specifically, the log reading program is written to the path under the system logs directory, divided into five stages of storage paths, and named / logs / {date} / {application name} / {task number} / {log stage} / {table name}.log file, where / logs / {date} / {application name} / {task number} / {log stage} / represents the storage path, {table name}.log file represents the file name, logs is the root path of the physical machine, and the task number must be unique. Figure 3 As shown, when executing data collection, the redo log data is obtained by reading the log program and divided into five stages corresponding to the log file acquisition file, log reading file, log parsing file, parsing result summary file, and summary result push file. Each file can contain multiple tables. For example, when the date is 20240501, the application name is manage, the task number is 3301, and the table name is table_A, the five files obtained are as follows:
[0045] 1. / logs / 20240501 / manage / 3301 / scan / table_A.log;
[0046] 2. / logs / 20240501 / manage / 3301 / read / table_A.log;
[0047] 3. / logs / 20240501 / manage / 3301 / analysis / table_A.log;
[0048] 4. / logs / 20240501 / manage / 3301 / report / table_A.log;
[0049] 5. / logs / 20240501 / manage / 3301 / push / table_A.log.
[0050] In the embodiment, when storing files, the file output log format is also standardized, which facilitates the subsequent abnormal location. Specifically, the file output log format is {date}{log level}|{operation type}:{primary key / unique index}|finish{log area action}; wherein the operation type represents the type of operation on the data, including addition, deletion, and modification, represented by symbols i, d, and u respectively; the primary key / unique index represents the primary key / unique index of each row or each type of data, which is a unique characteristic value; the log area action includes log file acquisition, log reading, log parsing, parsing result aggregation, and summary result push.
[0051] For example, the log of the sample table_A.log file in the / logs / 20240501 / manage / 3301 / scan area under the log file path is as follows:
[0052] 1. 2024-05-01 09:52:45.610 DEBUG | i : JL00089638400312 | finish scan;
[0053] 2. 2024-05-01 09:52:45.611 DEBUG | i : JL00089638400313 | finish scan;
[0054] 3. 2024-05-01 09:52:45.611 DEBUG | i : JL00089638400314 | finish scan;
[0055] 4. 2024-05-01 09:52:45.613 DEBUG | u : JL00089638400315 | finish scan.
[0056] S2, compare the medical data read from the data source and the medical data written into the data source to obtain difference data, and perform cross-comparison based on the difference data combined with five storage files and the corresponding file output log format to determine the lossy stage where the abnormality occurs.
[0057] In the embodiment, Figure 4 As shown, the medical data read from the data source and written to the data source are compared to obtain difference data, including:
[0058] (a) Divide the time range (start time, end time) corresponding to the data source into multiple time intervals as the current time interval. For example, divide (2024-05-01 08:00:00, 2024-05-01 14:00:00) into 6 time intervals of 1 hour, namely:
[0059] 1. [2024-05-01 08:00:00, 2024-05-01 09:00:00};
[0060] 2. [2024-05-01 09:00:00, 2024-05-01 10:00:00};
[0061] 3. [2024-05-01 10:00:00, 2024-05-01 11:00:00};
[0062] 4. [2024-05-01 11:00:00, 2024-05-01 12:00:00};
[0063] 5. [2024-05-01 12:00:00, 2024-05-01 13:00:00};
[0064] 6. [2024-05-01 13:00:00, 2024-05-01 14:00:00];
[0065] (b) Iterative data comparison process: In the current time interval, the target feature value field is queried from the read data source and the write data source respectively, and the queried target feature value field is concatenated with the current time interval and hashed to obtain two hash result values corresponding to each time interval. When the two hash result values are not equal, the current time interval corresponding to the two unequal hash result values is divided twice to obtain multiple sub-time intervals, and the sub-time interval is used as the current time interval;
[0066] The following takes the first time interval as an example, the target feature value field to be queried is PRM_KEY, the business time field is MODIFY_DT, the data source table to be read is READ_TABLE, and the data source table to be written is WRITE_TABLE. First, the PRM_KEY corresponding to the first time interval is queried from READ_TABLE and WRITE_TABLE respectively, which is JL00089638400312+JL00089638400313+JL00089638400314+JL00089638400315. Then, the queried PRM_KEY is concatenated in sequence and concatenated with the time interval string [2024-05-01 08:00:00, 2024-05-01 09:00:00} for hash calculation. The function is as follows: HASH(JL00089638400312+JL00089638400313+JL00089638400314+JL00089638400315+[2024-05-01 08:00:00, 2024-05-01 09:00:00} ).
[0067] Specifically, the concatenation result is obtained through the assembled SQL execution. Through a class MessageDigest provided by Java for calculating hash values, a corresponding hash calculation entity class Digest instance can be obtained by calling the getInstance method and passing in the corresponding required algorithm (SHA-256). A byte array representing the concatenation result is received through the Digest method under the MessageDigest instance, and a byte array hashBytes representing the hash value is returned. The byte array hashBytes is converted into a hexadecimal string to calculate the corresponding hash result value hexResult.
[0068] The hash result values of the read data source and the write data source are compared in turn according to the current time interval. If the hexResult of the read data source is not equal to the hexResult of the write data source, the current time interval is divided twice. The time can be set to a sub-time interval every 10 minutes to achieve a finer-grained time range segmentation.
[0069] For example, the hash result values corresponding to the first time interval [2024-05-01 08:00:00, 2024-05-01 09:00:00] are different. The time interval is further divided into 6 sub-time intervals, specifically:
[0070] 1. [2024-05-01 08:00:00, 2024-05-01 08:10:00];
[0071] 2. [2024-05-01 08:10:00, 2024-05-01 08:20:00];
[0072] 3. [2024-05-01 08:20:00, 2024-05-01 08:30:00];
[0073] 4. [2024-05-01 08:30:00, 2024-05-01 08:40:00];
[0074] 5. [2024-05-01 08:40:00, 2024-05-01 08:50:00];
[0075] 6. [2024-05-01 08:50:00, 2024-05-01 08:60:00];
[0076] (c) Repeating the data iterative comparison process until the difference data is directly determined according to the two unequal hash result values. Specifically, two sets of medical data corresponding to the two unequal hash result values are determined, and the difference data is directly determined by analyzing the two sets of medical data.
[0077] In the embodiment, Figure 4 As shown, after obtaining the difference data, the difference data is searched based on the five storage files corresponding to the five log stages, and the operation records of the difference data are determined based on the file output log format, and the abnormal lossy stage is located by cross-comparing the difference data and their operation records in the five storage files. Specifically, when it is determined that the difference data found in the five storage files are the same, the operation records corresponding to the same difference data in the five storage files are cross-compared, and the operation records different from other storage files are determined as lossy records through the cross-comparison results, and the log stage where the storage file corresponding to the lossy record is located is located as the lossy stage.
[0078] For example, the difference data obtained is: table name tableName = table_A, target feature value field PRM_KEY = JL00089638400312, find table_A.log files from five storage folders, cross-compare feature values and feature value operation records line by line, and obtain the following results:
[0079] 1. The feature value field PRM_KEY matched in scan / table_A.log is JL00089638400312. The corresponding operation records are: Add (i): 2, Delete (d): 1, Modify (u): 5;
[0080] 2. read / table_A.log matches the feature value field PRM_KEY = JL00089638400312, and the corresponding operation records are: Add (i): 2 Delete (d): 1, Modify (u): 5;
[0081] 3. The feature value field PRM_KEY matched in analysis / table_A.log is JL00089638400312, and the corresponding operation records are: Add (i): 1 Delete (d): 1, Modify (u): 5;
[0082] 4. The feature value field PRM_KEY matched in report / table_A.log is JL00089638400312. The corresponding operation records are: Add (i): 1 Delete (d): 1, Modify (u): 5;
[0083] 5. push / table_A.log matches the feature value field PRM_KEY = JL00089638400312, and the corresponding operation records are: Add (i): 1 Delete (d): 1, Modify (u): 5;
[0084] The analysis shows that one new piece of data was missing when parsing the data in the third log phase. The data feature value is: PRM_KEY = JL00089638400312.
[0085] The above-mentioned anomaly location method based on cross-comparison from data source to log can be applied to the field of medical data. As a rich and scalable technical solution for implementing CDC based on the LogMiner analysis tool provided by Oracle, it can solve technical problems such as data missing and data leakage in important links of the real-time process of corresponding data. It can quickly locate the specific log stage of lost data by comparing the log file and the data source table, so as to guide real-time compensation.
[0086] like Figure 5 As shown, the embodiment also provides an abnormality locating device 50 based on cross-comparison of data source to log, including a data partitioning and storage module 51 and a data cross-comparison and locating module 52, wherein the data partitioning and storage module 51 obtains the redo log data of the read data source, divides and writes the redo log data into files corresponding to five log stages and stores them, and standardizes the file output log format at the same time, the data cross-comparison and locating module 52 is used to compare the medical data of the read data source and the medical data of the write data source to obtain difference data, and cross-comparison is performed based on the difference data combined with the five storage files and the corresponding file output log format to determine the lossy stage where the abnormality occurs.
[0087] It should be noted that the anomaly location device based on data source to log cross-comparison provided in the above embodiment should be illustrated with the division of the above-mentioned functional modules when performing the anomaly location method based on data source to log cross-comparison. The above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the terminal or server is divided into different functional modules to complete all or part of the functions described above. In addition, the anomaly location device based on data source to log cross-comparison provided in the above embodiment belongs to the same concept as the anomaly location method embodiment based on data source to log cross-comparison. The specific implementation process is detailed in the anomaly location method embodiment based on data source to log cross-comparison, which will not be repeated here.
[0088] Based on the same inventive concept, an embodiment further provides a computing device, including a memory and one or more processors, wherein executable code is stored in the memory, and when the one or more processors execute the executable code, the method for locating anomalies based on cross-comparison from data source to log is implemented, specifically including the following steps:
[0089] S1, obtain the redo log data of the read data source, divide the redo log data into files corresponding to the five log stages and store them, and standardize the file output log format;
[0090] S2, compare the medical data read from the data source and the medical data written into the data source to obtain difference data, and perform cross-comparison based on the difference data combined with five storage files and the corresponding file output log format to determine the lossy stage where the abnormality occurs.
[0091] like Figure 6 As shown, the computing device provided in the embodiment, at the hardware level, in addition to the processor and memory, also includes the hardware required for other services such as internal bus, network interface, memory, etc. The memory is a non-volatile memory, and the processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the above-mentioned S1-S2 described anomaly location method based on cross-comparison of data source to log. Of course, in addition to software implementation, the present invention does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0092] Based on the same inventive concept, an embodiment further provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the above-mentioned anomaly locating method based on cross-comparison from data source to log is implemented, which specifically includes the following steps:
[0093] S1, obtain the redo log data of the read data source, divide the redo log data into files corresponding to the five log stages and store them, and standardize the file output log format;
[0094] S2, compare the medical data read from the data source and the medical data written into the data source to obtain difference data, and perform cross-comparison based on the difference data combined with five storage files and the corresponding file output log format to determine the lossy stage where the abnormality occurs.
[0095] In the embodiment, computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules or other data.
[0096] The specific implementation methods described above provide a detailed description of the technical solutions and beneficial effects of the present invention. It should be understood that the above is only the most preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, supplements and equivalent substitutions made within the scope of the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for locating anomalies based on cross-comparison of data sources to logs, characterized in that: The following steps are involved: Obtain the redo log data of the read data source, divide the redo log data into files corresponding to the five log stages and store them, and standardize the file output log format. The five log stages are log file acquisition stage, log reading stage, log parsing stage, parsing result aggregation stage, and aggregation result push stage. The file output log format is: {date}{log level}|{operation type}:{primary key / unique index}|finish{log area action}, where the operation type represents the type of operation on the data, including addition, deletion, and modification; the primary key / unique index represents the primary key / unique index of each row or each type of data, which is a unique characteristic value; Log area actions include log file acquisition, log reading, log parsing, parsing result aggregation, and summary result push; Comparing the medical data of the read data source and the written data source to obtain difference data, including: dividing the time range corresponding to the data source into multiple time intervals as the current time interval; iterative data comparison process: within the current time zone, querying the target feature value field from the read data source and the written data source respectively, and concatenating the queried target feature value field with the current time interval to perform hash calculation to obtain two hash result values corresponding to each time interval, when the two hash result values are not equal, dividing the current time interval corresponding to the two unequal hash result values twice to obtain multiple sub-time intervals, and using the sub-time interval as the current time interval; repeating the iterative data comparison process until the difference data is directly determined according to the two unequal hash result values; The difference data is searched based on the five storage files corresponding to the five log stages, and the operation records of the difference data are determined based on the file output log format. The lossy stage where the abnormality occurs is located by cross-comparing the difference data and their operation records in the five storage files.
2. The anomaly location method based on data source to log cross comparison according to claim 1 is characterized in that: The file for each stage is named: / logs / {date} / {application name} / {task number} / {log stage} / {table name}.log file.
3. The anomaly location method based on data source to log cross comparison according to claim 1 is characterized in that: Use the LogMiner tool to obtain the redo log data of the read data source.
4. The anomaly location method based on data source to log cross comparison according to claim 1 is characterized in that: Directly determine the difference data based on two unequal hash result values: Determine two sets of medical data corresponding to two unequal hash result values, and directly determine the difference data by analyzing the two sets of medical data.
5. The anomaly location method based on data source to log cross comparison according to claim 1 is characterized in that: The method of locating the abnormal lossy stage by cross-comparing the difference data and operation records in the five storage files includes: When it is determined that the difference data found in the five storage files are the same, the operation records corresponding to the same difference data in the five storage files are cross-compared. The operation records that are different from other storage files are determined as lossy records through the cross-comparison results, and the log stage of the storage files corresponding to the lossy records is located as the lossy stage.
6. An abnormality location device based on cross-comparison of data source to log, characterized in that: include: The data partitioning and storage module is used to obtain the redo log data of the read data source, divide the redo log data into files corresponding to the five log stages and store them, and standardize the file output log format. The five log stages are log file acquisition stage, log reading stage, log parsing stage, parsing result aggregation stage, and aggregation result push stage. The file output log format is: {date}{log level}|{operation type}:{primary key / unique index}|finish{log area action}, where the operation type represents the type of operation on the data, including addition, deletion, and modification; the primary key / unique index represents the primary key / unique index of each row or each type of data, which is a unique characteristic value; Log area actions include log file acquisition, log reading, log parsing, parsing result aggregation, and summary result push; A data cross-comparison and positioning module is used to compare the medical data of the read data source and the written data source to obtain difference data, including: dividing the time range corresponding to the data source into multiple time intervals as the current time interval; iterative data comparison process: within the current time zone, querying the target feature value field from the read data source and the written data source respectively, and concatenating the queried target feature value field with the current time interval to perform hash calculation to obtain two hash result values corresponding to each time interval, when the two hash result values are not equal, the current time interval corresponding to the two unequal hash result values is divided twice to obtain multiple sub-time intervals, and the sub-time interval is used as the current time interval; repeating the iterative data comparison process until the difference data is directly determined according to the two unequal hash result values; The difference data is searched based on the five storage files corresponding to the five log stages, and the operation records of the difference data are determined based on the file output log format. The lossy stage where the abnormality occurs is located by cross-comparing the difference data and their operation records in the five storage files.
7. A computing device comprising a memory and one or more processors, wherein the memory stores executable code, characterized in that: When the one or more processors execute the executable code, they are used to implement the anomaly locating method based on cross-comparison of data sources to logs as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that: A program is stored thereon, and when the program is executed by a processor, the anomaly locating method based on cross-comparison of data source to log described in any one of claims 1-5 is implemented.
