Database information processing method, device, storage medium and electronic device

By obtaining and updating the associated information of the database, the problem of inaccurate maintenance of database information in the ledger is solved, timely update and consistency of database information is achieved, and maintenance efficiency is improved.

CN115048399BActive Publication Date: 2025-08-29INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210690242.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-17
Publication Date
2025-08-29
Estimated Expiration
2042-06-17

AI Technical Summary

Technical Problem

In the prior art, the accuracy and efficiency of maintaining database information through ledgers is low, resulting in missing, errors and untimely maintenance of database information, affecting business operations and maintenance.

Method used

Get the list of new databases, determine the association information of each database and add it to the ledger database, query the stored information, trigger processing operations based on the query results and update the association information, including the database availability, master-slave relationship and storage amount, etc.

Benefits of technology

It realizes the rapid and accurate maintenance of database information recorded in the ledger, ensures timely updates and consistency of database information, and improves the accuracy and efficiency of database information maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115048399B_ABST
    Figure CN115048399B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, storage medium, and electronic device for processing database information, relating to the field of financial technology. The method comprises: obtaining a list of newly added databases; determining the server corresponding to each newly added database, obtaining the associated information of the newly added database from the server corresponding to the newly added database, and adding the associated information of the newly added database to the ledger database; querying the associated information of the stored databases from the ledger database to obtain the query results; triggering a processing operation for the database based on the query results, and updating the associated information of the database stored in the ledger database based on the results of the processing operation. This application solves the problem of low accuracy and efficiency in maintaining database information through ledgers in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of financial technology, and specifically, to a method, device, storage medium and electronic device for processing database information. Background Art

[0002] With the development of open-source databases, MySQL has been widely used by many enterprises. As business volume increases, the amount of data stored in MySQL databases and the number of databases need to increase significantly. This requires the addition, modification, and deletion of a large number of MySQL database instances to ensure the timeliness and accuracy of database content, thereby ensuring the smooth operation of business.

[0003] The surge in business volume has led to a significant increase in the number of databases, making it difficult to construct database ledgers using traditional spreadsheets. Large-scale database operations and maintenance rely on accurate database information stored in ledgers, and the complexity of building and maintaining ledger content can lead to issues such as missing database information, incorrect database information, and untimely maintenance. This can lead to incorrect database information being stored in ledgers, preventing operations and maintenance personnel from promptly maintaining abnormal databases, impacting business operations and even causing financial losses.

[0004] Currently, no effective solution has been proposed to address the low accuracy and efficiency of maintaining database information through ledgers in related technologies. Summary of the Invention

[0005] The present application provides a method, device, storage medium and electronic device for processing database information to solve the problem of low accuracy and efficiency in maintaining database information through ledgers in related technologies.

[0006] According to one aspect of the present application, a method for processing database information is provided. The method includes: obtaining a list of newly added databases, wherein the list of newly added databases includes multiple newly added databases; determining the server corresponding to each newly added database, obtaining association information of the newly added database from the server corresponding to the newly added database, and adding the association information of the newly added database to a ledger database, wherein the association information is used to indicate the attributes of the database; querying the association information of the stored databases from the ledger database to obtain a query result; triggering a processing operation for the database based on the query result, and updating the association information of the database stored in the ledger database based on the result of the processing operation.

[0007] Optionally, the method also includes: polling each database in the ledger database according to a preset time period, and obtaining the associated information of the current database from the server corresponding to each data; replacing the associated information of the database stored in the ledger database according to the associated information of the current database.

[0008] Optionally, the associated information of the database includes the available information of the database, the query result includes the available information of the database, the processing operation on the database is triggered according to the query result, and the associated information of the database stored in the ledger database is updated according to the result of the processing operation, including: when the queried available information indicates that the database is unavailable, determining the unavailability type of the database and outputting the corresponding first alarm information; detecting whether feedback information for the first alarm information is received, wherein the feedback information is used to indicate that the processing operation has been completed on the unavailable database; when the feedback information is received, determining the available information of the database on which the processing operation has been completed based on the feedback information, and obtaining updated available information; and updating the available information of the database stored in the ledger database according to the updated available information.

[0009] Optionally, the unavailability type includes a fault type. When feedback information is received, available information of the database that has completed the processing operation is determined based on the feedback information, and the updated available information is obtained, including: when the feedback information indicates that the database that has completed the processing operation is available, determining the information indicating that the database is available as the updated available information; when the feedback information indicates that the database that has completed the processing operation is unavailable, determining the information indicating that the database is unavailable as the updated available information.

