Automated inspection and alarm method and system
By integrating the XXL-JOB scheduled task tool and ORM framework into the Java program, an SQL data table of inspection points is generated to achieve automated inspections, solving the problems of low efficiency and low accuracy of inspection alarms in the banking system and improving inspection speed and accuracy.
Patent Information
- Application Number
- CN202211030763.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-26
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2042-08-26
AI Technical Summary
The inspection and alarm of the banking system are inefficient and not very accurate. Manual inspections are prone to omissions and consume a lot of manpower and material resources. The alarms of the third-party monitoring system are not timely, complete, and accurate.
Adopting an automated inspection method, the XXL-JOB scheduled task tool or a custom Java internal scheduled task generates an SQL data table for the inspection points, and uses the ORM framework to query the data source. Combined with cron expressions, 24-hour intelligent inspection is achieved, and SQL statements and the ORM framework are used to store and query data. After analyzing the results, the Java program prints them to the log or sends an alarm.
It improves the speed and accuracy of inspections, reduces errors, and realizes automated and efficient inspection alarms.
Smart Images

Figure CN115309748B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of monitoring and operation and maintenance technology, and in particular to an automated inspection and alarm method and system. Background Art
[0002] A bank is a financial institution established in accordance with the law to conduct monetary and credit business. Since each bank has a large amount of data that requires strict confidentiality measures, in order to ensure the security of bank data, it is necessary to conduct real-time inspections and alarms on the bank system. For example, manual inspections are used to inspect the database, which requires setting up multiple inspection points in the bank system. If the inspection points are too many and complicated, manual inspections may miss some inspection points, and manual inspections require a lot of manpower and material resources. Alternatively, some banks can also use third-party monitoring systems for inspections and alarms, but third-party monitoring systems have problems such as untimely, incomplete, inaccurate alarms and inflexible display of alarm information, which is not conducive to timely detection and handling of problems and faults in the bank system. In summary, the existing technology has the problems of low inspection and alarm efficiency and low accuracy. Summary of the Invention
[0003] The present invention provides an automated patrol inspection alarm method and system, which solves the technical problems of low efficiency and low accuracy of patrol inspection alarms in the prior art.
[0004] The basic solution provided by the present invention is: an automated inspection and alarm method, comprising:
[0005] S1. Generate the SQL data table that needs to configure the inspection points;
[0006] S2. Integrate XXL-JOB scheduled task tool into Java program or customize Java internal scheduled tasks;
[0007] S3. Use the XXL-JOB scheduled task tool or a custom Java internal scheduled task to store the SQL data tables that need to be inspected into the inspection point table;
[0008] S4. Execute the data in the inspection point table in the Java program to obtain the operation data, use the ORM framework to query the data source corresponding to the operation data for the data that needs to be inspected, and obtain the query results;
[0009] S5. Analyze and compare the query results with the expected results, and use a Java program to print the analysis and comparison results to a log.
[0010] The working principle and advantages of the present invention are: after generating the SQL data table that needs to configure the inspection point, integrating the XXL-JOB scheduled task tool or custom Java internal scheduled task into the Java program, the SQL data table that needs to be inspected is stored in the inspection point table through the XXL-JOB scheduled task tool or custom Java internal scheduled task, and there is no need for manual or third party to store the SQL data table that needs to be inspected into the inspection point table. At the same time, the data in the inspection point table is executed in the Java program to obtain the running data, and the ORM framework is used to query the data source corresponding to the running data for the data that needs to be inspected. Compared with manual inspection, the inspection and alarm process of this solution is automatically carried out, which can not only improve the inspection speed, but also reduce the inspection error, thereby improving the inspection and alarm efficiency and accuracy.
[0011] The patrol inspection alarm process of the present invention is automatically carried out, which can not only improve the speed of patrol inspection, but also reduce the error of patrol inspection, and solve the technical problems of low efficiency and low accuracy of patrol inspection alarm in the prior art.
[0012] Furthermore, in S3, cron expressions are configured according to business characteristics to perform intelligent program inspections.
[0013] The beneficial effect is that according to business characteristics, 24-hour program intelligent inspection can be realized by configuring cron expressions, thereby improving the efficiency of inspection.
[0014] Furthermore, in S3, the xxl-job-admin graphical interface provided by XXL-JOB is used to call and execute the completed xxl-job program, and the SQL data table that needs to be inspected is passed into the declared method as an execution parameter, and is stored in the same execute_sql field in the inspection point table through the insert statement of the SQL statement.
[0015] The beneficial effect is that through the insert statement of the SQL data table and the execute_sql in the inspection point table, the inspected SQL data table can be accurately stored in the inspection point table.
[0016] Furthermore, in S4, according to the inspection SQL statement and cron expression configured in S3, xxl-job finds the inspection xxl-job program configured in the code, and queries the value in the execute_sql field of the inspection data table to be executed and the data_source data source through the SELECT statement of the SQL statement. After obtaining the data, the ORM framework is used to query the corresponding data source for the data that needs to be inspected.
[0017] The beneficial effect is that inspection can be achieved more accurately through the SELECT statement, execute_sql field and ORM framework of the SQL statement.
[0018] Furthermore, in S5, the analysis and comparison results are sent to the alarm recipient via a third-party communication tool API or email.
[0019] The beneficial effect is that the alarm receiver can understand the analysis and comparison results in a timely manner so as to make manual adjustments to the inspection process.
[0020] Based on the above disclosed automated inspection and alarm method, the present invention further provides an automated inspection and alarm system, comprising:
[0021] A generation module, the generation module is used to generate an SQL data table for configuring inspection points;
[0022] Integration module, which is used to integrate XXL-JOB scheduled task tool or customize Java internal scheduled tasks in Java programs;
[0023] The warehousing module is used to store the SQL data tables that need to be inspected into the inspection point table through the XXL-JOB scheduled task tool or a custom Java internal scheduled task;
[0024] The running module is used to execute the data in the inspection point table in the Java program to obtain the running data, use the ORM framework to query the data source corresponding to the running data for the data that needs to be inspected, and obtain the query results;
[0025] The analysis module is used to analyze and compare the query results with the expected results, and print the analysis and comparison results to the log using a Java program.
[0026] The working principle and advantages of the present invention are: after generating the SQL data table that needs to configure the inspection point, integrating the XXL-JOB scheduled task tool or custom Java internal scheduled task into the Java program, the SQL data table that needs to be inspected is stored in the inspection point table through the XXL-JOB scheduled task tool or custom Java internal scheduled task, and there is no need for manual or third party to store the SQL data table that needs to be inspected into the inspection point table. At the same time, the data in the inspection point table is executed in the Java program to obtain the running data, and the ORM framework is used to query the data source corresponding to the running data for the data that needs to be inspected. Compared with manual inspection, it can not only improve the inspection speed, but also reduce the inspection error, thereby improving the inspection alarm efficiency and accuracy.
[0027] Furthermore, the storage module is also used to call and execute the completed xxl-job program through the xxl-job-admin graphical interface provided by XXL-JOB, pass the SQL data table that needs to be inspected as an execution parameter into the declared method, and store it in the same execute_sql field in the inspection point table through the insert statement of the SQL statement.
[0028] Furthermore, the running module is also used to find the inspection xxl-job program configured in the code through xxl-job according to the inspection SQL statement and cron expression, and query the value in the execute_sql field of the inspection data table to be executed and the data_source data source through the SELECT statement of the SQL statement. After obtaining the data, the ORM framework is used to query the corresponding data source for the data that needs to be inspected.
[0029] The beneficial effect is that through the insert statement of the SQL data table and the execute_sql in the inspection point table, the inspection SQL data table can be accurately stored in the inspection point table. At the same time, through the SELECT statement, execute_sql field and ORM framework of the SQL statement, the inspection can be implemented more accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 This is a system structure block diagram of an embodiment of an automated inspection and alarm system of the present invention. DETAILED DESCRIPTION
[0031] The following is a further detailed description through specific implementation methods:
[0032] Example 1
[0033] The embodiment is basically as shown in the attached Figure 1 As shown, an automatic inspection and alarm system includes:
[0034] A generation module, the generation module is used to generate an SQL data table for configuring inspection points;
[0035] Integration module, which is used to integrate XXL-JOB scheduled task tool or customize Java internal scheduled tasks in Java programs;
[0036] The warehousing module is used to store the SQL data tables that need to be inspected into the inspection point table through the XXL-JOB scheduled task tool or a custom Java internal scheduled task;
[0037] The running module is used to execute the data in the inspection point table in the Java program to obtain the running data, use the ORM framework to query the data source corresponding to the running data for the data that needs to be inspected, and obtain the query results;
[0038] The analysis module is used to analyze and compare the query results with the expected results, and print the analysis and comparison results to the log using a Java program.
[0039] The specific implementation process is as follows: S1. The generation module generates the SQL data table that needs to configure the inspection points. S2. The integration module integrates the XXL-JOB scheduled task tool or the custom Java internal scheduled task in the Java program. S3. The warehousing module stores the SQL data table that needs to be inspected into the inspection point table through the XXL-JOB scheduled task tool or the custom Java internal scheduled task; in this embodiment, the warehousing module configures the cron expression according to the business characteristics to perform intelligent program inspection, realizes 24-hour intelligent program inspection, and improves the efficiency of inspection. At the same time, the warehousing module calls and executes the completed xxl-job program through the xxl-job-admin graphical interface provided by XXL-JOB, passes the SQL data table that needs to be inspected as the execution parameter into the declared method, and stores it into the same execute_sql field in the inspection point table through the insert statement of the SQL statement. S4. The running module executes the data in the inspection point table in the Java program to obtain the running data, and uses the ORM framework to query the data source corresponding to the running data for the data that needs to be inspected to obtain the query results. The running data includes data_source (data source), title (inspection point name), and execute_sql (sql query statement); the corresponding data source here refers to the configured database name, and you can also use a self-selected method to use a variety of open source Java-supported persistence layer frameworks on the market to execute the queried sql query statement; in this embodiment, the running module can also find the inspection xxl-job program configured in the code according to the inspection SQL statement and cron expression configured by the warehousing module in S3, and use the SELECT statement of the SQL statement to query the value in the execute_sql field of the inspection data table that needs to be executed and the data_source data source. After obtaining the data, use the ORM framework to query the corresponding data source for the data that needs to be inspected. S5. The analysis module analyzes and compares the query results with the expected results, and then uses the Java program to print the analysis and comparison results to the log; here, the main analysis and comparison is the expected results (manual) and the results of executing the SQL query (query results). It is necessary to manually combine the SQL results obtained by execution to determine whether the inspection results meet expectations. What is printed is the result of executing execute_sql (SQL query statement).
[0040] Example: Insert the query SQL statement that needs to be inspected into the database table that needs to be inspected, and configure the automatic inspection SQL statement. First, insert and execute the SQL statement through xxl-job. The background uses Java program code to parse the fixed string {"id":"","fieldName":"","operationType":"","value":""} in Json format and parse it into Json data format.
[0041] Field Description: Id, the value can be empty. If it is not empty, the operation is performed according to the operationType numeric type; fieldName, the database inspection table field that needs to be operated, the value is changed according to the input field, where the numeric type passed by the operationType is agreed upon: 0 is skipped - when the id is not empty, the data is updated through the SQL statement, when it is empty, a new value is added, 1 is append start - the value inserted into the database is appended, 2 is adding, 3 is adding end, 4 is delete, where the append type operation is XXL-Job to solve the xxl-job parameter character limit, xxl-job is a third-party open source software; Value, the value to be added or updated.
[0042] Then, before the XXL-JOB scheduled task scheduler Java program performs automated inspections, you need to add the content in the data table according to the format. The following are the main contents:
[0043]
[0044]
[0045] After completing the above steps, we then use XXL-job to configure a scheduled task. XXL-job schedules the Java inspection program to begin the inspection. The Java program uses the open-source ORM database software to query the partrol table, retrieve all SQL statements that need to be inspected, serialize the results, and print them to a log file using JSON. Finally, the Java program uses the (java.mail) jar integrated with the Maven tool to send emails or integrate the push notification API provided by DingTalk.
[0046] In this embodiment, after generating the SQL data table that needs to configure the inspection point, the XXL-JOB scheduled task tool or the custom Java internal scheduled task is integrated into the Java program, and the SQL data table that needs to be inspected is stored in the inspection point table through the XXL-JOB scheduled task tool or the custom Java internal scheduled task. There is no need for manual or third-party to store the SQL data table that needs to be inspected into the inspection point table. At the same time, the data in the inspection point table is executed in the Java program to obtain the running data, and the ORM framework is used to query the data source corresponding to the running data for the data that needs to be inspected. Compared with manual inspection, the inspection and alarm process of this solution is automatically carried out, which can not only improve the speed of inspection, but also reduce the error of inspection, thereby improving the efficiency and accuracy of inspection and alarm.
[0047] Example 2
[0048] The only difference from Example 1 is that in S5, the analysis module sends the analysis and comparison results to the alarm recipient via a third-party communication tool API or email, so that the alarm recipient can understand the analysis and comparison results in a timely manner and make manual adjustments to the inspection process.
[0049] The above is only an embodiment of the present invention. Common knowledge such as the known specific structures and characteristics in the scheme is not described in detail here. Ordinary technicians in the field are aware of all common technical knowledge in the technical field of the invention before the application date or priority date, can obtain all existing technologies in the field, and have the ability to apply conventional experimental means before that date. Ordinary technicians in the field can improve and implement this scheme in combination with their own abilities under the inspiration given by this application. Some typical known structures or known methods should not become obstacles for ordinary technicians in the field to implement this application. It should be pointed out that for those skilled in the art, without departing from the structure of the present invention, several variations and improvements can be made, which should also be regarded as the scope of protection of the present invention. These will not affect the effect of the implementation of the present invention and the practicality of the patent. The scope of protection required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.
Claims
1. An automated inspection and alarm method, characterized in that: include: S1. Generate the SQL data table that needs to configure the inspection points; S2. Integrate XXL-JOB scheduled task tool into Java program or customize Java internal scheduled tasks; S3. Use the XXL-JOB scheduled task tool or a custom Java internal scheduled task to store the SQL data table that needs to be inspected into the inspection point table. Configure cron expressions based on business characteristics to perform intelligent program inspections. Use the xxl-job-admin graphical interface provided by XXL-JOB to call and execute the completed xxl-job program, pass the SQL data table that needs to be inspected as an execution parameter to the declared method, and use the insert statement of the SQL statement to store it in the same execute_sql field in the inspection point table. S4. Execute the data in the inspection point table in the Java program to obtain the running data. Use the ORM framework to query the data source corresponding to the running data for the data that needs to be inspected and obtain the query results. Based on the inspection SQL statement and cron expression configured in S3, xxl-job finds the inspection xxl-job program configured in the code. Use the SELECT statement of the SQL statement to query the value in the execute_sql field of the inspection data table to be executed and the data_source data source. After obtaining the data, use the ORM framework to query the corresponding data source for the data that needs to be inspected. S5. Analyze and compare the query results with the expected results, and use a Java program to print the analysis and comparison results to a log.
2. The automated inspection and alarm method according to claim 1, wherein: In S5, the analysis and comparison results are sent to the alarm recipient via a third-party communication tool API or email.
3. An automated inspection and alarm system, characterized in that: include: A generation module, the generation module is used to generate an SQL data table for configuring inspection points; Integration module, which is used to integrate XXL-JOB scheduled task tool or customize Java internal scheduled tasks in Java programs; The warehousing module is used to store the SQL data table that needs to be inspected into the inspection point table through the XXL-JOB scheduled task tool or the custom Java internal scheduled task; call and execute the completed xxl-job program through the xxl-job-admin graphical interface provided by XXL-JOB, pass the SQL data table that needs to be inspected as the execution parameter into the declared method, and store it into the same execute_sql field in the inspection point table through the insert statement of the SQL statement; The running module is used to execute the data in the inspection point table in the Java program to obtain the running data, use the ORM framework to query the data source corresponding to the running data for the data that needs to be inspected, and obtain the query results. The running module is also used to find the inspection xxl-job program configured in the code through xxl-job according to the inspection SQL statement and cron expression, query the value in the execute_sql field of the inspection data table that needs to be executed and the data_source data source through the SELECT statement of the SQL statement, and use the ORM framework to query the data source for the data that needs to be inspected after obtaining the data; The analysis module is used to analyze and compare the query results with the expected results, and print the analysis and comparison results to the log using a Java program.
Citation Information
Patent Citations
Knowledge base-based server automatic inspection system and method
CN110019203A
On-line intelligent inspection system and method for transformer substation
WO2022095616A1