CN115048399A - Database information processing method and device, storage medium and electronic equipment - Google Patents

Database information processing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN115048399A
CN115048399A CN202210690242.2A CN202210690242A CN115048399A CN 115048399 A CN115048399 A CN 115048399A CN 202210690242 A CN202210690242 A CN 202210690242A CN 115048399 A CN115048399 A CN 115048399A
Authority
CN
China
Prior art keywords
database
information
newly added
processing operation
stored
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202210690242.2A
Other languages
Chinese (zh)
Inventor
石海林
顾龚磊
茹麟淇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210690242.2A priority Critical patent/CN115048399A/en
Publication of CN115048399A publication Critical patent/CN115048399A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a database information processing method and device, a storage medium and electronic equipment, and relates to the field of financial technology. The method comprises the following steps: acquiring a newly added database list; respectively determining a server corresponding to each newly added database, acquiring 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; inquiring the stored associated information of the database from the ledger database to obtain an inquiry result; and triggering processing operation aiming at the database according to the query result, and updating the associated information of the database stored in the standing book database according to the result of the processing operation. By the method and the device, the problem that the accuracy and efficiency of maintaining the database information through the standing book in the related technology are low is solved.

Description

Database information processing method and device, storage medium and electronic equipment
Technical Field
The application relates to the field of financial science and technology, in particular to a database information processing method and device, a storage medium and electronic equipment.
Background
With the development of open source databases, the MySQL database is widely applied to many enterprises. With the increase of the service volume, the data volume stored in the MySQL database and the number of the databases need to be greatly increased, and a large number of MySQL database instances need to be newly added, modified and deleted, so that the high timeliness and the high accuracy of the database content are ensured, and the correct operation of the service is ensured.
The quantity of the databases is greatly increased due to the increase of the service volume, so that the difficulty of constructing the database ledger through the traditional electronic forms is high. Because large-scale database operation and maintenance depends on accurate database information stored in the standing book, and the construction of the standing book and the maintenance of the contents of the standing book are complex, the problems that the database information stored in the standing book is lost, the database information is wrong, the database is not maintained timely and the like are caused, so that wrong database information is stored in the standing book, operation and maintenance personnel cannot maintain the abnormal database timely, the service is influenced, and even property loss is caused.
Aiming at the problem that the accuracy and efficiency of maintaining database information through a standing book in the related technology are low, an effective solution is not provided at present.
Disclosure of Invention
The application provides a database information processing method and device, a storage medium and electronic equipment, and aims to solve the problems of low accuracy and efficiency of database information maintenance through a standing book in the related art.
According to one aspect of the application, a method for processing database information is provided. The method comprises the following steps: acquiring a newly added database list, wherein the newly added database list comprises a plurality of newly added databases; respectively determining a server corresponding to each newly added database, acquiring 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 standing book database, wherein the associated information is used for indicating the attribute of the database; inquiring the stored associated information of the database from the standing book database to obtain an inquiry result; and triggering processing operation aiming at the database according to the query result, and updating the associated information of the database stored in the standing book database according to the result of the processing operation.
Optionally, the method further comprises: polling each database in the standing book database according to a preset time period, and acquiring the associated information of the current database from a server corresponding to each data; and replacing the stored associated information of the database in the standing book database according to the associated information of the current database.
Optionally, the association information of the database includes available information of the database, the query result includes available information of the database, the processing operation for the database is triggered according to the query result, and the updating of the association information of the database stored in the ledger database according to the result of the processing operation includes: determining the unavailable type of the database and outputting corresponding first alarm information under the condition that the inquired available information indicates that the database is unavailable; detecting whether feedback information aiming at the first alarm information is received or not, wherein the feedback information is used for indicating that the processing operation is finished on the unavailable database; under the condition that the feedback information is received, determining available information of a database which executes the finished processing operation based on the feedback information to obtain updated available information; and updating the available information of the database stored in the standing book database according to the updated available information.
Optionally, the unavailable type includes a failure type, and in a case that the feedback information is received, determining available information of a database that performs a finishing operation based on the feedback information, and obtaining updated available information includes: determining information indicating that the database is available as updated available information when the feedback information indicates that the database executing the completed processing operation is available; in a case where the feedback information indicates that the database that performed the finalized processing operation is unavailable, information indicating that the database is unavailable is determined as updated available information.
Optionally, the unavailable type includes a recycling type, and in a case that the feedback information is received, determining available information of the database that has performed the finished processing operation based on the feedback information, and obtaining updated available information includes: under the condition that the feedback information indicates that the database which has performed the processing operation needs to be multiplexed, determining the information which indicates the database to be available as updated information to be used; and in the case that the feedback information indicates that the database which has performed the completed processing operation does not need to be multiplexed, deleting the associated information of the database from the ledger database.
Optionally, the association information of the database includes master-slave information of the database, the query result includes master-slave information of the database, the processing operation for the database is triggered according to the query result, and the updating of the association information of the database stored in the ledger database according to the result of the processing operation includes: under the condition that the inquired master-slave information indicates that the database is a master database, acquiring the running state of the database from a server corresponding to the database, wherein the master database is used for storing data under the normal running state; under the condition that the running state of the database indicates that the database is in a non-running state, master-slave information of the database stored in the standing book database is changed; under the condition that the inquired master-slave information indicates that the database is a slave database, acquiring the running state of the database from a server corresponding to the database, wherein the slave database is a backup database of the master database; and under the condition that the running state of the database indicates that the database is in the running state, changing master-slave information of the database stored in the standing book database.
Optionally, the association information of the database includes a storage amount of the database, the query result includes a storage amount of the database, the processing operation for the database is triggered according to the query result, and the updating of the association information of the database stored in the ledger database according to the result of the processing operation includes: under the condition that the memory space of the database is inquired, judging whether the memory space of the database is larger than a memory space threshold value or not, and under the condition that the memory space is larger than the memory space threshold value, outputting corresponding second alarm information; detecting whether feedback information aiming at the second alarm information is received or not, wherein the feedback information is used for indicating that the processing operation is finished on the database with the storage amount larger than the storage amount threshold; under the condition that the feedback information is received, determining the storage capacity of the database which executes the processing operation based on the feedback information to obtain an updated storage capacity; and updating the storage capacity of the database stored in the standing book database according to the updated storage capacity.
Optionally, after determining the server corresponding to each newly added database, obtaining the 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 the ledger database, the method further includes: acquiring a target list from the operation and maintenance database, wherein the target list comprises a plurality of preset databases, and the associated information of the preset databases is to be stored in the standing book database; judging whether the associated information of the plurality of preset databases is stored in the standing book database; under the condition that the associated information of the preset data is not stored in the standing book database, determining the preset database of which the associated information is not stored in the standing book database to obtain a target database; and acquiring 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 standing book database.
According to another aspect of the present application, a database information processing apparatus is provided. The device includes: the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring a newly added database list, and the newly added database list comprises a plurality of newly added databases; the first determining unit is used for respectively determining a server corresponding to each newly added database, acquiring 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 for indicating the attribute of the database; the first query unit is used for querying the stored associated information of the database from the standing book database to obtain a query result; and the first updating unit is used for triggering the processing operation aiming at the database according to the query result and updating the associated information of the database stored in the standing book database according to the result of the processing operation.
According to another aspect of the embodiments of the present invention, a non-volatile storage medium is further provided, where the non-volatile storage medium is used for storing a program, and the program controls a device in which the non-volatile storage medium is located to execute a processing method of database information when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including one or more processors and a memory; the memory stores computer readable instructions, and the processor is used for executing the computer readable instructions, wherein the computer readable instructions execute a method for processing database information.
Through the application, the following steps are adopted: acquiring a newly added database list, wherein the newly added database list comprises a plurality of newly added databases; respectively determining a server corresponding to each newly added database, acquiring 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 standing book database, wherein the associated information is used for indicating the attribute of the database; inquiring the stored associated information of the database from the standing book database to obtain an inquiry result; and triggering processing operation aiming at the database according to the query result, and updating the associated information of the database stored in the standing book database according to the result of the processing operation. The problem of lower accuracy and efficiency of maintaining database information through the standing book in the correlation technique is solved. The newly added database information is checked, the database information stored in the standing book database is traversed and confirmed, the abnormal database is fed back in the standing book, corresponding maintenance is carried out according to the feedback content, and then the effect of quickly and accurately maintaining the database corresponding to the database information recorded in the standing book is achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
fig. 1 is a flowchart of a processing method of database information provided according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a database information processing apparatus provided according to an embodiment of the present application;
fig. 3 is a schematic view of an electronic device according to an embodiment of the present application.
Detailed Description
It should be noted that, in the present application, the embodiments and features of the embodiments may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
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 for presentation, analyzed data, etc.) referred to in the present disclosure are information and data authorized by the user or sufficiently authorized by each party.
It should be noted that the method, the apparatus, the storage medium, and the electronic device for processing the database information determined by the present disclosure may be used in the field of financial technology, and may also be used in any field other than the field of financial technology.
According to an embodiment of the application, a method for processing database information is provided.
Fig. 1 is a flowchart of a processing method of database information according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S101, acquiring a newly added database list, wherein the newly added database list comprises a plurality of newly added databases.
It should be noted that, the IP address of the server where each database is located is recorded in the newly added database list, and the server corresponding to the database can be accessed through the IP address.
Specifically, the database list generation platform may obtain IP address information of a server of the newly added database, generate a newly added database list, and regularly send the newly added database list to the ledger database, so that the newly generated IP address information of the server of the database may be stored in the ledger database.
And step S102, respectively determining a server corresponding to each newly added database, acquiring 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 for indicating the attribute of the database.
Specifically, after the ledger database acquires the IP addresses of the servers corresponding to the multiple databases from the newly added database list, the servers can be accessed through the IP addresses of the servers to acquire the associated information of the databases, and each database and the corresponding associated information are stored in the ledger database in an associated manner. The association information may include operating system information of the server, information of the database, and information of a same group of databases that are in a same group association relationship with the database.
And step S103, inquiring the stored associated information of the database from the ledger database to obtain an inquiry result.
Specifically, after the associated information corresponding to the newly added database is stored, traversal check may be performed on the associated information of part or all of the databases in the ledger database to obtain the query structure.
And step S104, triggering processing operation aiming at the database according to the query result, and updating the associated information of the database stored in the standing book database according to the result of the processing operation.
Specifically, the ledger database can obtain the association information corresponding to the database corresponding to each abnormal information in the query result according to the query result, change the content in the corresponding association information according to the abnormal information, send out the corresponding alarm information to notify the operation and maintenance personnel to maintain the corresponding database, and after the operation and maintenance personnel maintain the database, change the content in the corresponding association information again according to the abnormal information according to the maintenance result to obtain the maintained association information, so that the database is processed timely, and the information in the ledger database is consistent with the information in the server.
According to the method for processing the database information, a newly added database list is obtained, wherein the newly added database list comprises a plurality of newly added databases; respectively determining a server corresponding to each newly added database, acquiring 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 standing book database, wherein the associated information is used for indicating the attribute of the database; inquiring the stored associated information of the database from the standing book database to obtain an inquiry result; and triggering processing operation aiming at the database according to the query result, and updating the associated information of the database stored in the standing book database according to the result of the processing operation. The problem of lower accuracy and efficiency of maintaining database information through the standing book in the correlation technique is solved. The newly added database information is checked, the database information stored in the standing book database is traversed and confirmed, the abnormal database is fed back in the standing book, corresponding maintenance is carried out according to the feedback content, and then the effect of quickly and accurately maintaining the database corresponding to the database information recorded in the standing book is achieved.
Optionally, in the method for processing database information provided in the embodiment of the present application, the method further includes: polling each database in the standing book database according to a preset time period, and acquiring the associated information of the current database from a server corresponding to each data; and replacing the correlation information of the database stored in the standing book database according to the correlation information of the current database.
Specifically, polling check can be performed on part or all of the databases in the ledger database at any time, that is, the servers are accessed through the IP addresses of the servers corresponding to each database, relevant information corresponding to the servers can be acquired when the servers corresponding to each database are accessed during the check, and the original relevant information in the ledger database is replaced by the relevant information, so that the relevant information stored in the ledger database is updated. The embodiment ensures the accuracy of the data in the standing book database.
Optionally, in the method for processing database information provided in this embodiment of the present application, the association information of the database includes available information of the database, the query result includes available information of the database, the processing operation for the database is triggered according to the query result, and the updating of the association information of the database stored in the ledger database according to the result of the processing operation includes: determining the unavailable type of the database and outputting corresponding first alarm information under the condition that the inquired available information indicates that the database is unavailable; detecting whether feedback information aiming at the first alarm information is received or not, wherein the feedback information is used for indicating that the processing operation is finished on the unavailable database; under the condition that the feedback information is received, determining available information of a database which executes the finished processing operation based on the feedback information to obtain updated available information; and updating the available information of the database stored in the standing book database according to the updated available information.
Specifically, the association information corresponding to each database may include database information of the database, where the database information may include availability information of the database, and when traversing checking is performed on the association information of all databases in the ledger database, the availability information of each data is first obtained, and when a certain database is unavailable, the alarm information corresponding to the database is generated, and the alarm information is returned to the operation and maintenance system. And maintaining the database in the operation and maintenance system and sending corresponding feedback information. And after the standing book database receives the feedback information, updating the available information of the database in the standing book database according to the available condition in the feedback information to obtain the updated available information.
For example, when the database a is detected to be unavailable, an alarm message is sent to notify relevant personnel to perform processing, and the processing result is synchronized into the ledger database after the processing, so that the availability information after the database a is updated is obtained. The embodiment achieves the effects of timely maintaining the database according to the available information of the database and updating the available information at the same time.
Optionally, in the method for processing database information provided in this embodiment of the present application, the unavailable type includes a fault type, and in a case that the feedback information is received, determining, based on the feedback information, available information of the database that has performed the processing operation, and obtaining updated available information includes: determining information indicating that the database is available as updated available information when the feedback information indicates that the database executing the completed processing operation is available; in a case where the feedback information indicates that the database that performed the finalized processing operation is unavailable, information indicating that the database is unavailable is determined as updated available information.
Specifically, the availability information of the database includes three types, i.e., available type, unavailable type and to-be-used type, where the unavailable type may include a fault type, and the fault type may be a condition that the database is abnormal due to objective factors, for example, a server device corresponding to the database crashes, and the database cannot be used due to an excessively high memory occupation ratio. According to the embodiment, the effect of timely maintaining the database according to the fault information of the database and updating the available information is achieved.
Optionally, in the method for processing database information provided in this embodiment of the present application, the unavailable type includes a recovery type, and in a case that the feedback information is received, determining, based on the feedback information, available information of the database that has performed the processing operation, and obtaining updated available information includes: under the condition that the feedback information indicates that the database which finishes the processing operation needs to be multiplexed, determining the information which indicates the database to be used as updated information to be used; and deleting the associated information of the database from the ledger database under the condition that the feedback information indicates that the database which has performed the finished processing operation does not need to be multiplexed.
Specifically, the unavailable type of the database may further include a recycle type, where the recycle type may be a database exception caused by a supervisor factor, for example, a server corresponding to the database is updated, a previous-generation server is eliminated, and at this time, after the ledger database sends an alarm message, a maintenance worker may perform data backup on the recycle type database and determine whether the database can be reused, and when the database can be reused, the vertical opening is marked for standby use and sealed, and corresponding feedback information is sent to the ledger database, and when the database is marked for standby use, the database with the mark for standby use is skipped when the database is checked subsequently, and the database is reused when the mark for standby use is deleted; and when the database can not be used again, directly sending feedback information for deleting the database, and deleting corresponding related information in the standing book database. The embodiment achieves the effects of timely maintaining the database according to the available information of the database and updating the available information at the same time.
Optionally, in the method for processing database information provided in this embodiment of the present application, the association information of the database includes master-slave information of the database, the query result includes master-slave information of the database, the processing operation for the database is triggered according to the query result, and the updating of the association information of the database stored in the ledger database according to the result of the processing operation includes: under the condition that the inquired master-slave information indicates that the database is a master database, acquiring the running state of the database from a server corresponding to the database, wherein the master database is used for storing data under the normal running state; under the condition that the running state of the database indicates that the database is in a non-running state, master-slave information of the database stored in the standing book database is changed; under the condition that the inquired master-slave information indicates that the database is a slave database, acquiring the running state of the database from a server corresponding to the database, wherein the slave database is a backup database of the master database; and under the condition that the running state of the database indicates that the database is in the running state, changing master-slave information of the database stored in the standing book database.
Specifically, the association information corresponding to each database may include master-slave information of the database. The multiple databases can be grouped according to the preset storage content, and the group name, the master database and the slave database in each group are set, the master database can be used for daily business data interaction, and the slave database can be used for backing up all data in the master database. When each database is checked in a traversing manner, judgment is carried out according to master-slave information stored in the standing book database and the current operation condition of the slave database, corresponding feedback information is sent to the standing book database under the condition that the master-slave information and the slave database are inconsistent, and corresponding associated information in the standing book database is changed according to the feedback information.
For example, the group B database includes an a master database, a B slave database, and a C slave database, when it is detected that the a master database is in a non-operating state, it is determined that the a master database may be changed in master-slave information due to an abnormality, the master-slave information of the a database is changed to the a slave database, the operating state of the slave database is determined B, C, and when the B slave database is still in the non-operating state and the C slave database is in an operating state, it is determined that the C slave database is changed to the master database instead of the a master database, the master-slave information of the C database is changed to the C master database, and the master-slave change information is fed back to the ledger database. The embodiment achieves the effect of more accurately recording the master-slave information of the database in the standing book database.
Optionally, in the method for processing database information provided in this embodiment of the present application, the association information of the database includes a storage amount of the database, the query result includes a storage amount of the database, the triggering, according to the query result, a processing operation on the database, and updating, according to a result of the processing operation, the association information of the database stored in the ledger database includes: under the condition that the storage amount of the database is inquired, judging whether the storage amount of the database is larger than a storage amount threshold value or not, and under the condition that the storage amount is larger than the storage amount threshold value, outputting corresponding second alarm information; detecting whether feedback information aiming at the second alarm information is received or not, wherein the feedback information is used for indicating that the processing operation is finished on the database with the storage capacity larger than the storage capacity threshold value; under the condition that the feedback information is received, determining the storage capacity of the database which executes the processing operation based on the feedback information to obtain an updated storage capacity; and updating the storage capacity of the database stored in the standing book database according to the updated storage capacity.
Specifically, the associated information corresponding to each database may include database information of the database, and the server information may further include storage capacity of the database. When traversing checking is carried out on the associated information of all the databases in the standing book database, the current storage capacity of each database is obtained, and the current storage capacity and the storage capacity in the associated information corresponding to the standing book database are replaced.
It should be noted that after the ledger database acquires the current storage amount to be replaced, the current storage amount needs to be compared with a threshold value, alarm information is sent when the current storage amount is greater than the threshold value, and after the operation and maintenance staff receive the information, feedback information, that is, the storage amount after the capacity expansion of the database is acquired, and the corresponding storage amount in the ledger database is replaced to obtain an updated storage amount. The embodiment achieves the effects of synchronizing the memory space and timely repairing the database with abnormal memory space.
Optionally, in the method for processing database information provided in this embodiment of the present application, after determining a server corresponding to each newly added database, obtaining 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: acquiring a target list from the operation and maintenance database, wherein the target list comprises a plurality of preset databases, and the associated information of the preset databases is to be stored in the standing book database; judging whether the associated information of the plurality of preset databases is stored in the standing book database; under the condition that the associated information of the preset data is not stored in the standing book database, determining the preset database of which the associated information is not stored in the standing book database to obtain a target database; and acquiring 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 standing book database.
Specifically, after the associated information of the newly added database is added to the standing book database, a target list corresponding to the database list in the newly added database list needs to be obtained from the operation database, wherein the target list in the operation database corresponds to the information in the newly added database list, the target list is compared with the information in the newly added database list, the missing database in the newly added database list is searched in the standing book database, the associated information of the missing database is obtained from the target list in the case that the missing database is not searched, and the associated information of the missing database is stored in the standing book database.
For example, there are A, B, C, D, E, F six databases in the newly added database list, there are A, B, C, D, E, F, G, H eight databases in the target list, at this time, the newly added database list is compared with the target list to obtain the missing information of G, H two databases, at this time, a search is performed in the standing book database, and it is found that the associated information of the G database is already stored in the standing book database, so only the associated information of the H database is stored in the standing book database. The embodiment avoids the phenomenon of missing a newly added database.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the present application further provides a processing apparatus for database information, and it should be noted that the processing apparatus for database information of the embodiment of the present application may be used to execute the processing method for database information provided in the embodiment of the present application. The following describes a database information processing apparatus according to an embodiment of the present application.
Fig. 2 is a schematic diagram of a database information processing apparatus according to an embodiment of the present application. As shown in fig. 2, the apparatus includes: a first obtaining unit 21, a first determining unit 22, an inquiring unit 23, and an updating unit 24.
Specifically, the first obtaining unit 21 is configured to obtain a list of newly added databases, where the list of newly added databases includes a plurality of newly added databases;
the first determining unit 22 is configured to determine a server corresponding to each newly added database, 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, where the association information is used to indicate an attribute of the database;
the query unit 23 is configured to query the stored associated information of the database from the ledger database to obtain a query result;
and the updating unit 24 is configured to trigger a processing operation for 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.
The processing device for database information provided by the embodiment of the application acquires a newly added database list through a first acquiring unit 21, wherein the newly added database list comprises a plurality of newly added databases; the first determining unit 22 determines a server corresponding to each newly added database, acquires 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 for indicating the attribute of the database; the query unit 23 queries the stored associated information of the database from the ledger database to obtain a query result; the updating unit 24 triggers a processing operation for the database according to the query result, and updates the association information of the database stored in the ledger database according to the result of the processing operation. The problem of lower accuracy and efficiency of maintaining database information through the standing book in the correlation technique is solved. The newly added database information is checked, the database information stored in the standing book database is traversed and confirmed, the abnormal database is fed back in the standing book, corresponding maintenance is carried out according to the feedback content, and then the effect of quickly and accurately maintaining the database corresponding to the database information recorded in the standing book is achieved.
Optionally, in the apparatus for processing database information provided in the embodiment of the present application, the apparatus further includes: the polling unit is used for polling each database in the standing book database according to a preset time period and acquiring the associated information of the current database from the server corresponding to each data; and the replacing unit is used for replacing the association information of the database stored in the standing book database according to the association information of the current database.
Optionally, in the apparatus for processing database information provided in this embodiment of the present application, the association information of the database includes available information of the database, the query result includes available information of the database, and the updating unit 24 includes: the first determining module is used for determining the unavailable type of the database and outputting corresponding first alarm information under the condition that the inquired available information indicates that the database is unavailable; the first detection module is used for detecting whether feedback information aiming at the first alarm information is received or not, wherein the feedback information is used for indicating that the processing operation is finished on the unavailable database; the second determining module is used for determining the available information of the database which executes the finished processing operation based on the feedback information under the condition of receiving the feedback information to obtain updated available information; and the first updating module is used for updating the available information of the database stored in the standing book database according to the updated available information.
Optionally, in the apparatus for processing database information provided in this embodiment of the present application, the unavailable type includes a fault type, and the second determining module includes: the first determining submodule is used for determining the information indicating that the database is available as the updated available information under the condition that the feedback information indicates that the database which executes the finished processing operation is available; and the second determining sub-module is used for determining the information indicating that the database is unavailable as the updated available information when the feedback information indicates that the database which executes the finished processing operation is unavailable.
Optionally, in the apparatus for processing database information provided in this embodiment of the present application, the unavailable type includes a recovery type, and the second determining module includes: the third determining submodule is used for determining the information indicating that the database is available as the updated available information under the condition that the feedback information indicates that the database which finishes the processing operation needs to be reused; and the deleting submodule is used for deleting the associated information of the database from the ledger database under the condition that the feedback information indicates that the database which has performed the processing operation is not required to be reused.
Optionally, in the apparatus for processing database information provided in this embodiment of the present application, the association information of the database includes master-slave information of the database, the query result includes the master-slave information of the database, and the updating unit 24 includes: the first acquisition module is used for acquiring the running state of the database from a server corresponding to the database under the condition that the inquired master-slave information indicates that the database is a master database, wherein the master database is used for storing data under a normal running state; the first changing module is used for changing master-slave information of the database stored in the standing book database under the condition that the running state of the database indicates that the database is in a non-running state; the second acquisition module is used for acquiring the running state of the database from a server corresponding to the database under the condition that the inquired master-slave information indicates that the database is a slave database, wherein the slave database is a backup database of the master database; and the second changing module is used for changing the master-slave information of the database stored in the standing book database under the condition that the running state of the database indicates that the database is in the running state.
Optionally, in the apparatus for processing database information provided in the embodiment of the present application, the association information of the database includes a storage amount of the database, the query result includes the storage amount of the database, and the updating unit 24 includes: the output module is used for judging whether the storage amount of the database is larger than a storage amount threshold value or not under the condition that the storage amount of the database is inquired, and outputting corresponding second alarm information under the condition that the storage amount is larger than the storage amount threshold value; the second detection module is used for detecting whether feedback information aiming at the second alarm information is received or not, wherein the feedback information is used for indicating that the processing operation is finished on the database with the storage amount larger than the storage amount threshold; the third determining module is used for determining the storage capacity of the database which executes the finished processing operation based on the feedback information under the condition that the feedback information is received, so as to obtain the updated storage capacity; and the second updating module is used for updating the storage capacity of the database stored in the standing book database according to the updated storage capacity.
Optionally, in the apparatus for processing database information provided in the embodiment of the present application, the apparatus further includes: the second acquisition unit is used for acquiring a target list from the operation and maintenance database, wherein the target list comprises a plurality of preset databases, and the associated information of the preset databases is to be stored in the standing book database; the judging unit is used for judging whether the associated information of the plurality of preset databases is stored in the ledger database; the second determining unit is used for determining a preset database of which the associated information is not stored in the ledger database to obtain a target database under the condition that the associated information of the preset data is not stored in the ledger database; and the adding unit is used for acquiring 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.
The database information processing device comprises a processor and a memory, wherein the first acquiring unit 21, the first determining unit 22, the querying unit 23, the updating unit 24 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. One or more kernels can be set, and the problem that the accuracy and efficiency of maintaining database information through the ledger are low in the related art is solved by adjusting kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
The embodiment of the application also provides a nonvolatile storage medium, wherein the nonvolatile storage medium is used for storing the program, and the program controls the equipment where the nonvolatile storage medium is located to execute the processing method of the database information when running.
The embodiment of the application also provides an electronic device, which comprises a processor and a memory; the memory stores computer readable instructions, and the processor is used for executing the computer readable instructions, wherein the computer readable instructions execute a method for processing database information. The electronic device herein may be a server, a PC, a PAD, a mobile phone, etc.
As shown in fig. 3, an embodiment of the present invention provides an electronic device, where the electronic device 10 includes a processor, a memory, and a program stored in the memory and executable on the processor, and the processor executes the program to implement the following steps: acquiring a newly added database list; respectively determining a server corresponding to each newly added database, acquiring 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; inquiring the stored associated information of the database from the standing book database to obtain an inquiry result; and triggering processing operation aiming at the database according to the query result, and updating the associated information of the database stored in the standing book database according to the result of the processing operation. The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: acquiring a newly added database list; respectively determining a server corresponding to each newly added database, acquiring 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; inquiring the stored associated information of the database from the standing book database to obtain an inquiry result; and triggering processing operation aiming at the database according to the query result, and updating the associated information of the database stored in the standing book database according to the result of the processing operation.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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 Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the present application pertains. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (11)