[0010] Optionally, the unavailable type includes a recycling type. When feedback information is received, the available information of the database that has completed the processing operation is determined based on the feedback information, and the updated available information includes: when the feedback information indicates that the database that has completed the processing operation needs to be reused, the information indicating that the database is available is determined as the updated information to be used; when the feedback information indicates that the database that has completed the processing operation does not need to be reused, the associated information of the database is deleted from the ledger database.

[0011] Optionally, the database's associated information includes the database's master-slave information, the query result includes the database's master-slave information, triggering a processing operation on the database based on the query result, and updating the database's associated information stored in the ledger database based on the result of the processing operation, including: when the queried master-slave information indicates that the database is a master database, obtaining the database's operating status from the server corresponding to the database, wherein the master database is a database that stores data under normal operating conditions; when the database's operating status indicates that the database is in a non-operating state, changing the database's master-slave information stored in the ledger database; when the queried master-slave information indicates that the database is a slave database, obtaining the database's operating status from the server corresponding to the database, wherein the slave database is a backup database of the master database; when the database's operating status indicates that the database is in an operating state, changing the database's master-slave information stored in the ledger database.

[0012] Optionally, the associated information of the database includes the storage capacity of the database, the query result includes the storage capacity of the database, the processing operation on the database is triggered according to the query result, and the associated information of the database stored in the ledger database is updated according to the result of the processing operation, including: when the storage capacity of the database is queried, judging whether the storage capacity of the database is greater than the storage capacity threshold, and outputting the corresponding second alarm information when the storage capacity is greater than the storage capacity threshold; detecting whether feedback information for the second alarm information is received, wherein the feedback information is used to indicate that the processing operation has been completed on the database with a storage capacity greater than the storage capacity threshold; when the feedback information is received, determining the storage capacity of the database on which the processing operation has been completed based on the feedback information, and obtaining the updated storage capacity; and updating the storage capacity of the database stored in the ledger database according to the updated storage capacity.

[0013] Optionally, after determining the server corresponding to each newly added database, obtaining the associated information of the newly added database from the server corresponding to the newly added database, and adding the associated information of the newly added database to the ledger database, the method also includes: obtaining a target list from the operation and maintenance database, wherein the target list includes multiple preset databases, and the associated information of the preset databases is to be stored in the ledger database; judging whether the associated information of multiple preset databases has been stored in the ledger database; in the case that the associated information of the preset data is not stored in the ledger database, determining the preset database whose associated information is not stored in the ledger database, and obtaining the target database; obtaining the associated information of the target database from the server corresponding to the target database, and adding the associated information of the target database to the ledger database.

[0014] According to another aspect of the present application, a device for processing database information is provided. The device includes: a first acquisition unit, configured to acquire a list of newly added databases, wherein the list of newly added databases includes multiple newly added databases; a first determination unit, configured to respectively determine the server corresponding to each newly added database, acquire association information of the newly added database from the server corresponding to the newly added database, and add the association information of the newly added database to the ledger database, wherein the association information is used to indicate the attributes of the database; a first query unit, configured to query the association information of the stored database from the ledger database to obtain a query result; and a first update unit, configured to trigger a processing operation on the database according to the query result, and update the association information of the database stored in the ledger database according to the result of the processing operation.

[0015] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided. The non-volatile storage medium is used to store a program. When the program is running, the device where the non-volatile storage medium is located is controlled to execute a method for processing database information.

[0016] According to another aspect of an embodiment of the present invention, an electronic device is provided, comprising one or more processors and a memory; the memory stores computer-readable instructions, and the processor is used to run the computer-readable instructions, wherein the computer-readable instructions execute a method for processing database information when they are run.

[0017] Through this application, the following steps are adopted: obtaining a list of newly added databases, wherein the list of newly added databases includes multiple newly added databases; determining the server corresponding to each newly added database respectively, obtaining the associated information of the newly added database from the server corresponding to the newly added database, and adding the associated information of the newly added database to the ledger database, wherein the associated information is used to indicate the attributes of the database; querying the associated information of the stored database from the ledger database to obtain the query result; triggering the processing operation for the database according to the query result, and updating the associated information of the database stored in the ledger database according to the result of the processing operation. The problem of low accuracy and efficiency of maintaining database information through ledgers in related technologies is solved. By checking the newly added database information and traversing and confirming the database information stored in the ledger database, the abnormal database will be fed back in the ledger, and corresponding maintenance will be performed according to the feedback content, thereby achieving the effect of quickly and accurately maintaining the database corresponding to the database information recorded in the ledger. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of this application. The exemplary embodiments and descriptions of this application are intended to explain this application and do not constitute an improper limitation on this application. In the accompanying drawings:

