Data table monitoring method and device, computer device and storage medium
By monitoring data tables within a monitoring cycle and using the results from the previous cycle when there is a mismatch, the problem of low accuracy in monitoring data tables for horizontal business types is solved, achieving efficient and accurate data table monitoring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PING AN TECH (SHENZHEN) CO LTD
- Filing Date
- 2022-02-24
- Publication Date
- 2026-04-24
AI Technical Summary
Existing technologies have issues with monitoring errors when monitoring data tables with multiple horizontal business types. In particular, the accuracy of monitoring is low because different business types of data tables have different output times and frequencies, and using the same monitoring frequency or time leads to errors.
Based on the monitoring period and the rules of the metrics to be monitored in the data table, monitoring is performed within the monitoring period; otherwise, the monitoring results of the previous period are used. By configuring derived metrics and setting exception dates, the timing of monitoring is optimized to ensure monitoring accuracy.
It improves the accuracy of data table monitoring, avoids misjudgments caused by the mismatch between monitoring cycle and output timing, and enables simultaneous monitoring and accurate output of multiple indicators.
Smart Images

Figure CN114546778B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of security monitoring technology, and in particular to a method, apparatus, computer equipment, and storage medium for monitoring data tables. Background Technology
[0002] Data governance is a system that establishes decision-making authority and responsibility through a series of information-related processes. These processes are executed according to a consensus-based model that describes who (Who) can, based on what information, at what time (When) and under what circumstances (Where), use what method (How), and take what action (What). The ultimate goal of data governance is to enhance the value of data. Data governance is essential and forms the foundation for enterprises to achieve their digital strategies. It is a management system that includes organization, rules, processes, and tools.
[0003] Data quality monitoring is at the end of the entire data consumption chain and, as a crucial component of data governance, bears the important mission of safeguarding data quality. For monitoring data tables with a single business data type, current methods monitor each column individually. For monitoring data tables of enterprises with multiple business data types, methods have emerged that monitor table metrics to improve the reusability of monitoring code. However, the inventors realized that this monitoring method is only suitable for data tables with many vertical business types. For data tables with many horizontal business types, since the output time and frequency of data tables to be monitored differ for different business types, using the same monitoring frequency or time to monitor data tables with different output times will lead to erroneous monitoring results. Summary of the Invention
[0004] This invention provides a method, apparatus, computer device, and storage medium for monitoring data tables, in order to solve the technical problem of low accuracy in monitoring data tables.
[0005] A method for monitoring a data table, comprising:
[0006] Obtain at least one data table to be monitored from the database, and each of the data tables to be monitored contains multiple data items;
[0007] Based on user input, at least one data item in each of the data tables to be monitored is configured as a monitoring indicator;
[0008] Receive the monitoring period of each of the data tables to be monitored and the first monitoring rule of each of the indicators to be monitored in the data tables to be monitored;
[0009] When the current date falls within the monitoring period of the data table to be monitored, the monitoring indicators in the corresponding data table to be monitored are monitored according to the first monitoring rules of each monitoring indicator to be monitored, and the first monitoring result is obtained.
[0010] When the current date is not within the monitoring period of the data table to be monitored, the corresponding data table to be monitored will not be monitored, and the monitoring result of the previous monitoring period will be used as the first monitoring result of the corresponding data table to be monitored.
[0011] Output the first monitoring result of the indicators to be monitored in each of the data tables to be monitored.
[0012] A monitoring device for a data table, comprising:
[0013] The data table acquisition module is used to acquire at least one data table to be monitored from the database, and each of the data tables to be monitored contains multiple data items.
[0014] The configuration module is used to configure at least one data item in each of the data tables to be monitored as a monitoring indicator based on user input.
[0015] The first receiving module is used to receive the monitoring period of each of the data tables to be monitored and the first monitoring rule of each of the indicators to be monitored in the data tables to be monitored;
[0016] The first monitoring module is used to monitor the indicators to be monitored in the corresponding data table according to the first monitoring rules of each indicator to be monitored when the current date is within the monitoring period of the data table to be monitored, and to obtain the first monitoring result.
[0017] The second monitoring module is used to not monitor the corresponding data table when the current date is not within the monitoring period of the data table to be monitored, and to use the monitoring result of the previous monitoring period as the first monitoring result of the corresponding data table to be monitored.
[0018] The output module is used to output the first monitoring result of the indicators to be monitored in each of the data tables to be monitored.
[0019] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described data table monitoring method.
[0020] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described data table monitoring method.
[0021] The monitoring method, apparatus, computer equipment, and storage medium for the aforementioned data tables first obtain at least one data table to be monitored from a database. Each data table contains multiple data items. Then, based on user input, at least one data item in each data table is configured as a monitoring indicator. The monitoring period for each data table and the first monitoring rules for each monitoring indicator in the data table are received. When the current date is within the monitoring period of the data table, the monitoring indicators in the corresponding data table are monitored according to the first monitoring rules to obtain a first monitoring result. When the current date is not within the monitoring period of the data table, the corresponding data table is not monitored, and the monitoring result of the previous monitoring period is used as the corresponding data table. The first monitoring result is then used to output the first monitoring result of each of the monitored indicators in the monitored data tables. This allows the monitoring period of the monitored data tables to be configured according to the output timing of the monitored data tables, avoiding the technical problem of misjudging that the monitored data tables have missing data when the monitoring period of the monitored data tables does not match the output timing. On the other hand, the monitored indicators in the corresponding monitored data tables are monitored according to the first monitoring rules of each monitored indicator, so that multiple monitored indicators in the data table can be monitored simultaneously. At the same time, each indicator has a corresponding pre-configured first monitoring rule, which can be configured according to the data characteristics of each monitored indicator, and the corresponding monitored indicators can be monitored according to each first monitoring rule, thereby improving the overall monitoring accuracy of the monitored data tables. Attached Figure Description
[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a schematic diagram of an application environment for a data table monitoring method according to an embodiment of the present invention;
[0024] Figure 2 This is a flowchart of a data table monitoring method according to an embodiment of the present invention;
[0025] Figure 3 This is a schematic diagram of the structure of a data table monitoring device in one embodiment of the present invention;
[0026] Figure 4 This is a schematic diagram of a computer device according to an embodiment of the present invention. Detailed Implementation
[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] The data table monitoring method provided in this application can be applied to, for example... Figure 1 In this application environment, the computer device can communicate with external devices such as external servers via a network. This computer device can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The external server can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0029] In one embodiment, such as Figure 2 As shown, a method for monitoring a data table is provided, which is then applied to... Figure 1 The following steps, S101 to S106, are used as an example of computer equipment.
[0030] S101. Obtain at least one data table to be monitored from the database, each of which contains multiple data items.
[0031] In one embodiment, the database can be a Hive database or a MySQL database.
[0032] Understandably, when multiple data tables need to be monitored simultaneously, multiple tables can be configured to be monitored at once. The data items in each monitored table can be either columns or rows. Whether to monitor row or column data depends on the table's organization characteristics and the importance of each data item.
[0033] S102. Based on the user's input, configure at least one data item in each of the data tables to be monitored as a monitoring indicator.
[0034] It is understood that the metric to be monitored belongs to one or more of the data items. Users can configure data items in the data table to be monitored as metrics. These metrics can belong to the same data table or different data tables.
[0035] S103. Receive the monitoring period of each of the data tables to be monitored and the first monitoring rule of each of the indicators to be monitored in the data tables to be monitored.
[0036] Users can initially configure or adjust the monitoring rules and monitoring cycle for each monitored indicator, including identifying the monitoring frequency, ensuring the accuracy and completeness of the monitoring configuration, and parsing the monitoring content (common sense errors, absolute values, unique primary keys, year-on-year comparisons, month-on-month comparisons, averages, etc.). Preferably, the monitoring cycle can be determined based on the output cycle of the data table to be monitored. For example, if the output cycle of a data table to be monitored is every Monday, then the monitoring cycle for that data table is weekly. In other embodiments, the monitoring cycle can also be every day, every two days, etc. It is understood that the monitoring cycle can also be measured in "months" or "years".
[0037] In one embodiment, the first monitoring rule may include, for example, determining whether the data in the monitored indicator is within a preset first interval range, determining whether the data in the monitored indicator is a positive number, determining whether the data in the monitored indicator violates common sense, and determining whether the mean value of the data in the monitored indicator is within a preset second interval range.
[0038] When monitoring data from multiple metrics simultaneously, the first monitoring rule for a metric can be to determine whether the data in the first metric is greater than or equal to the data in the second metric, or to determine whether the difference between the data in the first metric and the data in the second metric is within a preset threshold range.
[0039] In one embodiment, after retrieving at least one data table to be monitored from the database, the method further includes the following steps S201 to S203:
[0040] S201. Receive the input strategy for generating derived indicators based on the data items, and generate the derived indicators according to the strategy.
[0041] In one embodiment, the derived index is generated according to the strategy by, for example, performing calculations on different data items according to preset rules to obtain the derived index. The data items involved in generating the same derived index can be one or more.
[0042] Specifically, when there is only one data item involved in generating the same derived indicator, the step of generating the derived indicator according to the strategy further includes:
[0043] Based on the user's input, obtain the first preset calculation rule;
[0044] The derived index value is obtained by performing a calculation on the value of one of the data items in the column according to the first preset calculation rule.
[0045] According to one application scenario of this embodiment, for example, the data in a certain column of data items is converted into binary to obtain the derived index, or a specific value is added to or subtracted from the data in a certain column of data items to obtain the derived index.
[0046] In other embodiments, when multiple data items participate in generating the same derived indicator, the step of generating the derived indicator according to the strategy further includes:
[0047] Based on the user's input, obtain the second preset calculation rule;
[0048] After performing the second preset calculation rule on the data values in the same row of multiple data items, the value of the row corresponding to the derived index is obtained.
[0049] Specifically, the second preset operation rules include, for example, summation and absolute value calculation.
[0050] This embodiment enables the derived index to be obtained by performing a second preset operation rule on the data in different columns. The derived index can be understood as a new data item obtained by performing a preset operation rule on one or more original data items.
[0051] S202, Receive the second monitoring rule of the derived index.
[0052] When the derived indicator is the summation of different data items in the same or different data tables to be monitored, the second monitoring rule may include monitoring whether the summation result is within a preset range, monitoring whether the summation result is positive, monitoring whether the summation result is empty, etc.
[0053] S203. Monitor the derived indicators according to the second monitoring rule to obtain the second monitoring result.
[0054] The data items used to generate the derived metric can be one data item from the same monitored data table, multiple data items from different monitored data tables, or multiple data items from the same monitored data table. Furthermore, when the data items generating the derived metric are multiple data items from different monitored data tables, the monitoring periods for these multiple data items are the same. Specifically, the monitoring periods for the related different monitored data tables are configured according to user input in step S103 above.
[0055] This embodiment generates derived indicators based on a derived indicator generation strategy, and monitors the relevant data in the derived indicators according to a pre-configured second monitoring rule. This allows the monitoring items of the original data table to be monitored to be expanded without adding new data items (i.e., rows or columns in the original data table). This can improve the monitoring effect without making intrusive modifications to the original data table.
[0056] S104. When the current date is within the monitoring period of the data table to be monitored, the monitoring indicators in the corresponding data table to be monitored are monitored according to the first monitoring rules of each monitoring indicator to be monitored, and the first monitoring result is obtained.
[0057] For data generated daily, such as policy data tables, the monitoring period can be set to daily. Furthermore, the specific amount of data monitored in each monitoring period can be configured. For example, data from the previous day can be monitored, with the corresponding expression being T+1, where T is the current date. Data from the previous two days can also be monitored, with the corresponding expression being T+2. Optionally, the amount of data monitored each time can also be T+7, indicating that data from the previous 7 days can be monitored.
[0058] S105. When the current date is not within the monitoring period of the data table to be monitored, the corresponding data table to be monitored is not monitored, and the monitoring result of the previous monitoring period is used as the first monitoring result of the corresponding data table to be monitored.
[0059] It is understandable that the monitoring results of the previous monitoring period of the initial monitoring period of the data table to be monitored were empty.
[0060] In one embodiment, after receiving the monitoring period of each of the data tables to be monitored and the first monitoring rule for each of the metrics to be monitored in the data tables to be monitored, the method further includes:
[0061] Obtain the current date and determine whether the current date belongs to a pre-configured exception date;
[0062] If the current date belongs to the exception date, then the monitoring indicators in the corresponding monitoring data table are monitored according to the first monitoring rules of each monitoring indicator to be monitored, and the first monitoring result is obtained.
[0063] If the current date is not an exception date, the corresponding data table to be monitored will not be monitored, and the monitoring result of the previous monitoring will be used as the first monitoring result of the corresponding data table to be monitored.
[0064] The exception dates could be, for example, the 1st to the 7th of each month. Specifically, the dates on which the monitored data table is not generated can be set as the exception dates.
[0065] This embodiment provides the setting of exception dates, so that the monitoring timing of the data table monitoring method corresponds to the actual output date of the data table to be monitored, avoiding invalid monitoring when no data table to be monitored is generated, thus consuming system resources and reducing information interference.
[0066] S106. Output the first monitoring result of the indicators to be monitored in each of the data tables to be monitored.
[0067] In one embodiment, there are several ways to output the monitoring results, including but not limited to:
[0068] The monitoring results are displayed and output directly on the display screen of the current terminal device;
[0069] The monitoring results will be sent to the relevant personnel responsible for monitoring, including their email address, mobile phone number, and work account.
[0070] Send the monitoring results to the designated terminal device.
[0071] It is understandable that the monitoring results include both the monitoring results showing that the data in the monitored data table is correct and the monitoring results showing that the data in the monitored data table contains errors.
[0072] The data table monitoring method proposed in this embodiment first obtains at least one data table to be monitored from the database. Each data table contains multiple data items. Then, based on user input, at least one data item in each data table is configured as a monitoring indicator. The method also receives the monitoring period for each data table and the first monitoring rule for each monitoring indicator in the data table. When the current date is within the monitoring period of the data table, the monitoring indicator in the corresponding data table is monitored according to the first monitoring rule, resulting in a first monitoring result. When the current date is not within the monitoring period of the data table, the corresponding data table is not monitored, and the monitoring result of the previous monitoring period is used as the first monitoring result for the corresponding data table. The monitoring results are output, and finally, the first monitoring results of the indicators to be monitored in each of the data tables to be monitored are output. This allows the monitoring period of the data tables to be monitored to be configured according to the output time of the data tables to be monitored, avoiding the technical problem of misjudging that the data tables to be monitored have missing data when the monitoring period of the data tables to be monitored does not match the output time. On the other hand, the indicators to be monitored in the corresponding data tables to be monitored are monitored according to the first monitoring rules of each indicator to be monitored, so that multiple indicators to be monitored in the data tables can be monitored at the same time. At the same time, each indicator has a corresponding pre-configured first monitoring rule, which can be configured according to the data characteristics of each indicator to be monitored, and the corresponding indicators to be monitored are monitored according to each first monitoring rule, thereby improving the overall monitoring accuracy of the data tables to be monitored.
[0073] Furthermore, the data table monitoring method is applied in a terminal device, and after obtaining the first monitoring result or the second monitoring result, the data table monitoring method further includes:
[0074] When the first monitoring result or the second monitoring result indicates an error, a pre-set user account bound to the data table to be monitored is obtained, and the user account runs in the virtual machine of the terminal device;
[0075] Obtain the table name of the monitoring data table corresponding to the monitoring indicator or derived indicator that has the aforementioned error;
[0076] The error message and the table name are sent to the user account running in the virtual machine.
[0077] In one embodiment, the virtual machine is, for example, a cloud desktop.
[0078] This embodiment sends the error message and table name to the user account instead of directly sending the erroneous data from the monitored or derived metrics to the user account. This ensures the security of the data in the monitored data table and restricts the user account to run only in a virtual machine, requiring pre-granted permissions to access the monitored data table where errors occur, further protecting the security of the data in the monitored data table.
[0079] In other embodiments, the specific content of data anomalies can be identified based on the alarm thresholds configured on the configuration end and the data monitoring results generated by the client. Error message levels can be set to red, yellow, and blue, and the data stakeholders can be notified to take appropriate action. Simultaneously, the anomaly content is reported to the client and written into the database for archiving, so that data stakeholders can take appropriate actions based on the alarm level, such as adjusting data production logic or monitoring content, until the monitoring alarm disappears.
[0080] The data table monitoring method proposed in this embodiment acts as the final "gatekeeper" in the data production chain, achieving one-time configuration and automated monitoring. For data developers, it eliminates the need for manual monitoring, allowing them to identify anomalies before data users and handle them before users even perceive them, greatly maintaining system stability and protecting the reputation of data developers. For data users, a timely and accurate data system provides crucial support for their business analysis and decision-making. This data table monitoring method not only safeguards the digital business department project but can also be extended to other projects, offering advantages such as ease of use, traceable monitoring process, high code reusability, and the ability to reuse data across different projects.
[0081] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0082] In one embodiment, a data table monitoring device is provided, which corresponds one-to-one with the data table monitoring methods described in the above embodiments. For example... Figure 3 As shown, the monitoring device 100 for this data table includes a data table acquisition module 11, a configuration module 12, a first receiving module 13, a first monitoring module 14, a second monitoring module 15, and an output module 16. Detailed descriptions of each functional module are as follows:
[0083] The data table acquisition module 11 is used to acquire at least one data table to be monitored from the database, and each of the data tables to be monitored contains multiple data items.
[0084] Configuration module 12 is used to configure at least one data item in each of the data tables to be monitored as a monitoring indicator based on user input;
[0085] The first receiving module 13 is used to receive the monitoring period of each of the data tables to be monitored and the first monitoring rule of each of the indicators to be monitored in the data tables to be monitored;
[0086] The first monitoring module 14 is used to monitor the indicators to be monitored in the corresponding data table according to the first monitoring rules of each indicator to be monitored when the current date is within the monitoring period of the data table to be monitored, and to obtain the first monitoring result.
[0087] The second monitoring module 15 is used to not monitor the corresponding data table when the current date is not within the monitoring period of the data table to be monitored, and to use the monitoring result of the previous monitoring period as the first monitoring result of the corresponding data table to be monitored.
[0088] Output module 16 is used to output the first monitoring result of the indicators to be monitored in each of the data tables to be monitored.
[0089] The data table monitoring device proposed in this embodiment achieves one-time configuration and automated monitoring. For data developers, it eliminates the need for manual monitoring, allowing them to identify anomalies before data users and handle them before users even perceive them, greatly maintaining system stability and protecting the reputation of data developers. For data users, a timely and accurate data system provides crucial support for business analysis and decision-making, not only safeguarding the digital business department project but also extending to other projects. It offers advantages such as ease of use, traceable monitoring processes, high code reusability, and the ability to reuse data across different projects.
[0090] In one embodiment, the monitoring device 100 for the data table further includes:
[0091] A derived indicator generation module is used to receive an input strategy for generating derived indicators based on the data items, and generate the derived indicators according to the strategy.
[0092] The second receiving module is used to receive the second monitoring rule of the derived indicator;
[0093] The third monitoring module is used to monitor the derived indicators according to the second monitoring rules and obtain the second monitoring result.
[0094] This embodiment allows for the generation of derived indicators by performing calculations on data items in different columns according to a second preset operation rule. A derived indicator can be understood as a new data item obtained by performing calculations on one or more existing data items according to the preset operation rule. This embodiment generates derived indicators based on a derived indicator generation strategy and monitors the relevant data in the derived indicators according to a pre-configured second monitoring rule. This allows for the expansion of the monitoring items in the original data table without adding new data items (i.e., rows or columns) to the original data table. It achieves improved monitoring effectiveness without intrusive modifications to the original data table.
[0095] In one embodiment, when only one data item participates in generating the same derived indicator, the derived indicator generation module specifically includes:
[0096] The first preset operation rule acquisition unit is used to acquire the first preset operation rule based on the user's input;
[0097] The first calculation unit is used to perform calculations on the values in one of the data items according to a first preset calculation rule to obtain the value of the derived index.
[0098] In one embodiment, when multiple data items participate in generating the same derived indicator, the derived indicator generation module specifically includes:
[0099] The second preset operation rule acquisition unit is used to acquire the second preset operation rule based on the user's input;
[0100] The second calculation unit is used to perform the calculation on the data values in the same row of multiple data items according to the second preset calculation rule, and then obtain the value of the row corresponding to the derived index.
[0101] In one embodiment, the monitoring device 100 for the data table is deployed in a terminal device, and the monitoring device 100 for the data table further includes:
[0102] The user account acquisition module is used to acquire a pre-set user account bound to the data table to be monitored when the first monitoring result or the second monitoring result is found to be erroneous. The user account runs in the virtual machine of the terminal device.
[0103] The table name acquisition module is used to acquire the table name of the data table to be monitored corresponding to the monitored indicator or derived indicator that has the error.
[0104] The message sending module is used to send a data error message and the table name to the user account running in the virtual machine.
[0105] This embodiment sends the error message and table name to the user account instead of directly sending the erroneous data from the monitored or derived metrics to the user account. This ensures the security of the data in the monitored data table and restricts the user account to run only in a virtual machine, requiring pre-granted permissions to access the monitored data table where errors occur, further protecting the security of the data in the monitored data table.
[0106] In other embodiments, the specific content of data anomalies can be identified based on the alarm thresholds configured on the configuration end and the data monitoring results generated by the client. Error message levels can be set to red, yellow, and blue, and the data stakeholders can be notified to take appropriate action. Simultaneously, the anomaly content is reported to the client and written into the database for archiving, so that data stakeholders can take appropriate actions based on the alarm level, such as adjusting data production logic or monitoring content, until the monitoring alarm disappears.
[0107] In one embodiment, the monitoring device 100 for the data table further includes:
[0108] The judgment module is used to obtain the current date and determine whether the current date belongs to a pre-configured exception date;
[0109] The fourth monitoring module is used to monitor the indicators to be monitored in the corresponding monitoring data table according to the first monitoring rules of each indicator to be monitored if the current date belongs to the exception date, and to obtain the first monitoring result.
[0110] The fifth monitoring module is used to not monitor the corresponding data table if the current date does not belong to the exception date, and to use the monitoring result of the previous monitoring as the first monitoring result of the corresponding data table.
[0111] This embodiment provides the setting of exception dates, so that the monitoring timing of the data table monitoring method corresponds to the actual output date of the data table to be monitored, avoiding invalid monitoring when no data table to be monitored is generated, thus consuming system resources and reducing information interference.
[0112] The terms "first" and "second" in the above-mentioned modules / units are only used to distinguish different modules / units and are not intended to specify which module / unit has a higher priority or any other limiting meaning. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not explicitly listed or inherent to these processes, methods, products, or devices. The module divisions appearing in this application are merely logical divisions; in actual applications, different division methods may be used.
[0113] Specific limitations regarding the monitoring device for the data table can be found in the limitations on the monitoring method for the data table mentioned above, and will not be repeated here. Each module in the aforementioned monitoring device for the data table can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0114] In one embodiment, a computer device, which may be a server, is provided. The computer device includes a processor, memory, a network interface, and a database connected via a system bus. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a storage medium and internal memory. The storage medium includes non-volatile storage media and / or volatile storage media, which stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the storage medium. The database of the computer device is used to store data involved in a data table monitoring method. The network interface of the computer device is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a data table monitoring method.
[0115] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 3As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computational and control capabilities. The memory includes storage media and internal memory. The storage media includes non-volatile and / or volatile storage media, storing an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the storage media. The network interface is used to communicate with an external server via a network connection. When executed by the processor, the computer program implements a method for monitoring a data table.
[0116] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the data table monitoring method described in the above embodiment, for example... Figure 2 The steps 101 to 106 shown, as well as other extensions and related steps of the method, are examples. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit of the data table monitoring device in the above embodiments, for example... Figure 3 The functions of modules 11 to 16 are shown. To avoid repetition, they will not be described again here.
[0117] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the computer device, connecting various parts of the computer device via various interfaces and lines.
[0118] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, video data, etc.).
[0119] The memory can be integrated into the processor or it can be set up separately from the processor.
[0120] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When executed by a processor, the computer program implements the steps of the data table monitoring method described in the above embodiments, for example... Figure 2 The steps 101 to 106 shown, as well as other extensions and related steps of the method, are examples. Alternatively, when the computer program is executed by a processor, it implements the functions of each module / unit of the data table monitoring device in the above embodiments, for example... Figure 3 The functions of modules 11 to 16 are shown. To avoid repetition, they will not be described again here.
[0121] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile and / or volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0122] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0123] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for monitoring a data table, characterized in that, include: Obtain at least one data table to be monitored from the database, and each of the data tables to be monitored contains multiple data items; Based on user input, at least one data item in each of the data tables to be monitored is configured as a monitoring indicator; The system receives the monitoring period of each of the data tables to be monitored and the first monitoring rule of each of the indicators to be monitored in the data tables to be monitored. The first monitoring rule includes: determining whether the data in the indicator to be monitored is within a preset first interval range, determining whether the data in the indicator to be monitored is a positive number, determining whether the data in the indicator to be monitored violates common sense, and determining whether the mean of the data in the indicator to be monitored is within a preset second interval range. When the current date falls within the monitoring period of the data table to be monitored, the monitoring indicators in the corresponding data table to be monitored are monitored according to the first monitoring rules of each monitoring indicator to be monitored, and the first monitoring result is obtained. When the current date is not within the monitoring period of the data table to be monitored, the corresponding data table to be monitored will not be monitored, and the monitoring result of the previous monitoring period will be used as the first monitoring result of the corresponding data table to be monitored. Output the first monitoring result of the indicator to be monitored in each of the data tables to be monitored; After retrieving at least one data table to be monitored from the database, the method further includes: The strategy for generating derived indicators based on the input data items is received, and the derived indicators are generated according to the strategy. The second monitoring rule for receiving the derived indicator, wherein the derived indicator is the summation of different data items in the same or different data tables to be monitored, the second monitoring rule includes: monitoring whether the summation result is within a preset range value, monitoring whether the summation result is positive, and monitoring whether the summation result is empty; The derived indicators are monitored according to the second monitoring rule to obtain the second monitoring result; The method is applied to a terminal device. After obtaining the first monitoring result or the second monitoring result, the monitoring method for the data table further includes: When the first monitoring result or the second monitoring result indicates an error, a pre-set user account bound to the data table to be monitored is obtained, and the user account runs in the virtual machine of the terminal device; Obtain the table name of the monitoring data table corresponding to the monitoring indicator or derived indicator that has the aforementioned error; Sending a data error message and the table name to the user account running in the virtual machine includes: Based on the alarm thresholds configured on the end and the data monitoring results generated by the client, identify the abnormal data content and set the error message level to three levels: red, yellow, and blue. The error message level and the content of the data anomaly are reported to the client and written into the database for archiving.
2. The data table monitoring method according to claim 1, characterized in that, When only one data item participates in generating the same derived indicator, the step of generating the derived indicator according to the strategy further includes: Based on the user's input, obtain the first preset calculation rule; The derived index value is obtained by performing a calculation on the value of one of the data items in the column according to the first preset calculation rule.
3. The data table monitoring method according to claim 1, characterized in that, When multiple data items participate in generating the same derived indicator, the step of generating the derived indicator according to the strategy further includes: Based on the user's input, obtain the second preset calculation rule; After performing the second preset calculation rule on the data values in the same row of multiple data items, the value of the row corresponding to the derived index is obtained.
4. The data table monitoring method according to claim 1, characterized in that, After receiving the monitoring period of each of the data tables to be monitored and the first monitoring rule of each of the indicators to be monitored in the data tables to be monitored, the method further includes: Obtain the current date and determine whether the current date belongs to a pre-configured exception date; If the current date belongs to the exception date, then the monitoring indicators in the corresponding monitoring data table are monitored according to the first monitoring rules of each monitoring indicator to be monitored, and the first monitoring result is obtained. If the current date is not an exception date, the corresponding data table to be monitored will not be monitored, and the monitoring result of the previous monitoring will be used as the first monitoring result of the corresponding data table to be monitored.
5. A monitoring device for a data table, characterized in that, The device is used to implement the data table monitoring method as described in any one of claims 1-4, comprising: The data table acquisition module is used to acquire at least one data table to be monitored from the database, and each of the data tables to be monitored contains multiple data items. The configuration module is used to configure at least one data item in each of the data tables to be monitored as a monitoring indicator based on user input. The first receiving module is used to receive the monitoring period of each of the data tables to be monitored and the first monitoring rule of each of the indicators to be monitored in the data tables to be monitored. The first monitoring rule includes: determining whether the data in the indicator to be monitored is within a preset first interval range, determining whether the data in the indicator to be monitored is a positive number, determining whether the data in the indicator to be monitored violates common sense, and determining whether the mean value of the data in the indicator to be monitored is within a preset second interval range. The first monitoring module is used to monitor the indicators to be monitored in the corresponding data table according to the first monitoring rules of each indicator to be monitored when the current date is within the monitoring period of the data table to be monitored, and to obtain the first monitoring result. The second monitoring module is used to not monitor the corresponding data table when the current date is not within the monitoring period of the data table to be monitored, and to use the monitoring result of the previous monitoring period as the first monitoring result of the corresponding data table to be monitored. The output module is used to output the first monitoring result of the indicators to be monitored in each of the data tables to be monitored; The monitoring device also includes: A derived indicator generation module is used to receive an input strategy for generating derived indicators based on the data items, and generate the derived indicators according to the strategy. The second receiving module is used to receive the second monitoring rule of the derived indicator, wherein the derived indicator is the summation of different data items in the same or different data tables to be monitored, and the second monitoring rule includes: monitoring whether the summation result is within a preset range value, monitoring whether the summation result is positive, and monitoring whether the summation result is empty. The third monitoring module is used to monitor the derived indicators according to the second monitoring rules and obtain the second monitoring result.
6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the monitoring method for the data table as described in any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the monitoring method for the data table as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Index data processing method and device, electronic equipment and storage medium
CN111400363A
Data monitoring method and device
CN113157671A