1. A method for processing database information is characterized by comprising the following steps:
acquiring a newly added database list, wherein the newly added database list comprises a plurality of newly added databases;
respectively determining a server corresponding to each newly added database, acquiring 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 for indicating the attribute of the database;
inquiring the stored associated information of the database from the standing book database to obtain an inquiry result;
and triggering processing operation aiming at 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.
2. The method of claim 1, further comprising:
polling each database in the standing book database according to a preset time period, and acquiring the association information of the current database from a server corresponding to each piece of data;
and replacing the stored associated information of the database in the standing book database according to the associated information of the current database.
3. The method of claim 1, wherein the association information of the database comprises available information of the database, the query result comprises available information of the database, the processing operation for the database is triggered according to the query result, and the updating of the association information of the database stored in the ledger database according to the result of the processing operation comprises:
determining the unavailable type of the database and outputting corresponding first alarm information under the condition that the inquired available information indicates that the database is unavailable;
detecting whether feedback information aiming at the first alarm information is received or not, wherein the feedback information is used for indicating that the processing operation is finished on the unavailable database;
under the condition that the feedback information is received, determining available information of the database which executes the processing operation based on the feedback information to obtain updated available information;
and updating the available information of the database stored in the standing book database according to the updated available information.
4. The method of claim 3, wherein the unavailable type comprises a fault type, and wherein determining, based on the feedback information, available information of the database that has performed the processing operation if the feedback information is received, and wherein obtaining updated available information comprises:
determining information indicating that the database is available as the updated available information in a case that the feedback information indicates that the database that performed the processing operation is available;
determining information indicating that the database is unavailable as the updated available information if the feedback information indicates that the database performing a finishing operation is unavailable.
5. The method of claim 3, wherein the unavailable type comprises a recycling type, and wherein determining available information of the database that has performed the processing operation based on the feedback information if the feedback information is received, and obtaining updated available information comprises:
determining information indicating that the database is available as the updated information to be used under the condition that the feedback information indicates that the database which has performed the processing operation needs to be multiplexed;
and under the condition that the feedback information indicates that the database which has performed the processing operation does not need to be multiplexed, deleting the associated information of the database from the standing book database.
6. The method of claim 1, wherein the association information of the database comprises master-slave information of the database, the query result comprises master-slave information of the database, the processing operation for the database is triggered according to the query result, and the updating of the association information of the database stored in the ledger database according to the result of the processing operation comprises:
under the condition that the inquired master-slave information indicates that the database is a master database, acquiring the running state of the database from a server corresponding to the database, wherein the master database is used for storing data under a normal running state;
under the condition that the running state of the database indicates that the database is in a non-running state, changing master-slave information of the database stored in the standing book database;
under the condition that the inquired master-slave information indicates that the database is a slave database, acquiring the running state of the database from a server corresponding to the database, wherein the slave database is a backup database of the master database;
and under the condition that the running state of the database indicates that the database is in the running state, changing master-slave information of the database stored in the standing book database.
7. The method of claim 1, wherein the association information of the database comprises a storage amount of the database, the query result comprises a storage amount of the database, the triggering of the processing operation on the database according to the query result, and the updating of the association information of the database stored in the ledger database according to a result of the processing operation comprises:
under the condition that the storage amount of the database is inquired, judging whether the storage amount of the database is larger than a storage amount threshold value or not, and under the condition that the storage amount is larger than the storage amount threshold value, outputting corresponding second alarm information;
detecting whether feedback information aiming at the second alarm information is received or not, wherein the feedback information is used for indicating that the processing operation is finished being executed on the database with the storage amount being larger than the storage amount threshold;
under the condition that the feedback information is received, determining the storage capacity of the database which executes the processing operation based on the feedback information to obtain an updated storage capacity;
and updating the storage capacity of the database stored in the standing book database according to the updated storage capacity.
8. The method according to claim 1, wherein after determining the server corresponding to each of the new databases, respectively, obtaining the association information of the new database from the server corresponding to the new database, and adding the association information of the new database to the ledger database, the method further comprises:
acquiring a target list from a operation and maintenance database, wherein the target list comprises a plurality of preset databases, and the associated information of the preset databases is to be stored in the ledger database;
judging whether the associated information of the preset databases is stored in the standing book database or not;
under the condition that the associated information of the preset data is not stored in the standing book database, determining the preset database of which the associated information is not stored in the standing book database to obtain a target database;
and acquiring the associated information of the target database from a server corresponding to the target database, and adding the associated information of the target database to the standing book database.
9. An apparatus for processing database information, comprising:
the device comprises a first obtaining unit, a second obtaining unit and a third obtaining unit, wherein the first obtaining unit is used for obtaining a newly added database list, and the newly added database list comprises a plurality of newly added databases;
a first determining unit, configured to determine a server corresponding to each newly added database, 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, where the association information is used to indicate an attribute of the database;
the first query unit is used for querying the stored associated information of the database from the standing book database to obtain a query result;
and the first updating unit is used for triggering the processing operation aiming at 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.
10. A non-volatile storage medium, wherein the non-volatile storage medium is configured to store a program, and when the program runs, the program controls a device in which the non-volatile storage medium is located to execute the database information processing method according to any one of claims 1 to 8.
11. An electronic device comprising one or more processors and memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of processing database information of any one of claims 1 to 8.
CN202210690242.2A 2022-06-17 2022-06-17 Database information processing method and device, storage medium and electronic equipment Pending CN115048399A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210690242.2A CN115048399A (en) 2022-06-17 2022-06-17 Database information processing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210690242.2A CN115048399A (en) 2022-06-17 2022-06-17 Database information processing method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN115048399A true CN115048399A (en) 2022-09-13

