A flexible configuration method, device, equipment and medium for early warning rules
By generating data table knowledge graphs and visual business element warning models, users can configure warning rules by themselves, solving the problem of high development costs in the existing technology and realizing flexible and low-cost warning rules configuration and application.
Patent Information
- Application Number
- CN202510046159.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-01-13
AI Technical Summary
In the prior art, after users raise early warning requirements, developers need to carry out customized development, resulting in excessive development costs and frequent changes in users' early warning requirements, further increasing development costs.
By generating a data table knowledge graph based on the metadata of the application system business database, a visual business element warning model is generated, and users are allowed to configure warning rules based on the model to realize monitoring and early warning of the application system.
Without the intervention of developers, users can configure early warning rules by themselves, which reduces the development costs of business intelligent supervision and improves the flexibility and efficiency of early warning rules.
Smart Images

Figure CN119474060B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of database operation and maintenance technology, and in particular to a flexible configuration method, device, equipment and medium for early warning rules. Background Art
[0002] IT systems are moving from the information age to the digital age and the AI age. During the development of this IT technology, IT systems are becoming more and more intelligent. While users are experiencing intelligence, they will also raise early warning demands for the actual operation of the business to meet the intelligent supervision of the business.
[0003] After users put forward early warning requirements, developers will customize and develop according to the users' requirements, and write corresponding early warning programs and rules, which leads to excessively high development costs. Moreover, users' early warning requirements are not fixed, and the frequent changes in early warning requirements further increase the development costs. Summary of the invention
[0004] The present invention provides a method, device, equipment and medium for flexibly configuring early warning rules to reduce the development cost of business intelligent supervision.
[0005] According to one aspect of the present invention, a flexible configuration method for early warning rules is provided, comprising:
[0006] Generate a data table knowledge graph based on the metadata of the application system business database;
[0007] Generate a visualized business element warning model according to the data table knowledge graph, and obtain warning rules configured by the user based on the business element warning model;
[0008] The application system is monitored and warned according to the warning rules.
[0009] According to another aspect of the present invention, a flexible configuration device for early warning rules is provided, comprising:
[0010] A graph generation module is used to generate a data table knowledge graph based on the metadata of the application system business database;
[0011] A rule configuration module, used to generate a visual business element warning model according to the data table knowledge graph, and obtain the warning rules configured by the user based on the business element warning model;
[0012] The detection and early warning module is used to monitor and warn the application system according to the early warning rules.
[0013] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the flexible configuration method of the early warning rule according to any embodiment of the present invention.
[0014] According to another aspect of the present invention, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the flexible configuration method of warning rules described in any embodiment of the present invention.
[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the flexible configuration method of early warning rules described in any embodiment of the present invention when executed.
[0016] The embodiment of the present invention performs intelligent identification on the business database, automatically establishes an early warning template for business elements, and provides users with flexible rule configuration to complete business early warning. The entire process does not require the intervention of developers, thereby reducing the development cost of business intelligent supervision.
[0017] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 is a flow chart of a flexible configuration method of early warning rules provided according to an embodiment of the present invention;
[0020] Figure 2 is a flow chart of a flexible configuration method of early warning rules provided according to another embodiment of the present invention;
[0021] Figure 3 is a structural schematic diagram of a flexible configuration device for early warning rules provided according to another embodiment of the present invention;
[0022] Figure 4It is a schematic diagram of the structure of an electronic device implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first", "second", etc. in the specification of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] Figure 1 This is a flowchart of a flexible configuration method for early warning rules provided by an embodiment of the present invention. This embodiment can be applied to the situation where the user does not know the specific content and structure of the business database, and can configure early warning rules that meet their early warning needs according to the business element early warning model without the assistance of developers. This method can be executed by a flexible configuration device for early warning rules, which can be implemented in the form of hardware and / or software. The device can be configured in an electronic device with corresponding data processing capabilities, such as a background server of an application system. Figure 1 As shown, the method includes:
[0026] S110. Generate a data table knowledge graph based on the metadata of the application system business database.
[0027] S120. Generate a visualized business element warning model according to the data table knowledge graph, and obtain warning rules configured by the user based on the business element warning model.
[0028] S130: Monitor and warn the application system according to the warning rules.
[0029] Specifically, create a business element container (bdb) and a business database metadata container (mdb) in the application. Perform a full scan of the business database of the application system to obtain metadata such as table name, field name, field type, description, primary key, index, primary and foreign key relationship of each data table in the business database, and put it into the metadata container. Perform a series of sorting and summarizing of the metadata in the metadata container to obtain a data table knowledge graph with data tables in the business database as nodes, and put the data table knowledge graph into the business element container.
[0030] After the data table knowledge graph is collected, a visual business element early warning model is generated based on the graph content of the data table knowledge graph. Users usually do not participate in the development of the business database, and the business database is a black box for users. When users have new early warning requirements, they can only seek developers to implement the early warning requirements. The present invention obtains a visual business element early warning model by sorting the metadata of the business database. At this time, the business database is no longer a black box for users. Through the business element early warning model and configuration tools provided by the system, users can configure corresponding early warning rules in the system based on their own early warning needs without having to seek help from developers, and the development cost of intelligent supervision can be effectively reduced.
[0031] The system monitors and warns of data changes and access behaviors in the business database based on user-configured warning rules and data table knowledge graphs.
[0032] The embodiment of the present invention performs intelligent identification on the business database, automatically establishes an early warning template for business elements, and provides users with flexible rule configuration to complete business early warning. The entire process does not require the intervention of developers, thereby reducing the development cost of business intelligent supervision.
[0033] Figure 2 This is a flowchart of a flexible configuration method of early warning rules provided by another embodiment of the present invention. This embodiment is optimized and improved on the basis of the above embodiment. Figure 2 As shown, the method includes:
[0034] S210. Classify and organize the metadata of the application system business database, and establish a data table knowledge graph including primary data tables and secondary data tables.
[0035] S220. Obtain the Chinese name of each data table in the data table knowledge graph, and add the corresponding Chinese name to the data table knowledge graph.
[0036] S230: grading the data tables in the data table knowledge graph.
[0037] Specifically, first organize the relationships between data tables according to metadata, determine the primary data table and auxiliary data table, and then establish a preliminary data table knowledge graph based on the primary and secondary relationships between the two.
[0038] At this time, the table names in the graph are all original English table names, which is not conducive to zero-based configuration rules for subsequent users. Therefore, it is necessary to analyze the files of the application system to determine the Chinese names of each data table and add them to the knowledge graph to obtain a usable data table knowledge graph.
[0039] After adding the Chinese name, it is necessary to further classify the data tables in the data table knowledge graph, and classify the data tables in the data table knowledge graph into three categories, namely atomic tables, derivative tables and calculation tables. The atomic table is the most basic form of data storage in the data warehouse, containing the most original and unprocessed information. The derivative table is generated based on one or more atomic tables through simple aggregation, screening and other operations, and is mainly used to optimize query performance or provide specific data views. The calculation table is generated based on the atomic table through complex mathematical calculations or statistical models, and aims to provide in-depth insights for business decisions. The main purpose of classification is to further organize and classify the data tables in the data table knowledge graph to facilitate subsequent model generation and user rule configuration.
[0040] Optionally, the metadata of the application system business database is classified and sorted to establish a data table knowledge graph including a main data table and a subsidiary data table, including:
[0041] Perform a full scan on the application system business database to obtain table information of each data table in the application system business database; the table information includes the primary and foreign key relationships of the data tables;
[0042] Classifying the data tables in the application system business database into primary data tables and secondary data tables according to the table information;
[0043] A data table knowledge graph is established based on the primary and secondary relationships between the primary data table and the secondary data table.
[0044] Specifically, collect the primary and foreign key relationships of the table names, as well as the weak associations between the primary key and index fields of the table in other tables. Based on these relationships, divide the data tables into primary and secondary data tables, and establish a knowledge graph relationship between the primary and secondary data tables. Since this relationship penetrates several levels, the primary data table as the root node is directly placed in the business element container and removed from the metadata container. For the remaining data tables in the metadata container, create a virtual root node in the business element container and associate the remaining data tables with the virtual node.
[0045] Optionally, for each data table in the data table knowledge graph, a presentation layer code corresponding to the data table and an http request path corresponding to the presentation layer code are determined according to an application system mapper file;
[0046] Determine the http request address corresponding to the data table according to the front-end engineering code and the front-end code routing list;
[0047] If the http request path is consistent with the http request address, a menu map of the route is obtained by matching the http request address in the database menu table;
[0048] The name of the bottom-level node in the menu map is determined as the Chinese name of the data table.
[0049] Specifically, for each data table of the business element container, scan the mapper file (mapper.xml) of the application to determine the Java entity class corresponding to the table, determine the corresponding display layer code through the Java entity class, and obtain the http request path corresponding to the table name through the display layer code. At the same time, all front-end engineering codes are obtained through git, and the front-end engineering codes are automatically scanned to obtain the front-end code routing list, and the http request address corresponding to the table name is found according to the routing list. If the two are consistent, match the routing address in the database menu table, obtain the menu map of the route, and set the name of the bottom node corresponding to the menu map to the Chinese name corresponding to the table name. Since a table may correspond to multiple addresses, sometimes there will be multiple Chinese names. In this case, the multiple Chinese names are split into Chinese keywords, and the same or high-frequency keywords are obtained and spliced as the final Chinese name of the table.
[0050] In addition, you can also obtain the node type corresponding to the data table through the menu map. If it is a primary data node, obtain the node name of its parent node in the map and set the name as the module name corresponding to the data table. If it is not a primary data node and its parent node in the business element container is a virtual node, you need to search again in the code corresponding to the routing list to see if there is a data form submission for this node. If so, you need to upgrade this node to a primary data node.
[0051] Optionally, grading the data tables in the data table knowledge graph according to the tables and fields includes:
[0052] Define the main data table in the data table knowledge graph as an atomic table;
[0053] Define the auxiliary data table whose table name is not report data in the data table knowledge graph as a derived table;
[0054] Define the auxiliary data table whose table name is report data in the data table knowledge graph as a calculation table;
[0055] Classify the fields according to the data fields of each data table; the field definition results include description fields and variable fields;
[0056] Correspondingly, the business element warning model includes the table content of each data table in the data table knowledge graph and the corresponding configurable warning behavior; the configurable warning behavior corresponding to the atomic table includes addition, deletion and modification, the configurable warning behavior corresponding to the derivative table includes addition, deletion and modification of the atomic table, and the configurable warning behavior corresponding to the calculation table includes timed triggering.
[0057] Specifically, the data tables and fields in the knowledge graph are graded. If the table is a primary data table, it is defined as an atomic table. If the table is a secondary data table, it is temporarily defined as a derived table. At the same time, it is inferred based on the name of the secondary data table and the table name to determine whether the current table is report data. If it meets the requirements, it will be further defined as a calculation table. The data fields of each table are obtained, and the indicators are graded according to the type of the field. If the table type is vachar, string, etc., the field is defined as a description. If it is a numeric type such as int, float, double, or a time type, it is defined as a variable.
[0058] In addition, since there are virtual nodes in the business element container, in addition to the calculation table, these nodes are configuration tables and log tables in the actual process. The calculation table is upgraded to the root node, and the others are directly removed from the business element container to complete the pruning optimization of the knowledge graph.
[0059] After the knowledge graph is collected, the business element warning model is constructed according to the node classification of the knowledge graph. The entire model is shown in Table 1 below:
[0060] Table 1
[0061]
[0062] The user manually configures the warning rules based on the above model, and then the system iterates the entire knowledge graph based on it, generates warning model indicators for each knowledge graph node, and establishes an AMI container for storage.
[0063] S240. Generate a visualized business element warning model according to the data table knowledge graph, and obtain warning rules configured by the user based on the business element warning model.
[0064] S250, determining a tracking method that matches the optional warning behavior of the data table; the tracking method includes operation tracking and time tracking; and monitoring and warning the optional warning behavior corresponding to the data table according to the tracking method.
[0065] Specifically, tracking is performed based on the data table type of the knowledge graph, which is divided into operation tracking and time tracking. First, the tracking parameter extraction is determined according to the behavior type corresponding to the data table, and then the tracking is implanted:
[0066] Operation tracking: For atomic tables, operation tracking is mainly used. In the application, an interceptor is added and intercepted according to the address of the display layer corresponding to the entity class of the atomic table. The main action of adding, deleting and modifying the atomic table is intercepted. When the atomic table operation matches the address of the warning behavior, the metadata of the warning is determined according to the user's request data object. If it is a deletion, the data object needs to be enriched according to the requested data object ID; at the same time, according to the main data object, all data indicators of the derived table are counted, encapsulated into the data object, and pushed to the warning scheduler.
[0067] Time tracking: According to the periodic statistical rules configured by the user for the calculation table warning model, data statistics are automatically performed according to the warning model rules, and the data is encapsulated in the data object and pushed to the warning scheduler. If the calculation table has a corresponding timer scheduling mechanism, the original timer scheduling is added with interceptor data tracking, and the regularly counted data is encapsulated in the data object and pushed to the warning scheduler.
[0068] Early warning scheduling: After the early warning scheduling receives the data encapsulation object, it obtains the early warning rules configured by the user for the early warning model according to the early warning object, measures the early warning object data, and generates an early warning alarm if it meets the early warning rules.
[0069] The embodiment of the present invention improves the timeliness of early warning by setting matching tracking methods for different early warning behaviors.
[0070] Figure 3 A schematic diagram of a flexible configuration device for early warning rules provided by another embodiment of the present invention. Figure 3 As shown, the device comprises:
[0071] A graph generation module 310 is used to generate a data table knowledge graph based on the metadata of the application system business database;
[0072] A rule configuration module 320 is used to generate a visual business element warning model according to the data table knowledge graph, and obtain the warning rules configured by the user based on the business element warning model;
[0073] The detection and warning module 330 is used to monitor and warn the application system according to the warning rules.
[0074] The flexible configuration device for early warning rules provided in the embodiment of the present invention can execute the flexible configuration method for early warning rules provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0075] Optionally, the graph generation module includes:
[0076] A graph generation unit is used to classify and organize the metadata of the application system business database and establish a data table knowledge graph including a main data table and an auxiliary data table;
[0077] A Chinese annotation unit, used to obtain the Chinese name of each data table in the data table knowledge graph, and add the corresponding Chinese name to the data table knowledge graph;
[0078] A graph grading unit is used for grading the said according to the said tables and fields.
[0079] Optionally, the graph generation unit is specifically used to: perform a full scan on the application system business database to obtain table information of each data table in the application system business database; the table information includes the primary and foreign key relationships of the data tables;
[0080] Classifying the data tables in the application system business database into primary data tables and secondary data tables according to the table information;
[0081] Establish a data table knowledge graph based on the primary and secondary relationships between the primary and secondary data tables
[0082] Optionally, a Chinese annotation unit is specifically used to: for each data table in the data table knowledge graph, determine the presentation layer code corresponding to the data table and the http request path corresponding to the presentation layer code according to the application system mapper file;
[0083] Determine the http request address corresponding to the data table according to the front-end engineering code and the front-end code routing list;
[0084] If the http request path is consistent with the http request address, a menu map of the route is obtained by matching the http request address in the database menu table;
[0085] The name of the bottom-level node in the menu map is determined as the Chinese name of the data table.
[0086] Optionally, a graph grading unit is specifically used to: define a main data table in the data table knowledge graph as an atomic table;
[0087] Define the auxiliary data table whose table name is not report data in the data table knowledge graph as a derived table;
[0088] Define the auxiliary data table whose table name is report data in the data table knowledge graph as a calculation table;
[0089] Classify the fields according to the data fields of each data table; the field definition results include description fields and variable fields;
[0090] Correspondingly, the business element warning model includes the table content of each data table in the data table knowledge graph and the corresponding configurable warning behavior; the configurable warning behavior corresponding to the atomic table includes addition, deletion and modification, the configurable warning behavior corresponding to the derivative table includes addition, deletion and modification of the atomic table, and the configurable warning behavior corresponding to the calculation table includes timed triggering.
[0091] Optionally, the detection and early warning module 330 includes:
[0092] A tracking point matching unit, used to determine a tracking point mode that matches the optional warning behavior of the data table; the tracking point mode includes operation tracking point and time tracking point;
[0093] The detection and early warning unit is used to monitor and warn the optional early warning behavior corresponding to the data table according to the tracking method.
[0094] The flexible configuration device of the warning rules further described can also execute the flexible configuration method of the warning rules provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0095] Figure 4 A schematic diagram of an electronic device 40 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0096] like Figure 4As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0097] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0098] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as a flexible configuration method for early warning rules.
[0099] In some embodiments, the flexible configuration method of the early warning rules can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the flexible configuration method of the early warning rules described above can be performed. Alternatively, in other embodiments, the processor 41 can be configured to execute the flexible configuration method of the early warning rules by any other appropriate means (for example, by means of firmware).
[0100] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0101] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0102] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0103] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0104] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0105] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0106] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0107] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A flexible configuration method for early warning rules, characterized in that: The method comprises: Generate a data table knowledge graph based on the metadata of the application system business database; Generate a visualized business element warning model according to the data table knowledge graph, and obtain the warning rules configured by the user based on the business element warning model; wherein the user configures the corresponding warning rules in the system based on his own warning needs through the business element warning model and configuration tool; Monitor and warn the application system according to the warning rules; The step of generating a data table knowledge graph based on the metadata of the application system business database includes: Classify and organize the metadata of the application system business database, and establish a data table knowledge graph containing primary data tables and secondary data tables; Obtain the Chinese name of each data table in the data table knowledge graph, and add the corresponding Chinese name to the data table knowledge graph; Classifying the data tables in the data table knowledge graph according to the tables and fields; The step of classifying and arranging the metadata of the application system business database and establishing a data table knowledge graph including a main data table and an auxiliary data table includes: Perform a full scan on the application system business database to obtain table information of each data table in the application system business database; the table information includes the primary and foreign key relationships of the data table, and the weak association relationships between the primary key and index fields of the data table in other data tables; Classifying the data tables in the application system business database into primary data tables and secondary data tables according to the table information; Establish a data table knowledge graph based on the primary and secondary relationships between the primary data table and the secondary data table; Wherein, the obtaining of the Chinese name of each data table in the data table knowledge graph includes: For each data table in the data table knowledge graph, determining the presentation layer code corresponding to the data table and the http request path corresponding to the presentation layer code according to the application system mapper file; Determine the http request address corresponding to the data table according to the front-end engineering code and the front-end code routing list; If the http request path is consistent with the http request address, a menu map of the route is obtained by matching the http request address in the database menu table; Determine the name of the bottom-level node in the menu map as the Chinese name of the data table; Wherein, grading the data tables in the data table knowledge graph according to the tables and fields includes: Define the main data table in the data table knowledge graph as an atomic table; Define the auxiliary data table whose table name is not report data in the data table knowledge graph as a derived table; Define the auxiliary data table whose table name is report data in the data table knowledge graph as a calculation table; Classify the fields according to the data fields of each data table; the field definition results include description fields and variable fields; Correspondingly, the business element warning model includes the table content of each data table in the data table knowledge graph and the corresponding configurable warning behavior; the configurable warning behavior corresponding to the atomic table includes addition, deletion and modification, the configurable warning behavior corresponding to the derivative table includes addition, deletion and modification of the atomic table, and the configurable warning behavior corresponding to the calculation table includes timed triggering.
2. The method according to claim 1, characterized in that The monitoring and early warning of the application system according to the early warning rules includes: Determine a tracking method that matches the optional warning behavior of the data table; the tracking method includes operation tracking and time tracking; The optional warning behavior corresponding to the data table is monitored and warned according to the tracking method.
3. A flexible configuration device for early warning rules, characterized in that: The device comprises: A graph generation module is used to generate a data table knowledge graph based on the metadata of the application system business database; A rule configuration module, used to generate a visual business element warning model according to the data table knowledge graph, and obtain the warning rules configured by the user based on the business element warning model; wherein the user configures the corresponding warning rules in the system based on his own warning needs through the business element warning model and configuration tool; A detection and warning module is used to monitor and warn the application system according to the warning rules; Wherein, the graph generation module includes: A graph generation unit is used to classify and organize the metadata of the application system business database and establish a data table knowledge graph including a main data table and an auxiliary data table; A Chinese annotation unit, used to obtain the Chinese name of each data table in the data table knowledge graph, and add the corresponding Chinese name to the data table knowledge graph; A graph grading unit, used for grading the data tables in the data table knowledge graph according to the tables and fields; The graph generation unit is specifically used to: perform a full scan on the application system business database to obtain table information of each data table in the application system business database; the table information includes the primary and foreign key relationships of the data table, and the weak association relationships between the primary key and index fields of the data table in other data tables; classify the data tables in the application system business database into primary data tables and secondary data tables according to the table information; establish a data table knowledge graph according to the primary and secondary relationships between the primary data tables and the secondary data tables; The Chinese annotation unit is specifically used for: for each data table in the data table knowledge graph, determining the display layer code corresponding to the data table and the http request path corresponding to the display layer code according to the application system mapper file; determining the http request address corresponding to the data table according to the front-end engineering code and the front-end code routing list; if the http request path and the http request address are consistent, matching the menu map of the route in the database menu table according to the http request address; determining the name of the bottom node in the menu map as the Chinese name of the data table; Among them, the graph grading unit is specifically used to: define the main data table in the data table knowledge graph as an atomic table; define the auxiliary data table in the data table knowledge graph whose table name is not report data as a derived table; define the auxiliary data table in the data table knowledge graph whose table name is report data as a calculation table; perform field grading according to the data fields of each data table; the field definition results include description fields and variable fields; accordingly, the business element warning model contains the table content of each data table in the data table knowledge graph and the corresponding configurable warning behavior; the configurable warning behavior corresponding to the atomic table includes addition, deletion and modification, the configurable warning behavior corresponding to the derivative table includes addition, deletion and modification of the atomic table, and the configurable warning behavior corresponding to the calculation table includes timed triggering.
4. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the flexible configuration method of early warning rules according to any one of claims 1-2.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the flexible configuration method of the early warning rules described in any one of claims 1-2 when executed.
Citation Information
Patent Citations
Alarm method and system based on dynamic configuration management caused by business rules, and storage medium
CN119229623A