WO2021027126A1 - Database monitoring method, apparatus, device and computer-readable storage medium - Google Patents

Database monitoring method, apparatus, device and computer-readable storage medium Download PDF

Info

Publication number
WO2021027126A1
WO2021027126A1 PCT/CN2019/117021 CN2019117021W WO2021027126A1 WO 2021027126 A1 WO2021027126 A1 WO 2021027126A1 CN 2019117021 W CN2019117021 W CN 2019117021W WO 2021027126 A1 WO2021027126 A1 WO 2021027126A1
Authority
WO
WIPO (PCT)
Prior art keywords
database
remote server
data
code
remote
Prior art date
Application number
PCT/CN2019/117021
Other languages
French (fr)
Chinese (zh)
Inventor
胡鹏强
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021027126A1 publication Critical patent/WO2021027126A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0727Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a storage system, e.g. in a DASD or network based storage system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Definitions

  • This application relates to the field of big data processing technology, and in particular to a database detection method, device, device, and non-volatile computer-readable storage medium.
  • Server database is a large-scale storage system that is currently used more. It has relatively high requirements for service availability, data reliability, performance, security, and scalability.
  • server database When using server database as a data storage tool, it is to ensure The integrity of the data or the stability of the system requires constant maintenance. In addition to the maintenance of the hardware of the device itself, this maintenance also includes the maintenance of the data. The maintenance of the data requires the staff to work according to the data. Logs are checked one by one. The generation of these work logs requires the database itself to record and realize, and remote control cannot be realized. This must be done locally in the database for maintenance and troubleshooting, which leads to the difficulty of maintenance.
  • the staff need to check and read the work log one by one, and the database maintenance of this kind of system is more difficult.
  • the data format may not always be converted to the same data format according to the standard. This makes the staff in the process of maintaining the database The inspection of the format has been increased, greatly increasing the difficulty of maintenance.
  • the main purpose of this application is to provide a database detection method, device, equipment, and computer-readable storage medium, which aims to solve the maintenance operations caused by the fact that the existing server maintenance platform does not support the storage of detection log files on remote servers Overly complex technical issues.
  • this application provides a database detection method, which is applied to data detection in a remote database, and the method includes the following steps:
  • the class object library is generated according to the operation request of the remote server, and the class object library is stored in the storage unit on the operating platform, wherein the class object library is used to control the remote operation of the remote server by the operating platform ,
  • the class object library contains remote server operation code, remote database operation code and file download code;
  • the corresponding remote database operation code is obtained from the class object library, and based on the remote database operation code, the database on the remote server Access to read the data in the database;
  • the file download code corresponding to the type of the remote server is retrieved to download the comparison result file from the remote server and save it on the operating platform through the file download code.
  • the step of generating a class object library according to an operation request of a remote server, and storing the class object library in a storage unit on an operating platform includes:
  • the access interface of the database corresponding to the access mode and the preset access execution code are called, and the parameters in the preset access execution code are modified according to the access interface to generate The remote server operation code;
  • the remote server operation code and the remote database operation code are stored in the class object library.
  • the corresponding remote database operation code is obtained from the class object library according to the type of the remote server and the communication protocol corresponding to the communication link, and based on The step of the remote database operation code accessing each database on the remote server to read data in the database includes:
  • the data is converted according to the conversion rule and stored in the data map respectively.
  • the data of each database read from the remote server is compared according to preset inspection rules to filter out abnormal data in the database, and generate data based on the abnormal data
  • the steps of comparing result files in log format include:
  • the data in the unified converted data map is compared and verified to obtain a first comparison result, and the first comparison result is that data is selected from the data based on the comparison verification Data whose format is inconsistent with the storage format;
  • a log file is generated according to the first comparison result and the second comparison result.
  • the type of the remote server is retrieved from the class object library through the operation platform.
  • the corresponding remote server operation code after the step of establishing a communication link between the operation platform and the remote server based on the remote server operation code, further includes:
  • all the operation codes corresponding to the remote server in the class object library are integrated and compiled to obtain a maintenance small program code of remote server data, and the maintenance small program code is used to obtain the remote server Compare and analyze the data in the database;
  • the maintenance applet code is uploaded to the remote server through the communication link and executed.
  • the calling the file download code corresponding to the type of the remote server to download the comparison result file from the remote server through the file download code and save it to the operation includes:
  • the database detection method further includes:
  • a table file for storing data of the database is generated, and the table file is embedded in the maintenance applet code and uploaded to the remote server, wherein the table
  • the data storage format of the file is consistent with the data storage format of the database.
  • the present application also provides a database detection device, which is applied to data detection in a remote server database, and the database detection device includes:
  • the object generation module is used to generate a class object library according to the operation request of the remote server, and store the class object library in a storage unit on the operating platform, where the class object library is used to control the operating platform to The remote operation of the remote server, the class object library contains remote server operation code, remote database operation code and file download code;
  • the communication module is used to receive the remote operation request and determine the type of the remote server to be accessed in the remote operation request, and retrieve the type corresponding to the remote server from the class object library through the operation platform Remote server operation code, based on the remote server operation code to establish a communication link between the operation platform and the remote server;
  • the data reading module is used to obtain the corresponding remote database operation code from the class object library according to the type of the remote server and the communication protocol corresponding to the communication link, and to perform data processing based on the remote database operation code
  • Each database on the remote server is accessed to read the data in the database;
  • the detection module is used to compare the data of each database read from the remote server according to preset inspection rules to filter out abnormal data in the database, and generate a log based on the abnormal data Format comparison result file, wherein the preset inspection rules include the storage format of the data in the database and the sensitive words in the data;
  • the download module is configured to retrieve the file download code corresponding to the type of the remote server to download the comparison result file from the remote server and save it to the operating platform through the file download code on.
  • the present application also provides a database detection device.
  • the database detection device includes a memory, a processor, and a database detection program stored in the memory and running on the processor. When the database detection program is executed by the processor, the steps of the database detection method described in any one of the above are implemented.
  • the present application also has a computer-readable storage medium with a database detection program stored on the computer-readable storage medium, and when the database detection program is executed by a processor, the above-mentioned Steps of database detection method.
  • This application realizes the access to the remote server and the detection of the corresponding remote database by setting up a class object library on the operating platform, and downloads the comparison result file obtained from the detection of the data in the remote database through the file download code
  • the detection results of the remote database have been stored on the operating platform, when users need to maintain and check the data of the remote database, they can directly read the comparison result file on the operating platform for reference.
  • the object library for controlling remote server access and remote database detection is stored on the operating platform Therefore, this application is equivalent to providing a unified control platform to manage multiple remote servers and remote databases.
  • FIG. 1 is a schematic flowchart of a first embodiment of a database detection method provided by this application
  • FIG. 2 is a schematic flowchart of a second embodiment of the database detection method provided by this application.
  • FIG. 3 is a schematic diagram of functional modules of an embodiment of a database detection device provided by this application.
  • FIG. 4 is a schematic diagram of the structure of the operation platform involved in the solution of the embodiment of the application.
  • FIG. 1 is a flowchart of a database detection method provided by an embodiment of the application.
  • the database detection method specifically includes the following steps:
  • Step S110 generating a class object library according to the operation request of the remote server, and storing the class object library in a storage unit on the operating platform;
  • the class object library is used to control the remote operation of the remote server by the operating platform, and the class object library contains remote server operation code, remote database operation code and file download code.
  • the class object library refers to a remote access code library containing the type of remote server, the correspondence between the communication interface and the control code.
  • the operation code is used to implement remote access and operation to the remote server, and it may be an access control code or a mapping file.
  • control code it can be a small program code specifically developed based on the corresponding remote server that integrates access and operation control.
  • the small program code is directly called on the platform The above execution can operate and read data on the database on the remote server.
  • mapping file When using a mapping file to achieve, specifically by first generating a remote operation class object channelExec on the server where the platform is located, using this object to establish a connection with the remote server that needs to be operated, and then calling the object of the established connection exeCommand method to execute the command of the remote server.
  • the operation code set in this step whether it is implemented by control code or mapping file, the effect of its execution is equivalent to executing the command on the remote server.
  • the result obtained by the execution will be a string
  • the form is returned to the platform.
  • the remotely operated objects and methods are part of the platform, so the platform encapsulates the method code.
  • Step S120 Receive a remote operation request, determine the type of remote server to be accessed in the remote operation request, and retrieve a remote server corresponding to the type of the remote server from the class object library through the operation platform Operation code, based on the remote server operation code to establish a communication link between the operation platform and the remote server;
  • the communication connection may be a wireless connection or a wired connection, which may be determined according to the actual connection relationship between the platform and the remote server.
  • connection established here is not only to realize the communication between the two, but also to realize The operation of the operating platform on the remote server, but the operation here is realized by means of code control.
  • Step S130 Obtain the corresponding remote database operation code from the class object library according to the type of the remote server and the communication protocol corresponding to the communication link, and perform an operation on the remote server based on the remote database operation code. To access each database of, and the data in the database has been read;
  • the database in the remote server is accessed through the access code formed according to the remote database operation code, and the data stored in the database is read.
  • you can select part of the data for reading by sampling It can also be read all, preferably, select partial read here.
  • the data after the data is read, it also includes the conversion of the read data, that is, the same conversion is performed on the data read in each database to form a data map, each of which is All data have the same format.
  • the conversion of data can be based on a data conversion rule, but when the normal data is converted according to the conversion rule, the final result obtained is in compliance with the inspection rule; and the data itself appears
  • the final data obtained cannot pass the inspection rules, but the unified conversion here can ensure the unity of the data.
  • it can be improved. Accuracy.
  • Step S140 Compare the data of each database read from the remote server according to preset inspection rules to filter out abnormal data in the database, and generate a log format based on the abnormal data Comparison result file;
  • the preset inspection rule includes the storage format of the data in the database and the sensitive words in the data.
  • the realization of the comparison is to compare each data read from each database, and the comparison verification here is specifically the verification of the data format. If the data format is inconsistent, then It is considered abnormal data. If the data format is consistent, the data is considered normal.
  • the comparison process includes comparing the data obtained in the database with the preset data storage format. If the storage format is different, it is considered invalid data or malicious in nature.
  • the data is recorded in a log format file, and data abnormalities are also marked;
  • the sensitive words refer to those that cause dangerous attacks on the remote server. Entries or code languages that cause server data loss, malicious attacks on the server's operating system, etc.
  • the comparison process can also be a comparison between a database and a database.
  • a backup database and an execution database exist in the remote server, and the data in the execution database is backed up in the backup database.
  • the execution database The data stored in the database can be compared and verified through the data in the backup database. After the mutual comparison, select and verify the rules for comparison, and finally generate a log file from the result of the comparison.
  • the comparison is the data map, and the comparison based on the data map is to compare each data in the data map with the preset inspection
  • the rules are compared and verified, but each data in the data map has been converted accordingly.
  • step S150 the file download code corresponding to the type of the remote server is retrieved to download the comparison result file from the remote server and save it on the operating platform through the file download code.
  • the operating platform may extract the abnormally marked data from the log file through the automatic maintenance program for safe processing.
  • step S140 if after comparing and verifying each data, if it does not meet the rules, extract the data separately. After knowing that all the data in the database is compared, the abnormal The data forms an abnormal data set, which is stored in a log file and stored on a remote server.
  • each database is stored separately, but it is also stored in a log file, of course, it can also be Multiple log files are formed.
  • attribute information of each database in the remote server according to the remote database requested to be operated in the operation request, the attribute information including the access mode, operation mode, and database type of the database;
  • the remote server operation code and the remote database operation code are stored in the class object library.
  • the remote server operation code in the process of generating the remote server operation code, it is mainly for the communication connection between the remote server and the operation platform. For further database access connections, it is based on the communication connection.
  • the code to operate the remote database is implemented.
  • the communication connection between the operating platform and the remote server is realized through the remote server operation code, and how to access each database after the connection is realized by operating the remote database operation code.
  • the remote database operation code can be It is understood as a code collection, which includes multiple sub-codes, each sub-code corresponding to a database, through these sub-codes to try individual access to the database and operation control; of course, the code for operating a remote database can also be understood as It is a script code that can control the access and operation of multiple databases at the same time, such as a script code developed through the commonality of all databases.
  • control code used to control the database access function in the remote server.
  • the control code when executed on the operating platform based on the link of the communication connection, it is equivalent to the database access function in the remote server.
  • Control control the execution of the database access function, so as to achieve indirect access to the remote server database, and the data read at this time can be controlled by some download file codes to control the operating platform to download from the remote server and save to the operation On the platform, the operating platform then proceeds to steps S120-S150.
  • the databases on the remote server are: oracle database, mysql database, hbase database, hive database, among which oracle database and mysql database are relational databases, and they are used in similar ways, while hbase database is distributed and column-oriented Open source database, hive database is a data warehouse tool based on Hadoop, which can map structured data files into a database table.
  • hive database is a data warehouse tool based on Hadoop, which can map structured data files into a database table.
  • the operation methods of these databases are different, and the result form of the data collection returned after the operation is also different.
  • these several databases will be used to store different data.
  • the operating platform realizes remote detection and control through the above code, and uniformly converts the data content of these databases into a map for storage, so that these different data can be uniformly compared.
  • the generated class object library can specifically store the operating code according to the type of the database. It can be stored in the class object library and stored on the operating platform, or it can be the object through the class object library.
  • the actual operation code is stored in the storage unit of the operation platform, and the corresponding relationship between the remote server, the database and the operation code is stored in the class object library, that is, step S130 includes :
  • the data is converted according to the conversion rule and stored in the data map respectively.
  • the operation code for operating a remote database can also be developed in two ways, one is access control code, and the other is a mapping file.
  • the access control code refers to the startup script of the database access program on the remote server, and the script is used to control the execution of the program code in the remote server and does not have the function of directly controlling the database, that is to say This script is a tool for indirect control of the database.
  • mapping file it is by mapping different databases to the access interface on the remote server, and then by establishing the corresponding relationship between the access interface and the communication interface of the operating platform, and finally forming a mapping relationship table; and
  • mapping relationship table When detecting the database, you can directly access the corresponding database by querying the mapping relationship table.
  • the data map can also classify and store the data. That is to say, in the process of converting the data to storage in the data map, it also includes The received data is classified according to the category in the data map, and then converted on the basis of the classification to store the value in the corresponding category in the data map.
  • the conversion of the data map includes the conversion of data in each database into a data map, and the unified conversion of all the acquired database data into a data map; for the conversion into a data map, according to the database
  • the data of each database is converted as a data type.
  • preliminary conversion inspections can be performed on the data of each database, and the data that is successfully converted normally is stored, and the data that is not converted is performed. Abnormal mark.
  • step S140 can be specifically implemented in the following ways:
  • a log file is generated according to the first comparison result and the second comparison result.
  • comparing data maps when comparing data maps, it is specifically to compare the data elements and rules in the data map.
  • it can be the comparison of the data format, or it can be verified through some calculation algorithms. For example, hash algorithms, etc., use algorithms to calculate verification values to verify data.
  • the database data with abnormal comparisons (not in compliance with the rules in time) is extracted from the data map and saved separately.
  • the abnormal data will be generated into a log file, and the database detection situation will be recorded through the log file to facilitate subsequent maintenance Maintenance and evaluation of the database by personnel.
  • the maintenance request including the remote server to be maintained and corresponding database information
  • all the operation codes corresponding to the remote server in the class object library are integrated and compiled to obtain a maintenance small program code of remote server data, and the maintenance small program code is used to obtain the remote server Compare and analyze the data in the database;
  • the maintenance applet code is uploaded to the remote server through the communication link for execution.
  • the remote server will want the operation platform to return a response message, and the operation platform controls to perform the next data comparison and download operation according to the response message, and in step S150 ,
  • the specific implementation is: after receiving the response message that the maintenance applet code execution is completed, call the file download code according to the type of the remote server, download the comparison result file from the remote server, and Stored in the local storage of the operating platform.
  • the comparison result file is also called a log file.
  • the operation platform accesses and reads the database of the remote server, after obtaining the data, it can be placed on the remote server.
  • the comparison processing on the above, and the processing can be the comparison processing by the server automatically executing the detection program of the server itself, or the comparison processing through the rules developed by the operating platform.
  • the database detection method further includes:
  • a table file for storing the data of the database is generated and embedded in the maintenance applet code and uploaded to the remote server.
  • the data storage format of the table file is It is consistent with the storage format of the data in the database.
  • the maintenance applet code will be executed periodically to back up the data in the database to the table file, and return it to the operating platform for storage.
  • the operating platform can also upload some other test codes to the remote server through the file upload code, and realize some other functions through the test code, without requiring everybody
  • the test script file here is some existing test code, specifically the script code corresponding to the test process developed by the user according to actual needs, which is different from the test process of the remote server itself, for example, test database storage
  • the bad sectors of the volume may be detected in the database to meet the requirements of the stored data format.
  • the detection and maintenance of the database can be some preset detection processes, but these detection steps require the user to control the execution, and in the existing detection control, the operation is generally performed directly on the remote server.
  • the method of this proposal not only realizes the detection of its own database by controlling the remote server locally on the operating platform, but also realizes the download and save of the log file generated by the detection in the local operating platform. In this way, local viewing of the test results is realized, and manual maintenance operations and back and forth inspections of the database are greatly saved.
  • a specific implementation flow chart of the database detection method based on the linux execution system in this embodiment of the application specifically includes the following steps:
  • Step S210 Extract an operating platform in the system that supports connection, login, and operation of a remote server, and execute code control through the operating platform to execute system commands on the remote server;
  • the specific implementation method of this step is to encapsulate the code used to realize the remote operation of the server on the operating platform, and the code is developed in the Linux system language, of course, it can also be obtained by calling the remote server on the Linux system.
  • the access code is used to modify the corresponding access interface and access protocol to obtain the operation code corresponding to the remote server.
  • Step S220 enter the relevant server on the remote server
  • the remote control server accesses its corresponding database, such as hbase, hive, etc., through the operating code on the operating platform.
  • the specific access is realized: the code for linking and operating the remote database is encapsulated on the platform.
  • Step S230 Support batch comparison of oracle data, Mysql database and data in hbase and hive databases on the remote server;
  • this step first query the data in each database, save it as a map, and then compare each map one by one, and store the elements in the map that do not meet the rules separately.
  • Step S240 Support uploading document files and script files (python, shell, js, jmeter, etc.) to the remote server, and execute the script on the remote service or use the document file;
  • the code for uploading files is encapsulated on the platform.
  • Step S250 After the database data comparison is completed, the data that does not meet the rules is integrated and returned to the local, and saved as a log file;
  • the code of the download file is encapsulated on the platform.
  • Step S260 Download and save the log file to the operating platform, so as to implement maintenance and viewing of the log file locally on the operating platform.
  • step S230 specifically, the non-compliant elements saved in step S230 are first saved as a log file on the server, and then the download file code method is called to download the file locally.
  • this application also provides a database detection device, which can be used to implement the database detection method provided in the embodiments of this application, and its physical implementation exists in the form of a local PC.
  • the specific hardware of the PC The realization is shown in Figure 3.
  • the mobile device includes: a processor 301, such as a CPU, a communication bus 302, a user interface 303, a network interface 304, and a memory 305.
  • the communication bus 302 is used to implement connection and communication between these components.
  • the user interface 303 may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the network interface 304 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
  • the memory 305 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as a magnetic disk memory.
  • the memory 305 may also be a storage device independent of the aforementioned processor 301.
  • the memory 305 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a database-based detection program.
  • the operating system is a program for managing and data analysis devices and software resources, the database checking program and the operation of other software and/or programs.
  • the network interface 104 is mainly used to access the network; the user interface 103 is mainly used to communicate with the external Internet or with a remote server that provides enterprise data, and access to the remote server
  • the data stored in all the databases in the database are analyzed and processed to obtain the corresponding abnormal data structure, and the processor 301 can be used to call the database detection program stored in the memory 305 and execute the implementation of the following database detection methods Example of operation.
  • the implementation of FIG. 3 can also be a mobile terminal capable of touch operation such as a mobile phone.
  • the processor of the mobile terminal can implement the database detection method by reading the data stored in the buffer or storage unit.
  • the program code is used to perform remote operations on the database on the remote server, and the log file generated after the operation is generated and fed back to the operating platform for local storage.
  • FIG. 4 is a schematic diagram of the functional modules of the database detection device provided by the embodiment of the application.
  • the device includes:
  • the object generation module 41 is configured to generate a class object library according to the operation request of the remote server, and store the class object library in a storage unit on the operating platform, wherein the class object library is used to control the operating platform pair
  • the class object library contains remote server operation code, remote database operation code, and file download code;
  • the communication module 42 is configured to receive a remote operation request and determine the type of the remote server to be accessed in the remote operation request, and retrieve the type corresponding to the remote server from the class object library through the operation platform
  • the remote server operation code is based on the remote server operation code to establish a communication link between the operation platform and the remote server;
  • the data reading module 43 is configured to obtain the corresponding remote database operation code from the class object library according to the type of the remote server and the communication protocol corresponding to the communication link after the communication link is established, and Access to each database on the remote server based on the remote database operation code, and read data in the database;
  • the detection module 44 is configured to compare the data of each database read from the remote server according to preset inspection rules, filter out abnormal data in the database, and generate a log based on the abnormal data Format comparison result file, wherein the preset inspection rules include the storage format of the data in the database and the sensitive words in the data;
  • the download module 45 is configured to retrieve the file download code corresponding to the type of the remote server, download the comparison result file from the remote server and save it on the operating platform.
  • the operation code of the remote server is set on the operating platform to realize the operation of the database on the remote server and the reading of data, and then the format of the read data is checked, a log file is generated, and the log file is Save to the operating platform, so that users can implement and view the results of the data storage of the database in the remote server, no longer need to view through the remote operation mode, greatly improve the maintenance efficiency of the database, thereby solving
  • the existing server maintenance platform does not support the storage of detection log files on the remote server, which leads to the technical problem of overly complex maintenance operations, which greatly improves the maintenance efficiency of the remote server database.
  • the application also provides a computer-readable storage medium.
  • a database detection program is stored on the computer-readable storage medium, and when the database detection program is executed by a processor, the steps of the database detection method described in any of the above embodiments are implemented, and the specific steps are as follows:
  • the class object library is generated according to the operation request of the remote server, and the class object library is stored in the storage unit on the operating platform, wherein the class object library is used to control the remote operation of the remote server by the operating platform ,
  • the class object library contains remote server operation code, remote database operation code and file download code;
  • the corresponding remote database operation code is obtained from the class object library, and based on the remote database operation code, the database on the remote server Access to read the data in the database;
  • the file download code corresponding to the type of the remote server is retrieved to download the comparison result file from the remote server and save it on the operating platform through the file download code.
  • the database detection program is executed by the processor to realize the steps of generating a class object library according to an operation request of a remote server and storing the class object library in a storage unit on an operating platform. , Including the following steps:
  • the access mode call the access interface of the database corresponding to the access mode and the preset access execution code, and modify the parameters in the preset access execution code according to the access interface to generate The remote server operation code;
  • the remote server operation code and the remote database operation code are stored in the class object library.
  • the database detection program is executed by the processor to obtain the corresponding remote database from the class object library according to the type of the remote server and the communication protocol corresponding to the communication link Operating code, and accessing each database on the remote server based on the remote database operating code to read the data in the database includes the following steps:
  • the data is converted according to the conversion rule and stored in the data map respectively.
  • the database detection program is executed by the processor to implement the comparison of the data of each database read from the remote server according to a preset inspection rule to filter out the
  • the steps of generating abnormal data in the database and generating a comparison result file in log format according to the abnormal data include:
  • the data in the unified converted data map is compared and verified to obtain a first comparison result, and the first comparison result is that data is selected from the data based on the comparison verification Data whose format is inconsistent with the storage format;
  • a log file is generated according to the first comparison result and the second comparison result.
  • all the operation codes corresponding to the remote server in the class object library are integrated and compiled to obtain a maintenance small program code of remote server data, and the maintenance small program code is used to obtain the remote server Compare and analyze the data in the database;
  • the maintenance applet code is uploaded to the remote server through the communication link and executed.
  • the database detection program is executed by the processor to realize the retrieval of the file download code corresponding to the type of the remote server, so as to use the file download code to compare the comparison result
  • the steps include the following steps:
  • the method of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. ⁇
  • the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium (such as ROM/RAM), including Several instructions are used to make a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) execute the method described in each embodiment of the present application.