[0019] Figure 1 is a flowchart of a method for processing database information provided in an embodiment of the present application;

[0020] Figure 2 is a schematic diagram of a database information processing device provided according to an embodiment of the present application;

[0021] Figure 3 A schematic diagram of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0022] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0023] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.

[0026] It should be noted that the database information processing methods, devices, storage media and electronic devices determined in the present disclosure can be used in the field of financial technology, and can also be used in any field other than the field of financial technology. The application fields of the database information processing methods, devices, storage media and electronic devices determined in the present disclosure are not limited.

[0027] According to an embodiment of the present application, a method for processing database information is provided.

[0028] Figure 1 This is a flowchart of a method for processing database information according to an embodiment of the present application. Figure 1 As shown, the method includes the following steps:

[0029] Step S101: obtaining a newly added database list, wherein the newly added database list includes a plurality of newly added databases.

[0030] It should be noted that the newly added database list records the IP address of the server where each database is located, and the server corresponding to the database can be accessed through the IP address.

[0031] Specifically, the database list generation platform can obtain the IP address information of the server of the newly added database, generate a new database list, and regularly send the new database list to the ledger database so that the IP address information of the server of the latest generated database can be stored in the ledger database.

[0032] In step S102, the server corresponding to each newly added database is determined respectively, the association information of the newly added database is obtained from the server corresponding to the newly added database, and the association information of the newly added database is added to the ledger database, wherein the association information is used to indicate the attributes of the database.

[0033] Specifically, after obtaining the IP addresses of the servers corresponding to multiple databases from the newly added database list, the ledger database can access each server using its IP address, obtain the database's associated information, and associate each database with the corresponding associated information and store it in the ledger database. This associated information may include the server's operating system information, information about the database, and information about databases in the same group as the database.

[0034] Step S103: query the stored database association information from the ledger database to obtain the query result.

[0035] Specifically, after storing the associated information corresponding to the newly added database, the associated information of some or all databases in the ledger database can be traversed and checked to obtain a query structure.

[0036] Step S104: triggering a processing operation on the database according to the query result, and updating the database association information stored in the ledger database according to the result of the processing operation.

[0037] Specifically, the ledger database can obtain the associated information corresponding to the database corresponding to each abnormal information in the query results based on the query results, and change the content in the corresponding associated information according to the abnormal information, and issue a corresponding alarm message to notify the operation and maintenance personnel to perform maintenance on the corresponding database. After the operation and maintenance personnel perform maintenance, the content in the associated information corresponding to the abnormal information will be changed again according to the maintenance results to obtain the maintained associated information, thereby achieving timely processing of the database and making the information in the ledger database consistent with the information in the server.

[0038] The method for processing database information provided in the embodiment of the present application is to obtain a list of newly added databases, wherein the list of newly added databases includes multiple newly added databases; determine the server corresponding to each newly added database respectively, obtain the associated information of the newly added database from the server corresponding to the newly added database, and add the associated information of the newly added database to the ledger database, wherein the associated information is used to indicate the attributes of the database; query the associated information of the stored database from the ledger database to obtain the query result; trigger the processing operation for the database according to the query result, and update the associated information of the database stored in the ledger database according to the result of the processing operation. The problem of low accuracy and efficiency of maintaining database information through ledgers in related technologies is solved. By checking the newly added database information and traversing and confirming the database information stored in the ledger database, the abnormal database will be fed back in the ledger, and corresponding maintenance will be performed according to the feedback content, thereby achieving the effect of quickly and accurately maintaining the database corresponding to the database information recorded in the ledger.

[0039] Optionally, in the database information processing method provided in the embodiment of the present application, the method also includes: polling each database in the ledger database according to a preset time period, and obtaining the associated information of the current database from the server corresponding to each data; replacing the associated information of the database stored in the ledger database according to the associated information of the current database.

[0040] Specifically, some or all of the databases in the ledger database can be polled and checked at any time. That is, the server corresponding to each database can be accessed through the IP address of the server corresponding to each database. When checking, the relevant information corresponding to the server can be obtained when accessing the server corresponding to each database, and the original associated information in the ledger database can be replaced with the associated information, thereby updating the associated information stored in the ledger database. This embodiment ensures the accuracy of the data in the ledger database.