Family

ID=83161133

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210690242.2A Pending CN115048399A (en) 2022-06-17 2022-06-17 Database information processing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115048399A (en)

Similar Documents

Publication Publication Date Title
US11586673B2 (en) Data writing and reading method and apparatus, and cloud storage system
CN107133234B (en) Method, device and system for updating cache data
CN106897342B (en) Data verification method and equipment
CN106899654B (en) Sequence value generation method, device and system
CN110222042B (en) Method, device, equipment and system architecture for determining checked business data
CN110781214A (en) Database reading and writing method and device, computer equipment and storage medium
CN106878365B (en) data synchronization method and device
CN109471901B (en) Data synchronization method and device
CN102902770A (en) Method and system for assembling mirror image files
CN114301785A (en) Method and device for determining service relationship of computer and storage medium
CN114691445A (en) Cluster fault processing method and device, electronic equipment and readable storage medium
CN116775716A (en) Data query method and device, storage medium and electronic equipment
CN115080309A (en) Data backup system, method, storage medium, and electronic device
CN110928945B (en) Data processing method and device for database and data processing system
CN111209138A (en) Operation and maintenance method and device of data storage system
CN115048399A (en) Database information processing method and device, storage medium and electronic equipment
CN114500249A (en) Root cause positioning method and device
CN114860432A (en) Method and device for determining information of memory fault
CN109976944B (en) Data processing method and system, storage medium and electronic device
CN114138745A (en) Data integration method and device, storage medium and processor
CN109426559B (en) Command issuing method and device, storage medium and processor
CN111078258A (en) Version upgrading method and device
CN112256489A (en) Data acquisition method and device of cloud development platform and data storage architecture
CN110990378A (en) Block chain-based data consistency comparison method, device and medium
CN111158873A (en) System state machine implementation method and device, storage medium and processor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination