A method for constructing a data link for adaptive database detection
By constructing an adaptive database detection data chain, combined with sliding window and incremental learning, the inefficiency and anomaly detection accuracy of traditional database monitoring methods in complex and ever-changing data environments are solved, achieving efficient and intelligent database detection.
Patent Information
- Application Number
- CN202410686254.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-05-30
AI Technical Summary
Traditional database monitoring methods are unable to adapt to complex and ever-changing data environments, resulting in low monitoring efficiency and an inability to effectively identify anomalies in the data.
An adaptive database detection data chain construction method is adopted. Through dynamic data detection, database structure inversion and information fusion evaluation, combined with sliding window feature extraction, a dynamic anomaly detection model is constructed. Incremental learning is used to update the detection parameters to achieve adaptive database detection.
It improves the automation and intelligence of database detection, enabling timely capture of data change trends, improving the accuracy of anomaly detection, and maintaining the effectiveness of the detection model.
Smart Images

Figure CN118535770B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of database detection, and in particular to a method for constructing a self-adaptive database detection data chain. Background Art
[0002] With the rapid development of the Internet and the advent of the big data era, the amount of data stored in databases continues to increase, including various structured and unstructured data. At present, traditional database monitoring methods are mostly based on static rules or pre-defined patterns for data detection, and these methods have certain limitations. With the diversification of data types and data structures in databases, as well as the increase in data volume, traditional monitoring methods are often unable to fully adapt to complex and changing data environments. To address this problem, this patent proposes a method for constructing an adaptive database detection data chain, which uses artificial intelligence technology to automatically analyze the changes, trends, and potential regularities of data from different databases, adjust monitoring strategies in real time according to data characteristics and environment, improve monitoring efficiency, and reduce manual intervention. Summary of the invention
[0003] In view of this, the present invention provides a method for constructing an adaptive database detection data chain, the purpose of which is to: 1) propose an adaptive database detection data chain construction method, realize adaptive database detection data chain construction through dynamic data detection, database structure inversion and information fusion evaluation, and can effectively improve the automation and intelligence level of database detection; 2) by combining the sliding window method, the dynamic changing features are extracted in real time, the changing trend of the data can be captured in time, and the dynamic characteristics of the data can be better reflected; 3) when constructing a dynamic data anomaly detection model, a density-based local outlier factor method is adopted to capture anomalies in the data, which can more effectively identify local anomalies and improve the accuracy of anomaly detection; 4) by adopting an incremental learning method, the detection parameters are updated in real time to adapt to the dynamic changes of structural data in the database, the effectiveness of the detection model can be maintained, and dynamic adjustments can be made as the data changes.
[0004] To achieve the above object, the present invention provides a method for constructing an adaptive database detection data chain, comprising the following steps:
[0005] A method for constructing an adaptive database detection data chain, characterized in that the method comprises:
[0006] S1: extracting data dynamic features from a database in real time, wherein adaptive feature extraction combined with a sliding window is an implementation method for extracting data dynamic features, and the data dynamic features include mean and standard deviation statistical features;
[0007] S2: Construct a dynamic data anomaly detection model, which captures anomalies in the data by analyzing the dynamic characteristics of the data, wherein the density-based local outlier factor is an implementation method for capturing data point anomalies;
[0008] S3: Based on the real-time detection results, incremental learning is used to realize adaptive detection parameter update, and the detection parameters are adjusted to adapt to the dynamic changes of structural data in the database;
[0009] S4: Fuse the models of different data sources, use the information fusion algorithm to integrate the data dependencies of different data sources, build a detection chain for the detection models of different data sources, and achieve optimal detection of the global database.
[0010] As a further improvement method of the present invention:
[0011] Optionally, extracting data dynamic features from the database in real time in step S1 includes:
[0012] S11: Build a dynamic window adjustment function to monitor data changes. When the data fluctuation exceeds the specified threshold, increase the window size to include more historical data; when the data fluctuation is less than the specified threshold, reduce the window size to capture recent changes more quickly. The calculation formula is:
[0013] W current =min(W max ,max(W min , W prev +α·Δ))ifΔk,threshhold
[0014]
[0015] in:
[0016] W current Indicates the current window size;
[0017] W max Indicates the maximum window size limit;
[0018] W min Indicates the minimum window size limit
[0019] W prev Indicates the window size at the previous moment;
[0020] Represents the mean of the historical window size;
[0021] α represents the adjustment factor, which is used to control the adjustment speed of the window size
[0022] Δ represents the amount of data change;
[0023] threshhold indicates the preset threshold;
[0024] S12: Calculate the dynamic characteristics of the data in the sliding window according to the calculated sliding window.
[0025] Optionally, building a dynamic data anomaly detection model in step S2 includes:
[0026] S21: Perform data dynamic feature anomaly monitoring on the data extracted from the current window data, calculate the outlier factor score of the data point, and identify abnormal data according to the outlier factor score, where the outlier factor score calculation formula of the data point p is:
[0027]
[0028] in:
[0029] N(p) represents the neighborhood set of data point p;
[0030] k-distance(p) represents the distance from data point p to its kth neighbor;
[0031] reach_dist(o, p) represents the distance from data point p to data point o;
[0032] LOF(p) represents the outlier factor score of data point p;
[0033] S22: If the outlier factor score of the current window data exceeds the specified threshold, it means that there is a structural change in the current database, and the parameters of the adaptive detection tool need to be adjusted.
[0034] Optionally, the step S3 uses incremental learning to implement adaptive detection parameter update, including:
[0035] S31: Collect database test case data and perform table structure mining to obtain different form structures in the database, wherein pattern mining is the main implementation method of the table structure mining;
[0036] S32: Perform association reasoning on the mined form structure to obtain primary and foreign key association relationships of different forms;
[0037] S33: Adaptively update detection parameters according to the mined form structure and primary and foreign key association relationships to form a detection tool for the current database.
[0038] The collecting of database test case data and performing table structure mining to obtain different form structures in the database includes:
[0039] S311: Scan the collected test case sequence data, construct a prefix projection of each sequence, group the sequences with the same prefix together, and form a prefix projection table;
[0040] S312: based on the constructed prefix projection table, grouping the collected test case sequence data according to the prefixes to generate a projection database;
[0041] S313: recursively mining the projection database to find frequent sequence patterns, and in each round of recursion, generating candidate sequences by connecting different prefixes;
[0042] S314: Prune the generated candidate sequences, remove the sequences with low support, and obtain frequent sequences, where the support calculation formula is:
[0043]
[0044] in:
[0045] Support(S) represents the support of the frequent sequence S;
[0046] N represents the number of test cases;
[0047] n(S) represents the number of test cases containing the frequent sequence S;
[0048] S315: Merge frequent sequences to generate long sequence patterns;
[0049] S316: Repeat steps S313 to S315 until no longer frequent sequence can be generated, and finally obtain a table structure corresponding to the test case data as the frequent sequence with the maximum length.
[0050] The method of performing association reasoning on the mined form structure to obtain primary and foreign key association relationships of different forms includes:
[0051] S321: Grouping the same items contained in different form structures into one group, and the form structures in the same group have a dependency relationship;
[0052] S322: Counting the number of occurrences of the same item data references from different form structures in the test case data of the database, where the same item data references refer to the same item appearing together with other items in the form;
[0053] S323: Calculate the reference degree according to the statistically obtained number of times the same item data is referenced in different form structures. The calculation formula is:
[0054]
[0055] in:
[0056] d iIndicates the citation degree of the i-th form;
[0057] I represents a collection of forms in the same group;
[0058] m i Indicates the number of times the same item data reference appears in the i-th form;
[0059] S324: The form structure with the largest reference degree is used as the primary key of the same item, and the other form structures in the same group are connected to the form structure through foreign keys.
[0060] Optionally, in step S4, the detection chain is constructed for the detection models of different data sources by using an information fusion algorithm to integrate the data dependencies of different data sources, including:
[0061] S41: Determine the importance of each data source based on data quality, data integrity and business requirements, quantify the weight of each data source, and build a dependency graph between data sources based on the correlation and dependency between data fields;
[0062] S42: Based on the importance weights and dependency graphs of the data sources, construct an objective function for maximizing detection efficiency. The objective function calculation formula is:
[0063]
[0064] in:
[0065] E represents the detection efficiency;
[0066] w i Represents the importance weight of the i-th data source;
[0067] R ij is the dependency relationship between the i-th data source and the j-th data source, and its value is {1, -1}. When j depends on i, its value is 1, otherwise it is -1.
[0068] P i represents the detection accuracy of the i-th data source;
[0069] n represents the number of data sources;
[0070] i, j represent the data source indexes respectively.
[0071] In order to solve the above problem, the present invention provides an electronic device, the electronic device comprising:
[0072] A memory storing at least one instruction;
[0073] Communication interface, enabling electronic equipment to communicate; and
[0074] The processor executes the instructions stored in the memory to implement the above-mentioned adaptive database detection data link construction method.
[0075] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned adaptive database detection data link construction method.
[0076] Compared with the prior art, the present invention proposes a method for constructing an adaptive database detection data chain, which has the following advantages:
[0077] Firstly, this scheme proposes a method for constructing an adaptive database detection data chain, which realizes the construction of an adaptive database detection data chain through dynamic data detection, database structure inversion and information fusion evaluation, and can effectively improve the automation and intelligence level of database detection;
[0078] At the same time, this solution extracts dynamic changing features in real time by combining the sliding window method, which can capture the changing trend of data in time and better reflect the dynamic characteristics of data;
[0079] In addition, when this scheme constructs a dynamic data anomaly detection model, the model adopts a density-based local outlier factor method to capture anomalies in the data, which can more effectively identify local anomalies and improve the accuracy of anomaly detection; and by adopting an incremental learning method, it can realize real-time updating of detection parameters to adapt to the dynamic changes of structural data in the database, which can maintain the effectiveness of the detection model and make dynamic adjustments as the data changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 A schematic diagram of a flow chart of a method for constructing an adaptive database detection data link provided by an embodiment of the present invention;
[0081] Figure 2 A schematic diagram of the structure of an electronic device for implementing a method for building an adaptive database detection data link provided by an embodiment of the present invention.
[0082] In the figure: 1 electronic device, 10 processor, 11 memory, 12 program, 13 communication interface.
[0083] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0084] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0085] The embodiment of the present application provides a method for constructing an adaptive database detection data chain. The execution subject of the method for constructing an adaptive database detection data chain includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the method for constructing an adaptive database detection data chain can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
[0086] Embodiment 1:
[0087] S1: extracting data dynamic features from a database in real time, wherein adaptive feature extraction combined with a sliding window is an implementation method for extracting data dynamic features, and the data dynamic features include mean and standard deviation statistical features.
[0088] The step S1 extracts data dynamic features from the database in real time, including:
[0089] S11: Build a dynamic window adjustment function to monitor data changes. When the data fluctuation exceeds the specified threshold, increase the window size to include more historical data; when the data fluctuation is less than the specified threshold, reduce the window size to capture recent changes more quickly. The calculation formula is:
[0090] W current =min(W max ,max(W min , W prev +α·Δ))ifΔ≥threshhold
[0091]
[0092] in:
[0093] W current Indicates the current window size;
[0094] W max Indicates the maximum window size limit;
[0095] W min Indicates the minimum window size limit
[0096] W prev Indicates the window size at the previous moment;
[0097] Represents the mean of the historical window size;
[0098] α represents the adjustment factor, which is used to control the adjustment speed of the window size
[0099] Δ represents the amount of data change;
[0100] threshhold indicates the preset threshold;
[0101] S12: Calculate the dynamic characteristics of the data in the sliding window according to the calculated sliding window.
[0102] S2: Construct a dynamic data anomaly detection model, which captures anomalies in the data by analyzing the dynamic characteristics of the data, wherein the density-based local outlier factor is an implementation method for capturing data point anomalies.
[0103] The dynamic data anomaly detection model is constructed in step S2, including:
[0104] S21: Dynamic feature anomaly monitoring is performed on the data extracted from the current window data, the outlier factor score of the data point is calculated, and the abnormal data is identified according to the outlier factor score, where the outlier factor score calculation formula of the data point p is:
[0105]
[0106] in:
[0107] N(p) represents the neighborhood set of data point p;
[0108] k-distance(p) represents the distance from data point p to its kth neighbor;
[0109] reach_dist(o, p) represents the distance from data point p to data point o;
[0110] LOF(p) represents the outlier factor score of data point p;
[0111] S22: If the outlier factor score of the current window data exceeds the specified threshold, it means that there is a structural change in the current database, and the parameters of the adaptive detection tool need to be adjusted.
[0112] S3: Based on the real-time detection results, incremental learning is used to realize adaptive detection parameter update, and the detection parameters are adjusted to adapt to the dynamic changes of structural data in the database.
[0113] In the step S3, incremental learning is used to implement adaptive detection parameter update, including:
[0114] S31: Collect database test case data and perform table structure mining to obtain different form structures in the database, wherein pattern mining is the main implementation method of table structure mining;
[0115] S32: Perform association reasoning on the mined form structure to obtain primary and foreign key association relationships of different forms;
[0116] S33: Adaptively update detection parameters according to the mined form structure and primary and foreign key association relationships to form a detection tool for the current database.
[0117] The collecting of database test case data and performing table structure mining to obtain different form structures in the database includes:
[0118] S311: Scan the collected test case sequence data, construct a prefix projection of each sequence, group the sequences with the same prefix together, and form a prefix projection table;
[0119] S312: based on the constructed prefix projection table, grouping the collected test case sequence data according to the prefixes to generate a projection database;
[0120] S313: recursively mining the projection database to find frequent sequence patterns, and in each round of recursion, generating candidate sequences by connecting different prefixes;
[0121] S314: Prune the generated candidate sequences, remove the sequences with low support, and obtain frequent sequences, where the support calculation formula is:
[0122]
[0123] in:
[0124] Support(S) represents the support of the frequent sequence S;
[0125] N represents the number of test cases;
[0126] n(S) represents the number of test cases containing the frequent sequence S;
[0127] S315: Merge frequent sequences to generate long sequence patterns;
[0128] S316: Repeat steps S313 to S315 until no longer frequent sequence can be generated, and finally obtain a table structure corresponding to the test case data as the frequent sequence with the maximum length.
[0129] The method of performing association reasoning on the mined form structure to obtain primary and foreign key association relationships of different forms includes:
[0130] S321: Grouping the same items contained in different form structures into one group, and the form structures in the same group have a dependency relationship;
[0131] S322: Counting the number of occurrences of the same item data references from different form structures in the test case data of the database, where the same item data references refer to the same item appearing together with other items in the form;
[0132] S323: Calculate the reference degree according to the statistically obtained number of times the same item data is referenced in different form structures. The calculation formula is:
[0133]
[0134] in:
[0135] d i Indicates the citation degree of the i-th form;
[0136] I represents a collection of forms in the same group;
[0137] m i Indicates the number of times the same item data reference appears in the i-th form;
[0138] S324: The form structure with the largest reference degree is used as the primary key of the same item, and the other form structures in the same group are connected to the form structure through foreign keys.
[0139] S4: Fuse the models of different data sources, use the information fusion algorithm to integrate the data dependencies of different data sources, build a detection chain for the detection models of different data sources, and achieve optimal detection of the global database.
[0140] In step S4, the information fusion algorithm is used to integrate the data dependencies of different data sources to construct a detection chain for the detection models of different data sources, including:
[0141] S4l: Determine the importance of each data source based on data quality, data integrity and business requirements, quantify the weight of each data source, and build a dependency graph between data sources based on the correlation and dependency between data fields;
[0142] S42: Based on the importance weights and dependency graphs of the data sources, construct an objective function for maximizing detection efficiency. The objective function calculation formula is:
[0143]
[0144] in:
[0145] E represents the detection efficiency;
[0146] w i Represents the importance weight of the i-th data source;
[0147] R ij is the dependency relationship between the i-th data source and the j-th data source, and its value is {1, -1}. When j depends on i, its value is 1, otherwise it is -1.
[0148] P i represents the detection accuracy of the i-th data source;
[0149] n represents the number of data sources;
[0150] i, k represent the data source indexes respectively.
[0151] Embodiment 2:
[0152] like Figure 2 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing a method for building a data link for adaptive database detection provided by an embodiment of the present invention.
[0153] The electronic device 1 may include a processor 10 , a memory 11 , a communication interface 13 , and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10 , such as a program 12 .
[0154] Wherein, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 can also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 can also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the program 12, etc., but also can be used to temporarily store data that has been output or is to be output.
[0155] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (such as the program 12 for implementing the construction of the adaptive database detection data link), and calls the data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
[0156] The communication interface 13 may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices, and to achieve connection and communication between internal components of the electronic device.
[0157] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0158] Figure 2 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 2 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0159] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0160] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.
[0161] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0162] The program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:
[0163] Extracting dynamic changes of data from a database in real time, wherein adaptive feature extraction combined with a sliding window is an implementation method for extracting dynamic features of data, wherein the dynamic features of data include statistical features of mean and standard deviation;
[0164] Constructing a dynamic data anomaly detection model, wherein the model captures anomalies in the data by analyzing the dynamic characteristics of the data, wherein a density-based local outlier factor is an implementation method for capturing data point anomalies;
[0165] According to the real-time detection results, incremental learning is used to realize adaptive detection parameter update, and the detection parameters are adjusted to adapt to the dynamic changes of structural data in the database;
[0166] The models of different data sources are fused, and the information fusion algorithm is used to integrate the data dependencies of different data sources to build a detection chain for the detection models of different data sources, so as to achieve optimal detection of the global database.
[0167] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figure 1 to Figure 2 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0168] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the terms "including", "comprising" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method 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, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0169] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0170] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for constructing an adaptive database detection data chain, It is characterized in that The method comprises: S1: extracting data dynamic features from a database in real time, wherein adaptive feature extraction combined with a sliding window is an implementation method for extracting data dynamic features, and the data dynamic features include mean and standard deviation statistical features; S2: Construct a dynamic data anomaly detection model, which captures anomalies in the data by analyzing the dynamic characteristics of the data, wherein the density-based local outlier factor is an implementation method for capturing data point anomalies; S3: Based on the real-time detection results, incremental learning is used to realize adaptive detection parameter update, and the detection parameters are adjusted to adapt to the dynamic changes of structural data in the database; S4: Fuse the models of different data sources, use the information fusion algorithm to integrate the data dependencies of different data sources, build a detection chain for the detection models of different data sources, and achieve the optimization of the global database; In the step S3, incremental learning is used to implement adaptive detection parameter update, including: S31: Collect database test case data and perform table structure mining to obtain different form structures in the database, wherein pattern mining is the main implementation method of the table structure mining; S32: Perform association reasoning on the mined form structure to obtain primary and foreign key association relationships of different forms; S33: Adaptively update detection parameters according to the mined form structure and primary and foreign key association relationships to form a detection tool for the current database; In the step S31, database test case data is collected and table structure mining is performed to obtain different form structures in the database, including: S311: Scan the collected test case sequence data, construct a prefix projection of each sequence, group the sequences with the same prefix together, and form a prefix projection table; S312: based on the constructed prefix projection table, grouping the collected test case sequence data according to the prefixes to generate a projection database; S313: recursively mining the projection database to find frequent sequence patterns, and in each round of recursion, generating candidate sequences by connecting different prefixes; S314: Prune the generated candidate sequences, remove the sequences with low support, and obtain frequent sequences, where the support calculation formula is: in: Support(S) represents the support of the frequent sequence S; N represents the number of test cases; n(S) represents the number of test cases containing the frequent sequence S; S315: Merge frequent sequences to generate long sequence patterns; S316: Repeat steps S313 to S315 until no longer frequent sequence can be generated, and finally obtain a table structure corresponding to the test case data as the frequent sequence with the maximum length; In the step S32, the form structure obtained by mining is subjected to association reasoning to obtain the primary and foreign key association relationships of different forms, including: S321: Grouping the same items contained in different form structures into one group, and the form structures in the same group have a dependency relationship; S322: Counting the number of occurrences of the same item data references in different form structures in the test case data of the database, where the same item data references refer to the same item appearing together with other items in the form; S323: Calculate the reference degree according to the statistically obtained number of times the same item data is referenced in different form structures. The calculation formula is: in: d i Indicates the citation degree of the i-th form; I represents a collection of forms in the same group; m i Indicates the number of times the same item data reference appears in the i-th form; S324: The form structure with the largest reference degree is used as the primary key of the same item, and the other form structures in the same group are connected to the form structure through foreign keys.
2. A method for constructing an adaptive database detection data link as claimed in claim 1, It is characterized in that The step S1 extracts data dynamic features from the database in real time, including: S11: Build a dynamic window adjustment function to monitor data changes. When the data fluctuation exceeds the specified threshold, increase the window size to include more historical data; when the data fluctuation is less than the specified threshold, reduce the window size to capture recent changes more quickly. The calculation formula is: IN current =min(W max ,max(W min ,IN prev +α Δ))ifΔ≥threshhold in: W current Indicates the current window size; W max Indicates the maximum window size limit; W min Indicates the minimum window size limit; W prev Indicates the window size at the previous moment; Represents the mean of the historical window size; α represents the adjustment factor, which is used to control the adjustment speed of the window size; Δ represents the amount of data change; threshhold indicates the preset threshold; S12: Calculate the dynamic characteristics of the data in the sliding window according to the calculated sliding window.
3. A method for constructing an adaptive database detection data link as claimed in claim 1, It is characterized in that The dynamic data anomaly detection model is constructed in step S2, including: S21: Dynamic feature anomaly monitoring is performed on the data extracted from the current window data, the outlier factor score of the data point is calculated, and the abnormal data is identified according to the outlier factor score, where the outlier factor score calculation formula of the data point p is: in: N(p) represents the neighborhood set of data point p; k-distance(p) represents the distance from data point p to its kth neighbor; reach_dist(o,p) represents the distance from data point p to data point o; LOF(p) represents the outlier factor score of data point p; S22: If the outlier factor score of the current window data exceeds the specified threshold, it means that there is a structural change in the current database, and the parameters of the adaptive detection tool need to be adjusted.
4. A method for constructing an adaptive database detection data link as claimed in claim 1, It is characterized in that In step S4, the information fusion algorithm is used to integrate the data dependencies of different data sources to construct a detection chain for the detection models of different data sources, including: S41: Determine the importance of each data source based on data quality, data integrity and business requirements, quantify the weight of each data source, and build a dependency graph between data sources based on the correlation and dependency between data fields; S42: Based on the importance weights and dependency graphs of the data sources, construct an objective function for maximizing detection efficiency. The objective function calculation formula is: in: E represents the detection efficiency; w i Represents the importance weight of the i-th data source; R ij is the dependency relationship between the i-th data source and the j-th data source, and its value is {1, -1}. When j depends on i, its value is 1, otherwise it is -1. P i represents the detection accuracy of the i-th data source; n represents the number of data sources; i, j represent the data source indexes respectively.