[0041] Optionally, in the database information processing method provided in the embodiment of the present application, the associated information of the database includes the available information of the database, the query result includes the available information of the database, the processing operation for the database is triggered according to the query result, and the associated information of the database stored in the ledger database is updated according to the result of the processing operation, including: when the queried available information indicates that the database is unavailable, determining the unavailability type of the database and outputting the corresponding first alarm information; detecting whether feedback information for the first alarm information is received, wherein the feedback information is used to indicate that the processing operation has been completed on the unavailable database; when the feedback information is received, determining the available information of the database on which the processing operation has been completed based on the feedback information, and obtaining updated available information; and updating the available information of the database stored in the ledger database according to the updated available information.

[0042] Specifically, the associated information corresponding to each database may include the database information of the database, wherein the database information may include the availability information of the database. When traversing and checking the associated information of all databases in the ledger database, the availability information of each data is first obtained, and when a database is unavailable, an alarm information corresponding to the database is generated and returned to the operation and maintenance system. The database is repaired in the operation and maintenance system, and corresponding feedback information is issued. After receiving the feedback information, the ledger database updates the available information of the database in the ledger database according to the availability in the feedback information, and obtains the updated available information.

[0043] For example, if Database A is detected to be unavailable, an alarm message is issued to notify relevant personnel to handle the issue. After the issue is resolved, the results are synchronized to the ledger database, thereby obtaining updated availability information for Database A. This embodiment achieves the effect of timely maintaining the database based on the available information of the database and updating the available information at the same time.

[0044] Optionally, in the method for processing database information provided in an embodiment of the present application, the unavailability type includes a fault type. When feedback information is received, the available information of the database that has completed the processing operation is determined based on the feedback information, and the updated available information is obtained, including: when the feedback information indicates that the database that has completed the processing operation is available, determining the information indicating that the database is available as the updated available information; when the feedback information indicates that the database that has completed the processing operation is unavailable, determining the information indicating that the database is unavailable as the updated available information.

[0045] Specifically, database availability information includes three types: available, unavailable, and pending. The unavailable type can include a fault type, which can be caused by objective factors, such as a server crash or excessive database memory usage, rendering the database unusable. In this case, after the ledger database issues an alarm, maintenance personnel will repair the faulty database and synchronize the success of the repair to the ledger database as feedback. This embodiment achieves the effect of timely database maintenance based on database fault information while simultaneously updating availability information.

[0046] Optionally, in the database information processing method provided in the embodiment of the present application, the unavailable type includes a recycling type. When feedback information is received, the available information of the database that has completed the processing operation is determined based on the feedback information, and the updated available information is obtained, including: when the feedback information indicates that the database that has completed the processing operation needs to be reused, the information indicating that the database is available is determined as the updated information to be used; when the feedback information indicates that the database that has completed the processing operation does not need to be reused, the associated information of the database is deleted from the ledger database.

[0047] Specifically, the unavailable types of the database may also include recycling types, where the recycling type may be a database anomaly caused by a supervisory factor, such as an update of the server corresponding to the database, the elimination of the previous generation of servers, etc. At this time, after the ledger database issues an alarm message, the maintenance personnel will back up the data of the recycling type database and determine whether the database can be used again. When the database can be used again, the vertical opening will be marked as ready for use and sealed, and corresponding feedback information will be sent to the ledger database. In the case of a database with a ready-to-use mark, the database with the ready-to-use mark will be skipped during subsequent database checks, and the database will be reused when the ready-to-use mark is deleted; when the database cannot be used again, feedback information for deleting the database will be directly sent, and the corresponding relevant information in the ledger database will be deleted. This embodiment achieves the effect of timely maintaining the database based on the available information of the database and updating the available information at the same time.

[0048] Optionally, in the database information processing method provided in the embodiment of the present application, the database's associated information includes the database's master-slave information, the query result includes the database's master-slave information, triggering a processing operation on the database according to the query result, and updating the database's associated information stored in the ledger database according to the result of the processing operation, including: when the queried master-slave information indicates that the database is a master database, obtaining the database's operating status from the server corresponding to the database, wherein the master database is a database that stores data under normal operating conditions; when the database's operating status indicates that the database is in a non-operating state, changing the database's master-slave information stored in the ledger database; when the queried master-slave information indicates that the database is a slave database, obtaining the database's operating status from the server corresponding to the database, wherein the slave database is a backup database of the master database; when the database's operating status indicates that the database is in an operating state, changing the database's master-slave information stored in the ledger database.

[0049] Specifically, the association information corresponding to each database may include the master-slave information of the database. Multiple databases can be grouped according to the preset storage content, and the group name and the master and slave databases in each group can be set. The master database can be used for daily business data interaction, and the slave database can be used to back up all the data in the master database. When traversing and checking each database, a judgment will be made based on the master-slave information stored in the ledger database and the current operating status of the slave database. If the two are inconsistent, corresponding feedback information will be sent to the ledger database, and the corresponding association information in the ledger database will be changed based on the feedback information.

[0050] For example, in group B, there is a master database A, a slave database B, and a slave database C. When it is detected that master database A is in a non-operating state, it is determined that the master-slave information of master database A may have changed due to an abnormality. At this time, the master-slave information of database A is changed to that of slave database A. At this time, the operating status of slave databases B and C is determined. When slave database B is still in a non-operating state and slave database C is in an operating state, it is determined that slave database C has replaced master database A as the master database. The master-slave information of database C is changed to master database C, and the master-slave change information is fed back to the ledger database. This embodiment achieves the effect of more accurately recording the master-slave information of the databases in the ledger database.

[0051] Optionally, in the database information processing method provided in the embodiment of the present application, the associated information of the database includes the storage capacity of the database, the query result includes the storage capacity of the database, the processing operation for the database is triggered according to the query result, and the associated information of the database stored in the ledger database is updated according to the result of the processing operation, including: when the storage capacity of the database is queried, judging whether the storage capacity of the database is greater than the storage capacity threshold, and outputting the corresponding second alarm information when the storage capacity is greater than the storage capacity threshold; detecting whether feedback information for the second alarm information is received, wherein the feedback information is used to indicate that the processing operation has been completed on the database whose storage capacity is greater than the storage capacity threshold; when the feedback information is received, determining the storage capacity of the database on which the processing operation has been completed based on the feedback information, and obtaining the updated storage capacity; and updating the storage capacity of the database stored in the ledger database according to the updated storage capacity.

[0052] Specifically, the associated information corresponding to each database may include the database information of the database, wherein the server information may also include the storage capacity of the database. When traversing and checking the associated information of all databases in the ledger database, the current storage capacity of each database is obtained and replaced with the storage capacity in the corresponding associated information in the ledger database.

[0053] It should be noted that after the ledger database obtains the replaced current storage capacity, it needs to compare it with the threshold and issue an alarm message when the current storage capacity exceeds the threshold. After receiving the alarm message, the operation and maintenance personnel will obtain feedback information, that is, the storage capacity after the database expansion, and replace the corresponding storage capacity in the ledger database to obtain the updated storage capacity. This embodiment achieves the effect of synchronizing storage capacity and promptly repairing databases with abnormal storage capacity.

[0054] Optionally, in the database information processing method provided in the embodiment of the present application, after determining the server corresponding to each newly added database, obtaining the associated information of the newly added database from the server corresponding to the newly added database, and adding the associated information of the newly added database to the ledger database, the method also includes: obtaining a target list from the operation and maintenance database, wherein the target list includes multiple preset databases, and the associated information of the preset databases is to be stored in the ledger database; judging whether the associated information of multiple preset databases has been stored in the ledger database; in the case that the associated information of the preset data is not stored in the ledger database, determining the preset database whose associated information is not stored in the ledger database, and obtaining the target database; obtaining the associated information of the target database from the server corresponding to the target database, and adding the associated information of the target database to the ledger database.

[0055] Specifically, after adding the associated information of the newly added database to the ledger database, it is necessary to obtain a target list corresponding to the database list in the newly added database list from the operation and maintenance database, wherein the target list in the operation and maintenance database corresponds to the information in the newly added database list, compare the target list with the information in the newly added database list, and search for the database missing from the newly added database list in the ledger database, and if the missing database is not found, obtain the associated information of the missing database from the target list, and store the associated information of the missing database in the ledger database.

[0056] For example, the newly added database list contains six databases (A, B, C, D, E, and F), while the target list contains eight databases (A, B, C, D, E, F, G, and H). Comparing the newly added database list with the target list reveals the missing information for databases G and H. A search in the ledger database reveals that the associated information for database G is already stored in the ledger database, so only the associated information for database H is stored in the ledger database. This embodiment avoids missing newly added databases.

[0057] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0058] The present application also provides a database information processing device. It should be noted that the database information processing device of the present application can be used to execute the database information processing method provided in the present application. The following describes the database information processing device provided in the present application.