Abstract

A database monitoring method, generating a class object library according to a remote server operation request, and storing same in a memory cell of an operation platform, then, on the basis of the remote operation request, selecting from the class object library every type of corresponding operation code implementing data of a database of the remote server to perform operation verification, performing format verification of read data, generating a log file, and saving the log file to the operation platform. A database monitoring apparatus, a device and a computer-readable storage medium, implementing an operation for a remote server on the basis of operation code configured on an operation platform, and storing an operation result at a locale of the operation, thereby enabling a user to view in real time a data storage result of a database on the remote server without having to view via remote operation means, greatly improving efficiency of repair and maintenance of a database.

Description

数据库检测方法、装置、设备及计算机可读存储介质Database detection method, device, equipment and computer readable storage medium
本申请要求于2019年08月14日提交中国专利局、申请号为201910749124.2、发明名称为“数据库检测方法、装置、设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on August 14, 2019, the application number is 201910749124.2, and the invention title is "database detection methods, devices, equipment and computer-readable storage media". The reference is incorporated in the application.
技术领域Technical field
本申请涉及大数据处理技术领域,尤其涉及一种数据库检测方法、装置、设备及非易失性计算机可读存储介质。This application relates to the field of big data processing technology, and in particular to a database detection method, device, device, and non-volatile computer-readable storage medium.
背景技术Background technique
服务器数据库是目前使用较多的大型存储系统,对于服务可用性、数据可靠性、性能、安全和扩展性等等都具有比较高的要求,而在使用服务器数据库作为数据的存储工具时,则为了保证数据的完整性或者系统的稳定性,则需要不断地进行维护,而该维护除了对设备本身硬件上的维护之外,还包括对数据的维护,为数据的维护则需要工作人员根据数据的工作日志来进行逐一排查,这些工作日志的产生需要数据库本身来记录实现,并且还不能进行远程控制实现,这必须要在数据库本地来实现维护排查,这样就导致了维护的难度。Server database is a large-scale storage system that is currently used more. It has relatively high requirements for service availability, data reliability, performance, security, and scalability. When using server database as a data storage tool, it is to ensure The integrity of the data or the stability of the system requires constant maintenance. In addition to the maintenance of the hardware of the device itself, this maintenance also includes the maintenance of the data. The maintenance of the data requires the staff to work according to the data. Logs are checked one by one. The generation of these work logs requires the database itself to record and realize, and remote control cannot be realized. This must be done locally in the database for maintenance and troubleshooting, which leads to the difficulty of maintenance.
以及,对于同时存在多个数据库的前提下,工作人员需要逐个数据库进行排查和读取工作日志,这种系统的数据库维护难度就更加大了。尤其是存在多个数据库时,会由于存储的数据的格式是各种各样的,在转化数据格式时并不一定都会按标准转换为相同的数据格式,对此使得工作人员在维护数据库过程中增加了格式的排查,大大提高了维护难度。And, under the premise that there are multiple databases at the same time, the staff need to check and read the work log one by one, and the database maintenance of this kind of system is more difficult. Especially when there are multiple databases, because the format of the stored data is various, the data format may not always be converted to the same data format according to the standard. This makes the staff in the process of maintaining the database The inspection of the format has been increased, greatly increasing the difficulty of maintenance.
发明内容Summary of the invention
本申请的主要目的在于提供一种数据库检测方法、装置、设备及计算机可读存储介质,旨在解决由于现有的服务器维护平台不支持远程服务器上检测日志文件的存储,而导致检修维护的操作过于复杂的技术问题。The main purpose of this application is to provide a database detection method, device, equipment, and computer-readable storage medium, which aims to solve the maintenance operations caused by the fact that the existing server maintenance platform does not support the storage of detection log files on remote servers Overly complex technical issues.
为实现上述目的,本申请提供一种数据库检测方法,应用于对远程数据库中的数据检测,所述方法包括以下步骤:In order to achieve the above objective, this application provides a database detection method, which is applied to data detection in a remote database, and the method includes the following steps:
根据远程服务器的操作请求生成类对象库,并将所述类对象库存储于操作平台上的存储单元中,其中,所述类对象库用于控制所述操作平台对所述远程服务器的远程操作,所述类对象库中包含有远程服务器操作代码、远程数据库操作代码以及文件下载代码;The class object library is generated according to the operation request of the remote server, and the class object library is stored in the storage unit on the operating platform, wherein the class object library is used to control the remote operation of the remote server by the operating platform , The class object library contains remote server operation code, remote database operation code and file download code;
接收远程操作请求,并确定所述远程操作请求中待触发访问的远程服务器的类型,通过所述操作平台从所述类对象库中调取与所述远程服务器的类型对应的远程服务器操作代码,基于所述远程服务器操作代码建立所述操作平台与所述远程服务器之间的通信链路;Receive a remote operation request, determine the type of remote server to be accessed in the remote operation request, and retrieve the remote server operation code corresponding to the type of the remote server from the class object library through the operation platform, Establishing a communication link between the operating platform and the remote server based on the remote server operating code;
根据所述远程服务器的类型和所述通信链路对应的通信协议,从所述类对象库中获取对应的远程数据库操作代码,并基于所述远程数据库操作代码对所述远程服务器上的各数据库进行访问,以读取所述数据库中的数据;According to the type of the remote server and the communication protocol corresponding to the communication link, the corresponding remote database operation code is obtained from the class object library, and based on the remote database operation code, the database on the remote server Access to read the data in the database;
根据预设的检验规则对从所述远程服务器中读取到的各数据库的数据进行比对,以筛选出所述数据库中异常的数据,并根据所述异常的数据生成日志格式的比对结果文件,其中,所述预设的检验规则包括所述数据在所述数据库中的存储格式和数据中的敏感字;Compare the data of each database read from the remote server according to preset inspection rules to filter out abnormal data in the database, and generate a comparison result in log format according to the abnormal data File, wherein the preset inspection rule includes the storage format of the data in the database and the sensitive words in the data;
调取与所述远程服务器的类型对应的所述文件下载代码,以通过所述文件下载代码将所述比对结果文件从所述远程服务器中下载并保存至所述操作平台上。The file download code corresponding to the type of the remote server is retrieved to download the comparison result file from the remote server and save it on the operating platform through the file download code.
可选的,所述根据远程服务器的操作请求生成类对象库,并将所述类对象库存储于操作平台上的存储单元中的步骤包括:Optionally, the step of generating a class object library according to an operation request of a remote server, and storing the class object library in a storage unit on an operating platform includes:
根据所述操作请求中请求操作的所述远程数据库,确定所述远程服务器中各数据库的属性信息,所述属性信息包括数据库的访问方式、操作方式和数据库类型;Determine the attribute information of each database in the remote server according to the remote database requested to be operated in the operation request, the attribute information including the access mode, operation mode and database type of the database;
根据所述访问方式、调取与所述访问方式对应的所述数据库的访问接口以及预设的访问执行代码,并根据所述访问接口对所述预设的访问执行代码中参数进行修改,生成所述远程服务器操作代码;According to the access mode, the access interface of the database corresponding to the access mode and the preset access execution code are called, and the parameters in the preset access execution code are modified according to the access interface to generate The remote server operation code;
根据所述操作方式、所述数据库类型以及预设的数据库访问代码,生成用于所述远程数据库进行操作访问的所述远程数据库操作代码;Generating the remote database operation code for operating and accessing the remote database according to the operation mode, the database type, and the preset database access code;
将所述远程服务器操作代码和所述操作远程数据库操作代码存储于所述类对象库中。The remote server operation code and the remote database operation code are stored in the class object library.
可选的,所述在建立所述通信链路后,根据所述远程服务器的类型和所述通信链路对应的通信协议,从所述类对象库中获取对应的远程数据库操作 代码,并基于所述远程数据库操作代码对所述远程服务器上的各数据库进行访问,以读取所述数据库中的数据的步骤包括:Optionally, after the communication link is established, the corresponding remote database operation code is obtained from the class object library according to the type of the remote server and the communication protocol corresponding to the communication link, and based on The step of the remote database operation code accessing each database on the remote server to read data in the database includes:
根据存储在所述操作平台上的操作远程数据库操作代码对数据库进行访问,读取所述数据库中存储的数据;Access the database according to the remote database operation code stored on the operation platform, and read the data stored in the database;
根据所述远程服务器的类型确定用于分析数据的数据地图类型,并基于所述数据地图类型提取数据格式的转换规则;Determining a data map type for analyzing data according to the type of the remote server, and extracting data format conversion rules based on the data map type;
根据所述转换规则对所述数据进行转换,并分别存储于数据地图中。The data is converted according to the conversion rule and stored in the data map respectively.
可选的,所述根据预设的检验规则对从所述远程服务器中读取到的各数据库的数据进行比对,以筛选出所述数据库中异常的数据,并根据所述异常的数据生成日志格式的比对结果文件的步骤包括:Optionally, the data of each database read from the remote server is compared according to preset inspection rules to filter out abnormal data in the database, and generate data based on the abnormal data The steps of comparing result files in log format include:
根据所述存储格式,将统一转换后的数据地图中的数据进行比对验证,得到第一比对结果,所述第一比对结果为基于所述比对验证从所述数据中筛选出数据格式与所述存储格式不一致的数据;According to the storage format, the data in the unified converted data map is compared and verified to obtain a first comparison result, and the first comparison result is that data is selected from the data based on the comparison verification Data whose format is inconsistent with the storage format;
根据所述敏感字对筛选出来的数据进行对比,识别出所述数据中的敏感字并进行异常标记,得到第二比对结果;Compare the screened data according to the sensitive words, identify the sensitive words in the data and mark the abnormality, to obtain the second comparison result;
根据第一比对结果和第二比对结果生成日志文件。A log file is generated according to the first comparison result and the second comparison result.
可选的,在所述接收远程操作请求,并确定所述远程操作请求中待触发访问的远程服务器的类型,通过所述操作平台从所述类对象库中调取与所述远程服务器的类型对应的远程服务器操作代码,基于所述远程服务器操作代码建立所述操作平台与所述远程服务器之间的通信链路的步骤所述之后,还包括:Optionally, after receiving the remote operation request and determining the type of the remote server to be accessed in the remote operation request, the type of the remote server is retrieved from the class object library through the operation platform The corresponding remote server operation code, after the step of establishing a communication link between the operation platform and the remote server based on the remote server operation code, further includes:
接收所述操作平台上远程服务器发起的维护请求,所述维护请求中包括待维护的远程服务器和对应的数据库信息;Receiving a maintenance request initiated by a remote server on the operating platform, where the maintenance request includes the remote server to be maintained and corresponding database information;
根据所述维护请求将所述类对象库中与所述远程服务器对应的所有操作代码进行整合编译,得到一个远程服务器数据的维护小程序代码,所述维护小程序代码用于获取所述远程服务器中的数据库的数据进行比对分析;According to the maintenance request, all the operation codes corresponding to the remote server in the class object library are integrated and compiled to obtain a maintenance small program code of remote server data, and the maintenance small program code is used to obtain the remote server Compare and analyze the data in the database;
通过所述通信链路将所述维护小程序代码上传至所述远程服务器并进行执行。The maintenance applet code is uploaded to the remote server through the communication link and executed.
可选的,所述调取与所述远程服务器的类型对应的所述文件下载代码,以通过所述文件下载代码将所述比对结果文件从所述远程服务器中下载并保存至所述操作平台上的步骤包括:Optionally, the calling the file download code corresponding to the type of the remote server to download the comparison result file from the remote server through the file download code and save it to the operation The steps on the platform include:
在接收到所述维护小程序代码执行完成的响应消息后,根据所述远程服 务器的类型调取所述文件下载代码,以及从所述远程服务器中下载所述对比结果文件,并将所述对比结果文件存储在操作平台本地的存储器中。After receiving the response message that the maintenance applet code execution is complete, call the file download code according to the type of the remote server, download the comparison result file from the remote server, and compare the The result file is stored in the local storage of the operating platform.
可选的,所述数据库检测方法还包括:Optionally, the database detection method further includes:
根据所述维护请求和数据库的属性信息,生成用于存储数据库的数据的表格文件,并将所述表格文件嵌入到所述维护小程序代码中上传至所述远程服务器中,其中,所述表格文件的数据存储格式与所述数据库的数据的存储格式一致。According to the maintenance request and the attribute information of the database, a table file for storing data of the database is generated, and the table file is embedded in the maintenance applet code and uploaded to the remote server, wherein the table The data storage format of the file is consistent with the data storage format of the database.
此外,为实现上述目的,本申请还一种数据库检测装置,应用于对远程服务器数据库中的数据检测,所述数据库检测装置包括:In addition, in order to achieve the above purpose, the present application also provides a database detection device, which is applied to data detection in a remote server database, and the database detection device includes:
对象生成模块,用于根据远程服务器的操作请求生成类对象库,并将所述类对象库存储于操作平台上的存储单元中,其中,所述类对象库用于控制所述操作平台对所述远程服务器的远程操作,所述类对象库中包含有远程服务器操作代码、远程数据库操作代码以及文件下载代码;The object generation module is used to generate a class object library according to the operation request of the remote server, and store the class object library in a storage unit on the operating platform, where the class object library is used to control the operating platform to The remote operation of the remote server, the class object library contains remote server operation code, remote database operation code and file download code;
通信模块,用于接收远程操作请求,并确定所述远程操作请求中待触发访问的远程服务器的类型,通过所述操作平台从所述类对象库中调取与所述远程服务器的类型对应的远程服务器操作代码,基于所述远程服务器操作代码建立所述操作平台与所述远程服务器之间的通信链路;The communication module is used to receive the remote operation request and determine the type of the remote server to be accessed in the remote operation request, and retrieve the type corresponding to the remote server from the class object library through the operation platform Remote server operation code, based on the remote server operation code to establish a communication link between the operation platform and the remote server;
数据读取模块,用于根据所述远程服务器的类型和所述通信链路对应的通信协议,从所述类对象库中获取对应的远程数据库操作代码,并基于所述远程数据库操作代码对所述远程服务器上的各数据库进行访问,以读取所述数据库中的数据;The data reading module is used to obtain the corresponding remote database operation code from the class object library according to the type of the remote server and the communication protocol corresponding to the communication link, and to perform data processing based on the remote database operation code Each database on the remote server is accessed to read the data in the database;
检测模块,用于根据预设的检验规则对从所述远程服务器中读取到的各数据库的数据进行比对,以筛选出所述数据库中异常的数据,并根据所述异常的数据生成日志格式的比对结果文件,其中,所述预设的检验规则包括所述数据在所述数据库中的存储格式和数据中的敏感字;The detection module is used to compare the data of each database read from the remote server according to preset inspection rules to filter out abnormal data in the database, and generate a log based on the abnormal data Format comparison result file, wherein the preset inspection rules include the storage format of the data in the database and the sensitive words in the data;
下载模块,用于调取与所述远程服务器的类型对应的所述文件下载代码,以通过所述文件下载代码将所述比对结果文件从所述远程服务器中下载并保存至所述操作平台上。The download module is configured to retrieve the file download code corresponding to the type of the remote server to download the comparison result file from the remote server and save it to the operating platform through the file download code on.
此外,为实现上述目的,本申请还一种数据库检测设备,所述数据库检测设备包括:存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的数据库检测程序,所述数据库检测程序被所述处理器执行时实现如上任一项所述的数据库检测方法的步骤。In addition, in order to achieve the above-mentioned object, the present application also provides a database detection device. The database detection device includes a memory, a processor, and a database detection program stored in the memory and running on the processor. When the database detection program is executed by the processor, the steps of the database detection method described in any one of the above are implemented.
此外,为实现上述目的,本申请还一种计算机可读存储介质,所述计算机可读存储介质上存储有数据库检测程序,所述数据库检测程序被处理器执行时实现如上任一项所述的数据库检测方法的步骤。In addition, in order to achieve the above-mentioned object, the present application also has a computer-readable storage medium with a database detection program stored on the computer-readable storage medium, and when the database detection program is executed by a processor, the above-mentioned Steps of database detection method.
本申请通过在操作平台上设置类对象库的方式来实现对远程服务器的访问以及对对应的远程数据库的检测,并将对远程数据库中数据的检测所得到的对比结果文件,通过文件下载代码下载到操作平台上来,由于远程数据库的检测结果已经存储在了操作平台上,所以当用户需要对远程数据库的数据进行维护检查时,可以直接通过读取操作平台上的比较结果文件进行查阅即可实现对远程数据库的检查,不再需要直接对远程数据库进行操作了,大大提高了对数据库的检修维护效率;同时,由于对于控制远程服务器访问和远程数据库的检测的类对象库是存储在操作平台上的,所以本申请是相当于提供的一个统一的控制平台来对多个远程服务器和远程数据库的管理,相对于现有技术,不需要再逐一的访问维护了,提高了维护的效率,也简化了维护的操作流程,减少了人力资源的投入。This application realizes the access to the remote server and the detection of the corresponding remote database by setting up a class object library on the operating platform, and downloads the comparison result file obtained from the detection of the data in the remote database through the file download code On the operating platform, since the detection results of the remote database have been stored on the operating platform, when users need to maintain and check the data of the remote database, they can directly read the comparison result file on the operating platform for reference. For remote database inspection, it is no longer necessary to directly operate the remote database, which greatly improves the efficiency of database maintenance; at the same time, because the object library for controlling remote server access and remote database detection is stored on the operating platform Therefore, this application is equivalent to providing a unified control platform to manage multiple remote servers and remote databases. Compared with the prior art, there is no need to access and maintain one by one, which improves the efficiency of maintenance and simplifies The operation process of maintenance is improved, and the investment of human resources is reduced.
附图说明Description of the drawings
图1为本申请提供的数据库检测方法第一实施例的流程示意图;FIG. 1 is a schematic flowchart of a first embodiment of a database detection method provided by this application;
图2为本申请提供的数据库检测方法第二实施例的流程示意图;2 is a schematic flowchart of a second embodiment of the database detection method provided by this application;
图3为本申请提供的数据库检测装置一实施例的功能模块示意图;3 is a schematic diagram of functional modules of an embodiment of a database detection device provided by this application;
图4为本申请实施例方案涉及的操作平台的结构示意图。FIG. 4 is a schematic diagram of the structure of the operation platform involved in the solution of the embodiment of the application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics, and advantages of the purpose of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described herein are only used to explain the application, and not used to limit the application.
参照图1,图1为本申请实施例提供的数据库检测方法的流程图。在本实施例中,所述数据库检测方法具体包括以下步骤:Referring to FIG. 1, FIG. 1 is a flowchart of a database detection method provided by an embodiment of the application. In this embodiment, the database detection method specifically includes the following steps:
步骤S110,根据远程服务器的操作请求生成类对象库,并将所述类对象库存储于操作平台上的存储单元中;Step S110, generating a class object library according to the operation request of the remote server, and storing the class object library in a storage unit on the operating platform;
在该步骤中,所述类对象库用于控制所述操作平台对所述远程服务器的远程操作,所述类对象库中包含有远程服务器操作代码、远程数据库操作代 码以及文件下载代码。In this step, the class object library is used to control the remote operation of the remote server by the operating platform, and the class object library contains remote server operation code, remote database operation code and file download code.
在本实施例中,所述类对象库指的是包含有远程服务器的类型、通信接口和控制代码的对应关系的远程访问代码库。其中,所述操作代码用于实现远程对所述远程服务器的访问及操作,其可以是一种访问的控制代码,也可以是一种映射文件。In this embodiment, the class object library refers to a remote access code library containing the type of remote server, the correspondence between the communication interface and the control code. Wherein, the operation code is used to implement remote access and operation to the remote server, and it may be an access control code or a mapping file.
对于采用控制代码的实现时,可以是基于对应的远程服务器特定开发的一种集访问和操作控制一体的小程序代码,当需要对远程服务器的数据库进行检测时,直接调用该小程序代码在平台上执行就可以对远程服务器上的数据库进行操作和读取数据了。For the implementation using control code, it can be a small program code specifically developed based on the corresponding remote server that integrates access and operation control. When the database of the remote server needs to be detected, the small program code is directly called on the platform The above execution can operate and read data on the database on the remote server.
对于采用映射文件来实现时,具体通过在平台所在服务器上先生成一个远程操作的类对象channelExec,使用该对象建立起与需要操作的远程服务器的连接,之后就可以调用这个已建立连接的对象的exeCommand方法来执行远程服务器的命令了。When using a mapping file to achieve, specifically by first generating a remote operation class object channelExec on the server where the platform is located, using this object to establish a connection with the remote server that needs to be operated, and then calling the object of the established connection exeCommand method to execute the command of the remote server.
在该步骤中设置的操作代码,不管是使用控制代码还是映射文件来实现,其在执行的效果是相当于在远程服务器上执行命令,执行完命令后,就会将执行得到的结果以字符串形式返回给平台。这个远程操作的对象和方法是属于平台的一部分,所以说是平台封装了该方法的代码。The operation code set in this step, whether it is implemented by control code or mapping file, the effect of its execution is equivalent to executing the command on the remote server. After the command is executed, the result obtained by the execution will be a string The form is returned to the platform. The remotely operated objects and methods are part of the platform, so the platform encapsulates the method code.
步骤S120,接收远程操作请求,并确定所述远程操作请求中待触发访问的远程服务器的类型,通过所述操作平台从所述类对象库中调取与所述远程服务器的类型对应的远程服务器操作代码,基于所述远程服务器操作代码建立所述操作平台与所述远程服务器之间的通信链路;Step S120: Receive a remote operation request, determine the type of remote server to be accessed in the remote operation request, and retrieve a remote server corresponding to the type of the remote server from the class object library through the operation platform Operation code, based on the remote server operation code to establish a communication link between the operation platform and the remote server;
在该步骤中,该通信连接可以是无线的连接,也可以是有线的连接,具体可以根据平台与远程服务器的实际连接关系来确定。In this step, the communication connection may be a wireless connection or a wired connection, which may be determined according to the actual connection relationship between the platform and the remote server.
在本案中,还可以是通过根据操作代码来生成链路连接代码、远程控制代码和访问代码的方式来实现,也即是说这里建立的连接不仅仅是实现两者的通信,还是用来实现操作平台对远程服务器的操作,只是这里操作是采用了代码控制的方式来实现。In this case, it can also be realized by generating link connection code, remote control code and access code according to the operation code, that is to say, the connection established here is not only to realize the communication between the two, but also to realize The operation of the operating platform on the remote server, but the operation here is realized by means of code control.
步骤S130,根据所述远程服务器的类型和所述通信链路对应的通信协议,从所述类对象库中获取对应的远程数据库操作代码,并基于所述远程数据库操作代码对所述远程服务器上的各数据库进行访问,已读取所述数据库中的数据;Step S130: Obtain the corresponding remote database operation code from the class object library according to the type of the remote server and the communication protocol corresponding to the communication link, and perform an operation on the remote server based on the remote database operation code. To access each database of, and the data in the database has been read;
在该步骤中,通过根据远程数据库操作代码形成的访问代码对远程服务 器中的数据库进行访问,并读取数据库中存储的数据,,对于数据的读取可以通过抽样的方式选择部分数据进行读取,也可以是全部读取,优选的,这里选择部分读取。In this step, the database in the remote server is accessed through the access code formed according to the remote database operation code, and the data stored in the database is read. For data reading, you can select part of the data for reading by sampling , It can also be read all, preferably, select partial read here.
进一步的,在读取了数据之后,还包括对所述读取到的数据进行转换,即是将各个数据库中读取到的数据进行同一的转换,分别形成数据地图,该数据地图中的每个数据都具有相同格式的。Further, after the data is read, it also includes the conversion of the read data, that is, the same conversion is performed on the data read in each database to form a data map, each of which is All data have the same format.
在实际应用中,对于数据的转换,可以是基于一种数据转换规则进行转换,只是对于将正常的数据按照转换规则进行转换时,最终得到的结果是符合检验规则的;而对于数据本身就出现了异常时,其经过数据转换规则转换后,最终得到的数据也是无法通过检验规则的检验的,只是这里进行统一的转换可以保证了数据的统一性,这里在比对的过程中,更加能提高准确率。In practical applications, the conversion of data can be based on a data conversion rule, but when the normal data is converted according to the conversion rule, the final result obtained is in compliance with the inspection rule; and the data itself appears When an exception is detected, after the data conversion rules are converted, the final data obtained cannot pass the inspection rules, but the unified conversion here can ensure the unity of the data. Here, in the process of comparison, it can be improved. Accuracy.
步骤S140,根据预设的检验规则对从所述远程服务器中读取到的各数据库的数据进行比对,以筛选出所述数据库中异常的数据,并根据所述异常的数据生成日志格式的比对结果文件;Step S140: Compare the data of each database read from the remote server according to preset inspection rules to filter out abnormal data in the database, and generate a log format based on the abnormal data Comparison result file;
在该步骤中,所述预设的检验规则包括所述数据在所述数据库中的存储格式和数据中的敏感字。In this step, the preset inspection rule includes the storage format of the data in the database and the sensitive words in the data.
在本实施例中,对于比对的实现是将从每个数据库中读取的每个数据的相互比对,而这里的比对验证具体是对数据的格式的验证,若数据格式不一致,则认为是异常数据,若数据格式一致,则认为该数据正常。In this embodiment, the realization of the comparison is to compare each data read from each database, and the comparison verification here is specifically the verification of the data format. If the data format is inconsistent, then It is considered abnormal data. If the data format is consistent, the data is considered normal.
在实际应用中,所述对比的过程包括将数据库中获取到的数据与预设的数据的存储格式进行一一比对,若与存储格式不一样的,则认为是无效数据或者是具有恶意性质的数据,并在日志格式的文件中进行记录,同时还会进行数据异常标记;In practical applications, the comparison process includes comparing the data obtained in the database with the preset data storage format. If the storage format is different, it is considered invalid data or malicious in nature. The data is recorded in a log format file, and data abnormalities are also marked;
进一步的,对于存储格式不一样的数据还需要检测数据中是否存在敏感字眼,若存在,则在日志文件中进行标注;这里的敏感字眼指的是对所述远程服务器造成危险攻击的、对会导致服务器数据丢失的、对服务器的操作系统恶意攻击等等的词条或者代码语言。Further, for data with different storage formats, it is necessary to detect whether there are sensitive words in the data, and if they exist, mark them in the log file; the sensitive words here refer to those that cause dangerous attacks on the remote server. Entries or code languages that cause server data loss, malicious attacks on the server's operating system, etc.
进一步的,所述比对过程还可以是数据库与数据库之间的比对,例如远程服务器中存在备份数据库和执行数据库,而执行数据库中的数据备份在备份数据库中,对于这种情况,执行数据库中存储的数据可以通过备份数据库中的数据进行相互比对验证,在相互比对后再选择与验证规则进行比对,最后将两者比对的结果生成日志文件。Further, the comparison process can also be a comparison between a database and a database. For example, a backup database and an execution database exist in the remote server, and the data in the execution database is backed up in the backup database. In this case, the execution database The data stored in the database can be compared and verified through the data in the backup database. After the mutual comparison, select and verify the rules for comparison, and finally generate a log file from the result of the comparison.
在本案中,若将每个数据库中读取的数据转换为数据地图后,则比对的是数据地图了,同时基于数据地图的比对也是将数据地图中的每个数据与预设的检验规则进行比对验证,只是数据地图中的每个数据都已经进行了相应的转换了。In this case, if the data read in each database is converted into a data map, then the comparison is the data map, and the comparison based on the data map is to compare each data in the data map with the preset inspection The rules are compared and verified, but each data in the data map has been converted accordingly.
步骤S150,调取与所述远程服务器的类型对应的所述文件下载代码,以通过所述文件下载代码将所述比对结果文件从所述远程服务器中下载并保存至所述操作平台上。In step S150, the file download code corresponding to the type of the remote server is retrieved to download the comparison result file from the remote server and save it on the operating platform through the file download code.
在实际应用中,在通过文件下载代码将远程服务器中的比对结果下载下来后,当需要进行维护时,直接从操作平台中读取对应的结果后即可实现同时对远程数库的维护;进一步的,还可以是由操作平台在接收到维护指令后,通过自动维护程序从日志文件中提取出标记有异常的数据进行安全处理。In practical applications, after downloading the comparison results in the remote server through the file download code, when maintenance is required, the corresponding results can be directly read from the operating platform to achieve simultaneous maintenance of the remote database; Further, after receiving the maintenance instruction, the operating platform may extract the abnormally marked data from the log file through the automatic maintenance program for safe processing.
在本案中,对于步骤S140,若在将每个数据进行比对验证后,其不满足规则时,将该数据单独提取出来,知道对该数据库的所有数据都比对完成后,将这些异常的数据形成一个异常数据集,并存储到日志文件中,同时保存在远程服务器上,并且在存储到日志文件时,分开每个数据库进行存储,但是还存储在一个日志文件中,当然了也可以是形成多个日志文件。In this case, for step S140, if after comparing and verifying each data, if it does not meet the rules, extract the data separately. After knowing that all the data in the database is compared, the abnormal The data forms an abnormal data set, which is stored in a log file and stored on a remote server. When storing to a log file, each database is stored separately, but it is also stored in a log file, of course, it can also be Multiple log files are formed.
进一步的,还可以是将从所有数据库中异常数据形成一个大的异常数据集存储到日志文件中。Further, it is also possible to form a large abnormal data set from all abnormal data in the database and store it in a log file.
在本实施例中,对于步骤S110根据操作请求生成类对象库时,还需要根据数据库的属性信息来生成,具体可以通过以下方式实现:In this embodiment, when generating the class object library according to the operation request in step S110, it also needs to be generated according to the attribute information of the database, which can be specifically implemented in the following ways:
根据所述操作请求中请求操作的所述远程数据库确定所述远程服务器中各数据库的属性信息,所述属性信息包括数据库的访问方式、操作方式和数据库类型;Determining attribute information of each database in the remote server according to the remote database requested to be operated in the operation request, the attribute information including the access mode, operation mode, and database type of the database;
根据所述访问方式调取所述数据库的访问接口,以及预设的访问执行代码,并根据所述访问接口对所述预设的访问执行代码中参数进行修改,生成所述远程服务器操作代码;Retrieve the access interface of the database and the preset access execution code according to the access mode, and modify the parameters in the preset access execution code according to the access interface to generate the remote server operation code;
根据所述操作方式和所述数据库类型,以及预设的数据库访问代码,生成用于所述远程数据库进行操作访问的所述远程数据库操作代码;Generating the remote database operation code for operating and accessing the remote database according to the operation mode, the database type, and a preset database access code;
将所述远程服务器操作代码和所述操作远程数据库操作代码存储于所述类对象库中。The remote server operation code and the remote database operation code are stored in the class object library.
在本实施例中,在生成远程服务器操作代码的过程中,主要是针对远程服务器与操作平台两者之间的通信连接,对于进一步的数据库访问连接,则 是在该通信连接的基础上再由操作远程数据库的代码来实现。In this embodiment, in the process of generating the remote server operation code, it is mainly for the communication connection between the remote server and the operation platform. For further database access connections, it is based on the communication connection. The code to operate the remote database is implemented.
也即是说,通过远程服务器操作代码先实现操作平台与远程服务器的通信连接,而对于连接后应当如何访问每个数据库,则通过操作远程数据库操作代码来实现,对于该操作远程数据库操作代码可以理解为是一个代码集合,该集合包括了多个子代码,每个子代码对应一个数据库,通过这些子代码来试下对数据库的单独访问和操作控制;当然,该操作远程数据库的代码还可以理解为是一个可以同时控制多个数据库访问和操作的脚本代码,例如通过对所有数据库的共同性来开发的脚本代码。That is to say, the communication connection between the operating platform and the remote server is realized through the remote server operation code, and how to access each database after the connection is realized by operating the remote database operation code. For this operation, the remote database operation code can be It is understood as a code collection, which includes multiple sub-codes, each sub-code corresponding to a database, through these sub-codes to try individual access to the database and operation control; of course, the code for operating a remote database can also be understood as It is a script code that can control the access and operation of multiple databases at the same time, such as a script code developed through the commonality of all databases.
进一步的,还可以是用于控制远程服务器中访问数据库功能的控制代码,对于这种情况,当操作平台上基于通信连接的链路执行该控制代码时,相当于对远程服务器中的数据库访问功能的控制,控制该数据库访问功能的执行,从而实现对远程服务器数据库的间接访问了,而这时读取都的数据可以通过一些下载文件的代码来控制操作平台从远程服务器中下载下来保存至操作平台上,然后操作平台在进行步骤S120-S150的步骤。Further, it can also be a control code used to control the database access function in the remote server. In this case, when the control code is executed on the operating platform based on the link of the communication connection, it is equivalent to the database access function in the remote server. Control, control the execution of the database access function, so as to achieve indirect access to the remote server database, and the data read at this time can be controlled by some download file codes to control the operating platform to download from the remote server and save to the operation On the platform, the operating platform then proceeds to steps S120-S150.
例如,远程服务器上的数据库分别为:oracle数据库、mysql数据库、hbase数据库、hive数据库,其中oracle数据库和mysql数据库都是关系型数据库,使用方式比较接近,而hbase数据库是分布式的、面向列的开源数据库,hive数据库是基于Hadoop的一个数据仓库工具,可以将结构化的数据文件映射为一张数据库表。这几个数据库的操作方式是不一样的,并且操作后返回的数据集合结果形式也是不一样的。在日常应用中,这几个数据库都会被使用到,以保存不一样的数据。操作平台通过上述的代码来实现远程的检测控制,并把对这些数据库的查询出来的数据内容统一转化成map形式保存,这样就能对这些不同的数据进行统一比较了。For example, the databases on the remote server are: oracle database, mysql database, hbase database, hive database, among which oracle database and mysql database are relational databases, and they are used in similar ways, while hbase database is distributed and column-oriented Open source database, hive database is a data warehouse tool based on Hadoop, which can map structured data files into a database table. The operation methods of these databases are different, and the result form of the data collection returned after the operation is also different. In daily applications, these several databases will be used to store different data. The operating platform realizes remote detection and control through the above code, and uniformly converts the data content of these databases into a map for storage, so that these different data can be uniformly compared.
在实际应用中,对于生成的类对象库是具体可以是按照数据库的类型对操作代码进行分类存储,具体可以是存储在类对象库中存储在操作平台上,也可以是通过类对象库的对象关系来获取对象的操作代码,而实际的操作胆码是存储在操作平台的存储单元中,而类对象库中存储的是远程服务器、数据库和操作代码之间的对应关系,即是步骤S130包括:In practical applications, the generated class object library can specifically store the operating code according to the type of the database. It can be stored in the class object library and stored on the operating platform, or it can be the object through the class object library. To obtain the operation code of the object, the actual operation code is stored in the storage unit of the operation platform, and the corresponding relationship between the remote server, the database and the operation code is stored in the class object library, that is, step S130 includes :
根据存储在所述操作平台上的操作远程数据库操作代码对数据库进行访问,读取所述数据库中存储的数据;Access the database according to the remote database operation code stored on the operation platform, and read the data stored in the database;
根据所述远程服务器的类型确定用于分析数据的数据地图类型,并基于所述数据地图类型提取数据格式的转换规则;Determining a data map type for analyzing data according to the type of the remote server, and extracting data format conversion rules based on the data map type;
根据所述转换规则对所述数据进行转换,并分别存储于数据地图中。The data is converted according to the conversion rule and stored in the data map respectively.
对于操作远程数据库操作代码也可以通过两种方式来开发,一种是访问的控制代码,另一种是一种映射文件。The operation code for operating a remote database can also be developed in two ways, one is access control code, and the other is a mapping file.
而对于访问的控制代码指的是对远程服务器上的数据库访问程序的启动脚本,而该脚本至用于控制远程服务器中的程序代码的执行,并不具有直接控制数据库的功能,也即是说这个脚本是间接控制数据库的工具。The access control code refers to the startup script of the database access program on the remote server, and the script is used to control the execution of the program code in the remote server and does not have the function of directly controlling the database, that is to say This script is a tool for indirect control of the database.
同理,对于映射文件,则是通过将不同的数据库映射到远程服务器上的访问接口上,然后通过建立访问接口与操作平台的通信接口之间的对应关系,最后汇总形成一个映射关系表;而在对数据库进行检测时,直接通过查询映射关系表的方式来实现对对应的数据库进行远程访问,同时还可以是通过对应关系的方式来获取到数据库访问代码,并控制访问代码的执行来实现对数据库的访问。In the same way, for the mapping file, it is by mapping different databases to the access interface on the remote server, and then by establishing the corresponding relationship between the access interface and the communication interface of the operating platform, and finally forming a mapping relationship table; and When detecting the database, you can directly access the corresponding database by querying the mapping relationship table. At the same time, you can also obtain the database access code through the corresponding relationship, and control the execution of the access code to achieve the Database access.
在本实施例中,所述数据地图在存储数据的同时,还可以对数据进行分类存储,即是说对于在将数据转换至存储在数据地图的过程中,还包括对从所述数据库中获取到的数据根据数据地图中的类别进行分类,然后在分类的基础上进行转换存储值数据地图中对应的类别中。In this embodiment, while storing the data, the data map can also classify and store the data. That is to say, in the process of converting the data to storage in the data map, it also includes The received data is classified according to the category in the data map, and then converted on the basis of the classification to store the value in the corresponding category in the data map.
在本案中,对于数据地图的转化包括对每个数据库中的数据都转换为一个数据地图,以及将所有获取到的数据库的数据统一转换为一个数据地图;对于转化为一个数据地图时,按照数据库来进行转化,每个数据库的数据作为一个数据类型进行转换,当然在转化的过程中也可以对各个数据库的数据进行初步的转化检验,将正常转化成功的数据存储,对于转换不成功的数据进行异常的标记。In this case, the conversion of the data map includes the conversion of data in each database into a data map, and the unified conversion of all the acquired database data into a data map; for the conversion into a data map, according to the database For conversion, the data of each database is converted as a data type. Of course, during the conversion process, preliminary conversion inspections can be performed on the data of each database, and the data that is successfully converted normally is stored, and the data that is not converted is performed. Abnormal mark.
进一步的,在将获取到的数据库数据转换存储到数据地图中之后,对于步骤S140的实施,具体可以通过以下方式实现:Further, after the acquired database data is converted and stored in the data map, the implementation of step S140 can be specifically implemented in the following ways:
根据所述存储格式将统一转换后的数据地图中的数据进行比对验证,得到第一比对结果,所述第一比对结果为基于所述比对验证从所述数据中筛选出数据格式与所述存储格式不一致的数据;Perform comparison verification on the data in the unified converted data map according to the storage format to obtain a first comparison result, and the first comparison result is based on the comparison verification to select a data format from the data Data inconsistent with the storage format;
根据所述敏感字对筛选出来的数据进行对比,识别出所述数据中的敏感字,并进行异常标记,得到第二比对结果;Compare the filtered data according to the sensitive words, identify the sensitive words in the data, and mark the abnormality to obtain the second comparison result;
根据第一比对结果和第二比对结果生成日志文件。A log file is generated according to the first comparison result and the second comparison result.
在实际应用中,对于比对数据地图时,具体是分别对数据地图中的数据元素与规则进行比对,优选的可以是数据格式的比对,也可以是通过一些计 算算法来对其检验,比如哈希算法等等,通过算法来计算验证值来对数据进行检验。In actual applications, when comparing data maps, it is specifically to compare the data elements and rules in the data map. Preferably, it can be the comparison of the data format, or it can be verified through some calculation algorithms. For example, hash algorithms, etc., use algorithms to calculate verification values to verify data.
对于比对异常(及时不符合规则)的数据库数据从数据地图中提取出来进行单独的保存,在最后会将这些异常的数据生成日志文件,通过日志文件来记录数据库检测的情况,从而便于后续维护人员对数据库的维护和评估。The database data with abnormal comparisons (not in compliance with the rules in time) is extracted from the data map and saved separately. At the end, the abnormal data will be generated into a log file, and the database detection situation will be recorded through the log file to facilitate subsequent maintenance Maintenance and evaluation of the database by personnel.
在实际应用中,对于是否启动上述的检测过程对远程服务器上的数据库的数据进行处理,在建立了两者之间的通信链路之后,还需要根据用户在操作平台上的维护触发来控制执行下一步的检测和对日志文件的下载,具体是在建立通信链路后,In practical applications, whether to start the above detection process to process the data of the database on the remote server, after the communication link between the two is established, it is also necessary to control the execution according to the user's maintenance trigger on the operating platform The next step is to check and download the log file, specifically after the communication link is established,
接收用户在所述操作平台上的远程服务器的维护请求,所述维护请求中包括待维护的远程服务器和对应的数据库信息;Receiving a user's maintenance request of a remote server on the operating platform, the maintenance request including the remote server to be maintained and corresponding database information;
根据所述维护请求将所述类对象库中与所述远程服务器对应的所有操作代码进行整合编译,得到一个远程服务器数据的维护小程序代码,所述维护小程序代码用于获取所述远程服务器中的数据库的数据进行比对分析;According to the maintenance request, all the operation codes corresponding to the remote server in the class object library are integrated and compiled to obtain a maintenance small program code of remote server data, and the maintenance small program code is used to obtain the remote server Compare and analyze the data in the database;
将所述维护小程序代码通过所述通信链路上传至所述远程服务器进行执行。The maintenance applet code is uploaded to the remote server through the communication link for execution.
这时,在操作平台控制对远程服务器完成检测的操作后,远程服务器会想操作平台返馈一个响应消息,操作平台根据响应消息控制执行下一步数据的比对和下载操作,而在步骤S150中,具体实现是:在接收到所述维护小程序代码执行完成的响应消息后,根据所述远程服务器的类型调取所述文件下载代码,从所述远程服务器中下载所述对比结果文件,并存储在操作平台本地的存储器中。At this time, after the operation platform controls the remote server to complete the detection operation, the remote server will want the operation platform to return a response message, and the operation platform controls to perform the next data comparison and download operation according to the response message, and in step S150 , The specific implementation is: after receiving the response message that the maintenance applet code execution is completed, call the file download code according to the type of the remote server, download the comparison result file from the remote server, and Stored in the local storage of the operating platform.
在本实施例中,所述对比结果文件也称为日志文件,在操作平台对远程服务器的数据库进行访问、读取等操作,获取到数据后,可以是将读取到的数据放置在远程服务器上进行比对的处理,而该处理可以是由服务器自动执行服务器自身的检测程序进行比对处理,也可以是通过操作平台开发的规则进行比对处理。In this embodiment, the comparison result file is also called a log file. After the operation platform accesses and reads the database of the remote server, after obtaining the data, it can be placed on the remote server. The comparison processing on the above, and the processing can be the comparison processing by the server automatically executing the detection program of the server itself, or the comparison processing through the rules developed by the operating platform.
在本实施例中,所述数据库检测方法还包括:In this embodiment, the database detection method further includes:
根据所述维护请求和数据库的属性信息生成一个用于存储数据库的数据的表格文件,并嵌入到所述维护小程序代码中上传至所述远程服务器中,其中,所述表格文件的数据存储格式与所述数据库的数据的存储格式一致。According to the maintenance request and the attribute information of the database, a table file for storing the data of the database is generated and embedded in the maintenance applet code and uploaded to the remote server. The data storage format of the table file is It is consistent with the storage format of the data in the database.
在实际应用中,所述远程服务器中数据库的数据在存储的同时,所述维 护小程序代码会定时执行将所述数据库中的数据备份至所述表格文件中,回传给操作平台进行存储。In practical applications, while the data in the database in the remote server is being stored, the maintenance applet code will be executed periodically to back up the data in the database to the table file, and return it to the operating platform for storage.
在本案中,除了生成维护小程序代码之外,所述操作平台还可以通过文件上传代码向所述远程服务器上传一些其他的测试代码,通过该测试代码实现一些其他的功能,不需要每个都要重新生成代码程序,这里的测试脚本文件是一些现有的测试代码,具体为用户根据实际需求自主开发的检测流程对应的脚本代码,与远程服务器本身的检测流程不相同,例如,检测数据库存储卷的坏道情况或者是检测数据库中符合存储的数据格式等要求。对于数据库的检测维护可以是一些预设的检测过程,只是这些检测步骤是需要用户来去控制执行的,而在现有的检测控制中,一般都是采用直接在远程服务器上进行的操作,而不是在操作平台上的操作,而通过本提案的方法,不仅实现了在操作平台本地上控制远程服务器对其自身的数据库的检测,还实现了将检测生成的日志文件下载保存在操作平台本地,从而实现了对检测结果的本地查看,同时还大大节省了手工的维护操作以及来回对数据库的检查。In this case, in addition to generating the maintenance applet code, the operating platform can also upload some other test codes to the remote server through the file upload code, and realize some other functions through the test code, without requiring everybody To regenerate the code program, the test script file here is some existing test code, specifically the script code corresponding to the test process developed by the user according to actual needs, which is different from the test process of the remote server itself, for example, test database storage The bad sectors of the volume may be detected in the database to meet the requirements of the stored data format. The detection and maintenance of the database can be some preset detection processes, but these detection steps require the user to control the execution, and in the existing detection control, the operation is generally performed directly on the remote server. It is not the operation on the operating platform, but the method of this proposal not only realizes the detection of its own database by controlling the remote server locally on the operating platform, but also realizes the download and save of the log file generated by the detection in the local operating platform. In this way, local viewing of the test results is realized, and manual maintenance operations and back and forth inspections of the database are greatly saved.
进一步的,对于一些特殊的检查,用户可以根据实际需要开发出具有特别需求的检测脚本,而这些脚本并不在远程服务器上,通过上述的方法,将这些检测脚本上传至服务器上,在使用时,通过保存在操作平台本地的执行代码来远程控制上传至服务器上的脚本进行控制,从而实现了特殊检测的开发,并且该脚本执行形成的检测日志文件,通过下载文件代码可以下载到操作平台上,以供给用户查看,从而实现在在本地平台上就可以同时实现对数据库中维护和检查,以及实现了对特殊的定制检查需求。Further, for some special inspections, users can develop inspection scripts with special requirements according to actual needs, and these scripts are not on the remote server. Through the above method, upload these inspection scripts to the server. When using, The script uploaded to the server is controlled remotely by the execution code saved in the operating platform, so as to realize the development of special detection, and the detection log file formed by the script execution can be downloaded to the operating platform by downloading the file code. In order to provide users to view, so as to realize the maintenance and inspection of the database at the same time on the local platform, as well as the realization of special customized inspection requirements.
如图2所示,为本申请实施例基于linux执行系统实现的数据库检测方法的具体实现流程图,该方法具体包括以下步骤:As shown in FIG. 2, a specific implementation flow chart of the database detection method based on the linux execution system in this embodiment of the application, the method specifically includes the following steps:
步骤S210、提取系统中的支持连接、登陆、操作远程服务器的操作平台,通过该操作平台执行代码控制在远程服务器上执行系统命令;Step S210: Extract an operating platform in the system that supports connection, login, and operation of a remote server, and execute code control through the operating platform to execute system commands on the remote server;
对于该步骤的具体实现方式为,通过在操作平台上封装用于实现远程操作服务器的代码,而该代码是以Linux系统语言开发得到,当然也可以是通过该调取Linux系统上的远程服务器的访问代码来修改对应的访问接口和访问协议来得到与远程服务器对应的操作代码。The specific implementation method of this step is to encapsulate the code used to realize the remote operation of the server on the operating platform, and the code is developed in the Linux system language, of course, it can also be obtained by calling the remote server on the Linux system. The access code is used to modify the corresponding access interface and access protocol to obtain the operation code corresponding to the remote server.
步骤S220,在远程服务器上进入相关服务器;Step S220, enter the relevant server on the remote server;
在该步骤中,通过该操作平台上的操作代码远程控制服务器访问其对应 的数据库,如hbase、hive等,具体的访问实现:在平台上封装了链接和操作远程数据库的代码。In this step, the remote control server accesses its corresponding database, such as hbase, hive, etc., through the operating code on the operating platform. The specific access is realized: the code for linking and operating the remote database is encapsulated on the platform.
步骤S230、支持进行oracle数据、Mysql数据库与远程服务器上hbase、hive数据库中的数据的批量比对;Step S230: Support batch comparison of oracle data, Mysql database and data in hbase and hive databases on the remote server;
对于该步骤的实现方式:首先查询出各个数据库中的数据,存成map,然后对每个map进行一一比对,将不符合规则的map中的元素单独存起来。For the implementation of this step: first query the data in each database, save it as a map, and then compare each map one by one, and store the elements in the map that do not meet the rules separately.
步骤S240、支持上传文档文件、脚本文件(python、shell、js、jmeter等)到远程服务器上,并在远程服务上执行该脚本或者使用该文档文件;Step S240: Support uploading document files and script files (python, shell, js, jmeter, etc.) to the remote server, and execute the script on the remote service or use the document file;
对于该步骤的实现方式:在平台上封装了上传文件的代码。For the implementation of this step: the code for uploading files is encapsulated on the platform.
步骤S250、当数据库数据比对完成后,将不符合规则的数据整合返回到本地,保存成日志文件;Step S250: After the database data comparison is completed, the data that does not meet the rules is integrated and returned to the local, and saved as a log file;
对于该步骤的实现方式:在平台上封装了下载文件的代码。For the implementation of this step: the code of the download file is encapsulated on the platform.
步骤S260、将日志文件下载保存到操作平台上,以实现在操作平台本地上进行维护查看日志文件。Step S260: Download and save the log file to the operating platform, so as to implement maintenance and viewing of the log file locally on the operating platform.
在该步骤中,具体是通过将步骤S230中保存的不符合规则元素先在服务器上存成日志文件,然后调用下载文件代码方法,将该文件下载到本地。In this step, specifically, the non-compliant elements saved in step S230 are first saved as a log file on the server, and then the download file code method is called to download the file locally.
在本实施例中,通过以上方案,实现了自动检测扫描服务器上数据库中不符合规则数据并将检测结果保存到本地以供查阅的方案,这一自动化的过程,大大节省了手工操作的人力。In this embodiment, through the above scheme, a scheme of automatically detecting non-compliant data in the database on the scanning server and saving the detection result locally for reference is realized. This automated process greatly saves manual manpower.
为了解决上述的问题,本申请还提供一种数据库检测设备,该数据库检测设备可以用于实现本申请实施例提供的数据库检测方法,其物理实现以本地PC电脑端的方式存在,该PC的具体硬件实现如图3所示。In order to solve the above-mentioned problems, this application also provides a database detection device, which can be used to implement the database detection method provided in the embodiments of this application, and its physical implementation exists in the form of a local PC. The specific hardware of the PC The realization is shown in Figure 3.
参见图3,该移动设备包括:处理器301,例如CPU,通信总线302、用户接口303,网络接口304,存储器305。其中,通信总线302用于实现这些组件之间的连接通信。用户接口303可以包括显示屏(Display)、输入单元比如键盘(Keyboard),网络接口304可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器305可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器305可选的还可以是独立于前述处理器301的存储装置。Referring to FIG. 3, the mobile device includes: a processor 301, such as a CPU, a communication bus 302, a user interface 303, a network interface 304, and a memory 305. Among them, the communication bus 302 is used to implement connection and communication between these components. The user interface 303 may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the network interface 304 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 305 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as a magnetic disk memory. Optionally, the memory 305 may also be a storage device independent of the aforementioned processor 301.
如图3所示,作为一种计算机可读存储介质的存储器305中可以包括操作系统、网络通信模块、用户接口模块以及基于数据库检测程序。其中,操 作系统是管理和数据分析装置和软件资源的程序,所述数据库检测程序以及其它软件和/或程序的运行。As shown in FIG. 3, the memory 305 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a database-based detection program. Among them, the operating system is a program for managing and data analysis devices and software resources, the database checking program and the operation of other software and/or programs.
在图3所示的PC操作平台的硬件结构中,网络接口104主要用于接入网络;用户接口103主要用于与外界互联网或者是与提供企业数据的远程服务器进行通信,调取远程服务器上的所有数据库中的存储的数据,然后对这些数据进行分析处理,得到对应的数据异常结构,而处理器301可以用于调用存储器305中存储的数据库检测程序,并执行以下数据库检测方法的各实施例的操作。In the hardware structure of the PC operating platform shown in FIG. 3, the network interface 104 is mainly used to access the network; the user interface 103 is mainly used to communicate with the external Internet or with a remote server that provides enterprise data, and access to the remote server The data stored in all the databases in the database are analyzed and processed to obtain the corresponding abnormal data structure, and the processor 301 can be used to call the database detection program stored in the memory 305 and execute the implementation of the following database detection methods Example of operation.
在本大明实施例中,对于图3的实现还可以是一种手机等可以触控操作的移动终端,该移动终端的处理器通过读取存储在缓存器或者存储单元中的可以实现数据库检测方法的程序代码来进行对远程服务器上的数据库进行远程的操作,并将操作后的结果生成日志文件返馈下载到操作平台本地上进行存储。In this embodiment of the Ming Dynasty, the implementation of FIG. 3 can also be a mobile terminal capable of touch operation such as a mobile phone. The processor of the mobile terminal can implement the database detection method by reading the data stored in the buffer or storage unit. The program code is used to perform remote operations on the database on the remote server, and the log file generated after the operation is generated and fed back to the operating platform for local storage.
为了解决上述的问题,本申请实施例还提供了一种数据库检测装置,参照图4,图4为本申请实施例提供的数据库检测装置的功能模块的示意图。在本实施例中,该装置包括:In order to solve the above-mentioned problem, an embodiment of the present application also provides a database detection device. Referring to FIG. 4, FIG. 4 is a schematic diagram of the functional modules of the database detection device provided by the embodiment of the application. In this embodiment, the device includes:
对象生成模块41,用于根据远程服务器的操作请求生成类对象库,并将所述类对象库存储于操作平台上的存储单元中,其中,所述类对象库用于控制所述操作平台对所述远程服务器的远程操作,所述类对象库中包含有远程服务器操作代码、远程数据库操作代码以及文件下载代码;The object generation module 41 is configured to generate a class object library according to the operation request of the remote server, and store the class object library in a storage unit on the operating platform, wherein the class object library is used to control the operating platform pair For the remote operation of the remote server, the class object library contains remote server operation code, remote database operation code, and file download code;
通信模块42,用于接收远程操作请求,并确定所述远程操作请求中待触发访问的远程服务器的类型,通过所述操作平台从所述类对象库中调取与所述远程服务器的类型对应的远程服务器操作代码,基于所述远程服务器操作代码建立所述操作平台与所述远程服务器之间的通信链路;The communication module 42 is configured to receive a remote operation request and determine the type of the remote server to be accessed in the remote operation request, and retrieve the type corresponding to the remote server from the class object library through the operation platform The remote server operation code is based on the remote server operation code to establish a communication link between the operation platform and the remote server;
数据读取模块43,用于在建立所述通信链路后,根据所述远程服务器的类型和所述通信链路对应的通信协议从所述类对象库中获取对应的远程数据库操作代码,并基于所述远程数据库操作代码对所述远程服务器上的各数据库进行访问,读取所述数据库中的数据;The data reading module 43 is configured to obtain the corresponding remote database operation code from the class object library according to the type of the remote server and the communication protocol corresponding to the communication link after the communication link is established, and Access to each database on the remote server based on the remote database operation code, and read data in the database;
检测模块44,用于根据预设的检验规则对从所述远程服务器中读取到的各数据库的数据进行比对,筛选出所述数据库中异常的数据,并根据所述异常的数据生成日志格式的比对结果文件,其中,所述预设的检验规则包括所 述数据在所述数据库中的存储格式和数据中的敏感字;The detection module 44 is configured to compare the data of each database read from the remote server according to preset inspection rules, filter out abnormal data in the database, and generate a log based on the abnormal data Format comparison result file, wherein the preset inspection rules include the storage format of the data in the database and the sensitive words in the data;
下载模块45,用于调取与所述远程服务器的类型对应的所述文件下载代码将所述比对结果文件从所述远程服务器中下载并保存至所述操作平台上。The download module 45 is configured to retrieve the file download code corresponding to the type of the remote server, download the comparison result file from the remote server and save it on the operating platform.
基于与上述本申请实施例的数据库检测方法相同的实施例说明内容,因此本实施例对数据库检测装置的实施例内容不做过多赘述。Based on the description of the embodiment that is the same as the above-mentioned database detection method of the embodiment of the present application, the content of the embodiment of the database detection device is not described in detail in this embodiment.
本实施例通过在操作平台上设置远程服务器的操作代码来实现对远程服务器上的数据库的操作和数据的读取,然后对读取到的数据进行格式的检验,生成日志文件,并将日志文件保存到操作平台上,从而实现了用户可以对远程服务器中的数据库的数据存储的结果进行实施查看,不需要再通过远程的操作方式来查看了,大大提高了对数据库的检修维护效率,从而解决了现有的服务器维护平台不支持远程服务器上检测日志文件的存储,而导致检修维护的操作过于复杂的技术问题,大大提高了远程服务器数据库的维护效率。In this embodiment, the operation code of the remote server is set on the operating platform to realize the operation of the database on the remote server and the reading of data, and then the format of the read data is checked, a log file is generated, and the log file is Save to the operating platform, so that users can implement and view the results of the data storage of the database in the remote server, no longer need to view through the remote operation mode, greatly improve the maintenance efficiency of the database, thereby solving The existing server maintenance platform does not support the storage of detection log files on the remote server, which leads to the technical problem of overly complex maintenance operations, which greatly improves the maintenance efficiency of the remote server database.
本申请还提供一种计算机可读存储介质。The application also provides a computer-readable storage medium.
本实施例中,所述计算机可读存储介质上存储有数据库检测程序,所述数据库检测程序被处理器执行时实现如上述任一项实施例中所述的数据库检测方法的步骤,其具体步骤如下:In this embodiment, a database detection program is stored on the computer-readable storage medium, and when the database detection program is executed by a processor, the steps of the database detection method described in any of the above embodiments are implemented, and the specific steps are as follows:
根据远程服务器的操作请求生成类对象库,并将所述类对象库存储于操作平台上的存储单元中,其中,所述类对象库用于控制所述操作平台对所述远程服务器的远程操作,所述类对象库中包含有远程服务器操作代码、远程数据库操作代码以及文件下载代码;The class object library is generated according to the operation request of the remote server, and the class object library is stored in the storage unit on the operating platform, wherein the class object library is used to control the remote operation of the remote server by the operating platform , The class object library contains remote server operation code, remote database operation code and file download code;
接收远程操作请求,并确定所述远程操作请求中待触发访问的远程服务器的类型,通过所述操作平台从所述类对象库中调取与所述远程服务器的类型对应的远程服务器操作代码,基于所述远程服务器操作代码建立所述操作平台与所述远程服务器之间的通信链路;Receive a remote operation request, determine the type of remote server to be accessed in the remote operation request, and retrieve the remote server operation code corresponding to the type of the remote server from the class object library through the operation platform, Establishing a communication link between the operating platform and the remote server based on the remote server operating code;
根据所述远程服务器的类型和所述通信链路对应的通信协议,从所述类对象库中获取对应的远程数据库操作代码,并基于所述远程数据库操作代码对所述远程服务器上的各数据库进行访问,以读取所述数据库中的数据;According to the type of the remote server and the communication protocol corresponding to the communication link, the corresponding remote database operation code is obtained from the class object library, and based on the remote database operation code, the database on the remote server Access to read the data in the database;
根据预设的检验规则对从所述远程服务器中读取到的各数据库的数据进行比对,以筛选出所述数据库中异常的数据,并根据所述异常的数据生成日志格式的比对结果文件,其中,所述预设的检验规则包括所述数据在所述数据库中的存储格式和数据中的敏感字;Compare the data of each database read from the remote server according to preset inspection rules to filter out abnormal data in the database, and generate a comparison result in log format according to the abnormal data File, wherein the preset inspection rule includes the storage format of the data in the database and the sensitive words in the data;
调取与所述远程服务器的类型对应的所述文件下载代码,以通过所述文件下载代码将所述比对结果文件从所述远程服务器中下载并保存至所述操作平台上。The file download code corresponding to the type of the remote server is retrieved to download the comparison result file from the remote server and save it on the operating platform through the file download code.
在本实施例中,所述数据库检测程序被所述处理器执行实现所述根据远程服务器的操作请求生成类对象库,并将所述类对象库存储于操作平台上的存储单元中的步骤时,包括如下步骤:In this embodiment, the database detection program is executed by the processor to realize the steps of generating a class object library according to an operation request of a remote server and storing the class object library in a storage unit on an operating platform. , Including the following steps:
根据所述操作请求中请求操作的所述远程数据库,确定所述远程服务器中各数据库的属性信息,所述属性信息包括数据库的访问方式、操作方式和数据库类型;Determine the attribute information of each database in the remote server according to the remote database requested to be operated in the operation request, the attribute information including the access mode, operation mode and database type of the database;
根据所述访问方式,调取与所述访问方式对应的所述数据库的访问接口以及预设的访问执行代码,并根据所述访问接口对所述预设的访问执行代码中参数进行修改,生成所述远程服务器操作代码;According to the access mode, call the access interface of the database corresponding to the access mode and the preset access execution code, and modify the parameters in the preset access execution code according to the access interface to generate The remote server operation code;
根据所述操作方式、所述数据库类型以及预设的数据库访问代码,生成用于所述远程数据库进行操作访问的所述远程数据库操作代码;Generating the remote database operation code for operating and accessing the remote database according to the operation mode, the database type, and the preset database access code;
将所述远程服务器操作代码和所述操作远程数据库操作代码存储于所述类对象库中。The remote server operation code and the remote database operation code are stored in the class object library.
在本实施例中,所述数据库检测程序被所述处理器执行实现所述根据所述远程服务器的类型和所述通信链路对应的通信协议,从所述类对象库中获取对应的远程数据库操作代码,并基于所述远程数据库操作代码对所述远程服务器上的各数据库进行访问,以读取所述数据库中的数据的步骤时,包括如下步骤:In this embodiment, the database detection program is executed by the processor to obtain the corresponding remote database from the class object library according to the type of the remote server and the communication protocol corresponding to the communication link Operating code, and accessing each database on the remote server based on the remote database operating code to read the data in the database includes the following steps:
根据存储在所述操作平台上的操作远程数据库操作代码对数据库进行访问,读取所述数据库中存储的数据;Access the database according to the remote database operation code stored on the operation platform, and read the data stored in the database;
根据所述远程服务器的类型确定用于分析数据的数据地图类型,并基于所述数据地图类型提取数据格式的转换规则;Determining a data map type for analyzing data according to the type of the remote server, and extracting data format conversion rules based on the data map type;
根据所述转换规则对所述数据进行转换,并分别存储于数据地图中。The data is converted according to the conversion rule and stored in the data map respectively.
在本实施例中,所述数据库检测程序被所述处理器执行实现所述根据预设的检验规则对从所述远程服务器中读取到的各数据库的数据进行比对,以筛选出所述数据库中异常的数据,并根据所述异常的数据生成日志格式的比对结果文件的步骤包括:In this embodiment, the database detection program is executed by the processor to implement the comparison of the data of each database read from the remote server according to a preset inspection rule to filter out the The steps of generating abnormal data in the database and generating a comparison result file in log format according to the abnormal data include:
根据所述存储格式,将统一转换后的数据地图中的数据进行比对验证,得到第一比对结果,所述第一比对结果为基于所述比对验证从所述数据中筛 选出数据格式与所述存储格式不一致的数据;According to the storage format, the data in the unified converted data map is compared and verified to obtain a first comparison result, and the first comparison result is that data is selected from the data based on the comparison verification Data whose format is inconsistent with the storage format;
根据所述敏感字对筛选出来的数据进行对比,识别出所述数据中的敏感字并进行异常标记,得到第二比对结果;Compare the screened data according to the sensitive words, identify the sensitive words in the data and mark the abnormality, to obtain the second comparison result;
根据第一比对结果和第二比对结果生成日志文件。A log file is generated according to the first comparison result and the second comparison result.
在本实施例中,所述数据库检测程序被所述处理器执行时还实现如下步骤:In this embodiment, the following steps are further implemented when the database detection program is executed by the processor:
接收所述操作平台上远程服务器发起的维护请求,所述维护请求中包括待维护的远程服务器和对应的数据库信息;Receiving a maintenance request initiated by a remote server on the operating platform, where the maintenance request includes the remote server to be maintained and corresponding database information;
根据所述维护请求将所述类对象库中与所述远程服务器对应的所有操作代码进行整合编译,得到一个远程服务器数据的维护小程序代码,所述维护小程序代码用于获取所述远程服务器中的数据库的数据进行比对分析;According to the maintenance request, all the operation codes corresponding to the remote server in the class object library are integrated and compiled to obtain a maintenance small program code of remote server data, and the maintenance small program code is used to obtain the remote server Compare and analyze the data in the database;
通过所述通信链路将所述维护小程序代码上传至所述远程服务器并执行。The maintenance applet code is uploaded to the remote server through the communication link and executed.
在本实施例中,所述数据库检测程序被所述处理器执行实现所述调取与所述远程服务器的类型对应的所述文件下载代码,以通过所述文件下载代码将所述比对结果文件从所述远程服务器中下载并保存至所述操作平台上的步骤时,包括如下步骤:In this embodiment, the database detection program is executed by the processor to realize the retrieval of the file download code corresponding to the type of the remote server, so as to use the file download code to compare the comparison result When the file is downloaded from the remote server and saved on the operating platform, the steps include the following steps:
在接收到所述维护小程序代码执行完成的响应消息后,根据所述远程服务器的类型调取所述文件下载代码,以及从所述远程服务器中下载所述对比结果文件,并将所述对比结果文件存储在操作平台本地的存储器中。After receiving the response message that the maintenance applet code execution is complete, call the file download code according to the type of the remote server, download the comparison result file from the remote server, and compare the The result file is stored in the local storage of the operating platform.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better.的实施方式。 Based on this understanding, the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM/RAM), including Several instructions are used to make a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) execute the method described in each embodiment of the present application.

