Automatic data monitoring method and device, electronic equipment and storage medium
Through the automated method of analyzing and generating query record rules, the problems of low efficiency and poor reliability of manual writing query statements and rules in the prior art are solved, and efficient and accurate data monitoring is achieved.
Patent Information
- Application Number
- CN202411882013.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-18
AI Technical Summary
In the prior art, technicians need to manually write PromQL query statements and configure Grafana alarms, which leads to slower monitoring response speed, and the reliability of manually writing recording rules is low, making monitoring errors prone to occur.
By obtaining the input query statement, analyzing it using the preset statement analysis model, extracting key information, and generating query record names and rules based on these key information, and automatically generating query record rules for monitoring the target system.
It realizes the automatic extraction of key information of query statements and generates query record rules, which reduces the need to manually write rules, improves the efficiency and accuracy of data monitoring, and reduces the risk of errors.
Smart Images

Figure CN119848084A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an automated data monitoring method, device, electronic device, and computer-readable storage medium. Background Art
[0002] As the complexity of business systems increases, real-time monitoring and alerting of systems becomes critical. Monitoring can be achieved by combining various tools. For example, Prometheus and Grafana are widely used monitoring and visualization tools in the industry, responsible for data collection and query, and data display and alert configuration, respectively. However, using these tools requires certain technical thresholds, especially in writing PromQL query statements and configuring Grafana alerts.
[0003] Currently, technicians need to manually write query statements (such as the above PromQL). After configuring a large number of alarms, the monitoring response speed slows down because the query statements need to query data in real time. Therefore, technicians need to manually create corresponding recording rules for each query statement and calculate and cache the query results in the monitoring tool. The above process is cumbersome, and the reliability of manually written recording rules is low, which is prone to various monitoring errors. Summary of the invention
[0004] In view of this, in order to solve some or all of the above-mentioned technical problems, the embodiments of the present application provide an automated data monitoring method, device, electronic device and computer-readable storage medium.
[0005] In a first aspect, an embodiment of the present application provides an automated data monitoring method, the method comprising: obtaining a query statement input for monitoring a target system; parsing the query statement using a preset statement parsing model to obtain key information contained in the query statement; generating a query record name using the key information according to a preset naming rule; generating a query record rule based on the query record name and the query statement; and monitoring the data generated by the target system based on the query record rule.
[0006] In one possible implementation, data generated by a target system is monitored based on query record rules, including: generating a rule file in a preset format based on the query record rules; importing the rule file into a preset data monitoring tool, and using the data monitoring tool to monitor the data generated by the target system according to the query record rules.
[0007] In a possible implementation, the key information includes at least one of the following: an indicator name, a usage function, a time offset, and a query condition.
[0008] In one possible implementation, a query record name is generated according to a preset naming rule using key information, including: generating an initial query record name according to a preset naming rule using key information; generating identification information of the query statement; and merging the identification information and the initial query record name to obtain a query record name.
[0009] In a possible implementation, generating identification information of a query statement includes: performing encryption calculation on the query statement according to a preset encryption algorithm to obtain encrypted information; and generating identification information based on the encrypted information.
[0010] In a possible implementation, a preset statement parsing model is used to parse a query statement to obtain key information contained in the query statement, including: obtaining statement parsing rule information; inputting the query statement and the statement parsing rule information into the statement parsing model to obtain key information contained in the query statement.
[0011] In a second aspect, an embodiment of the present application provides an automated data monitoring device, which includes: an acquisition module for acquiring a query statement input for monitoring a target system; a parsing module for parsing the query statement using a preset statement parsing model to obtain key information contained in the query statement; a first generation module for generating a query record name using the key information in accordance with a preset naming rule; a second generation module for generating a query record rule based on the query record name and the query statement; and a monitoring module for monitoring the data generated by the target system based on the query record rule.
[0012] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory for storing a computer program; a processor for executing the computer program stored in the memory, and when the computer program is executed, the method of any embodiment of the automated data monitoring method of the first aspect of the present application is implemented.
[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, a method of any embodiment of the automated data monitoring method of the first aspect described above is implemented.
[0014] In a fifth aspect, an embodiment of the present application provides a computer program, which includes a computer-readable code. When the computer-readable code runs on a device, the processor in the device implements a method as in any embodiment of the automated data monitoring method of the first aspect described above.
[0015] The automated data monitoring method, device, electronic device, and computer-readable storage medium provided in the embodiments of the present application obtain input query statements, parse the query statements using a statement parsing model, obtain key information contained in the query statements, and then generate a query record name using the key information according to a preset naming rule, generate a query record rule based on the query record name and the query statement, and finally monitor the data generated by the target system based on the query record rule. The embodiments of the present application realize the automatic extraction of key information of query statements and the automatic generation of query record rules, without the need to manually write query record rules, thereby improving the efficiency of data monitoring for various systems and reducing the risk of errors caused by manually writing query record rules. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0017] In order to more clearly illustrate the embodiments of the present application 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0018] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0019] Figure 1 A flowchart of an automated data monitoring method provided in an embodiment of the present application;
[0020] Figure 2 A flowchart of another automated data monitoring method provided in an embodiment of the present application;
[0021] Figure 3 A flowchart of another automated data monitoring method provided in an embodiment of the present application;
[0022] Figure 4 A flowchart of another automated data monitoring method provided in an embodiment of the present application;
[0023] Figure 5 A flowchart of another automated data monitoring method provided in an embodiment of the present application;
[0024] Figure 6A schematic diagram of the structure of an automated data monitoring device provided in an embodiment of the present application;
[0025] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. It should be noted that unless otherwise specifically stated, the relative arrangement of the components and steps, the numerical expressions and the numerical values described in these embodiments do not limit the scope of the present application.
[0027] Those skilled in the art will understand that the terms "first" and "second" in the embodiments of the present application are only used to distinguish between different steps, devices, modules and other objects, and do not represent any specific technical meanings, nor do they indicate the logical order between them.
[0028] It should also be understood that in this embodiment, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.
[0029] It should also be understood that any component, data or structure mentioned in the embodiments of the present application can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0030] In addition, the term "and / or" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.
[0031] It should also be understood that the description of the various embodiments in this application focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0032] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present application, its application, or uses.
[0033] Technologies, circuits, and devices known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the above-mentioned technologies, circuits, and devices should be considered as part of the specification.
[0034] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0035] It should be noted that, in the absence of conflict, the embodiments in this application and the features in the embodiments can be combined with each other. To facilitate the understanding of the embodiments of the present application, the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0036] In order to solve the technical problems of low efficiency and low query accuracy in manually writing query record rules in the prior art, the present application provides an automated data monitoring method that can automatically generate query record rules to improve the efficiency and accuracy of data monitoring using query record rules.
[0037] Figure 1 A flow chart of an automated data monitoring method provided for an embodiment of the present application. The method can be applied to one or more electronic devices such as a server, a desktop computer, a laptop computer, a portable computer, a smart phone, etc. In addition, the execution subject of the method can be hardware or software. When the above-mentioned execution subject is hardware, the execution subject can be one or more of the above-mentioned electronic devices. For example, a single electronic device can execute the method, or a plurality of electronic devices can cooperate with each other to execute the method. When the above-mentioned execution subject is software, the method can be implemented as multiple software or software modules, or as a single software or software module. No specific limitation is made here.
[0038] like Figure 1 As shown, the method specifically includes:
[0039] Step 101: Obtain a query statement input for monitoring a target system.
[0040] In this embodiment, the target system may be any type of system that can generate data. For example, a backend data system of a video playback platform or a backend data system of a shopping website. The query statement may be a statement applicable to a data monitoring tool. For example, when the data monitoring tool is Prometheus, the query statement may be a PromQL statement.
[0041] As an example, a PromQL statement looks like this:
[0042] sum(increase(autorenew_set_log_insert_total{application="vip-xuanwu",agreem entType="1",operatorType="1"}[1m])).
[0043] This statement means to query the number of users who have activated automatic renewal in the last minute.
[0044] Step 102: parse the query statement using a preset statement parsing model to obtain key information contained in the query statement.
[0045] In this embodiment, the sentence parsing model can be a special model pre-trained for data monitoring scenarios, or it can be a general natural language large model of various types. As an example, when the sentence parsing model is a pre-trained special model, the model can include a network structure such as LSTM, ResNet, etc., and the model is trained by using a machine learning method by annotating key information of sample sentences in advance. The trained model is the above-mentioned sentence parsing model.
[0046] When the sentence parsing model is a natural language large model (such as ChatGPT), the query statement and prompt information containing extraction rules can be input into the large model. The large model parses the query statement according to the prompt information and outputs key information.
[0047] The key information output indicates the main meaning of the query statement, for example, it may include the indicator name, used function, time offset, etc.
[0048] Step 103, generating a query record name according to a preset naming rule and using key information.
[0049] In this embodiment, according to the above naming rules, key information can be spliced, modified, etc. in a certain order to generate a query record name.
[0050] As an example, based on the query statement in the example, the generated query record name is:
[0051] autorenew_set_log_insert_total:increase1m:application_agreementType_operator Type.
[0052] Step 104: Generate query record rules based on the query record name and the query statement.
[0053] In this embodiment, the query record name and the query statement may be added to a rule template to generate a query record rule.
[0054] As an example, when the data monitoring tool is Prometheus, based on the above example, the query record rules generated are as follows:
[0055]
[0056] The content contained in the record field is the query record name, and the content contained in the expr field is the query record rule.
[0057] Step 105: Monitor the data generated by the target system based on the query record rule.
[0058] In this embodiment, the data monitoring tool can perform monitoring configuration according to the query record rule, and then execute the monitoring process to return the queried data. Optionally, the returned data can be displayed on the screen through a visualization tool (such as Grafana) for the user to view.
[0059] The automated data monitoring method provided in the embodiment of the present application obtains an input query statement, parses the query statement using a statement parsing model, obtains key information contained in the query statement, and then generates a query record name using the key information according to a preset naming rule, generates a query record rule based on the query record name and the query statement, and finally monitors the data generated by the target system based on the query record rule. The embodiment of the present application realizes the automatic extraction of key information of the query statement and the automatic generation of the query record rule, without the need to manually write the query record rule, thereby improving the efficiency of data monitoring for various systems and reducing the risk of errors caused by manually writing the query record rule.
[0060] In some optional implementations of this embodiment, such as Figure 2 As shown, step 105 includes:
[0061] Step 1051: Generate a rule file in a preset format based on the query record rule.
[0062] The format of the rule file is a format that can adapt to the data monitoring tool, for example, it can be a file in YAML format.
[0063] The rule file may include multiple groups of query record rules, each group of query record rules corresponding to a query statement. Each group of query record rules may be written into the rule file according to the data format defined in the rule file. For example, as in the example in the description corresponding to the above step 104, it is a group of query record rules.
[0064] Step 1052, import the rule file into a preset data monitoring tool, and use the data monitoring tool to monitor the data generated by the target system according to the query record rule.
[0065] After the rule file is imported into the data monitoring tool, the target system can be monitored and calculated in real time according to a series of query recording rules configured in the rule file, and the corresponding monitoring data can be returned. For example, when the above data monitoring tool is Prometheus, the generated rule file contains multiple sets of Recording Rules. According to the above example, the number of users who have activated automatic renewal in the last minute can be returned.
[0066] This embodiment generates a rule file in a preset format, and the rule file matches the data monitoring tool, so that the data monitoring tool can be automatically run, so that the method can be applied to various types of data monitoring tools, improving the adaptability of data monitoring scenarios. At the same time, it reduces the time and labor cost of manually operating the data monitoring tool, and improves the efficiency and accuracy of system configuration.
[0067] In some optional implementations of this embodiment, the key information includes at least one of the following: indicator name, usage function, time offset, and query condition.
[0068] The indicator name is used to uniquely define a time series, the function refers to the various functions included in the query statement, the time offset refers to the time interval when collecting data, and the query condition indicates the limited range when querying data.
[0069] As an example, a PromQL statement looks like this:
[0070] sum(increase(autorenew_set_log_insert_total{application="vip-xuanwu",agreem entType="1",operatorType="1"}[1m])).
[0071] The key information analyzed includes:
[0072] a.Indicator name: autorenew_set_log_insert_total;
[0073] b. Use functions: sum, increase;
[0074] c. Time offset: 1m;
[0075] d. Query conditions: application, agreementType, operatorType.
[0076] This embodiment achieves a more comprehensive extraction of the main features contained in the query statement by parsing multiple key information. The generated query record name can more clearly express the meaning of the query record rule. The query record name is more readable and consistent, which is helpful for later operation and management.
[0077] In some optional implementations of this embodiment, such as Figure 3 As shown, step 103 includes:
[0078] Step 1031, generate an initial query record name according to a preset naming rule and using key information.
[0079] The initial query record name is a query record name that does not contain identification information. For example, the initial query record name is:
[0080] autorenew_set_log_insert_total:increase1m:application_agreementType_operator Type.
[0081] Step 1032: Generate identification information of the query statement.
[0082] The identification information is used to uniquely represent the query statement. The identification information can be generated in various ways. For example, the query statement number can be generated as the identification information according to the generation order of the query statement.
[0083] Step 1033: merge the identification information and the initial query record name to obtain the query record name.
[0084] The identification information may be inserted into the initial query record name according to a preset insertion position. For example, after the identification information is inserted at the end of the initial query record, the query record name generated is:
[0085] autorenew_set_log_insert_total:increase1m:application_agreementType_operator Type: XXXXX, where XXXXX is identification information.
[0086] This embodiment generates identification information for the query statement and adds the identification information to the query record name, so that the query record name can uniquely represent the query statement, avoid name duplication caused by manually setting the query record name, solve the problem of name conflict, and make the query record more readable and consistent, which is helpful for later operation and management.
[0087] In some optional implementations of this embodiment, such as Figure 4 As shown, step 1032 includes:
[0088] Step 10321, encrypt the query statement according to the preset encryption algorithm to obtain encrypted information.
[0089] The encryption algorithm may be of various types, for example, it may be an MD5 algorithm.
[0090] Step 10322, generate identification information based on the encrypted information.
[0091] Specifically, all or part of the encrypted information can be used as identification information. For example, the first 16 bits of the MD5 value can be used as identification information. As an example, after the first 16 bits of the MD5 value are inserted at the end of the initial query record, the query record name generated is:
[0092] autorenew_set_log_insert_total:increase1m:application_agreementType_operator Type:70f03c84d33a8977. 70f03c84d33a8977 is identification information.
[0093] This embodiment uses an encryption algorithm to encrypt the query statement, and adds the generated encrypted information to the query record name, thereby automatically generating a unique query record name, further solving the problem of name conflicts, and facilitating later operation, maintenance, and management.
[0094] In some optional implementations of this embodiment, such as Figure 5 As shown, step 102 includes:
[0095] Step 1021, obtaining statement parsing rule information.
[0096] The statement parsing rule information may be information used to prompt the statement parsing model to extract key information. For example, the statement parsing rule information may include "The following query statement is a PromQL statement, from which the indicator name, usage function, time offset, and query condition are extracted. The indicator name is defined as: ..., the usage function is defined as: ..., the time offset is defined as: ..., and the query condition is defined as: ...".
[0097] Step 1022: Input the query statement and statement parsing rule information into the statement parsing model to obtain key information contained in the query statement.
[0098] The sentence parsing model in this embodiment can be a generative natural language large model, such as ChatGPT, etc. After the query statement and the sentence parsing rule information are input into the sentence parsing model, the sentence parsing model can extract key information from the query statement according to the parsing rules defined by the sentence parsing rule information. Usually, in actual scenarios, the interface of the above-mentioned sentence parsing model can be called, and the query statement and the sentence parsing rule information can be input into the sentence parsing model through the interface, and the extracted key information can be received from the interface.
[0099] This embodiment sets statement parsing rule information and uses a large natural language model as a statement parsing model, eliminating the need to pre-set and train a dedicated model, thereby greatly reducing the difficulty of extracting query statements and improving the efficiency of generating query record names.
[0100] Figure 6 A schematic diagram of the structure of an automated data monitoring device provided in an embodiment of the present application. Specifically comprising:
[0101] The acquisition module 601 is used to acquire a query statement input for monitoring a target system;
[0102] The parsing module 602 is used to parse the query statement using a preset statement parsing model to obtain key information contained in the query statement;
[0103] The first generating module 603 is used to generate a query record name using key information according to a preset naming rule;
[0104] The second generating module 604 is used to generate a query record rule based on the query record name and the query statement;
[0105] The monitoring module 605 is used to monitor the data generated by the target system based on the query record rules.
[0106] In some optional implementations of this embodiment, the monitoring module includes: a first generation unit, used to generate a rule file in a preset format based on the query record rules; a monitoring unit, used to import the rule file into a preset data monitoring tool, and use the data monitoring tool to monitor the data generated by the target system according to the query record rules.
[0107] In some optional implementations of this embodiment, the key information includes at least one of the following: indicator name, usage function, time offset, and query condition.
[0108] In some optional implementations of this embodiment, the first generation module includes: a second generation unit, used to generate an initial query record name according to a preset naming rule and using key information; a third generation unit, used to generate identification information of the query statement; and a merging unit, used to merge the identification information and the initial query record name to obtain a query record name.
[0109] In some optional implementations of this embodiment, the third generation unit includes: a calculation subunit, used to perform encryption calculation on the query statement according to a preset encryption algorithm to obtain encrypted information; and a generation subunit, used to generate identification information based on the encrypted information.
[0110] In some optional implementations of this embodiment, the parsing module includes: an acquisition unit, used to acquire statement parsing rule information; and a parsing unit, used to input the query statement and the statement parsing rule information into a statement parsing model to obtain key information contained in the query statement.
[0111] The automatic data monitoring device provided in this embodiment can be as follows Figure 6 The automated data monitoring device shown in can execute all the steps of the above automated data monitoring methods, thereby achieving the technical effects of the above automated data monitoring methods. For details, please refer to the above related description. For the sake of brevity, it will not be repeated here.
[0112] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, Figure 7 The electronic device 700 shown includes: at least one processor 701, a memory 702, at least one network interface 704 and other user interfaces 703. The various components in the electronic device 700 are coupled together via a bus system 705. It is understood that the bus system 705 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 705 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 705 is not described in detail. Figure 7 Various buses are labeled as bus system 705.
[0113] The user interface 703 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).
[0114] It can be understood that the memory 702 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DRRAM). The memory 702 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0115] In some implementations, the memory 702 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 7021 and an application 7022 .
[0116] The operating system 7021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 7022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present application can be included in the application 7022.
[0117] In this embodiment, by calling the program or instruction stored in the memory 702, specifically, the program or instruction stored in the application 7022, the processor 701 is used to execute the method steps provided by each method embodiment, for example, including:
[0118] Obtain query statements input for monitoring the target system; use a preset statement parsing model to parse the query statements to obtain key information contained in the query statements; generate query record names using the key information according to preset naming rules; generate query record rules based on the query record names and query statements; and monitor data generated by the target system based on the query record rules.
[0119] The method disclosed in the above embodiment of the present application can be applied to the processor 701, or implemented by the processor 701. The processor 701 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 701 or the instruction in the form of software. The above processor 701 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 702, and the processor 701 reads the information in the memory 702 and completes the steps of the above method in combination with its hardware.
[0120] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the above functions of the present application, or a combination thereof.
[0121] For software implementation, the technology described above in this article can be implemented by a unit that performs the functions described above in this article. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0122] The electronic device provided in this embodiment may be Figure 7 The electronic device shown in can execute all the steps of the above-mentioned automatic data monitoring methods, thereby achieving the technical effects of the above-mentioned automatic data monitoring methods. Please refer to the above related description for details. For the sake of brevity, it will not be repeated here.
[0123] The embodiment of the present application also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.
[0124] When one or more programs in the storage medium can be executed by one or more processors, the above-mentioned automated data monitoring method executed on the electronic device side can be implemented.
[0125] The processor is used to execute the program stored in the memory to implement the following steps of the automated data monitoring method performed on the electronic device side:
[0126] Obtain query statements input for monitoring the target system; use a preset statement parsing model to parse the query statements to obtain key information contained in the query statements; generate query record names using the key information according to preset naming rules; generate query record rules based on the query record names and query statements; and monitor data generated by the target system based on the query record rules.
[0127] The professionals should further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different circuits to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0128] The steps of the circuits or algorithms described in conjunction with the embodiments disclosed herein may be implemented using hardware, software modules executed by a processor, or a combination of the two. The software modules may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0129] It should be understood that the terms used in the text are only for the purpose of describing specific example embodiments, and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used in the text may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The steps, processes, and operations described in the text are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0130] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. An automated data monitoring method, characterized in that: The method comprises: Obtaining query statements input for monitoring the target system; Utilizing a preset sentence parsing model, the query sentence is parsed to obtain key information contained in the query sentence; Generate a query record name using the key information according to a preset naming rule; Generate a query record rule based on the query record name and the query statement; Based on the query record rule, the data generated by the target system is monitored.
2. The method according to claim 1, characterized in that The monitoring of the data generated by the target system based on the query record rule includes: Based on the query record rule, generate a rule file in a preset format; The rule file is imported into a preset data monitoring tool, and the data monitoring tool is used to monitor the data generated by the target system according to the query record rule.
3. The method according to claim 1, characterized in that The key information includes at least one of the following: indicator name, usage function, time offset, and query condition.
4. The method according to claim 1, characterized in that: The step of generating a query record name by using the key information according to a preset naming rule includes: Generate an initial query record name using the key information according to a preset naming rule; Generate identification information of the query statement; The identification information and the initial query record name are combined to obtain the query record name.
5. The method according to claim 4, characterized in that The identification information for generating the query statement includes: According to a preset encryption algorithm, the query statement is encrypted and calculated to obtain encrypted information; Based on the encrypted information, the identification information is generated.
6. The method according to claim 1, characterized in that The query statement is parsed using a preset statement parsing model to obtain key information contained in the query statement, including: Get statement parsing rule information; The query statement and the statement parsing rule information are input into the statement parsing model to obtain key information contained in the query statement.
7. An automated data monitoring device, characterized in that: The device comprises: An acquisition module, used to acquire a query statement input for monitoring a target system; A parsing module, used to parse the query statement using a preset statement parsing model to obtain key information contained in the query statement; A first generating module, used to generate a query record name using the key information according to a preset naming rule; A second generating module, used for generating a query record rule based on the query record name and the query statement; A monitoring module is used to monitor the data generated by the target system based on the query record rule.
8. The device according to claim 7, characterized in that The monitoring module comprises: A first generating unit, configured to generate a rule file in a preset format based on the query record rule; The monitoring unit is used to import the rule file into a preset data monitoring tool, and use the data monitoring tool to monitor the data generated by the target system according to the query record rule.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor is used to execute the computer program stored in the memory, and when the computer program is executed, the automated data monitoring method described in any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the automated data monitoring method described in any one of claims 1 to 6 is implemented.