[0059] Figure 2 Schematic diagram of a database information processing device according to an embodiment of the present application. Figure 2 As shown, the device includes: a first acquiring unit 21 , a first determining unit 22 , a querying unit 23 , and an updating unit 24 .

[0060] Specifically, the first obtaining unit 21 is used to obtain a new database list, wherein the new database list includes multiple new databases;

[0061] The first determining unit 22 is configured to determine the server corresponding to each newly added database, obtain associated information of the newly added database from the server corresponding to the newly added database, and add the associated information of the newly added database to the ledger database, wherein the associated information is used to indicate attributes of the database;

[0062] A query unit 23 is used to query the stored database related information from the ledger database to obtain the query result;

[0063] The updating unit 24 is used to trigger a processing operation on the database according to the query result, and update the database related information stored in the ledger database according to the result of the processing operation.

[0064] The database information processing device provided in the embodiment of the present application obtains a list of newly added databases through a first obtaining unit 21, wherein the list of newly added databases includes multiple newly added databases; the first determining unit 22 determines the server corresponding to each newly added database, obtains the associated information of the newly added database from the server corresponding to the newly added database, and adds the associated information of the newly added database to the ledger database, wherein the associated information is used to indicate the attributes of the database; the query unit 23 queries the associated information of the stored database from the ledger database to obtain the query result; the update unit 24 triggers the processing operation for the database according to the query result, and updates the associated information of the database stored in the ledger database according to the result of the processing operation. The problem of low accuracy and efficiency of maintaining database information through ledgers in related technologies is solved. By checking the newly added database information and traversing and confirming the database information stored in the ledger database, the abnormal database is fed back in the ledger, and corresponding maintenance is performed according to the feedback content, thereby achieving the effect of quickly and accurately maintaining the database corresponding to the database information recorded in the ledger.

[0065] Optionally, in the database information processing device provided in the embodiment of the present application, the device also includes: a polling unit, used to poll each database in the ledger database according to a preset time period, and obtain the associated information of the current database from the server corresponding to each data; a replacement unit, used to replace the associated information of the database stored in the ledger database according to the associated information of the current database.

[0066] Optionally, in the database information processing device provided in the embodiment of the present application, the associated information of the database includes the available information of the database, the query result includes the available information of the database, and the update unit 24 includes: a first determination module, which is used to determine the unavailability type of the database and output the corresponding first alarm information when the queried available information indicates that the database is unavailable; a first detection module, which is used to detect whether feedback information for the first alarm information is received, wherein the feedback information is used to indicate that the processing operation has been completed on the unavailable database; a second determination module, which is used to determine the available information of the database on which the processing operation has been completed based on the feedback information when the feedback information is received, and obtain the updated available information; a first update module, which is used to update the available information of the database stored in the ledger database according to the updated available information.

[0067] Optionally, in the database information processing device provided in the embodiment of the present application, the unavailability type includes a fault type, and the second determination module includes: a first determination submodule, used to determine the information indicating that the database is available as updated available information when the feedback information indicates that the database after the processing operation is completed is available; and a second determination submodule, used to determine the information indicating that the database is unavailable as updated available information when the feedback information indicates that the database after the processing operation is completed is unavailable.

[0068] Optionally, in the database information processing device provided in the embodiment of the present application, the unavailable type includes a recycling type, and the second determination module includes: a third determination sub-module, which is used to determine the information indicating that the database is available as the updated available information when the feedback information indicates that the database that has completed the processing operation needs to be reused; and a deletion sub-module, which is used to delete the associated information of the database from the ledger database when the feedback information indicates that the database that has completed the processing operation does not need to be reused.

[0069] Optionally, in the database information processing device provided in the embodiment of the present application, the database's associated information includes the master-slave information of the database, the query result includes the master-slave information of the database, and the update unit 24 includes: a first acquisition module, which is used to obtain the operating status of the database from the server corresponding to the database when the queried master-slave information indicates that the database is a master database, wherein the master database is a database that stores data under normal operating conditions; a first change module, which is used to change the master-slave information of the database stored in the ledger database when the operating status of the database indicates that the database is in a non-operating state; a second acquisition module, which is used to obtain the operating status of the database from the server corresponding to the database when the queried master-slave information indicates that the database is a slave database, wherein the slave database is a backup database of the master database; and a second change module, which is used to change the master-slave information of the database stored in the ledger database when the operating status of the database indicates that the database is in an operating state.

[0070] Optionally, in the database information processing device provided in the embodiment of the present application, the associated information of the database includes the storage capacity of the database, the query result includes the storage capacity of the database, and the update unit 24 includes: an output module for determining whether the storage capacity of the database is greater than the storage capacity threshold when the storage capacity of the database is queried, and outputting the corresponding second alarm information when the storage capacity is greater than the storage capacity threshold; a second detection module for detecting whether feedback information for the second alarm information is received, wherein the feedback information is used to indicate that the processing operation has been completed on the database whose storage capacity is greater than the storage capacity threshold; a third determination module for determining the storage capacity of the database on which the processing operation has been completed based on the feedback information when the feedback information is received, and obtaining the updated storage capacity; a second update module for updating the storage capacity of the database stored in the ledger database according to the updated storage capacity.

[0071] Optionally, in the database information processing device provided in the embodiment of the present application, the device also includes: a second acquisition unit, used to obtain a target list from the operation and maintenance database, wherein the target list includes multiple preset databases, and the associated information of the preset databases is to be stored in the ledger database; a judgment unit, used to judge whether the associated information of multiple preset databases has been stored in the ledger database; a second determination unit, used to determine the preset database whose associated information is not stored in the ledger database when the associated information of the preset data is not stored in the ledger database, and obtain the target database; an adding unit, used to obtain the associated information of the target database from the server corresponding to the target database, and add the associated information of the target database to the ledger database.

[0072] The above-mentioned database information processing device includes a processor and a memory. The above-mentioned first acquisition unit 21, first determination unit 22, query unit 23, update unit 24, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize the corresponding functions.

[0073] The processor contains a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be configured, and adjusting kernel parameters solves the low accuracy and efficiency of maintaining database information through ledgers in related technologies.

[0074] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0075] An embodiment of the present application further provides a non-volatile storage medium, which is used to store a program. When the program is running, the device where the non-volatile storage medium is located is controlled to execute a method for processing database information.

[0076] The present application also provides an electronic device comprising a processor and a memory; the memory stores computer-readable instructions, and the processor is configured to execute the computer-readable instructions, wherein the computer-readable instructions, when executed, execute a method for processing database information. The electronic device herein may be a server, a PC, a PAD, a mobile phone, or the like.

[0077] like Figure 3 As shown, an embodiment of the present invention provides an electronic device, wherein the electronic device 10 includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: obtaining a list of newly added databases; determining the server corresponding to each newly added database, obtaining the associated information of the newly added database from the server corresponding to the newly added database, and adding the associated information of the newly added database to the ledger database; querying the associated information of the stored database from the ledger database to obtain the query result; triggering a processing operation for the database based on the query result, and updating the associated information of the database stored in the ledger database based on the result of the processing operation. The device in this article can be a server, PC, PAD, mobile phone, etc.

[0078] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: obtaining a list of newly added databases; determining the server corresponding to each newly added database respectively, obtaining the associated information of the newly added database from the server corresponding to the newly added database, and adding the associated information of the newly added database to the ledger database; querying the associated information of the stored database from the ledger database to obtain the query result; triggering a processing operation for the database based on the query result, and updating the associated information of the database stored in the ledger database based on the result of the processing operation.

[0079] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0080] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0081] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0082] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0083] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0084] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0085] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0086] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0087] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A method for processing database information, characterized in that: include: Obtain a newly added database list, wherein the newly added database list includes multiple newly added databases; Determine the server corresponding to each newly added database, obtain the associated information of the newly added database from the server corresponding to the newly added database, and add the associated information of the newly added database to the ledger database, wherein the associated information is used to indicate the attributes of the database; Querying the stored database association information from the ledger database to obtain a query result, wherein the database association information includes available information of the database; A processing operation on the database is triggered according to the query result, and the associated information of the database stored in the ledger database is updated according to the result of the processing operation, wherein the processing operation refers to a maintenance operation on the database.

2. The method according to claim 1, characterized in that The method further comprises: Polling each database in the ledger database according to a preset time period, and obtaining the associated information of the current database from the server corresponding to each data; The associated information of the database stored in the ledger database is replaced according to the associated information of the current database.

3. The method according to claim 1, characterized in that The query result includes available information of the database, triggering a processing operation for the database according to the query result, and updating the associated information of the database stored in the ledger database according to the result of the processing operation includes: When the queried availability information indicates that the database is unavailable, determining the unavailability type of the database and outputting corresponding first alarm information; detecting whether feedback information regarding the first warning information is received, wherein the feedback information is used to indicate that the processing operation on the unavailable database is completed; Upon receiving the feedback information, determining, based on the feedback information, the available information in the database that has completed the processing operation, and obtaining updated available information; The available information of the database stored in the ledger database is updated according to the updated available information.