Claims (20)

  1. 一种数据库检测方法,应用于对远程数据库中的数据检测,所述方法包括以下步骤:A database detection method is applied to the detection of data in a remote database. The method includes the following steps:
    根据远程服务器的操作请求生成类对象库,并将所述类对象库存储于操作平台上的存储单元中,其中,所述类对象库用于控制所述操作平台对所述远程服务器的远程操作,所述类对象库中包含有远程服务器操作代码、远程数据库操作代码以及文件下载代码;The class object library is generated according to the operation request of the remote server, and the class object library is stored in the storage unit on the operating platform, wherein the class object library is used to control the remote operation of the remote server by the operating platform , The class object library contains remote server operation code, remote database operation code and file download code;
    接收远程操作请求,并确定所述远程操作请求中待触发访问的远程服务器的类型,通过所述操作平台从所述类对象库中调取与所述远程服务器的类型对应的远程服务器操作代码,基于所述远程服务器操作代码建立所述操作平台与所述远程服务器之间的通信链路;Receive a remote operation request, determine the type of remote server to be accessed in the remote operation request, and retrieve the remote server operation code corresponding to the type of the remote server from the class object library through the operation platform, Establishing a communication link between the operating platform and the remote server based on the remote server operating code;
    根据所述远程服务器的类型和所述通信链路对应的通信协议,从所述类对象库中获取对应的远程数据库操作代码,并基于所述远程数据库操作代码对所述远程服务器上的各数据库进行访问,以读取所述数据库中的数据;According to the type of the remote server and the communication protocol corresponding to the communication link, the corresponding remote database operation code is obtained from the class object library, and based on the remote database operation code, the database on the remote server Access to read the data in the database;
    根据预设的检验规则对从所述远程服务器中读取到的各数据库的数据进行比对,以筛选出所述数据库中异常的数据,并根据所述异常的数据生成日志格式的比对结果文件,其中,所述预设的检验规则包括所述数据在所述数据库中的存储格式和数据中的敏感字;Compare the data of each database read from the remote server according to preset inspection rules to filter out abnormal data in the database, and generate a comparison result in log format according to the abnormal data File, wherein the preset inspection rule includes the storage format of the data in the database and the sensitive words in the data;
    调取与所述远程服务器的类型对应的所述文件下载代码,以通过所述文件下载代码将所述比对结果文件从所述远程服务器中下载并保存至所述操作平台上。The file download code corresponding to the type of the remote server is retrieved to download the comparison result file from the remote server and save it on the operating platform through the file download code.
  2. 如权利要求1所述的数据库检测方法,所述根据远程服务器的操作请求生成类对象库,并将所述类对象库存储于操作平台上的存储单元中的步骤包括:The database detection method according to claim 1, wherein the step of generating a class object library according to an operation request of a remote server, and storing the class object library in a storage unit on an operating platform comprises:
    根据所述操作请求中请求操作的所述远程数据库,确定所述远程服务器中各数据库的属性信息,所述属性信息包括数据库的访问方式、操作方式和 数据库类型;Determine the attribute information of each database in the remote server according to the remote database requested to be operated in the operation request, the attribute information including the access mode, operation mode and database type of the database;
    根据所述访问方式,调取与所述访问方式对应的所述数据库的访问接口以及预设的访问执行代码,并根据所述访问接口对所述预设的访问执行代码中参数进行修改,生成所述远程服务器操作代码;According to the access mode, call the access interface of the database corresponding to the access mode and the preset access execution code, and modify the parameters in the preset access execution code according to the access interface to generate The remote server operation code;
    根据所述操作方式、所述数据库类型以及预设的数据库访问代码,生成用于所述远程数据库进行操作访问的所述远程数据库操作代码;Generating the remote database operation code for operating and accessing the remote database according to the operation mode, the database type, and the preset database access code;
    将所述远程服务器操作代码和所述操作远程数据库操作代码存储于所述类对象库中。The remote server operation code and the remote database operation code are stored in the class object library.
  3. 如权利要求2所述的数据库检测方法,所述根据所述远程服务器的类型和所述通信链路对应的通信协议,从所述类对象库中获取对应的远程数据库操作代码,并基于所述远程数据库操作代码对所述远程服务器上的各数据库进行访问,以读取所述数据库中的数据的步骤包括:The database detection method according to claim 2, wherein the corresponding remote database operation code is obtained from the class object library according to the type of the remote server and the communication protocol corresponding to the communication link, and based on the The steps of the remote database operation code accessing each database on the remote server to read the data in the database include:
    根据存储在所述操作平台上的操作远程数据库操作代码对数据库进行访问,读取所述数据库中存储的数据;Access the database according to the remote database operation code stored on the operation platform, and read the data stored in the database;
    根据所述远程服务器的类型确定用于分析数据的数据地图类型,并基于所述数据地图类型提取数据格式的转换规则;Determining a data map type for analyzing data according to the type of the remote server, and extracting data format conversion rules based on the data map type;
    根据所述转换规则对所述数据进行转换,并分别存储于数据地图中。The data is converted according to the conversion rule and stored in the data map respectively.
  4. 如权利要求3所述的数据库检测方法,所述根据预设的检验规则对从所述远程服务器中读取到的各数据库的数据进行比对,以筛选出所述数据库中异常的数据,并根据所述异常的数据生成日志格式的比对结果文件的步骤包括:The database detection method according to claim 3, wherein the data of each database read from the remote server is compared according to a preset inspection rule to screen out abnormal data in the database, and The step of generating a comparison result file in log format according to the abnormal data includes:
    根据所述存储格式,将统一转换后的数据地图中的数据进行比对验证,得到第一比对结果,所述第一比对结果为基于所述比对验证从所述数据中筛选出数据格式与所述存储格式不一致的数据;According to the storage format, the data in the unified converted data map is compared and verified to obtain a first comparison result, and the first comparison result is that data is selected from the data based on the comparison verification Data whose format is inconsistent with the storage format;
    根据所述敏感字对筛选出来的数据进行对比,识别出所述数据中的敏感字并进行异常标记,得到第二比对结果;Compare the screened data according to the sensitive words, identify the sensitive words in the data and mark the abnormality, to obtain the second comparison result;
    根据第一比对结果和第二比对结果生成日志文件。A log file is generated according to the first comparison result and the second comparison result.
  5. 如权利要求4所述的数据库检测方法,在所述接收远程操作请求,并确定所述远程操作请求中待触发访问的远程服务器的类型,通过所述操作平台从所述类对象库中调取与所述远程服务器的类型对应的远程服务器操作代码,基于所述远程服务器操作代码建立所述操作平台与所述远程服务器之间的通信链路的步骤所述之后,还包括:The database detection method according to claim 4, after receiving the remote operation request, determining the type of the remote server to be accessed in the remote operation request, and calling from the class object library through the operation platform The remote server operation code corresponding to the type of the remote server, after the step of establishing a communication link between the operation platform and the remote server based on the remote server operation code, further includes:
    接收所述操作平台上远程服务器发起的维护请求,所述维护请求中包括待维护的远程服务器和对应的数据库信息;Receiving a maintenance request initiated by a remote server on the operating platform, where the maintenance request includes the remote server to be maintained and corresponding database information;
    根据所述维护请求将所述类对象库中与所述远程服务器对应的所有操作代码进行整合编译,得到一个远程服务器数据的维护小程序代码,所述维护小程序代码用于获取所述远程服务器中的数据库的数据进行比对分析;According to the maintenance request, all the operation codes corresponding to the remote server in the class object library are integrated and compiled to obtain a maintenance small program code of remote server data, and the maintenance small program code is used to obtain the remote server Compare and analyze the data in the database;
    通过所述通信链路将所述维护小程序代码上传至所述远程服务器并执行。The maintenance applet code is uploaded to the remote server through the communication link and executed.
  6. 如权利要求5所述的数据库检测方法,所述调取与所述远程服务器的类型对应的所述文件下载代码,以通过所述文件下载代码将所述比对结果文件从所述远程服务器中下载并保存至所述操作平台上的步骤包括:The database detection method according to claim 5, wherein the file download code corresponding to the type of the remote server is retrieved, so as to use the file download code to transfer the comparison result file from the remote server The steps to download and save to the operating platform include:
    在接收到所述维护小程序代码执行完成的响应消息后,根据所述远程服务器的类型调取所述文件下载代码,以及从所述远程服务器中下载所述对比结果文件,并将所述对比结果文件存储在操作平台本地的存储器中。After receiving the response message that the maintenance applet code execution is complete, call the file download code according to the type of the remote server, download the comparison result file from the remote server, and compare the The result file is stored in the local storage of the operating platform.
  7. 如权利要求6所述的数据库检测方法,所述数据库检测方法还包括:8. The database detection method according to claim 6, the database detection method further comprising:
    根据所述维护请求和数据库的属性信息,生成用于存储数据库的数据的表格文件,并将所述表格文件嵌入到所述维护小程序代码中上传至所述远程服务器中,其中,所述表格文件的数据存储格式与所述数据库的数据的存储格式一致。According to the maintenance request and the attribute information of the database, a table file for storing data of the database is generated, and the table file is embedded in the maintenance applet code and uploaded to the remote server, wherein the table The data storage format of the file is consistent with the data storage format of the database.
  8. 一种数据库检测装置,应用于对远程服务器数据库中的数据检测,所述数据库检测装置包括:A database detecting device, which is applied to detecting data in a remote server database, the database detecting device includes:
    对象生成模块,用于根据远程服务器的操作请求生成类对象库,并将所述类对象库存储于操作平台上的存储单元中,其中,所述类对象库用于控制所述操作平台对所述远程服务器的远程操作,所述类对象库中包含有远程服务器操作代码、远程数据库操作代码以及文件下载代码;The object generation module is used to generate a class object library according to the operation request of the remote server, and store the class object library in a storage unit on the operating platform, where the class object library is used to control the operating platform to The remote operation of the remote server, the class object library contains remote server operation code, remote database operation code and file download code;
    通信模块,用于接收远程操作请求,并确定所述远程操作请求中待触发访问的远程服务器的类型,通过所述操作平台从所述类对象库中调取与所述远程服务器的类型对应的远程服务器操作代码,基于所述远程服务器操作代码建立所述操作平台与所述远程服务器之间的通信链路;The communication module is used to receive the remote operation request and determine the type of the remote server to be accessed in the remote operation request, and retrieve the type corresponding to the remote server from the class object library through the operation platform Remote server operation code, based on the remote server operation code to establish a communication link between the operation platform and the remote server;
    数据读取模块,用于根据所述远程服务器的类型和所述通信链路对应的通信协议,从所述类对象库中获取对应的远程数据库操作代码,并基于所述远程数据库操作代码对所述远程服务器上的各数据库进行访问,以读取所述数据库中的数据;The data reading module is used to obtain the corresponding remote database operation code from the class object library according to the type of the remote server and the communication protocol corresponding to the communication link, and to perform data processing based on the remote database operation code Each database on the remote server is accessed to read the data in the database;
    检测模块,用于根据预设的检验规则对从所述远程服务器中读取到的各数据库的数据进行比对,以筛选出所述数据库中异常的数据,并根据所述异常的数据生成日志格式的比对结果文件,其中,所述预设的检验规则包括所述数据在所述数据库中的存储格式和数据中的敏感字;The detection module is used to compare the data of each database read from the remote server according to preset inspection rules to filter out abnormal data in the database, and generate a log based on the abnormal data Format comparison result file, wherein the preset inspection rules include the storage format of the data in the database and the sensitive words in the data;
    下载模块,用于调取与所述远程服务器的类型对应的所述文件下载代码,以通过所述文件下载代码将所述比对结果文件从所述远程服务器中下载并保存至所述操作平台上。The download module is configured to retrieve the file download code corresponding to the type of the remote server to download the comparison result file from the remote server and save it to the operating platform through the file download code on.
  9. 如权利要求8所述的数据库检测装置,所述对象生成模块用于根据所述操作请求中请求操作的所述远程数据库,确定所述远程服务器中各数据库的属性信息,所述属性信息包括数据库的访问方式、操作方式和数据库类型;根据所述访问方式,调取与所述访问方式对应的所述数据库的访问接口以及预设的访问执行代码,并根据所述访问接口对所述预设的访问执行代码中参数进行修改,生成所述远程服务器操作代码;根据所述操作方式、所述数据库类型以及预设的数据库访问代码,生成用于所述远程数据库进行操作访问 的所述远程数据库操作代码;将所述远程服务器操作代码和所述操作远程数据库操作代码存储于所述类对象库中。The database detection device according to claim 8, wherein the object generation module is configured to determine the attribute information of each database in the remote server according to the remote database requested to be operated in the operation request, the attribute information including the database Access mode, operation mode and database type; according to the access mode, the access interface of the database corresponding to the access mode and the preset access execution code are called, and the preset access execution code is checked according to the access interface Modify the parameters in the access execution code to generate the remote server operation code; according to the operation mode, the database type, and the preset database access code, generate the remote database for operation and access to the remote database Operation code; storing the remote server operation code and the remote database operation code in the class object library.
  10. 如权利要求9所述的数据库检测装置,所述数据读取模块用于根据存储在所述操作平台上的操作远程数据库操作代码对数据库进行访问,读取所述数据库中存储的数据;根据所述远程服务器的类型确定用于分析数据的数据地图类型,并基于所述数据地图类型提取数据格式的转换规则;根据所述转换规则对所述数据进行转换,并分别存储于数据地图中。The database detection device according to claim 9, wherein the data reading module is used to access the database according to the remote database operation code stored on the operation platform, and read the data stored in the database; The type of the remote server determines the data map type used to analyze the data, and extracts the conversion rule of the data format based on the data map type; converts the data according to the conversion rule and stores them in the data map respectively.
  11. 如权利要求10所述的数据库检测装置,所述检测模块用于根据所述存储格式,将统一转换后的数据地图中的数据进行比对验证,得到第一比对结果,所述第一比对结果为基于所述比对验证从所述数据中筛选出数据格式与所述存储格式不一致的数据;根据所述敏感字对筛选出来的数据进行对比,识别出所述数据中的敏感字并进行异常标记,得到第二比对结果;根据第一比对结果和第二比对结果生成日志文件。The database detection device according to claim 10, wherein the detection module is configured to compare and verify the data in the unified converted data map according to the storage format to obtain a first comparison result, and the first comparison The result of the comparison is that based on the comparison and verification, the data whose data format is inconsistent with the storage format is selected from the data; the selected data is compared according to the sensitive words, and the sensitive words in the data are identified and combined Mark the abnormality to obtain the second comparison result; generate a log file according to the first comparison result and the second comparison result.
  12. 如权利要求11所述的数据库检测装置,所述数据库检测装置还包括维护模块,用于接收通过所述通信链路所述操作平台上远程服务器发起的维护请求,所述维护请求中包括待维护的远程服务器和对应的数据库信息;根据所述维护请求将所述类对象库中与所述远程服务器对应的所有操作代码进行整合编译,得到一个远程服务器数据的维护小程序代码,所述维护小程序代码用于获取所述远程服务器中的数据库的数据进行比对分析;将所述维护小程序代码上传至所述远程服务器并进行执行。The database detection device according to claim 11, said database detection device further comprising a maintenance module for receiving a maintenance request initiated by a remote server on said operating platform via said communication link, said maintenance request including a maintenance request The remote server and the corresponding database information; according to the maintenance request, all the operation codes corresponding to the remote server in the class object library are integrated and compiled to obtain a maintenance applet code for the remote server data. The maintenance applet The program code is used to obtain the data of the database in the remote server for comparison and analysis; upload the maintenance applet code to the remote server and execute it.
  13. 如权利要求12所述的数据库检测装置,所述检测模块用于在接收到所述维护小程序代码执行完成的响应消息后,根据所述远程服务器的类型调取所述文件下载代码,以及从所述远程服务器中下载所述对比结果文件,并将所述对比结果文件存储在操作平台本地的存储器中。The database detection device according to claim 12, wherein the detection module is configured to retrieve the file download code according to the type of the remote server after receiving the response message that the maintenance applet code execution is completed, and from The remote server downloads the comparison result file, and stores the comparison result file in the local storage of the operating platform.
  14. 一种数据库检测设备,所述数据库检测设备包括:存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的数据库检测程序,所述 数据库检测程序被所述处理器执行时实现如下所述的数据库检测方法的步骤:A database detection device, the database detection device comprising: a memory, a processor, and a database detection program that is stored on the memory and can run on the processor, and when the database detection program is executed by the processor The steps to implement the database detection method described below:
    根据远程服务器的操作请求生成类对象库,并将所述类对象库存储于操作平台上的存储单元中,其中,所述类对象库用于控制所述操作平台对所述远程服务器的远程操作,所述类对象库中包含有远程服务器操作代码、远程数据库操作代码以及文件下载代码;The class object library is generated according to the operation request of the remote server, and the class object library is stored in the storage unit on the operating platform, wherein the class object library is used to control the remote operation of the remote server by the operating platform , The class object library contains remote server operation code, remote database operation code and file download code;
    接收远程操作请求,并确定所述远程操作请求中待触发访问的远程服务器的类型,通过所述操作平台从所述类对象库中调取与所述远程服务器的类型对应的远程服务器操作代码,基于所述远程服务器操作代码建立所述操作平台与所述远程服务器之间的通信链路;Receive a remote operation request, determine the type of remote server to be accessed in the remote operation request, and retrieve the remote server operation code corresponding to the type of the remote server from the class object library through the operation platform, Establishing a communication link between the operating platform and the remote server based on the remote server operating code;
    根据所述远程服务器的类型和所述通信链路对应的通信协议,从所述类对象库中获取对应的远程数据库操作代码,并基于所述远程数据库操作代码对所述远程服务器上的各数据库进行访问,以读取所述数据库中的数据;According to the type of the remote server and the communication protocol corresponding to the communication link, the corresponding remote database operation code is obtained from the class object library, and based on the remote database operation code, the database on the remote server Access to read the data in the database;
    根据预设的检验规则对从所述远程服务器中读取到的各数据库的数据进行比对,以筛选出所述数据库中异常的数据,并根据所述异常的数据生成日志格式的比对结果文件,其中,所述预设的检验规则包括所述数据在所述数据库中的存储格式和数据中的敏感字;Compare the data of each database read from the remote server according to preset inspection rules to filter out abnormal data in the database, and generate a comparison result in log format according to the abnormal data File, wherein the preset inspection rule includes the storage format of the data in the database and the sensitive words in the data;
    调取与所述远程服务器的类型对应的所述文件下载代码,以通过所述文件下载代码将所述比对结果文件从所述远程服务器中下载并保存至所述操作平台上。The file download code corresponding to the type of the remote server is retrieved to download the comparison result file from the remote server and save it on the operating platform through the file download code.
  15. 如权利要求14所述的数据库检测设备,所述数据库检测程序被所述处理器执行实现所述根据远程服务器的操作请求生成类对象库,并将所述类对象库存储于操作平台上的存储单元中的步骤时,包括如下步骤:The database detection device according to claim 14, the database detection program is executed by the processor to realize the generation of the class object library according to the operation request of the remote server, and the storage of the class object library on the operating platform The steps in the unit include the following steps:
    根据所述操作请求中请求操作的所述远程数据库,确定所述远程服务器中各数据库的属性信息,所述属性信息包括数据库的访问方式、操作方式和数据库类型;Determine the attribute information of each database in the remote server according to the remote database requested to be operated in the operation request, the attribute information including the access mode, operation mode and database type of the database;
    根据所述访问方式,调取与所述访问方式对应的所述数据库的访问接口以及预设的访问执行代码,并根据所述访问接口对所述预设的访问执行代码中参数进行修改,生成所述远程服务器操作代码;According to the access mode, call the access interface of the database corresponding to the access mode and the preset access execution code, and modify the parameters in the preset access execution code according to the access interface to generate The remote server operation code;
    根据所述操作方式、所述数据库类型以及预设的数据库访问代码,生成用于所述远程数据库进行操作访问的所述远程数据库操作代码;Generating the remote database operation code for operating and accessing the remote database according to the operation mode, the database type, and the preset database access code;
    将所述远程服务器操作代码和所述操作远程数据库操作代码存储于所述类对象库中。The remote server operation code and the remote database operation code are stored in the class object library.
  16. 如权利要求15所述的数据库检测设备,所述数据库检测程序被所述处理器执行实现所述根据所述远程服务器的类型和所述通信链路对应的通信协议,从所述类对象库中获取对应的远程数据库操作代码,并基于所述远程数据库操作代码对所述远程服务器上的各数据库进行访问,以读取所述数据库中的数据的步骤时,包括如下步骤:The database detection device according to claim 15, wherein the database detection program is executed by the processor to implement the communication protocol from the class object library according to the type of the remote server and the communication protocol corresponding to the communication link The step of obtaining the corresponding remote database operation code and accessing each database on the remote server based on the remote database operation code to read the data in the database includes the following steps:
    根据存储在所述操作平台上的操作远程数据库操作代码对数据库进行访问,读取所述数据库中存储的数据;Access the database according to the remote database operation code stored on the operation platform, and read the data stored in the database;
    根据所述远程服务器的类型确定用于分析数据的数据地图类型,并基于所述数据地图类型提取数据格式的转换规则;Determining a data map type for analyzing data according to the type of the remote server, and extracting data format conversion rules based on the data map type;
    根据所述转换规则对所述数据进行转换,并分别存储于数据地图中。The data is converted according to the conversion rule and stored in the data map respectively.
  17. 如权利要求16所述的数据库检测设备,所述数据库检测程序被所述处理器执行实现所述根据预设的检验规则对从所述远程服务器中读取到的各数据库的数据进行比对,以筛选出所述数据库中异常的数据,并根据所述异常的数据生成日志格式的比对结果文件的步骤包括:15. The database detection device according to claim 16, wherein the database detection program is executed by the processor to implement the comparison of the data of each database read from the remote server according to a preset inspection rule, The steps of filtering out abnormal data in the database and generating a comparison result file in a log format according to the abnormal data include:
    根据所述存储格式,将统一转换后的数据地图中的数据进行比对验证,得到第一比对结果,所述第一比对结果为基于所述比对验证从所述数据中筛选出数据格式与所述存储格式不一致的数据;According to the storage format, the data in the unified converted data map is compared and verified to obtain a first comparison result, and the first comparison result is that data is selected from the data based on the comparison verification Data whose format is inconsistent with the storage format;
    根据所述敏感字对筛选出来的数据进行对比,识别出所述数据中的敏感字并进行异常标记,得到第二比对结果;Compare the screened data according to the sensitive words, identify the sensitive words in the data and mark the abnormality, to obtain the second comparison result;
    根据第一比对结果和第二比对结果生成日志文件。A log file is generated according to the first comparison result and the second comparison result.
  18. 如权利要求17所述的数据库检测设备,所述数据库检测程序被所述处理器执行时还实现如下步骤:17. The database detection device according to claim 17, wherein the database detection program further implements the following steps when being executed by the processor:
    接收所述操作平台上远程服务器发起的维护请求,所述维护请求中包括待维护的远程服务器和对应的数据库信息;Receiving a maintenance request initiated by a remote server on the operating platform, where the maintenance request includes the remote server to be maintained and corresponding database information;
    根据所述维护请求将所述类对象库中与所述远程服务器对应的所有操作代码进行整合编译,得到一个远程服务器数据的维护小程序代码,所述维护小程序代码用于获取所述远程服务器中的数据库的数据进行比对分析;According to the maintenance request, all the operation codes corresponding to the remote server in the class object library are integrated and compiled to obtain a maintenance small program code of remote server data, and the maintenance small program code is used to obtain the remote server Compare and analyze the data in the database;
    通过所述通信链路将所述维护小程序代码上传至所述远程服务器并执行。The maintenance applet code is uploaded to the remote server through the communication link and executed.
  19. 如权利要求18所述的数据库检测设备,所述数据库检测程序被所述处理器执行实现所述调取与所述远程服务器的类型对应的所述文件下载代码,以通过所述文件下载代码将所述比对结果文件从所述远程服务器中下载并保存至所述操作平台上的步骤时,包括如下步骤:The database detection device according to claim 18, wherein the database detection program is executed by the processor to realize the retrieval of the file download code corresponding to the type of the remote server, so as to use the file download code to download The step of downloading the comparison result file from the remote server and saving it to the operating platform includes the following steps:
    在接收到所述维护小程序代码执行完成的响应消息后,根据所述远程服务器的类型调取所述文件下载代码,以及从所述远程服务器中下载所述对比结果文件,并将所述对比结果文件存储在操作平台本地的存储器中。After receiving the response message that the maintenance applet code execution is complete, call the file download code according to the type of the remote server, download the comparison result file from the remote server, and compare the The result file is stored in the local storage of the operating platform.
  20. 一种非易失性计算机可读存储介质,所述计算机可读存储介质上存储有数据库检测程序,所述数据库检测程序被处理器执行时实现如下所述的数据库检测方法的步骤:A non-volatile computer-readable storage medium having a database detection program stored on the computer-readable storage medium, and when the database detection program is executed by a processor, the steps of the following database detection method are implemented:
    根据远程服务器的操作请求生成类对象库,并将所述类对象库存储于操作平台上的存储单元中,其中,所述类对象库用于控制所述操作平台对所述远程服务器的远程操作,所述类对象库中包含有远程服务器操作代码、远程数据库操作代码以及文件下载代码;The class object library is generated according to the operation request of the remote server, and the class object library is stored in the storage unit on the operating platform, wherein the class object library is used to control the remote operation of the remote server by the operating platform , The class object library contains remote server operation code, remote database operation code and file download code;
    接收远程操作请求,并确定所述远程操作请求中待触发访问的远程服务器的类型,通过所述操作平台从所述类对象库中调取与所述远程服务器的类 型对应的远程服务器操作代码,基于所述远程服务器操作代码建立所述操作平台与所述远程服务器之间的通信链路;Receive a remote operation request, determine the type of remote server to be accessed in the remote operation request, and retrieve the remote server operation code corresponding to the type of the remote server from the class object library through the operation platform, Establishing a communication link between the operating platform and the remote server based on the remote server operation code;
    根据所述远程服务器的类型和所述通信链路对应的通信协议,从所述类对象库中获取对应的远程数据库操作代码,并基于所述远程数据库操作代码对所述远程服务器上的各数据库进行访问,以读取所述数据库中的数据;According to the type of the remote server and the communication protocol corresponding to the communication link, the corresponding remote database operation code is obtained from the class object library, and based on the remote database operation code, the database on the remote server Access to read the data in the database;
    根据预设的检验规则对从所述远程服务器中读取到的各数据库的数据进行比对,以筛选出所述数据库中异常的数据,并根据所述异常的数据生成日志格式的比对结果文件,其中,所述预设的检验规则包括所述数据在所述数据库中的存储格式和数据中的敏感字;Compare the data of each database read from the remote server according to preset inspection rules to filter out abnormal data in the database, and generate a comparison result in log format according to the abnormal data File, wherein the preset inspection rule includes the storage format of the data in the database and the sensitive words in the data;
    调取与所述远程服务器的类型对应的所述文件下载代码,以通过所述文件下载代码将所述比对结果文件从所述远程服务器中下载并保存至所述操作平台上。The file download code corresponding to the type of the remote server is retrieved to download the comparison result file from the remote server and save it on the operating platform through the file download code.
