CN114238324A - Checking method and device for host station, electronic equipment and storage medium - Google Patents

Checking method and device for host station, electronic equipment and storage medium Download PDF

Info

Publication number
CN114238324A
CN114238324A CN202111521110.9A CN202111521110A CN114238324A CN 114238324 A CN114238324 A CN 114238324A CN 202111521110 A CN202111521110 A CN 202111521110A CN 114238324 A CN114238324 A CN 114238324A
Authority
CN
China
Prior art keywords
site
data
checking
slave
field
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
CN202111521110.9A
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 CN202111521110.9A priority Critical patent/CN114238324A/en
Publication of CN114238324A publication Critical patent/CN114238324A/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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution

Landscapes

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

Abstract

The invention discloses a checking method and a device for a host station, electronic equipment and a storage medium, and relates to the field of financial technology, wherein the checking method comprises the following steps: acquiring site data of a host site, wherein the host site comprises: the master station and the at least one slave station check whether the station data between the master station and each slave station are consistent to obtain a check result, determine that inconsistent data exist in the station data between the master station and each slave station under the condition that the check result is not empty, and send the check result to the target terminal. The invention solves the technical problem that the data of different host sites cannot be automatically checked in the related technology, and site data are easy to be inconsistent.

Description

Checking method and device for host station, electronic equipment and storage medium
Technical Field
The invention relates to the field of financial science and technology, in particular to a method and a device for checking a host station, electronic equipment and a storage medium.
Background
With the rapid development of financial science and technology, the requirements of customers on the continuity and stable operation of financial services are higher and higher, and more financial institutions establish a double-activity or even multi-activity system to ensure the stable operation of the system. In the related art, a core system of a financial institution may be a ZOS (management suite operating system) system based on IBM, and may manage data using a relational database, and at the same time, may establish a highly available architecture of the same city and dual activities by using a QREP (database backup technology) data replication technology, so that, in a core system failure scenario, it may be quickly switched to another same city system to operate and provide external services. Data loss or anomalies are unacceptable for financial systems, and therefore, how to ensure data consistency in a same city system is a switchable basis. If the data of the same city system is inconsistent, the high-availability architecture is unavailable, and great challenges are caused to the continuous operation of the business. If the problem is manually located and analyzed by a DBA (database administrator), the problem cannot be found and solved in the first time in the face of a large business scale.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for checking host computer sites, electronic equipment and a storage medium, which are used for at least solving the technical problem that data of different host computer sites cannot be checked automatically in the related technology and site data are easy to be inconsistent.
According to an aspect of an embodiment of the present invention, there is provided an inspection method for a host station, including: acquiring site data of a host site, wherein the host site comprises: a master site and at least one slave site; checking whether the site data between the master site and each slave site are consistent or not to obtain a checking result; and under the condition that the check result is not empty, determining that site data between the master site and the slave site are inconsistent, and sending the check result to a target terminal.
Optionally, the site data at least includes: application table data, the application table data comprising at least: the field table data, whether the site data between the master site and each slave site are consistent or not is checked, and the step of obtaining the checking result comprises the following steps: extracting first field table data in a database of the primary site, wherein the first field table data at least comprises: table name, field type, and field length; after preprocessing the first field table data, writing the first field table data into a shared file in the main site; extracting second field table data in a database of the slave site, and writing the second field table data into a site file of the slave site after preprocessing the second field table data; and checking whether the data in the site file of the slave site is consistent with the data in the shared file or not to obtain a field table checking result.
Optionally, the application table data further includes: index table data, checking whether the site data between the master site and each slave site are consistent, and obtaining the checking result, further comprising: extracting first index table data in a database of the primary site, wherein the first index table data at least comprises: index name, index field name and field sorting; after preprocessing the first index table data, writing the first index table data into a shared file in the main site; extracting second index table data in a database of the slave site, and writing the second index table data into a site file of the slave site after preprocessing the second index table data; and checking whether the data in the site file of the slave site is consistent with the data in the shared file or not to obtain an index table checking result.
Optionally, the site data further includes: program table data, checking whether the site data between the master site and each slave site are consistent, and obtaining the checking result, wherein the program table data comprises the following steps: extracting first program table data in a database of the primary site, wherein the first program table data at least comprises: program name, program identification number, timestamp; after preprocessing the first program table data, writing the first program table data into a shared file in the main site; extracting second program table data in a database of the slave site, and writing the second program table data into a site file of the slave site after preprocessing the second program table data; and checking whether the data in the site file of the slave site is consistent with the data in the shared file or not to obtain a program logic checking result.
Optionally, the site data further includes: copying parameter data, and checking whether the station data between the master station and each slave station are consistent to obtain a checking result, wherein the checking result comprises the following steps: obtaining a first replication parameter table of a first preset process based on the site information of the primary site, wherein the table type of the first replication parameter table comprises at least one of the following types: a queue parameter table, an alarm information parameter table and an application configuration parameter table; writing the shared file in the primary site after preprocessing the first copy parameter table; obtaining a second copy parameter table of a first preset process based on the site information of the slave site; after the second copy parameter table is preprocessed, writing the preprocessed second copy parameter table into a shared file in the slave site; and checking whether the data in the shared file in the master site is consistent with the data in the shared file in the slave site to obtain a first checking result.
Optionally, before checking whether the station data between the master station and each slave station are consistent, the checking method further includes: deploying a forward process field table and a reverse process field table on the host site; deploying a forward program field table and a reverse program field table on an agent site, wherein the agent site comprises: a proxy master site and a proxy slave site.
Optionally, the step of checking whether the station data between the master station and each slave station are consistent to obtain a check result further includes: checking whether the configuration field data of the forward progress field table is consistent with the configuration field data of the reverse progress field table to obtain a second checking result; or, checking whether the data of the forward process field table of the slave site is consistent with the data of the forward program field table of the proxy slave site to obtain a third checking result; or, checking whether the data of the reverse process field table of the primary site is consistent with the data of the reverse program field table of the proxy primary site to obtain a fourth checking result; or, checking whether the data of the forward process field table of the master site is consistent with the data of the forward process field table of the slave site, and obtaining a fifth checking result.
Optionally, the step of checking whether the station data between the master station and each slave station are consistent to obtain a check result further includes: acquiring data of a copy configuration table and table data in a database; and checking the copy configuration table data and the table data in the database to obtain a sixth checking result.
Optionally, the step of checking whether the station data between the master station and each slave station are consistent to obtain a check result further includes: acquiring the application configuration parameter table in the first preset process, wherein the application configuration parameter table at least comprises: applying the table name; based on the application table name, inquiring an index table in a database, sorting the identification information of the index table, and selecting one index table as a target index table in a sorting result; inquiring a key value table in a database based on the target index table to obtain a first key value set; inquiring a field table in a first preset process based on the application table name to obtain a second key value set; and checking whether the key value data of the first key value set and the key value data of the second key value set are consistent or not to obtain a seventh checking result.
Optionally, the step of checking whether the station data between the master station and each slave station are consistent to obtain a check result further includes: checking a current state of a parameter table of the first preset process of the host site, wherein the current state includes: an active state or an inactive state; writing a parameter table of an inactive state into the inspection result; checking the current state of a parameter table of a second preset process of the agent site, and writing the parameter table of the inactive state into the checking result.
Optionally, the step of checking whether the station data between the master station and each slave station are consistent to obtain a check result further includes: reading a filtering parameter table of the second preset process of the agent site; checking whether the filtering parameter table has a filtering policy; adding the filtering policy to the filtering parameter table in case the filtering parameter table does not have the filtering policy.
Optionally, the checking method further comprises: establishing a first list file based on the site data of the slave site; acquiring a table name of an application parameter table of a first preset process of the slave site and a table name of a database system table; screening out a second table list file based on the table name of the application parameter table and the table name of the database system table; and checking whether the file data of the first list file and the second list file are abnormal or not to obtain a check report.
According to another aspect of the embodiments of the present invention, there is also provided an inspection apparatus for a host station, including: an obtaining unit, configured to obtain site data of a host site, where the host site includes: a master site and at least one slave site; the checking unit is used for checking whether the site data between the master site and each slave site are consistent or not to obtain a checking result; and the determining unit is used for determining that inconsistent data exists in the station data between the master station and the slave station under the condition that the checking result is not empty, and sending the checking result to the target terminal.
Optionally, the site data at least includes: application table data, the application table data comprising at least: field table data, the checking unit comprising: a first extraction module, configured to extract first field table data in a database of the primary site, where the first field table data at least includes: table name, field type, and field length; the first writing module is used for writing the shared file in the main site after preprocessing the first field table data; the second extraction module is used for extracting second field table data in a database of the slave station, preprocessing the second field table data and writing the second field table data into a station file of the slave station; and the first checking module is used for checking whether the data in the site file of the slave site is consistent with the data in the shared file or not to obtain a field table checking result.
Optionally, the application table data further includes: index table data, the checking unit further comprising: a third extraction module, configured to extract first index table data in the database of the primary site, where the first index table data at least includes: index name, index field name and field sorting; the second writing module is used for writing the shared file in the main site after preprocessing the data of the first index table; the fourth extraction module is used for extracting second index table data in the database of the slave station, and writing the second index table data into the station file of the slave station after preprocessing the second index table data; and the second checking module is used for checking whether the data in the site file of the slave site is consistent with the data in the shared file or not to obtain an index table checking result.
Optionally, the site data further includes: program table data, the checking unit including: a fifth extraction module, configured to extract first program table data in a database of the primary site, where the first program table data at least includes: program name, program identification number, timestamp; the third writing module is used for writing the shared file in the main site after preprocessing the first program table data; a sixth extraction module, configured to extract second program table data in the database of the slave site, and write the second program table data into a site file of the slave site after preprocessing the second program table data; and the third checking module is used for checking whether the data in the site file of the slave site is consistent with the data in the shared file or not to obtain a program logic checking result.
Optionally, the site data further includes: -copying parameter data, the checking unit comprising: a first output module, configured to obtain a first copy parameter table of a first preset process based on the site information of the primary site, where a table type of the first copy parameter table includes at least one of the following: a queue parameter table, an alarm information parameter table and an application configuration parameter table; the fourth writing module is used for writing the shared file in the primary site after the first replication parameter table is preprocessed; the second output module is used for obtaining a second copy parameter table of the first preset process based on the site information of the slave site; a fifth writing module, configured to write the shared file in the slave site after preprocessing the second copy parameter table; and the fourth checking module is used for checking whether the data in the shared file in the master site is consistent with the data in the shared file in the slave site to obtain a first checking result.
Optionally, the inspection apparatus further comprises: a first deployment module, configured to deploy a forward process field table and a reverse process field table on the host site before checking whether site data between the master site and each of the slave sites are consistent; a second deployment module, configured to deploy a forward program field table and a reverse program field table on the agent site, where the agent site includes: a proxy master site and a proxy slave site.
Optionally, the inspection unit further comprises: a fifth checking module, configured to check whether the configuration field data of the forward process field table is consistent with the configuration field data of the reverse process field table, so as to obtain a second checking result; or, a sixth checking module, configured to check whether data in the forward process field table of the slave site is consistent with data in the forward program field table of the proxy slave site, to obtain a third checking result; or, the seventh checking module is configured to check whether data of the reverse process field table of the primary site is consistent with data of the reverse program field table of the proxy primary site, and obtain a fourth checking result; or, the eighth checking module is configured to check whether data in the forward process field table of the master site is consistent with data in the forward process field table of the slave site, so as to obtain a fifth checking result.
Optionally, the inspection unit further comprises: the first acquisition module is used for acquiring the data of the copy configuration table and the table data in the database; and the ninth checking module is used for checking the data of the copy configuration table and the table data in the database to obtain a sixth checking result.
Optionally, the inspection unit further comprises: a second obtaining module, configured to obtain the application configuration parameter table in the first preset process, where the application configuration parameter table at least includes: applying the table name; the first query module is used for querying an index table in a database based on the application table name, sequencing the identification information of the index table and selecting one index table as a target index table in a sequencing result; the second query module is used for querying a key value table in a database based on the target index table to obtain a first key value set; the third query module is used for querying a field table in a first preset process based on the application table name to obtain a second key value set; a tenth checking module, configured to check whether the key value data of the first key value set and the key value data of the second key value set are consistent, and obtain a seventh checking result.
Optionally, the inspection unit further comprises: an eleventh checking module, configured to check a current state of a parameter table of the first preset process of the host site, where the current state includes: an active state or an inactive state; a sixth writing module, configured to write a parameter table of an inactive state into the check result; and the twelfth checking module is used for checking the current state of the parameter table of the second preset process of the proxy site and writing the parameter table in the inactive state into the checking result.
Optionally, the inspection unit further comprises: the first reading module is used for reading a filtering parameter table of the second preset process of the proxy site; a thirteenth checking module, configured to check whether the filtering parameter table has a filtering policy; a first adding module, configured to add the filtering policy to the filtering parameter table if the filtering parameter table does not have the filtering policy.
Optionally, the inspection apparatus further comprises: the first establishing module is used for establishing a first list file based on the site data of the slave site; the third acquisition module is used for acquiring the table name of the application parameter table of the first preset process of the slave site and the table name of the database system table; the first screening module is used for screening out a second list file based on the list name of the application parameter list and the list name of the database system list; a fourteenth checking module, configured to check whether file data of the first table manifest file and the second table manifest file are abnormal, so as to obtain a check report.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, and when the computer program runs, the apparatus where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned inspection methods for a host station.
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, where the memory is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement any one of the above-mentioned checking methods for a host station.
In the present disclosure, site data of a host site is acquired, wherein the host site includes: the master station and the at least one slave station check whether the station data between the master station and each slave station are consistent to obtain a check result, determine that inconsistent data exist in the station data between the master station and each slave station under the condition that the check result is not empty, and send the check result to the target terminal. In the application, whether the data among different host computer sites are consistent or not can be automatically checked, the data consistency check is completed, inconsistent data can be reported immediately, comprehensive and rapid checking and alarming can be realized, continuous and stable operation of services is guaranteed, and the technical problem that the site data are inconsistent because the data of different host computer sites cannot be automatically checked in the related technology is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of an alternative inspection method for a host site according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an alternative high availability architecture according to an embodiment of the present invention;
fig. 3 is a diagram of fields of an alternative comparative QREP configuration in accordance with an embodiment of the present invention;
FIG. 4 is a diagram illustrating an alternative method for checking a CAPTURE filtering parameter table according to an embodiment of the invention;
FIG. 5 is a schematic diagram of an alternative host site inspection system according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating an alternative shared file for sites, according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of an alternative inspection apparatus for a host site, according to an embodiment of the present invention;
fig. 8 is a block diagram of a hardware structure of an electronic device (or mobile device) for an inspection method of a host site according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the 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 invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention 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 is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. 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.
To facilitate understanding of the invention by those skilled in the art, some terms or nouns referred to in the embodiments of the invention are explained below:
QREP: a data replication technology is essentially a technology of transaction playback based on LOG LOG reading.
It should be noted that the inspection method and apparatus for the host site in the present disclosure can be used in the financial technology field for inspecting the host site, and can also be used in any field other than the financial technology field for inspecting the host site.
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.
The following embodiments of the present invention can be applied to various systems/applications/devices for checking host sites, and are mainly applied to checking whether data among different host sites are consistent, wherein the data of the host sites mainly checked are data such as an application table, a program, and QREP parameters.
The present invention will be described in detail with reference to examples.
Example one
In accordance with an embodiment of the present invention, there is provided an inspection method embodiment for a host site, it being noted that the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer-executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
Fig. 1 is a flow chart of an alternative checking method for a host site according to an embodiment of the present invention, as shown in fig. 1, the method including the steps of:
step S101, acquiring site data of a host site, wherein the host site comprises: a master site and at least one slave site.
And step S102, checking whether the site data between the master site and each slave site are consistent to obtain a checking result.
Step S103, under the condition that the checking result is not empty, determining that the site data between the master site and the slave site are inconsistent, and sending the checking result to the target terminal.
Through the above steps, the site data of the host site can be acquired, wherein the host site includes: a master site and at least one slave site; checking whether the site data between the master site and each slave site are consistent to obtain a checking result; and when the check result is not empty, determining that site data between the master site and the slave site are inconsistent, and transmitting the check result to the target terminal. In the embodiment of the invention, the data consistency check can be completed by automatically checking whether the data among different host computer sites are consistent, the inconsistent data can be reported immediately, the comprehensive, rapid and effective check and alarm can be realized, the continuous and stable operation of the service is ensured, and the technical problem that the data of the sites are easily inconsistent because the data of the different host computer sites cannot be automatically checked in the related technology is solved.
The following will explain the embodiments of the present invention in detail with reference to the above steps.
In the embodiment of the present invention, in order to ensure the continuity of the service, a dual-active system or a multi-active site system may be set, and in this embodiment, taking the dual-active system as an example, an a site is set as a master site, and a B site is set as a slave site. Fig. 2 is a schematic diagram of an alternative high availability architecture according to an embodiment of the present invention, in a normal state, a core transaction is run at a site a, a QREP copy technology may be adopted, and a site data transmission technology/a site data writing technology is used, so that a data LOG completes normally only when the site a and the site B perform landing transactions at the same time, and it can be ensured that data at different sites is not lost. The CAPTURE process of the QREP is started on a PROXY system PROXY (B site), the CAPTURE is responsible for analyzing the data LOG into specific database data SQL, and then the data is applied to the application table of the B site through the application process of the B site, so that the consistency of the data of the application tables of the A site and the B site is ensured, and meanwhile, the PROXY (B site) and the A site are decoupled, so that the data can be ensured not to be lost in a disaster scene of the A site. Conversely, if the transaction is running on the B site, then the CAPTURE process of PROXY (site A) is responsible for resolving the data LOG and the APPLY process of site A is applied to the application table of site A. In normal state, the CAPTURE process of PROXY (site A) and the APPLY process of site A are not started.
Step S101, acquiring site data of a host site, wherein the host site comprises: a master site and at least one slave site.
In this embodiment of the present invention, the master site may be divided into a master site and a slave site, and in order to ensure the continuity of the service, a dual-active system or a multi-active site system may be provided (that is, a plurality of slave sites may be provided according to the actual situation), where the site data may include: application table data, program table data, QREP parameter data, and the like.
Optionally, before checking whether the site data between the master site and each slave site are consistent, the checking method further includes: deploying a forward progress field table and a reverse progress field table on a host site; deploying a forward program field table and a reverse program field table on an agent site, wherein the agent site comprises: a proxy master site and a proxy slave site.
In the embodiment of the present invention, a field table of forward APPLY (i.e. a forward process field table) and a field table of reverse APPLY (i.e. a reverse process field table) may be deployed on the host site a/B, and a field table of forward CAPTURE (i.e. a forward program field table) and a field table of forward CAPTURE (i.e. a reverse program field table) may be deployed on PROXY (a site) (i.e. a PROXY host site) and PROXY (B site) (i.e. a PROXY slave site).
And step S102, checking whether the site data between the master site and each slave site are consistent to obtain a checking result.
In the embodiment of the present invention, an automatic trigger module may be adopted, so that the checking of the site data of different host sites is performed in the form of a trigger script, for example, twice a day in the morning, twice in the afternoon, twice in the evening, and 6 fixed time comparison checks all day long, and the operation sequence of different site operations (i.e., checking between the site data of different sites) may be controlled by a TWS (host automated job scheduling tool). Meanwhile, after the system change is finished (namely, when the master site cannot operate, the slave site is switched to continue to operate), the changed site data are ensured to be consistent by triggering script check.
Optionally, the site data at least includes: application table data, the application table data comprising at least: the field table data, whether the site data between the master site and each slave site are consistent is checked, and the step of obtaining the checking result comprises the following steps: extracting first field table data in a database of a primary site, wherein the first field table data at least comprises: table name, field type, and field length; after preprocessing the first field table data, writing the first field table data into a shared file in the main site; extracting second field table data in a database of the slave site, and writing the second field table data into a site file of the slave site after preprocessing the second field table data; and checking whether the data in the site file of the slave site is consistent with the data in the shared file or not to obtain a field table checking result.
Optionally, the application table data further includes: the step of indexing the table data, checking whether the site data between the master site and each slave site are consistent, and obtaining the checking result, further comprises: extracting first index table data in a database of a primary site, wherein the first index table data at least comprises: index name, index field name and field sorting; after preprocessing the first index table data, writing the preprocessed first index table data into a shared file in a main site; extracting second index table data in a database of the slave site, and writing a site file of the slave site after preprocessing the second index table data; and checking whether the data in the site file of the slave site is consistent with the data in the shared file or not to obtain an index table checking result.
In the embodiment of the invention, the application table data in the site data of different host sites can be checked through the application table structure comparison module, and the table structure and the index structure can be mainly compared for the application table data, so that the consistency of the application table data structure can be ensured. The method comprises the following specific steps:
the first field table data (i.e., data of table names, field types, and field lengths of all application tables in the field table) in the database (e.g., DB2 database) of the full extraction a site (representing the primary site), and formatting (i.e. preprocessing) the data to obtain data in a uniform format, writing the data into the shared file of the site a, extracting the second field table data in the database of the site B (representing the slave site) in the same way, formatting the data, writing the data into the site file of the site B, and comparing whether the data in the site file is consistent with the data in the shared file (namely, checking whether the data in the site file of the slave site is consistent with the data in the shared file) at the B site, checking whether the data is abnormal, and writing a comparison result into an application table structure comparison file (namely, a field table check result).
The first index table data (i.e., index names, index field names, field ordering, etc. data of all application tables in the index table) in the database (e.g., DB2 database) of the full extraction a-site (representing the primary site), and formatting (i.e. preprocessing) the data to obtain data in a uniform format, writing the data into the shared file of the site a, extracting the second index table data in the database of the site B (representing the slave site) in the same way, formatting the data, writing the data into the site file of the site B, and comparing whether the data in the site file is consistent with the data in the shared file (namely, checking whether the data in the site file of the slave site is consistent with the data in the shared file) at the B site, checking whether the data is abnormal, and writing a comparison result into an index structure comparison file (namely, an index table check result).
Optionally, the site data further includes: program table data, checking whether the site data between the master site and each slave site are consistent, and obtaining the checking result, wherein the program table data comprises the following steps: extracting first program table data in a database of a main site, wherein the first program table data at least comprises: program name, program identification number, timestamp; after preprocessing the first program table data, writing the first program table data into a shared file in a main site; extracting second program table data in a database of the slave site, and writing a site file of the slave site after preprocessing the second program table data; and checking whether the data in the site file of the slave site is consistent with the data in the shared file or not to obtain a program logic checking result.
In the embodiment of the present invention, the program table data in the site data of different host sites may be checked by the program comparison module, specifically: the method includes the steps of extracting first program table data (namely, data such as program names, program identification numbers and time stamps in all program tables) in a database (for example, a DB2 database) of a site (representing a master site) in a full quantity, formatting the data (namely, preprocessing the data to obtain data in a unified format), writing the data into a shared file of the site A, extracting second program table data in a database of a site (representing a slave site) in the same way, formatting the data, writing the data into a site file of the site B, comparing whether the data in the site file of the site B is consistent with the data in the shared file (namely, checking whether the data in the site file of the slave site is consistent with the data in the shared file), checking whether the data is abnormal, and writing a comparison result into a program logic comparison file (namely, a program logic check result).
Optionally, the site data further includes: copying parameter data, checking whether the site data between the master site and each slave site are consistent, and obtaining a checking result, wherein the checking result comprises the following steps: obtaining a first copy parameter table of a first preset process based on site information of a primary site, wherein the table type of the first copy parameter table comprises at least one of the following types: a queue parameter table, an alarm information parameter table and an application configuration parameter table; after the first copy parameter table is preprocessed, writing the preprocessed first copy parameter table into a shared file in a main site; obtaining a second copy parameter table of the first preset process based on the site information of the slave site; after the second copy parameter table is preprocessed, writing a shared file in the slave site; and checking whether the data in the shared file in the master site is consistent with the data in the shared file in the slave site to obtain a first checking result.
In the embodiment of the present invention, the QREP parameter comparison module may be used to check copy parameter data in site data of different host sites, including checking a copy parameter table of a first preset process between different sites, which is specifically as follows:
inquiring a control parameter table (namely, a first copy parameter table) of an APPLY process (namely, a first preset process) according to site information of a master site, wherein the table types of the first copy parameter table comprise a queue parameter table, an alarm information parameter table, an application configuration parameter table and the like, the parameter table is relevant parameters of the APPLY process, the first copy parameter table of the first preset process of the A site can be obtained, and after the first copy parameter table is preprocessed (namely, the format of the parameter table is processed in a unified manner), the first copy parameter table is written into a shared file in the A site, similarly, a second copy parameter table of the first preset process of the B site can be obtained, and after the second copy parameter table is preprocessed (namely, the format of the parameter table is processed in a unified manner), the second copy parameter table is written into a shared file in the B site, and then whether data in the shared file in the master site is consistent with data in the shared file in the slave site is checked, a first inspection result is obtained.
Optionally, the step of checking whether the site data between the master site and each slave site are consistent to obtain a check result further includes: checking whether the configuration field data of the forward process field table is consistent with the configuration field data of the reverse process field table to obtain a second checking result; or, checking whether the data of the forward progress field table of the slave site is consistent with the data of the forward program field table of the proxy slave site to obtain a third checking result; or, checking whether the data of the reverse process field table of the primary site is consistent with the data of the reverse program field table of the proxy primary site to obtain a fourth checking result; or, checking whether the data of the forward progress field table of the master site is consistent with the data of the forward progress field table of the slave site, and obtaining a fifth checking result.
In the embodiment of the invention, the checking of the copy parameter data in the site data of different host sites further comprises the comparison of fields configured by QREP, and the data is stored in the form of the fields, so that the correctness of the field configuration of QREP ensures whether the data can be copied correctly, and the fields of the CAPTURE process and the APPLY process are consistent, thereby ensuring that the data can be copied normally, the forward and reverse fields of the APPLY process are consistent, and ensuring that the reverse data copy can run normally in a switching scene.
Fig. 3 is a diagram illustrating alternative fields comparing QREP configurations according to an embodiment of the present invention, which is as follows:
step S301: obtaining configuration field data of the forward progress field table and configuration field data of the reverse progress field table by inquiring the application table name and the field name of the forward progress field table (namely, the forward progress field table) and the reverse progress field table (namely, the reverse progress field table) of the site A, and checking whether the configuration field data of the forward progress field table is consistent with the configuration field data of the reverse progress field table to obtain a second checking result.
Step S302: the data of the reverse process field table of the main site and the data of the reverse program field table of the agent main site are obtained by inquiring the application table name and the field name of the reverse application process field table of the site A, inquiring the application table name and the field name of the reverse program field table of the PROXY main site, writing the data into the shared file, and checking whether the data of the reverse process field table of the main site is consistent with the data of the reverse program field table of the agent main site at the site A to obtain a fourth checking result.
Step S303: obtaining configuration field data of the forward progress field table and configuration field data of the reverse progress field table by inquiring the application table name and the field name of the forward progress field table (namely, the forward progress field table) and the reverse progress field table (namely, the reverse progress field table) of the B site, and checking whether the configuration field data of the forward progress field table is consistent with the configuration field data of the reverse progress field table to obtain a second checking result.
Step S304: the method comprises the steps of inquiring an application table name and a field name of a forward application process field table of a B site, inquiring an application table name and a field name of a PROXY slave site forward process field table of a PROXY (B site), obtaining data of the forward process field table of the slave site and data of the forward program field table of the PROXY slave site, writing the data into a shared file, and checking whether the data of the forward process field table of the slave site is consistent with the data of the forward program field table of the PROXY slave site on the B site to obtain a third checking result.
Step S305: obtaining data of a forward progress field table of the site A by inquiring an application table name and a field name of the forward progress field table of the site A, and writing the data into a shared file; and checking whether the data of the forward process field table of the master site is consistent with the data of the forward process field table of the slave site or not at the B site to obtain a fifth checking result.
Optionally, the step of checking whether the site data between the master site and each slave site are consistent to obtain a check result further includes: acquiring data of a copy configuration table and table data in a database; and checking the copied configuration table data and the table data in the database to obtain a sixth checking result.
In the embodiment of the invention, the application table name and the field name of the forward application progress field table in the QREP can be inquired at the a site to obtain the copy configuration table data, the data is written into the file after being formatted, meanwhile, the table name and the field name are inquired in the database field table at the a site to obtain the table data in the database, the data is written into the file after being formatted, and then, the two files are checked (namely, the copy configuration table data and the table data in the database are checked), all fields of the application table of the database are ensured to be the same as all fields of the QREP configuration table, and the QREP abnormality caused by field omission can be avoided. Likewise, the same check can be made at the B site, since the above steps have already checked that the fields of the APPLY process field table and the CAPTURE process field table are identical, so the check of this step can ensure that the fields of the application table of the database are identical to the fields of the QREP configured APPLY process and CAPTURE process.
Optionally, the step of checking whether the site data between the master site and each slave site are consistent to obtain a check result further includes: acquiring an application configuration parameter table in a first preset process, wherein the application configuration parameter table at least comprises the following steps: applying the table name; based on the application table name, inquiring an index table in a database, sequencing identification information of the index table, and selecting one index table as a target index table in a sequencing result; inquiring a key value table in a database based on a target index table to obtain a first key value set; inquiring a field table in a first preset process based on the application table name to obtain a second key value set; and checking whether the key value data of the first key value set and the key value data of the second key value set are consistent or not to obtain a seventh checking result.
In the embodiment of the present invention, the QREP technology is a multithread concurrent operation, and a unique index needs to be configured to avoid an overtime deadlock of an application process, so that it is necessary to check whether the configuration of the unique index is correct, in this embodiment, there may be a plurality of unique indexes, and a unique index configuration sorted according to an index name first may be selected, which is specifically as follows:
querying all application table names configured in an application configuration parameter table of an APPLY process (i.e. a first preset process), querying an index table in a database according to the application table names, sorting the index tables in each application table according to the index names (i.e. identification information of the index tables), selecting one index table in each application table as a unique index (e.g. selecting the index table sorted to 1 as the unique index), obtaining unique indexes (i.e. target index tables) of all application tables, querying a key value table in the database according to the target index table, obtaining all key values (i.e. a first key value set), querying all key values (i.e. obtaining a second key value set) of a current field in a field table in the APPLY process according to the application table names, the first key value set and the second key value set, and comparing whether the key values configured in the field table of the APPLY process are consistent with the key values of the unique indexes (i.e. checking key value data of the first key value set and key value data of the unique index) according to the application table names, the first key value set and the second key value set and comparing whether the key value set configured in the field table in the APPLY process with the key value set Whether the key-value data of the second key-value set is consistent).
Optionally, the step of checking whether the site data between the master site and each slave site are consistent to obtain a check result further includes: checking a current state of a parameter table of a first preset process of a host site, wherein the current state comprises: an active state or an inactive state; writing the parameter table of the inactive state into the inspection result; and checking the current state of the parameter table of the second preset process of the agent site, and writing the parameter table in the inactive state into a checking result.
In the embodiment of the invention, a table with a non-active state in an application parameter table of an application process (namely, a first preset process) is checked in the A site and the B site (namely, the current state of the parameter table of the first preset process of the host site is checked, wherein the current state comprises an active state or an inactive state), a table with a non-active state in the application parameter table of the CAPTURE process (namely, the current state of the parameter table of a second preset process of the PROXY site is checked) is checked in the PROXY (A site) and the PROXY (B site), and the checked parameter table in the inactive state is written into a check result.
Optionally, the exception table in the application process may be checked at the a and B sites to see if it is empty, where all exception data is recorded in the exception table.
Optionally, the step of checking whether the site data between the master site and each slave site are consistent to obtain a check result further includes: reading a filtering parameter table of a second preset process of the agent site; checking whether the filtering parameter table has a filtering strategy; in the case where the filtering parameter table does not have a filtering policy, the filtering policy is added to the filtering parameter table.
In this embodiment of the present invention, fig. 4 is a schematic diagram of an optional checking of the CAPTURE filtering parameter table according to an embodiment of the present invention, which may be implemented by checking whether the CAPTURE filtering parameter table has a filtering policy (i.e., after reading the filtering parameter table of the second preset process of the PROXY site, it is checked whether the filtering parameter table has the filtering policy) at a PROXY site and the a/B sites are simultaneously turned on, if the CAPTURE of the PROXY site is started in an abnormal situation, if the filtering policy is not present, it may be caused that data LOG copied to the B site is copied to the a site again, which causes repeated updating of data and data abnormality, and therefore, if the filtering parameter table does not have the filtering policy, the filtering policy is added to the filtering parameter table.
Step S103, under the condition that the checking result is not empty, determining that the site data between the master site and the slave site are inconsistent, and sending the checking result to the target terminal.
In the embodiment of the present invention, if the check result is not empty, it indicates that there is inconsistent data in the site data between the master site and the slave site, and in this embodiment, when a non-empty file is checked (i.e., under the condition that the check result is not empty), the operation and maintenance staff may be notified for the first time in the form of centralized monitoring, email, short message alarm, etc. according to the information of the file through the alarm handling module, so as to analyze and resolve the file quickly (i.e., send the check result to the target terminal).
Optionally, the checking method further includes: establishing a first list file based on the site data of the slave site; acquiring a table name of an application parameter table of a first preset process of a slave site and a table name of a database system table; screening out a second list file based on the list name of the application parameter list and the list name of the database system list; and checking whether the file data of the first list file and the second list file are abnormal or not to obtain a check report.
In the embodiment of the present invention, the station B (representing the slave station) may run a part of the inquiry transactions in a normal state, and the station B unique parameter checking module may check whether the station B unique parameter is correct, which is specifically as follows: according to the site data of the B site, a normal table list file (namely a first table list file) is established, an application table name of an application parameter table of an application process is extracted at the B site, an application table name of a database system table is extracted (namely the table name of the application parameter table of a first preset process of the site and the table name of the database system table are obtained), a different table list (namely a second table list file) is screened out based on the table name of the application parameter table and the table name of the database system table, the comparison is carried out with the normal table list file, and whether the abnormality exists is checked (namely whether the file data of the first table list file and the file data of the second table list file are abnormal is checked, and a check report is obtained).
Optionally, the identification numbers of the host sites are unique and incremental, and it may be checked whether the identification number parameters of the two host sites are set as odd numbers or even numbers (that is, whether the identification numbers of different sites are both odd numbers or both even numbers), and if the identification numbers of the host sites are both odd numbers or both even numbers, it may happen that the identification numbers are the same after switching, resulting in a transaction error, and therefore, in the case that the identification number parameters of the two host sites are set as odd numbers, the identification number parameter of any one site of the two host sites is set as an odd number, and the identification number parameter of the other site is an even number.
The embodiment of the invention can compare and check the consistency of data among different sites by deploying the timing check script, collecting data such as an application table, a program, QREP parameters and the like and combining the QREP data copying technology, can comprehensively, quickly and effectively check and alarm the abnormal condition of the data among different sites, and ensures the continuous and stable operation of services.
Example two
FIG. 5 is a schematic diagram of an alternative mainframe site inspection system according to an embodiment of the present invention, as shown in FIG. 5, the system comprising: the system comprises an automatic trigger module, a shared file module, an application table structure comparison module, a program comparison module, a QREP parameter comparison module, a slave station unique parameter checking module and an alarm handling module, wherein the specific functions of the modules are as follows:
an automated triggering module: the operation can be executed in a timed trigger script form, for example, twice a day in the morning, twice in the afternoon, twice in the evening, and 6 times a day for fixed time comparison check, the operation sequence of different station operations is controlled by a TWS (host automated operation scheduling tool), and meanwhile, after the system change is finished, the data of the changed station is ensured to be consistent by the trigger script check.
A file sharing module: the shared file module can establish shared files at all the sites through the shared volumes, control read-write permission, write collected information into all the system files, compare the information in all the systems according to requirements, and check whether the system is abnormal or not.
Fig. 6 is a schematic diagram of optional shared files at various sites according to an embodiment of the present invention, as shown in fig. 6, an a-site file (readable, writable) and a PROXY (a-site) shared file (readable) may be created at the a-site, a PROXY (a-site) file (readable, writable) may be created at the PROXY (a-site), an a-site shared file (read-only) may be created at the B-site, a PROXY (a-site) shared file (read-only), a PROXY (B-site) shared file (read-only), and a PROXY (B-site) file (readable, writable) may be created at the PROXY (B-site).
Applying a table structure comparison module: the table structures of different sites can be ensured to be consistent, so that the application data structures of different sites are ensured to be consistent.
A program comparison module: the method can ensure that the program logics of different sites are consistent, ensure that the transaction accesses the application table with the same program logics after the switching of the park, and avoid transaction error reporting.
QREP parameter comparison module: the QREP parameters are configured according to the application table dimensions, namely the QREP synchronizes the data of the master station table T1 to the table T1 identical to the slave station, and parameter comparison ensures that the copying states of all application tables are normal, so that the inconsistency of the data of different stations caused by abnormal QREP states of a certain application table is avoided.
A slave site unique parameter checking module: normal operation of inquiry transactions from the stations can be ensured.
An alarm handling module: can ensure that the operation and maintenance personnel can be informed quickly when the system is abnormal.
In the embodiment of the invention, the consistency of data and transaction access can be ensured through the check of the seven modules, and the slave site can quickly take over and provide services to the outside under the failure of the master site, thereby ensuring the service continuity.
EXAMPLE III
The inspection apparatus for a host station provided in this embodiment includes a plurality of implementation units, each implementation unit corresponding to a respective implementation step in the first embodiment.
Fig. 7 is a schematic diagram of an alternative checking apparatus for a host station according to an embodiment of the present invention, and as shown in fig. 7, the checking apparatus may include: an acquisition unit 70, a checking unit 71, a determination unit 72, wherein,
an obtaining unit 70, configured to obtain station data of a host station, where the host station includes: a master site and at least one slave site;
a checking unit 71, configured to check whether station data between the master station and each slave station are consistent, so as to obtain a checking result;
a determining unit 72, configured to determine that there is data in which the station data between the master station and the slave station is inconsistent if the check result is not empty, and send the check result to the target terminal.
The above-mentioned inspection apparatus may acquire, by the acquiring unit 70, station data of a host station, where the host station includes: a master site and at least one slave site; checking whether the station data between the master station and each slave station are consistent through a checking unit 71 to obtain a checking result; when the check result is not empty, the determination unit 72 determines that there is data in which the station data between the master station and the slave station is inconsistent, and transmits the check result to the target terminal. In the embodiment of the invention, the data consistency check can be completed by automatically checking whether the data among different host computer sites are consistent, the inconsistent data can be reported immediately, the comprehensive, rapid and effective check and alarm can be realized, the continuous and stable operation of the service is ensured, and the technical problem that the data of the sites are easily inconsistent because the data of the different host computer sites cannot be automatically checked in the related technology is solved.
Optionally, the site data at least includes: application table data, the application table data comprising at least: the field table data, the checking unit includes: the first extraction module is used for extracting first field table data in a database of a primary site, wherein the first field table data at least comprises: table name, field type, and field length; the first writing module is used for writing the shared file in the main site after preprocessing the first field table data; the second extraction module is used for extracting second field table data in a database of the slave site, and writing the second field table data into a site file of the slave site after preprocessing the second field table data; and the first checking module is used for checking whether the data in the site file of the slave site is consistent with the data in the shared file or not to obtain a field table checking result.
Optionally, the application table data further includes: index table data, the checking unit further includes: a third extraction module, configured to extract first index table data in a database of a primary site, where the first index table data at least includes: index name, index field name and field sorting; the second writing module is used for writing the shared file in the main site after preprocessing the data of the first index table; the fourth extraction module is used for extracting the second index table data in the database of the slave site, and writing the second index table data into the site file of the slave site after preprocessing the second index table data; and the second checking module is used for checking whether the data in the site file of the slave site is consistent with the data in the shared file or not to obtain an index table checking result.
Optionally, the site data further includes: program table data, the checking unit includes: a fifth extraction module, configured to extract first program table data in a database of the primary site, where the first program table data at least includes: program name, program identification number, timestamp; the third writing module is used for writing the shared file in the main site after preprocessing the first program table data; the sixth extraction module is used for extracting second program table data in the database of the slave site, preprocessing the second program table data and writing the second program table data into a site file of the slave site; and the third checking module is used for checking whether the data in the site file of the slave site is consistent with the data in the shared file or not and obtaining a program logic checking result.
Optionally, the site data further includes: copying the parameter data, the checking unit includes: a first output module, configured to obtain a first copy parameter table of a first preset process based on site information of a primary site, where a table type of the first copy parameter table includes at least one of the following: a queue parameter table, an alarm information parameter table and an application configuration parameter table; the fourth writing module is used for writing the shared file in the main site after preprocessing the first copy parameter table; the second output module is used for obtaining a second copy parameter table of the first preset process based on the site information of the slave site; the fifth writing module is used for writing the shared file in the slave site after the second copy parameter table is preprocessed; and the fourth checking module is used for checking whether the data in the shared file in the master site is consistent with the data in the shared file in the slave site to obtain a first checking result.
Optionally, the inspection apparatus further comprises: the first deployment module is used for deploying a forward progress field table and a reverse progress field table on the host site before checking whether site data between the master site and each slave site are consistent; a second deployment module, configured to deploy the forward program field table and the reverse program field table on the agent site, where the agent site includes: a proxy master site and a proxy slave site.
Optionally, the checking unit further comprises: the fifth checking module is used for checking whether the configuration field data of the forward progress field table is consistent with the configuration field data of the reverse progress field table or not to obtain a second checking result; or, the sixth checking module is configured to check whether data in the forward process field table of the slave site is consistent with data in the forward program field table of the proxy slave site, and obtain a third checking result; or, the seventh checking module is configured to check whether data of the reverse process field table of the primary site is consistent with data of the reverse program field table of the proxy primary site, and obtain a fourth checking result; or, the eighth checking module is configured to check whether data in the forward progress field table of the master site is consistent with data in the forward progress field table of the slave site, and obtain a fifth checking result.
Optionally, the checking unit further comprises: the first acquisition module is used for acquiring the data of the copy configuration table and the table data in the database; and the ninth checking module is used for checking the copied configuration table data and the table data in the database to obtain a sixth checking result.
Optionally, the checking unit further comprises: a second obtaining module, configured to obtain an application configuration parameter table in a first preset process, where the application configuration parameter table at least includes: applying the table name; the first query module is used for querying the index tables in the database based on the application table names, sequencing the identification information of the index tables and selecting one index table as a target index table in a sequencing result; the second query module is used for querying the key value table in the database based on the target index table to obtain a first key value set; the third query module is used for querying a field table in the first preset process based on the application table name to obtain a second key value set; and the tenth checking module is used for checking whether the key value data of the first key value set and the key value data of the second key value set are consistent or not to obtain a seventh checking result.
Optionally, the checking unit further comprises: an eleventh checking module, configured to check a current state of a parameter table of a first preset process of the host site, where the current state includes: an active state or an inactive state; a sixth writing module, configured to write the parameter table of the inactive state into the inspection result; and the twelfth checking module is used for checking the current state of the parameter table of the second preset process of the proxy site and writing the parameter table in the inactive state into the checking result.
Optionally, the checking unit further comprises: the first reading module is used for reading a filtering parameter table of a second preset process of the proxy site; a thirteenth checking module, configured to check whether the filtering parameter table has a filtering policy; the first adding module is used for adding the filtering strategy to the filtering parameter table under the condition that the filtering parameter table does not have the filtering strategy.
Optionally, the inspection apparatus further comprises: the first establishing module is used for establishing a first list file based on the site data of the slave site; the third acquisition module is used for acquiring the table name of the application parameter table of the first preset process of the slave site and the table name of the database system table; the first screening module is used for screening out a second list file based on the list name of the application parameter list and the list name of the database system list; and the fourteenth checking module is used for checking whether the file data of the first table list file and the second table list file are abnormal or not to obtain a checking report.
The above-mentioned checking device may further comprise a processor and a memory, and the above-mentioned acquiring unit 70, the checking unit 71, the determining unit 72, 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.
The processor comprises a kernel, and the kernel calls a corresponding program unit from the memory. The kernel can set one or more than one kernel, and the checking result is sent to the target terminal by adjusting the 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 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 site data of a host site, wherein the host site comprises: a master site and at least one slave site; checking whether the site data between the master site and each slave site are consistent to obtain a checking result; and when the check result is not empty, determining that site data between the master site and the slave site are inconsistent, and transmitting the check result to the target terminal.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium including a stored computer program, wherein when the computer program runs, the apparatus where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned checking methods for a host station.
According to another aspect of embodiments of the present invention, there is also provided an electronic device, including one or more processors and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement any one of the above-mentioned checking methods for a host site.
Fig. 8 is a block diagram of a hardware structure of an electronic device (or mobile device) for an inspection method of a host site according to an embodiment of the present invention. As shown in fig. 8, the electronic device may include one or more (shown as 802a, 802b, … …, 802 n) processors 802 (the processors 802 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and memory 804 for storing data. Besides, the method can also comprise the following steps: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a keyboard, a power supply, and/or a camera. It will be understood by those skilled in the art that the structure shown in fig. 8 is only an illustration and is not intended to limit the structure of the electronic device. For example, the electronic device may also include more or fewer components than shown in FIG. 8, or have a different configuration than shown in FIG. 8.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (15)

1. An inspection method for a host site, comprising:
acquiring site data of a host site, wherein the host site comprises: a master site and at least one slave site;
checking whether the site data between the master site and each slave site are consistent or not to obtain a checking result;
and under the condition that the check result is not empty, determining that site data between the master site and the slave site are inconsistent, and sending the check result to a target terminal.
2. The inspection method according to claim 1, wherein the site data includes at least: application table data, the application table data comprising at least: the field table data, whether the site data between the master site and each slave site are consistent or not is checked, and the step of obtaining the checking result comprises the following steps:
extracting first field table data in a database of the primary site, wherein the first field table data at least comprises: table name, field type, and field length;
after preprocessing the first field table data, writing the first field table data into a shared file in the main site;
extracting second field table data in a database of the slave site, and writing the second field table data into a site file of the slave site after preprocessing the second field table data;
and checking whether the data in the site file of the slave site is consistent with the data in the shared file or not to obtain a field table checking result.
3. The inspection method of claim 2, wherein the application table data further comprises: index table data, checking whether the site data between the master site and each slave site are consistent, and obtaining the checking result, further comprising:
extracting first index table data in a database of the primary site, wherein the first index table data at least comprises: index name, index field name and field sorting;
after preprocessing the first index table data, writing the first index table data into a shared file in the main site;
extracting second index table data in a database of the slave site, and writing the second index table data into a site file of the slave site after preprocessing the second index table data;
and checking whether the data in the site file of the slave site is consistent with the data in the shared file or not to obtain an index table checking result.
4. The inspection method according to claim 2, wherein the site data further includes: program table data, checking whether the site data between the master site and each slave site are consistent, and obtaining the checking result, wherein the program table data comprises the following steps:
extracting first program table data in a database of the primary site, wherein the first program table data at least comprises: program name, program identification number, timestamp;
after preprocessing the first program table data, writing the first program table data into a shared file in the main site;
extracting second program table data in a database of the slave site, and writing the second program table data into a site file of the slave site after preprocessing the second program table data;
and checking whether the data in the site file of the slave site is consistent with the data in the shared file or not to obtain a program logic checking result.
5. The inspection method according to claim 2, wherein the site data further includes: copying parameter data, and checking whether the station data between the master station and each slave station are consistent to obtain a checking result, wherein the checking result comprises the following steps:
obtaining a first replication parameter table of a first preset process based on the site information of the primary site, wherein the table type of the first replication parameter table comprises at least one of the following types: a queue parameter table, an alarm information parameter table and an application configuration parameter table;
writing the shared file in the primary site after preprocessing the first copy parameter table;
obtaining a second copy parameter table of a first preset process based on the site information of the slave site;
after the second copy parameter table is preprocessed, writing the preprocessed second copy parameter table into a shared file in the slave site;
and checking whether the data in the shared file in the master site is consistent with the data in the shared file in the slave site to obtain a first checking result.
6. The method of claim 5, wherein before checking whether the site data between the master site and each of the slave sites is consistent, the method further comprises:
deploying a forward process field table and a reverse process field table on the host site;
deploying a forward program field table and a reverse program field table on an agent site, wherein the agent site comprises: a proxy master site and a proxy slave site.
7. The method of claim 6, wherein the step of checking whether the site data between the master site and each slave site are consistent to obtain the checking result further comprises:
checking whether the configuration field data of the forward progress field table is consistent with the configuration field data of the reverse progress field table to obtain a second checking result; or,
checking whether the data of the forward progress field table of the slave site is consistent with the data of the forward program field table of the proxy slave site to obtain a third checking result; or,
checking whether the data of the reverse process field table of the primary site is consistent with the data of the reverse program field table of the proxy primary site to obtain a fourth checking result; or,
and checking whether the data of the forward progress field table of the master site is consistent with the data of the forward progress field table of the slave site to obtain a fifth checking result.
8. The method of claim 5, wherein the step of checking whether the site data between the master site and each slave site are consistent to obtain the checking result further comprises:
acquiring data of a copy configuration table and table data in a database;
and checking the copy configuration table data and the table data in the database to obtain a sixth checking result.
9. The method of claim 5, wherein the step of checking whether the site data between the master site and each slave site are consistent to obtain the checking result further comprises:
acquiring the application configuration parameter table in the first preset process, wherein the application configuration parameter table at least comprises: applying the table name;
based on the application table name, inquiring an index table in a database, sorting the identification information of the index table, and selecting one index table as a target index table in a sorting result;
inquiring a key value table in a database based on the target index table to obtain a first key value set;
inquiring a field table in a first preset process based on the application table name to obtain a second key value set;
and checking whether the key value data of the first key value set and the key value data of the second key value set are consistent or not to obtain a seventh checking result.
10. The method of claim 5, wherein the step of checking whether the site data between the master site and each slave site are consistent to obtain the checking result further comprises:
checking a current state of a parameter table of the first preset process of the host site, wherein the current state includes: an active state or an inactive state;
writing a parameter table of an inactive state into the inspection result;
checking the current state of a parameter table of a second preset process of the agent site, and writing the parameter table of the inactive state into the checking result.
11. The method of claim 10, wherein the step of checking whether the site data between the master site and each of the slave sites are consistent to obtain the checking result further comprises:
reading a filtering parameter table of the second preset process of the agent site;
checking whether the filtering parameter table has a filtering policy;
adding the filtering policy to the filtering parameter table in case the filtering parameter table does not have the filtering policy.
12. The inspection method according to claim 1, further comprising:
establishing a first list file based on the site data of the slave site;
acquiring a table name of an application parameter table of a first preset process of the slave site and a table name of a database system table;
screening out a second table list file based on the table name of the application parameter table and the table name of the database system table;
and checking whether the file data of the first list file and the second list file are abnormal or not to obtain a check report.
13. An inspection apparatus for a host site, comprising:
an obtaining unit, configured to obtain site data of a host site, where the host site includes: a master site and at least one slave site;
the checking unit is used for checking whether the site data between the master site and each slave site are consistent or not to obtain a checking result;
and the determining unit is used for determining that inconsistent data exists in the station data between the master station and the slave station under the condition that the checking result is not empty, and sending the checking result to the target terminal.
14. A computer-readable storage medium, comprising a stored computer program, wherein when the computer program runs, the computer-readable storage medium controls an apparatus to execute the checking method for a host station according to any one of claims 1 to 12.
15. 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 checking method for a host site of any one of claims 1 to 12.
CN202111521110.9A 2021-12-13 2021-12-13 Checking method and device for host station, electronic equipment and storage medium Pending CN114238324A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111521110.9A CN114238324A (en) 2021-12-13 2021-12-13 Checking method and device for host station, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111521110.9A CN114238324A (en) 2021-12-13 2021-12-13 Checking method and device for host station, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114238324A true CN114238324A (en) 2022-03-25

Family

ID=80755403

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111521110.9A Pending CN114238324A (en) 2021-12-13 2021-12-13 Checking method and device for host station, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114238324A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115981880A (en) * 2023-03-21 2023-04-18 深圳云豹智能有限公司 Method, device, system and chip for avoiding deadlock of host access slave

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115981880A (en) * 2023-03-21 2023-04-18 深圳云豹智能有限公司 Method, device, system and chip for avoiding deadlock of host access slave

Similar Documents

Publication Publication Date Title
EP3435235B1 (en) Method and device for executing data recovery operation
US7200626B1 (en) System and method for verification of a quiesced database copy
CN109901949B (en) Application disaster recovery system and method for double-activity data center
CN107818431B (en) Method and system for providing order track data
EP2474919B1 (en) System and method for data replication between heterogeneous databases
US8938421B2 (en) Method and a system for synchronizing data
US7263537B1 (en) System and method for creating multiple QUIESCE database copies at a single server
CN111259004B (en) Method for indexing data in storage engine and related device
CN112286661B (en) Task scheduling method and device, storage medium and terminal
WO2011158387A1 (en) Data processing failure recovery method, system and program
CN108446326B (en) A kind of isomeric data management method and system based on container
CN110647425A (en) Database recovery method and device
CN114238324A (en) Checking method and device for host station, electronic equipment and storage medium
JP4928480B2 (en) Job processing system and job management method
CN108804239A (en) Method, apparatus, computer equipment and the storage medium of Platform integration
CN112433888A (en) Data processing method and device, storage medium and electronic equipment
CN115952227A (en) Data acquisition system and method, electronic device and storage medium
US20130290385A1 (en) Durably recording events for performing file system operations
CN110347650B (en) Metadata acquisition method and device
CN117349384B (en) Database synchronization method, system and equipment
CN115134213B (en) Disaster recovery method, device, equipment and storage medium
CN112596948B (en) Database cluster data backup method, device, equipment and storage medium
CN117170935A (en) Operating system restoration method, system, device and medium of super-fusion integrated machine
CN117743406A (en) Database data access method and device, electronic equipment and storage medium
CN117573554A (en) Service verification method and system, storage medium and electronic equipment

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