4. The method according to claim 3, characterized in that The unavailability type includes a fault type. When the feedback information is received, the available information of the database that has completed the processing operation is determined based on the feedback information, and the updated available information includes: In a case where the feedback information indicates that the database on which the processing operation is completed is available, determining the information indicating that the database is available as the updated available information; In a case where the feedback information indicates that the database on which the processing operation is completed is unavailable, the information indicating that the database is unavailable is determined as the updated available information.

5. The method according to claim 3, characterized in that The unavailable type includes a recycling type. When the feedback information is received, the available information of the database that has completed the processing operation is determined based on the feedback information, and the updated available information includes: In a case where the feedback information indicates that the database that has completed the processing operation needs to be reused, determining information indicating that the database is available as the updated information to be used; When the feedback information indicates that the database that has completed the processing operation does not need to be reused, the associated information of the database is deleted from the ledger database.

6. The method according to claim 1, characterized in that The database association information includes the master-slave information of the database, the query result includes the master-slave information of the database, triggering a processing operation for the database according to the query result, and updating the database association information stored in the ledger database according to the result of the processing operation includes: When the queried master-slave information indicates that the database is a master database, obtaining the operating status of the database from a server corresponding to the database, wherein the master database is a database that stores data in a normal operating state; When the operation status of the database indicates that the database is in a non-operational state, changing the master-slave information of the database stored in the ledger database; When the queried master-slave information indicates that the database is a slave database, obtaining the running status of the database from a server corresponding to the database, wherein the slave database is a backup database of the master database; When the running status of the database indicates that the database is in a running state, the master-slave information of the database stored in the ledger database is changed.

7. The method according to claim 1, characterized in that The associated information of the database includes the storage capacity of the database, the query result includes the storage capacity of the database, triggering a processing operation for the database according to the query result, and updating the associated information of the database stored in the ledger database according to the result of the processing operation includes: When the storage capacity of the database is queried, determining whether the storage capacity of the database is greater than a storage capacity threshold, and outputting corresponding second alarm information when the storage capacity is greater than the storage capacity threshold; detecting whether feedback information regarding the second warning information is received, wherein the feedback information is used to indicate that the processing operation on the database having a storage capacity greater than the storage capacity threshold is completed; Upon receiving the feedback information, determining the storage capacity of the database after the processing operation is completed based on the feedback information to obtain an updated storage capacity; The storage capacity of the database stored in the ledger database is updated according to the updated storage capacity.

8. The method according to claim 1, characterized in that After respectively determining the server corresponding to each of the newly added databases, obtaining the associated information of the newly added database from the server corresponding to the newly added database, and adding the associated information of the newly added database to the ledger database, the method further includes: Obtaining a target list from the operation and maintenance database, wherein the target list includes a plurality of preset databases, and associated information of the preset databases is to be stored in the ledger database; Determining whether the associated information of the plurality of preset databases has been stored in the ledger database; In a case where the associated information of the preset data is not stored in the ledger database, determining a preset database in which the associated information is not stored in the ledger database, and obtaining a target database; The associated information of the target database is obtained from the server corresponding to the target database, and the associated information of the target database is added to the ledger database.

9. A database information processing device, characterized in that: include: A first acquiring unit is configured to acquire a newly added database list, wherein the newly added database list includes a plurality of newly added databases; a first determining unit, configured to respectively determine a server corresponding to each of the newly added databases, obtain association information of the newly added database from the server corresponding to the newly added database, and add the association information of the newly added database to the ledger database, wherein the association information is used to indicate attributes of the database; A first query unit is configured to query the stored database association information from the ledger database to obtain a query result, wherein the database association information includes available information of the database; The first updating unit is used to trigger a processing operation on the database according to the query result, and update the associated information of the database stored in the ledger database according to the result of the processing operation, wherein the processing operation refers to a maintenance operation on the database.

10. A non-volatile storage medium, characterized in that: The non-volatile storage medium is used to store a program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the database information processing method according to any one of claims 1 to 8.

11. An electronic device, characterized in that: The system comprises one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method for processing database information as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Data change method and device, storage medium and electronic equipment

    CN114490696A

  • Method, system, and device for processing operation and maintenance data

    US20210073204A1