PCT/CN2019/117021 2019-08-14 2019-11-11 Database monitoring method, apparatus, device and computer-readable storage medium WO2021027126A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910749124.2 2019-08-14
CN201910749124.2A CN110647415B (en) 2019-08-14 2019-08-14 Database detection method, device and equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2021027126A1 true WO2021027126A1 (en) 2021-02-18

Family

ID=69009528

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117021 WO2021027126A1 (en) 2019-08-14 2019-11-11 Database monitoring method, apparatus, device and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN110647415B (en)
WO (1) WO2021027126A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112187950B (en) * 2020-10-10 2022-09-16 深圳市智百威科技发展有限公司 Method for solving slow remote data access
CN112214540B (en) * 2020-10-15 2024-03-01 上海达梦数据库有限公司 Data processing method, device, equipment and storage medium
CN112965949B (en) * 2021-03-03 2022-11-22 上海英方软件股份有限公司 Method for remotely reading ORACLE log file

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030187850A1 (en) * 2002-03-29 2003-10-02 Reed Michael L. Remote database access through a table entry
CN102118442A (en) * 2011-02-21 2011-07-06 清华大学 Method and device for accessing Web resources
CN103838781A (en) * 2012-11-27 2014-06-04 中兴通讯股份有限公司 Database access method and system
CN104426975A (en) * 2013-09-03 2015-03-18 北京网秦天下科技有限公司 Method, equipment and system for data synchronization
CN105447046A (en) * 2014-09-02 2016-03-30 阿里巴巴集团控股有限公司 Distributed system data consistency processing method, device and system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130304697A1 (en) * 2012-05-09 2013-11-14 Salesforce.Com, Inc. System and method for cross-platform synchronization of data objects in a multi-tenant environment
CN104639539B (en) * 2015-01-27 2018-05-18 深圳市汇朗科技有限公司 The method and apparatus that interface calls
CN105429826A (en) * 2015-12-25 2016-03-23 北京奇虎科技有限公司 Fault detection method and device for database cluster
CN109388569B (en) * 2018-10-08 2022-03-25 金蝶软件(中国)有限公司 Method for remotely detecting environmental anomaly of client, test server and storage medium
CN109933356B (en) * 2019-03-26 2022-06-03 杭州云毅网络科技有限公司 Remote proxy hot replacement method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030187850A1 (en) * 2002-03-29 2003-10-02 Reed Michael L. Remote database access through a table entry
CN102118442A (en) * 2011-02-21 2011-07-06 清华大学 Method and device for accessing Web resources
CN103838781A (en) * 2012-11-27 2014-06-04 中兴通讯股份有限公司 Database access method and system
CN104426975A (en) * 2013-09-03 2015-03-18 北京网秦天下科技有限公司 Method, equipment and system for data synchronization
CN105447046A (en) * 2014-09-02 2016-03-30 阿里巴巴集团控股有限公司 Distributed system data consistency processing method, device and system

Also Published As

Publication number Publication date
CN110647415A (en) 2020-01-03
CN110647415B (en) 2022-09-30

Similar Documents

Publication Publication Date Title
WO2021027126A1 (en) Database monitoring method, apparatus, device and computer-readable storage medium
US10467316B2 (en) Systems and methods for web analytics testing and web development
WO2018120721A1 (en) Method and system for testing user interface, electronic device, and computer readable storage medium
WO2018184420A1 (en) Software testing method, apparatus, electronic device, and medium
WO2019100577A1 (en) Automated test management method and apparatus, terminal device, and storage medium
CN108628748B (en) Automatic test management method and automatic test management system
CN106550038B (en) Data configuration diagnosis system and method of digital control system
US20180357143A1 (en) Testing computing devices
CN108023955B (en) Processing method and device for three-dimensional animation production process
CN110088744B (en) Database maintenance method and system
CN115033894B (en) Software component supply chain safety detection method and device based on knowledge graph
CN110063042A (en) A kind of response method and its terminal of database failure
CN112328631A (en) Production fault analysis method and device, electronic equipment and storage medium
CN114116422A (en) Hard disk log analysis method, hard disk log analysis device and storage medium
CN112269697B (en) Equipment storage performance testing method, system and related device
CN105207829B (en) Intrusion detection data processing method, device and system
CN113591079B (en) Method and device for acquiring abnormal application installation package and electronic equipment
CN111694724B (en) Test method and device of distributed form system, electronic equipment and storage medium
CN114328159A (en) Abnormal statement determination method, device, equipment and computer readable storage medium
CN113806331A (en) Data processing method and device
US11768824B2 (en) Method and system for performing real-time data validation
CN114020350B (en) Android system-based terminal off-load equipment detection method, system and medium
CN111770004B (en) HTTP (hyper text transport protocol) (S) flow content automatic verification method and storage medium
CN116719777B (en) Technology for reading OFD virtual partition four-way data by reading robot and simulating human processing
CN113704176B (en) File scanning method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19941678

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19941678

Country of ref document: EP

Kind code of ref document: A1