Data monitoring method, device, computer equipment and storage medium

By using probe scanning to obtain and compare the data storage time difference value when data synchronization between databases, the problem of inefficient data synchronization in the prior art is solved, and more efficient data monitoring and synchronization result generation is achieved.

CN114064808BActive Publication Date: 2025-04-15PING AN SECURITIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111432483.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-29
Publication Date
2025-04-15
Estimated Expiration
2041-11-29

AI Technical Summary

Technical Problem

When data synchronization between databases is synchronized by the prior art, full query is required, resulting in high time consumption and low efficiency.

Method used

The last scan end time of the database is obtained by scanning the probe, and only the target data corresponding to the end time of the scan are scanned. The data storage time difference in each database is compared to generate the results of successful or failed data synchronization.

Benefits of technology

The database data processing and workload are reduced, and the data synchronization result generation efficiency and database data monitoring and processing efficiency are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114064808B_ABST
    Figure CN114064808B_ABST
Patent Text Reader

Abstract

The present application relates to the field of artificial intelligence technology, and provides a data monitoring method, device, computer equipment and storage medium, including: after completing data synchronization, obtaining the last probe scan end time of each database; based on the first probe scanning the first target data corresponding to the first scan end time in the first database, obtaining the first storage time of the first data; based on the second probe scanning the second target data corresponding to the second scan end time in the second database; for each first data, if there is a second data identical to each first data in the second database, and the absolute value of the difference between the second storage time of each second data and the first storage time of each corresponding first data is less than the time length threshold, a first result of successful data synchronization is generated. The present application can improve the processing efficiency of data monitoring. The present application can also be applied to the field of blockchain, and the above-mentioned first result can be stored on the blockchain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a data monitoring method, apparatus, computer equipment and storage medium. Background Art

[0002] Currently, in the cross-system transmission business scenarios of products, there are verification requirements for data synchronization. Therefore, it is necessary to monitor the important data in the databases in multiple databases for data synchronization to monitor whether the data is successfully transmitted in each database. The existing method of monitoring database data is usually to query each database through some monitoring tools to obtain synchronized data, and then compare whether the data in each database is consistent. However, this method of using monitoring tools to query data is to query all the data in the database through query statements. The query range of the data is large. If the amount of data to be compared is large, it will take a long time to return the corresponding comparison results, which is labor-intensive and inefficient. Summary of the invention

[0003] The main purpose of this application is to provide a data monitoring method, device, computer equipment and storage medium, aiming to solve the technical problems that the existing method of monitoring the database takes a long time to return the corresponding comparison results, has a large workload and low efficiency.

[0004] The present application proposes a data monitoring method, which comprises the following steps:

[0005] When the target service is in an idle time period, data synchronization is performed between multiple preset databases, and after each database completes data synchronization, the last probe scan end time of each database is obtained; wherein the database includes at least a first database and a second database;

[0006] Scanning all first target data corresponding to the first scanning end time in the first database based on a preset first probe, and acquiring a first storage time of the first data; wherein the first scanning end time is the last probe scanning end time of the first database, and the first data is any one of all the first target data;

[0007] Scanning all second target data corresponding to the second scanning end time in the second database based on a preset second probe; wherein the second scanning end time is the last probe scanning end time of the second database;

[0008] For each of the first data, if there is second data identical to each of the first data in the second database, and the absolute value of the difference between the second storage time of each of the second data and the corresponding first storage time of each of the first data is less than a preset time length threshold, a first result of successful data synchronization is generated.

[0009] Optionally, before the step of synchronizing data between the preset multiple databases during the target service idle time period, the step includes:

[0010] Divide a day into multiple unit time periods according to the preset length division value;

[0011] Based on a preset processing peak time period, a designated time period that meets preset conditions is selected from all the unit time periods; wherein the number of the designated time periods is multiple;

[0012] Based on the pre-stored historical data processing volume records, the data processing volume of each of the databases in each of the specified time periods within a preset time period is counted;

[0013] Based on the data processing volume, generating a service idle time period of each of the databases according to a first preset rule;

[0014] Intersection processing is performed on all the service idle time periods to obtain the target service idle time period.

[0015] Optionally, after the step of scanning all second target data corresponding to the second scanning end time in the second database based on the preset second probe, the method further comprises:

[0016] For the first data, if the second database does not contain third data identical to the first data, a second result indicating data synchronization failure is generated;

[0017] If third data identical to the first data exists in the second database, calculating a specified absolute value of a difference between a first storage time of the first data and a third storage time of the third data;

[0018] If the absolute value of the specified difference is greater than the time length threshold, a third result of data synchronization failure is generated.

[0019] Optionally, the data monitoring method further includes:

[0020] Obtaining resource consumption information of each of the databases during data synchronization;

[0021] Acquire multiple state recognition models generated by training based on a preset first number of different training sample sets and a second number of different machine learning models, and determine a target state recognition model from all the state recognition models; wherein each of the training sample sets is combined one by one with each of the machine learning models to obtain a corresponding multiple training combinations, and the state recognition models of the same number as the training combinations are generated based on the training combination training; the number of the target state recognition models is greater than 1;

[0022] Based on the target state recognition model and the resource consumption information, generating an operation state corresponding to each of the databases;

[0023] If there is an abnormal state in all the operating states, obtaining a target database corresponding to the abnormal state, generating and displaying alarm information corresponding to the target database;

[0024] If there is no abnormal state in all the operating states, a reminder message indicating that the database is operating normally is generated and displayed.

[0025] Optionally, the step of determining a target state recognition model from all the state recognition models includes:

[0026] Obtaining a preset test sample set, inputting the test sample set into each of the state recognition models respectively, and generating a first evaluation score for each of the state recognition models according to a first calculation rule corresponding to a first evaluation index;

[0027] Filter out a first state recognition model whose first evaluation score is greater than a preset first evaluation score threshold from all the state recognition models;

[0028] Inputting the test sample sets into the first state recognition models respectively, and generating second evaluation scores for the first state recognition models according to second preset calculation rules corresponding to second evaluation indicators;

[0029] Filter out a second state recognition model whose second evaluation score is greater than a preset second evaluation score threshold from all the first state recognition models;

[0030] Based on the first evaluation score and the second evaluation score of each of the second state recognition models, generating a comprehensive evaluation score of each of the second state recognition models according to a second preset rule;

[0031] Sorting the comprehensive evaluation scores in descending order to obtain corresponding sorting results;

[0032] Starting from the first ranked comprehensive evaluation score in the ranking results, obtaining the target comprehensive evaluation scores of the target number in sequence;

[0033] A model corresponding to the target comprehensive evaluation score is obtained from the second state recognition model to obtain the target state recognition model.

[0034] Optionally, the step of generating a comprehensive evaluation score of each second state recognition model according to a second preset rule based on the first evaluation score and the second evaluation score of each second state recognition model includes:

[0035] Acquire a first importance value corresponding to the first evaluation index; and,

[0036] Obtaining a second importance value corresponding to the second evaluation indicator;

[0037] Based on the first evaluation score and the second evaluation score of each second state recognition model, the first importance value and the second importance value, a preset calculation formula is called to generate a comprehensive evaluation score of each second state recognition model.

[0038] Optionally, the step of generating the operating states corresponding to the respective databases based on the target state recognition model and the resource consumption information includes:

[0039] Inputting the resource consumption information of the designated database into each of the target state recognition models respectively; wherein the designated database is any one of all the databases;

[0040] Receiving the designated operation states corresponding to the resource consumption information of the designated database respectively generated by each of the target state recognition models;

[0041] If all the designated operating states are normal, the operating state of the designated database is determined to be normal; otherwise, the operating state of the designated database is determined to be abnormal.

[0042] The present application also provides a data monitoring device, comprising:

[0043] A first acquisition module is used to synchronize data between multiple preset databases during a target service idle time period, and to acquire the last probe scan end time of each database after each database completes data synchronization; wherein the databases include at least a first database and a second database;

[0044] A first scanning module, configured to scan all first target data corresponding to a first scanning end time in the first database based on a preset first probe, and obtain a first storage time of the first data; wherein the first scanning end time is an end time of a previous probe scanning of the first database, and the first data is any one of all the first target data;

[0045] A second scanning module, configured to scan all second target data in the second database corresponding to a second scanning end time based on a preset second probe; wherein the second scanning end time is the last probe scanning end time of the second database;

[0046] The first generating module is used to generate a first result of successful data synchronization for each of the first data, if there is second data identical to each of the first data in the second database, and the absolute value of the difference between the second storage time of each of the second data and the corresponding first storage time of each of the first data is less than a preset time length threshold.

[0047] The present application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0048] The present application also provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the steps of the above method when executed by a processor.

[0049] The data monitoring method, device, computer equipment and storage medium provided in this application have the following beneficial effects:

[0050] The data monitoring method, apparatus, computer equipment and storage medium provided in the present application, after completing data synchronization between multiple databases, will first obtain the last probe scan end time of each of the databases, and then scan all the data corresponding to the first scan end time in the first database based on the preset first probe, and obtain the first storage time of the first data, and scan all the data corresponding to the second scan end time in the second database based on the preset second probe. For each first data, if there is second data identical to each first data in the second database, and the absolute value of the difference between the second storage time of each second data and the first storage time of each corresponding first data is less than the preset time length threshold, a first result of successful data synchronization is generated. The present application uses probes to scan and process the synchronization data in the database corresponding to the last scan end time of each database, and monitors and processes the data scanned in the database, that is, to determine whether the same data has completed data synchronization between each database and to count the delay time between the same data that has completed synchronization in each database, and then automatically, quickly and accurately generate the result of this data synchronization based on the obtained monitoring data to complete the data verification process of the database after data synchronization, so that there is no need to query the entire data in the database, effectively reducing the processing volume and workload of database summary data, improving the efficiency of generating data synchronization results, and improving the processing efficiency of data monitoring in the database. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is a flowchart of a data monitoring method according to an embodiment of the present application;

[0052] Figure 2 is a structural diagram of a data monitoring device according to an embodiment of the present application;

[0053] Figure 3 It is a schematic diagram of the structure of a computer device according to an embodiment of the present application.

[0054] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0055] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0056] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as herein.

[0057] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0058] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0059] Reference Figure 1 , a data monitoring method according to an embodiment of the present application includes:

[0060] S10: When the target service is in an idle time period, data synchronization is performed between multiple preset databases, and after each database completes data synchronization, the last probe scan end time of each database is obtained; wherein the database includes at least a first database and a second database;

[0061] S20: Scanning all first target data corresponding to the first scanning end time in the first database based on a preset first probe, and acquiring a first storage time of the first data; wherein the first scanning end time is the last probe scanning end time of the first database, and the first data is any one of all the first target data;

[0062] S30: Scanning all second target data corresponding to a second scanning end time in the second database based on a preset second probe; wherein the second scanning end time is the last probe scanning end time of the second database;

[0063] S40: For each of the first data, if there is second data identical to each of the first data in the second database, and the absolute value of the difference between the second storage time of each of the second data and the corresponding first storage time of each of the first data is less than a preset time length threshold, a first result of successful data synchronization is generated.

[0064] As described in the above steps S10 to S40, the execution subject of the embodiment of the method is a data monitoring device. In practical applications, the above data monitoring device can be implemented by a virtual device, such as software code, or by a physical device written or integrated with relevant execution code, and can interact with the user through a keyboard, mouse, remote control, touchpad or voice control device. The data monitoring device in this embodiment can intelligently and quickly complete the data verification process of the database after data synchronization, and no longer needs to query the data in the database in full, effectively reducing the amount of data processing and workload, and improving the processing efficiency of data monitoring. Specifically, when in the idle time period of the target business, data synchronization is performed between multiple preset databases, and after each of the databases completes data synchronization, the probe scanning end time of each of the databases is first obtained. Among them, the database includes at least a first database and a second database. The second database can also be represented as any database other than the first database. Data synchronization refers to the cross-system transmission of target data, that is, the target data is transmitted to multiple related target databases at the same time. In addition, the last probe scanning end time of each database refers to the end time point of the last adjacent database using the probe to perform data monitoring, that is, the time point after completing the monitoring and analysis of all the synchronous data received in the database this time.

[0065] Then, based on the preset first probe, all the first target data in the first database corresponding to the first scan end time are scanned, and the first storage time of the first data is obtained. Among them, the first scan end time is the probe scan end time of the first database last time, and the first data is any one of all the first target data. In addition, all the data corresponding to the first scan end time in the first database refers to the synchronization data received by the first database after the first scan end time, that is, the data received by the first database during this data synchronization process. The storage time of the data refers to the time when the data is stored in the database. Specifically, a corresponding probe will be established for each database, and each probe is used to scan the message situation in the corresponding database. The probe can also be called a collection probe, which can be generated based on bytecode enhancement technology, and the collection probe can be used to bury the database. By using the collection probe to collect data information in the database, the data required in the database can be obtained. In addition, the collection probe can also be set to scan only certain important data in the collection database, that is, the data type or multiple types that the collection probe needs to detect can be customized. The method of embedding points using bytecode enhancement technology does not require code modification. Different programming languages ​​can be directly implanted in the language runtime environment or basic library through different technologies. Data collection can be completed quickly without auxiliary means such as logs, thereby improving the processing efficiency of data scanning.

[0066] Then, all the second target data corresponding to the second scan end time in the second database are scanned based on the preset second probe. Wherein, the second scan end time is the probe scan end time of the second database last time. Similarly, all the data corresponding to the second scan end time in the second database refers to the synchronization data received by the second database after the second scan end time, that is, the data received by the second database during this data synchronization process. By only performing data calculation and analysis processing on the data received by each database during this data synchronization process, it is not necessary to perform a full query on each database, which effectively narrows the data query range and is conducive to improving data processing efficiency. Wherein, the second storage time of the second data refers to the time when the second data is stored in the second database. In addition, if the second probe is used to scan all the data corresponding to the second scan end time in the second database and it is found that there is no second data identical to the first data in the second database, all the data corresponding to the second scan end time in the second database can be further scanned for a preset number of times later. If the second data identical to the first data is not detected in the preset number of scans, it is finally determined that there is no second data identical to the first data. In addition, there is no limitation on the specific value of the preset number of times, which can be set according to actual needs, for example, it can be set to 5 times.

[0067] Finally, for each of the first data, if there is a second data identical to each of the first data in the second database, and the absolute value of the difference between the second storage time of each of the second data and the first storage time of each of the corresponding first data is less than the preset time length threshold, then a first result of successful data synchronization is generated. Among them, the second storage time of the second data refers to the time when the second data is stored in the second database. If the second probe is used to scan all the data corresponding to the second scan end time in the second database and it is found that there is no second data identical to the first data in the second database, all the data corresponding to the second scan end time in the second database can be further scanned for a preset number of times. If no second data identical to the first data is detected in the preset number of scans, it is finally determined that there is no second data identical to the first data. There is no limitation on the specific value of the preset number of times, which can be set according to actual needs, for example, it can be set to 5 times. In addition, the absolute value of the difference in storage time between the first data and the second data can also be called the delay time of the first data, which means that after the first data is synchronized to the first database, the second data identical to the first data is synchronized to the second database after the time corresponding to the delay time has passed. In addition, the time length threshold is a value used to determine whether the calculated delay time between the first data and the second data is within a reasonable range. The specific value of the time length threshold is not limited and can be set according to actual needs. Since the same data is usually sent to different databases at the same time during data synchronization, if the storage time of the same data in different databases is very different, it can be determined that the data may be abnormal. Therefore, if the delay time of the first data is greater than the time length threshold, it can be determined that the first data is abnormal data. Only when the delay time of the first data is not greater than the time length threshold, the first data will be determined to be normal data.

[0068] In this embodiment, after completing data synchronization between multiple databases, the last probe scan end time of each database is obtained first, and then all data corresponding to the first scan end time in the first database are scanned based on the preset first probe, and the first storage time of the first data is obtained, and all data corresponding to the second scan end time in the second database are scanned based on the preset second probe. For each first data, if there is second data identical to each first data in the second database, and the absolute value of the difference between the second storage time of each second data and the first storage time of each corresponding first data is less than the preset time length threshold, a first result of successful data synchronization is generated. This embodiment uses probes to scan and process the synchronization data in the database corresponding to the last scan end time of each database, and monitors the data scanned in the database, that is, to determine whether the same data has completed data synchronization between each database and to count the delay time between the same data that has completed synchronization in each database, and then automatically, quickly and accurately generate the result of this data synchronization based on the obtained monitoring data to complete the data verification process of the database after data synchronization, so that there is no need to query the entire data in the database, effectively reducing the processing volume and workload of database summary data, improving the efficiency of generating data synchronization results, and improving the processing efficiency of data monitoring in the database.

[0069] Furthermore, in an embodiment of the present application, before the above step S10, the following steps are included:

[0070] S100: Divide a day into a plurality of unit time periods according to a preset length division value;

[0071] S101: Filtering out a designated time period that meets a preset condition from all the unit time periods based on a preset processing peak time period; wherein the number of the designated time periods is multiple;

[0072] S102: Based on the pre-stored historical data processing volume records, calculating the data processing volume of each database in each of the specified time periods within a preset time period;

[0073] S103: Based on the data processing volume, generating a service idle time period of each database according to a first preset rule;

[0074] S104: Perform intersection processing on all the service idle time periods to obtain the target service idle time period.

[0075] As described in the above steps S100 to S104, before executing the step of synchronizing data between the preset multiple databases when in the target business idle time period, a process of determining the target business idle time period may also be included. Specifically, firstly, a day is divided into multiple unit time periods according to a preset length division value. Among them, there is no specific limitation on the division method of the processing time period, and the time length contained in each time period obtained by division can also be set according to actual needs. For example, 1 hour can be used as the length division value, that is, the time length contained in a unit time period, then starting from 0 o'clock, a day (24 hours) can be divided into 24 time periods, that is, 0:00, 1:00, 2:00, ..., 24:00. Then, based on the preset processing peak time period, a specified time period that meets the preset conditions is screened out from all the unit time periods. Among them, the number of the specified time periods is multiple. In addition, the processing peak time period can be a busy time period of the database preliminarily generated in advance, and the preset condition refers to removing the busy time period from all the obtained unit time periods, and then obtaining the corresponding specified time period. For example, if the peak processing time period includes the time periods of 8:00-12:00 and 12:00-16:00, the designated time periods can be screened out as 0:00-8:00 and 16:00-24:00. By using the peak processing time period to preliminarily screen all unit time periods, it is only necessary to count the data processing volume of each designated time period within the preset time period, instead of counting the data processing volume of all time periods, which effectively reduces the data statistics, reduces the statistical loss of the device, and improves the processing intelligence of the device. Then, based on the pre-stored historical data processing volume records, the data processing volume of each of the databases in each of the designated time periods within the preset time period is counted. After obtaining the designated time period, based on the pre-stored historical data processing volume records, the data processing volume of each of the databases in each of the first time periods within the preset time period is counted. Among them, the preset time period is not specifically limited and can be set according to actual needs. For example, the preset time period can be the previous week adjacent to the current time. If the unit time period is 16:00-20:00, the data processing volume of the unit time period 16:00-20:00 in the week is the sum of all the data processing volumes contained in the unit time period 16:00-20:00 in the week. Subsequently, based on the data processing volume, the business idle time period of each of the databases is generated according to the first preset rule. Specifically, the process of generating the business idle time period of each of the databases according to the first preset rule may include: for any database, filtering out the first data processing volume that is greater than a preset data processing volume threshold from all the data processing volumes. Among them, the value of the above-mentioned data processing volume threshold is not specifically limited and can be set according to actual needs.After obtaining the first data processing volume, the first data processing volume is removed from all the data processing volumes to obtain the corresponding second data processing volume. Subsequently, a specific time period corresponding to the second data processing volume is screened out from all the first time periods. And the specific time period is used as the business idle time period of the database. Finally, all the business idle time periods are subjected to intersection processing to obtain the target business idle time period. Among them, by performing intersection processing on the business idle time periods of each database obtained, the target business idle time period finally obtained can be an idle time period applicable to all databases. After dividing a day into multiple unit time periods, this embodiment will first screen out the first time period from all the unit time periods based on the preset processing peak time period, and then analyze and process the data processing volume of each specified time period within the preset time period, and intelligently determine the business idle time period of each database based on the analysis results, and then determine the final target business idle time period according to the business idle time period of each database, effectively improving the accuracy of the generated target business idle time period. Subsequently, the data processing process of synchronizing data between databases will be carried out during the idle time period of the target business, and data synchronization processing will not be performed during the peak business processing time period of each database. This will not affect the normal use of users, nor will it affect the normal operation of data synchronization processing, thereby ensuring the rational use of database resources and effectively improving the processing speed and efficiency of data synchronization within the database.

[0076] Furthermore, in an embodiment of the present application, after the above step S40, the following steps are included:

[0077] S400: For the first data, if the second database does not contain third data identical to the first data, generating a second result of data synchronization failure;

[0078] S401: If third data identical to the first data exists in the second database, calculating a specified absolute value of a difference between a first storage time of the first data and a third storage time of the third data;

[0079] S402: If the absolute value of the specified difference is greater than the time length threshold, a third result of data synchronization failure is generated.

[0080] As described in the above steps S400 to S402, after executing the step of scanning all the second target data corresponding to the second scan end time in the second database based on the preset second probe, it can also include a process of generating a corresponding data synchronization failure result based on the obtained scanning result. Specifically, for the first data, if there is no third data identical to the first data in the second database, a second result of data synchronization failure is generated. If there is a third data identical to the first data in the second database, the specified absolute value of the difference between the first storage time of the first data and the third storage time of the third data is calculated. The specified absolute value of the difference represents the delay time of the first data. After obtaining the specified absolute value of the difference, if the specified absolute value of the difference is greater than the time length threshold, a third result of data synchronization failure is generated. Among them, when the third result of data synchronization failure occurs, abnormal data that appears in the data synchronization process, such as data that only exists in the first database but not in the second database, or data that exists in both the first database and the second database but the difference between the storage time in the first database and the second database exceeds the time length threshold, can also be added to the preset abnormal message queue, so as to accurately complete the abnormal monitoring processing of the first data in the data synchronization process. The abnormal message queue is a message queue for storing the synchronization processing exception. In addition, after the data placement of the abnormal message queue is completed, an early warning reminder processing can also be performed based on the abnormal message queue, for example, an early warning message carrying the data in the abnormal message queue can be generated and displayed. Specifically, the data in the abnormal message queue can be filled into the corresponding position in the preset information template to generate the early warning information, and the specific content of the information template is not limited. By performing early warning reminder processing on the abnormal message queue, the abnormal data contained in the abnormal message queue can be sent to the relevant operation and maintenance personnel, so that the operation and maintenance personnel can timely analyze and optimize the abnormal data that appears in the data synchronization process, so as to solve the current synchronization problem. In addition, normal data in the data synchronization process can also be added to the preset normal message queue. The normal message queue is a message queue for storing data that is normally synchronized. By using different message queues to store corresponding data, the accuracy of distinguishing abnormal data from normal data can be improved. In this embodiment, for any first data in the first database, if it is detected in the second database that there is no third data identical to the first data, a result of data synchronization failure is generated. And, if it is detected in the second database that there is third data identical to the first data, but the absolute value of the specified difference between the first storage time of the first data and the third storage time of the third data is greater than the time length threshold, a result of data synchronization failure is also generated.This embodiment uses a probe to scan and process the synchronization data in the database corresponding to the last scan end time of each database, and monitors and processes the data scanned in the database, that is, to determine whether the same data has completed data synchronization between each database and to count the delay time between the same data that has completed synchronization in each database, and then automatically, quickly and accurately generate the result of this data synchronization based on the obtained monitoring data to complete the data verification process of the database after data synchronization, so that it is no longer necessary to query the data in the database in full, effectively reducing the processing volume and workload of the database summary data, and improving the processing efficiency of data monitoring in the database. After obtaining the result of data synchronization, it is beneficial for subsequent relevant personnel to timely analyze and optimize the abnormal data that appears in the data synchronization process based on the result of data synchronization, so as to solve the current data synchronization problem.

[0081] Furthermore, in one embodiment of the present application, the data monitoring method further includes:

[0082] S500: Obtaining resource consumption information of each database during data synchronization;

[0083] S501: Acquire a plurality of state recognition models generated by training based on a preset first number of different training sample sets and a second number of different machine learning models, and determine a target state recognition model from all the state recognition models; wherein each of the training sample sets is combined one by one with each of the machine learning models to obtain a corresponding plurality of training combinations, and the state recognition models having the same number as the training combinations are generated based on the training combination training; and the number of the target state recognition models is greater than 1;

[0084] S502: generating an operation state corresponding to each of the databases based on the target state recognition model and the resource consumption information;

[0085] S503: If there is an abnormal state in all the operating states, obtain a target database corresponding to the abnormal state, generate and display alarm information corresponding to the target database;

[0086] S504: If there is no abnormal state in all the operating states, a reminder message indicating that the database is operating normally is generated and displayed.

[0087] As described in the above steps S500 to S504, the data monitoring method also includes a process for abnormal analysis of the operating status of each of the databases during the data synchronization process. Specifically, first obtain the resource consumption information of each of the databases during the data synchronization process. Wherein, the resource consumption information includes at least one of the following information: CPU usage, IO usage, network traffic usage, and memory usage. Then obtain a plurality of state recognition models generated by training based on a preset first number of different training sample sets and a second number of different machine learning models, and determine the target state recognition model from all the state recognition models. Wherein, each of the training sample sets is combined one by one with each of the machine learning models to obtain a corresponding plurality of training combinations, and the state recognition models equal in number to the training combinations are generated based on the training combination training. The number of the target state recognition models is greater than 1. In addition, there are the following differences between the multiple state recognition models generated by training: the training sample sets used are different, and the machine learning models used are different, so the accuracy and stability of the model recognition of each state recognition model generated will be different, so that the subsequent steps can be considered according to the accuracy and stability of the model recognition of each state recognition model, and then the target state recognition model or the target state recognition model used for state recognition processing of the resource consumption information of the database is screened out from all the state recognition models, so as to effectively improve the accuracy of the result of the operation state of the database corresponding to the resource consumption information generated in the end. Then, based on the target state recognition model and the resource consumption information, the operation state corresponding to each of the databases is generated. Among them, the operation state includes an abnormal state or a normal state. Finally, if it is determined that there is an abnormal state in all the operation states, the target database corresponding to the abnormal state is obtained, and the alarm information corresponding to the target database is generated and displayed. Among them, the alarm information carries the name information of the target database. If it is determined that there is no abnormal state in all the operation states, a reminder message that the database is running normally is generated and displayed. In this embodiment, during the process of data synchronization of each of the databases, the resource consumption information of each database can also be obtained, and the state of the resource consumption information of each database can be identified using a pre-trained target state recognition model to quickly and accurately obtain the operating status of each database, and corresponding alarm information or reminder information can be generated and displayed based on the obtained operating status, so that the user can clearly understand the current operating status of each database based on the displayed information, and can take corresponding processing measures in time according to the operating status, thereby effectively ensuring the safe operation of the database and the correct processing of data synchronization, thereby improving the user experience.

[0088] Furthermore, each training sample set includes several resource consumption information samples and operation status labels corresponding to the resource consumption information samples. The specific state recognition model training process may include: for a specified training sample set and a specified machine learning model in any specified training combination, the specified resource consumption information samples and the corresponding specified operation status labels in the specified training sample set are used to train the specified machine learning model to obtain a corresponding initial model, and then a preset verification sample set is obtained, and the initial model is tested for accuracy based on the verification sample set to obtain a corresponding prediction accuracy rate; it is determined whether the prediction accuracy rate is greater than a preset accuracy threshold; if so, the initial abnormality prediction model is used as the state recognition model corresponding to the specified training combination. In addition, the accuracy test refers to inputting several verification samples in the verification sample set into the initial model, the initial model predicts the identification label result of each verification sample, and compares the identification label result of each verification sample with the running status label corresponding to the verification sample. If they are consistent, the initial model's prediction of the verification sample is accurate. If they are inconsistent, the initial model's prediction of the verification sample is wrong, thereby statistically obtaining the prediction accuracy of the initial model (prediction accuracy = number of verification samples with accurate predictions / total number of verification samples). If the obtained prediction accuracy meets the set accuracy requirement, that is, it is greater than the preset accuracy threshold, the initial model converges, thereby ending the initial training, and the initial model that has ended the training is used as the state recognition model corresponding to the specified training combination, and is used to perform state recognition processing on the resource consumption information of the database subsequently obtained.

[0089] Further, in an embodiment of the present application, the above step S501 of determining a target state recognition model from all the state recognition models includes:

[0090] S5010: Obtain a preset test sample set, input the test sample set into each of the state recognition models respectively, and generate a first evaluation score for each of the state recognition models according to a first calculation rule corresponding to a first evaluation index;

[0091] S5011: Filter out a first state recognition model whose first evaluation score is greater than a preset first evaluation score threshold from all the state recognition models;

[0092] S5012: inputting the test sample set into each of the first state recognition models respectively, and generating a second evaluation score for each of the first state recognition models according to a second preset calculation rule corresponding to a second evaluation index;

[0093] S5013: Filter out a second state recognition model whose second evaluation score is greater than a preset second evaluation score threshold from all the first state recognition models;

[0094] S5014: generating a comprehensive evaluation score of each second state recognition model according to a second preset rule based on the first evaluation score and the second evaluation score of each second state recognition model;

[0095] S5015: sorting the comprehensive evaluation scores in descending order to obtain a corresponding sorting result;

[0096] S5016: Starting from the first comprehensive evaluation score in the sorting result, obtaining the target comprehensive evaluation scores of the target number in sequence;

[0097] S5017: Acquire a model corresponding to the target comprehensive evaluation score from the second state recognition model to obtain the target state recognition model.

[0098] As described in the above steps S5010 to S5017, the step of determining the target state recognition model from all the state recognition models may specifically include: first obtaining a preset test sample set, inputting the test sample set into each state recognition model, and generating a first evaluation score for each state recognition model according to a first calculation rule corresponding to the first evaluation index. Wherein, the test sample set may be generated based on any one of the training sample sets, such as randomly taking data of a preset numerical ratio from the training sample set as the test sample set, and the preset numerical ratio may be set according to actual needs, for example, may be set to 40%. In addition, the first evaluation index is precision or recall, and similarly the second evaluation index is precision or recall, and the first evaluation index is different from the second evaluation index. Specifically, when the first evaluation index is precision, the second evaluation index is recall; when the first evaluation index is recall, the second evaluation index is precision. Then, the first state recognition model whose first evaluation score is greater than the preset first evaluation score threshold is screened out from all the state recognition models. Among them, there is no specific limitation on the value of the first evaluation score threshold, which can be set according to actual needs. After obtaining the first state recognition model, the test sample set is respectively input into each of the first state recognition models, and the second evaluation score of each of the first state recognition models is generated according to the second preset calculation rule corresponding to the second evaluation index. Specifically, the first evaluation score and the second evaluation score, that is, the precision and recall rate, can be calculated and generated by the confusion matrix. The confusion matrix is ​​used to measure the accuracy of a classifier. For binary classification problems, its samples are divided into four situations: true positive examples (TruePositive), false positive examples (FalsePositive), true negative examples (TrueNegative), and false negative examples (FalseNegative) according to the combination of the true category and the predicted category of the classifier. The corresponding confusion matrix (ConfusionMatrix) is as follows:

[0099]

[0100] Based on the confusion matrix, we can calculate the precision and recall according to the following formula: Precision P = TP / (TP+FP), indicating that both the real situation and the predicted result are true / the predicted result is true; Recall R = TP / (TP+FN), indicating that both the real situation and the predicted result are true / the real situation is true. Then, the second state recognition model whose second evaluation score is greater than the preset second evaluation score threshold is selected from all the first state recognition models. Among them, the value of the second evaluation score threshold is not specifically limited and can be set according to actual needs. After obtaining the second state recognition model, based on the first evaluation score and the second evaluation score of each second state recognition model, the comprehensive evaluation score of each second state recognition model is generated according to the second preset rule. Among them, the specific implementation process of generating the comprehensive evaluation score of each second state recognition model according to the second preset rule will be further described in the subsequent specific embodiments of this application, which will not be repeated here. Subsequently, the comprehensive evaluation scores are sorted in order from large to small to obtain the corresponding sorting results. After obtaining the sorting result, starting from the first comprehensive evaluation score in the sorting result, the target comprehensive evaluation scores of the target quantity are obtained in sequence. Among them, the value of the target quantity is not specifically limited and can be set according to actual needs. Finally, the model corresponding to the target comprehensive evaluation score is obtained from the second state recognition model to obtain the target state recognition model. In this embodiment, the first evaluation score of the state recognition model is generated by using a preset test sample set, and the first state recognition model is screened out based on the first evaluation score, and then the second evaluation score of the first state recognition model is generated by using the test sample set, and the second state recognition model is screened out based on the second evaluation score, and then the corresponding comprehensive evaluation score is generated based on the first evaluation score and the second evaluation score of each second state recognition model, and multiple models with the largest comprehensive evaluation scores are screened out from all the second state recognition models as the target state recognition model. Since the obtained target state recognition model has a high data comprehensive processing capability, when the target state recognition model is used to perform state recognition on the resource consumption information of the database, the processing efficiency of the operation state analysis of the resource consumption information of the database can be effectively improved on the basis of ensuring the accuracy of the operation state result output by the target state recognition model.

[0101] Furthermore, in an embodiment of the present application, the above step S5014 includes:

[0102] S50140: Obtaining a first importance value corresponding to the first evaluation indicator; and,

[0103] S50141: Obtain a second importance value corresponding to the second evaluation indicator;

[0104] S50142: Based on the first evaluation score and the second evaluation score of each second state recognition model, the first importance value and the second importance value, call a preset calculation formula to generate a comprehensive evaluation score of each second state recognition model.

[0105] As described in the above steps S50140 to S50142, the step of generating a comprehensive evaluation score of each second state recognition model according to a second preset rule based on the first evaluation score and the second evaluation score of each second state recognition model may specifically include: first obtaining a first importance value corresponding to the first evaluation indicator. Among them, there is no specific limitation on the value of the first importance value, which can be set according to actual needs, for example, it can be set to 0.5, 1, etc. And obtaining the second importance value corresponding to the second evaluation indicator. Similarly, there is no specific limitation on the value of the second importance value, which can be set according to actual needs, for example, it can be set to 0.5, 1, etc. Subsequently, based on the first evaluation score and the second evaluation score of each second state recognition model, the first importance value and the second importance value, the preset calculation formula is called to generate the comprehensive evaluation score of each second state recognition model. Specifically, the calculation formula is: Among them, P is the precision, R is the recall, and β is the quotient between the importance value of the recall and the importance value of the precision. In this embodiment, by obtaining the first importance value corresponding to the first evaluation score and the second importance value corresponding to the second evaluation score, and then calling the corresponding calculation formula, the comprehensive evaluation score of each of the second state recognition models can be quickly and accurately generated, which is conducive to the subsequent rapid and accurate determination of the target state recognition model from all state recognition models based on the comprehensive evaluation score of the second state recognition model obtained. The comprehensive evaluation score corresponds to the evaluation value of the data comprehensive processing capability of the model, so the target state recognition model finally determined has a high data comprehensive processing capability and processing efficiency, so that when the target state recognition model is used to perform state recognition on the resource consumption information of the database, it can effectively improve the processing efficiency of the operation state analysis of the resource consumption information of the database on the basis of ensuring the accuracy of the operation state result output by the target state recognition model.

[0106] Furthermore, in an embodiment of the present application, the above step S502 includes:

[0107] S5020: Inputting resource consumption information of a designated database into each of the target state recognition models respectively; wherein the designated database is any one of all the databases;

[0108] S5021: receiving the designated operation states corresponding to the resource consumption information of the designated database, respectively generated by each of the target state recognition models;

[0109] S5022: If all the specified operating states are normal, determine that the operating state of the specified database is normal; otherwise, determine that the operating state of the specified database is abnormal.

[0110] As described in the above steps S5020 to S5022, the step of generating the operating state corresponding to each of the databases based on the target state recognition model and the resource consumption information may specifically include: first, inputting the resource consumption information of the designated database into each of the target state recognition models. The designated database is any one of all the databases. Then, the designated operating state corresponding to the resource consumption information of the designated database generated by each of the target state recognition models is received. Finally, if it is determined that all of the designated operating states are normal, the operating state of the designated database is determined to be a normal state, otherwise the operating state of the designated database is determined to be an abnormal state. In this embodiment, after selecting multiple models with the strongest comprehensive processing capabilities from multiple pre-trained state recognition models as the final target state recognition models, the multiple target state recognition models are used to perform state recognition on the resource consumption information of the database, and the final operating state is determined based on all the specified operating states obtained, that is, only when all the specified operating states are normal states will the final operating state of the database be determined to be a normal state, which ensures the comprehensiveness and accuracy of the operating state finally generated, and can avoid using only one state recognition model to perform state recognition on the resource consumption information of the database, resulting in inaccurate recognition results, thereby effectively improving the recognition accuracy of state recognition of the resource consumption information of the database.

[0111] The data monitoring method in the embodiment of the present application can also be applied to the blockchain field, such as storing the above-mentioned delay time and other data on the blockchain. By using the blockchain to store and manage the above-mentioned delay time, the security and non-tamperability of the above-mentioned delay time can be effectively guaranteed.

[0112] The above-mentioned blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0113] The underlying blockchain platform can include processing modules such as user management, basic services, smart contracts, and operation monitoring. Among them, the user management module is responsible for the identity information management of all blockchain participants, including maintaining public and private key generation (account management), key management, and the maintenance of the correspondence between the user's real identity and the blockchain address (authority management), etc., and, under authorization, supervises and audits the transactions of certain real identities and provides risk control rule configuration (risk control audit); the basic service module is deployed on all blockchain node devices to verify the validity of business requests, and records valid requests to storage after consensus is reached. For a new business request, the basic service first adapts the interface for parsing and authentication (interface adaptation), and then encrypts the business information through the consensus algorithm (consensus management). The smart contract module is responsible for the registration and issuance of contracts, as well as contract triggering and contract execution. Developers can define the contract logic in a programming language and publish it to the blockchain (contract registration). According to the logic of the contract terms, the key or other events are called to trigger the execution and complete the contract logic. It also provides the function of contract upgrade and cancellation. The operation monitoring module is mainly responsible for the deployment, configuration modification, contract setting, cloud adaptation and real-time status visualization output of the product during the product release process, such as alarm, network monitoring, node equipment health monitoring, etc.

[0114] Reference Figure 2 In one embodiment of the present application, a data monitoring device is also provided, including:

[0115] The first acquisition module 1 is used to synchronize data between multiple preset databases during the target service idle time period, and to acquire the last probe scan end time of each database after each database completes data synchronization; wherein the database includes at least a first database and a second database;

[0116] A first scanning module 2 is used to scan all first target data corresponding to a first scanning end time in the first database based on a preset first probe, and obtain a first storage time of the first data; wherein the first scanning end time is the last probe scanning end time of the first database, and the first data is any one of all the first target data;

[0117] A second scanning module 3, used to scan all second target data corresponding to a second scanning end time in the second database based on a preset second probe; wherein the second scanning end time is the last probe scanning end time of the second database;

[0118] The first generating module 4 is used to generate a first result of successful data synchronization for each of the first data, if there is second data identical to each of the first data in the second database, and the absolute value of the difference between the second storage time of each of the second data and the corresponding first storage time of each of the first data is less than a preset time length threshold.

[0119] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the data monitoring method in the aforementioned implementation mode, and will not be repeated here.

[0120] Furthermore, in one embodiment of the present application, the data monitoring device includes:

[0121] A division module, used to divide a day into multiple unit time periods according to a preset length division value;

[0122] A screening module, used to screen out a designated time period that meets preset conditions from all the unit time periods based on a preset processing peak time period; wherein the number of the designated time periods is multiple;

[0123] A statistical module, for calculating the data processing volume of each of the databases in each of the specified time periods within a preset time period based on pre-stored historical data processing volume records;

[0124] A second generating module, configured to generate a service idle time period of each of the databases according to a first preset rule based on the data processing volume;

[0125] The third generating module is used to perform intersection processing on all the service idle time periods to obtain the target service idle time period.

[0126] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the data monitoring method in the aforementioned implementation mode, and will not be repeated here.

[0127] Furthermore, in one embodiment of the present application, the data monitoring device includes:

[0128] a fourth generating module, configured to generate, for the first data, a second result indicating that data synchronization has failed if third data identical to the first data does not exist in the second database;

[0129] a calculation module, configured to calculate a specified absolute value of a difference between a first storage time of the first data and a third storage time of the third data if third data identical to the first data exists in the second database;

[0130] The fifth generating module is used to generate a third result of data synchronization failure if the absolute value of the specified difference is greater than the time length threshold.

[0131] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the data monitoring method in the aforementioned implementation mode, and will not be repeated here.

[0132] Furthermore, in one embodiment of the present application, the data monitoring device includes:

[0133] A second acquisition module is used to acquire resource consumption information of each database during data synchronization;

[0134] A determination module, used to obtain a plurality of state recognition models generated by training based on a preset first number of different training sample sets and a second number of different machine learning models, and determine a target state recognition model from all the state recognition models; wherein each of the training sample sets is combined one by one with each of the machine learning models to obtain a corresponding plurality of training combinations, and the state recognition models having the same number as the training combinations are generated based on the training combination training; and the number of the target state recognition models is greater than 1;

[0135] A sixth generating module, configured to generate operating states corresponding to the respective databases based on the target state recognition model and the resource consumption information;

[0136] A first display module is used to obtain a target database corresponding to the abnormal state if there is an abnormal state in all the operating states, generate and display alarm information corresponding to the target database;

[0137] The second display module is used to generate and display reminder information that the database is running normally if there is no abnormal state in all the operating states.

[0138] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the data monitoring method in the aforementioned implementation mode, and will not be repeated here.

[0139] Furthermore, in an embodiment of the present application, the above-mentioned determination module includes:

[0140] A first generating unit, configured to obtain a preset test sample set, input the test sample set into each of the state recognition models, and generate a first evaluation score for each of the state recognition models according to a first calculation rule corresponding to a first evaluation index;

[0141] A first screening unit, used to screen out a first state recognition model whose first evaluation score is greater than a preset first evaluation score threshold from all the state recognition models;

[0142] A second generating unit, configured to input the test sample set into each of the first state recognition models respectively, and generate a second evaluation score for each of the first state recognition models according to a second preset calculation rule corresponding to a second evaluation index;

[0143] A second screening unit, used to screen out a second state recognition model whose second evaluation score is greater than a preset second evaluation score threshold from all the first state recognition models;

[0144] A third generating unit, configured to generate a comprehensive evaluation score of each of the second state recognition models according to a second preset rule based on the first evaluation score and the second evaluation score of each of the second state recognition models;

[0145] A sorting unit, used to sort the comprehensive evaluation scores in descending order to obtain a corresponding sorting result;

[0146] An acquisition unit, configured to sequentially acquire a target number of target comprehensive evaluation scores starting from the first comprehensive evaluation score in the ranking result;

[0147] A determination unit is used to obtain a model corresponding to the target comprehensive evaluation score from the second state recognition model to obtain the target state recognition model.

[0148] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the data monitoring method in the aforementioned implementation mode, and will not be repeated here.

[0149] Furthermore, in one embodiment of the present application, the third generating unit includes:

[0150] A first acquisition subunit is configured to acquire a first importance value corresponding to the first evaluation index; and

[0151] A second acquisition subunit, used to acquire a second importance value corresponding to the second evaluation indicator;

[0152] A calculation subunit is used to call a preset calculation formula to generate a comprehensive evaluation score of each second state recognition model based on the first evaluation score and the second evaluation score of each second state recognition model, the first importance value and the second importance value.

[0153] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the data monitoring method in the aforementioned implementation mode, and will not be repeated here.

[0154] Furthermore, in one embodiment of the present application, the sixth generation module includes:

[0155] An input unit, used to input resource consumption information of a designated database into each of the target state recognition models; wherein the designated database is any one of all the databases;

[0156] A receiving unit, configured to receive the designated operating states corresponding to the resource consumption information of the designated database, respectively generated by each of the target state recognition models;

[0157] The determination unit is configured to determine that the operation state of the specified database is a normal state if all the specified operation states are normal states, and otherwise determine that the operation state of the specified database is an abnormal state.

[0158] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the data monitoring method in the aforementioned implementation mode, and will not be repeated here.

[0159] Reference Figure 3 In the embodiment of the present application, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a network interface, a display screen, an input device and a database connected through a system bus. Among them, the processor designed for the computer device is used to provide computing and control capabilities. The memory of the computer device includes a storage medium and an internal memory. The storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the storage medium. The database of the computer device is used to store the target service idle time period, the probe scanning end time, the first target data, the second target data, the first storage time, the second storage time and the delay time. The network interface of the computer device is used to communicate with an external terminal through a network connection. The display screen of the computer device is an indispensable graphic output device in the computer, which is used to convert digital signals into optical signals so that text and graphics are displayed on the screen of the display screen. The input device of the computer device is the main device for information exchange between the computer and the user or other devices, and is used to transmit data, instructions and certain mark information to the computer. When the computer program is executed by the processor, a data monitoring method is implemented.

[0160] The above processor executes the steps of the above data monitoring method:

[0161] When the target service is in an idle time period, data synchronization is performed between multiple preset databases, and after each database completes data synchronization, the last probe scan end time of each database is obtained; wherein the database includes at least a first database and a second database;

[0162] Scanning all first target data corresponding to the first scanning end time in the first database based on a preset first probe, and acquiring a first storage time of the first data; wherein the first scanning end time is the last probe scanning end time of the first database, and the first data is any one of all the first target data;

[0163] Scanning all second target data corresponding to the second scanning end time in the second database based on a preset second probe; wherein the second scanning end time is the last probe scanning end time of the second database;

[0164] For each of the first data, if there is second data identical to each of the first data in the second database, and the absolute value of the difference between the second storage time of each of the second data and the corresponding first storage time of each of the first data is less than a preset time length threshold, a first result of successful data synchronization is generated.

[0165] Those skilled in the art will understand that Figure 3 The structure shown in is merely a block diagram of a portion of the structure related to the present application scheme, and does not constitute a limitation on the devices and computer equipment to which the present application scheme is applied.

[0166] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, a data monitoring method is implemented, specifically:

[0167] When the target service is in an idle time period, data synchronization is performed between multiple preset databases, and after each database completes data synchronization, the last probe scan end time of each database is obtained; wherein the database includes at least a first database and a second database;

[0168] Scanning all first target data corresponding to the first scanning end time in the first database based on a preset first probe, and acquiring a first storage time of the first data; wherein the first scanning end time is the last probe scanning end time of the first database, and the first data is any one of all the first target data;

[0169] Scanning all second target data corresponding to the second scanning end time in the second database based on a preset second probe; wherein the second scanning end time is the last probe scanning end time of the second database;

[0170] For each of the first data, if there is second data identical to each of the first data in the second database, and the absolute value of the difference between the second storage time of each of the second data and the corresponding first storage time of each of the first data is less than a preset time length threshold, a first result of successful data synchronization is generated.

[0171] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in the present application and used in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0172] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0173] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A data monitoring method, characterized in that: include: When the target service is in an idle time period, data synchronization is performed between multiple preset databases, and after each database completes data synchronization, the last probe scan end time of each database is obtained; wherein the database includes at least a first database and a second database; Scanning all first target data corresponding to the first scanning end time in the first database based on a preset first probe, and acquiring a first storage time of the first data; wherein the first scanning end time is the last probe scanning end time of the first database, and the first data is any one of all the first target data; Scanning all second target data corresponding to the second scanning end time in the second database based on a preset second probe; wherein the second scanning end time is the last probe scanning end time of the second database; For each of the first data, if there is second data identical to each of the first data in the second database, and the absolute value of the difference between the second storage time of each of the second data and the corresponding first storage time of each of the first data is less than a preset time length threshold, a first result of successful data synchronization is generated.

2. The data monitoring method according to claim 1, characterized in that: Before the step of synchronizing data between the preset multiple databases during the target service idle time period, the method includes: Divide a day into multiple unit time periods according to the preset length division value; Based on a preset processing peak time period, a designated time period that meets preset conditions is selected from all the unit time periods; wherein the number of the designated time periods is multiple; Based on the pre-stored historical data processing volume records, the data processing volume of each of the databases in each of the specified time periods within a preset time period is counted; Based on the data processing volume, generating a service idle time period of each of the databases according to a first preset rule; Intersection processing is performed on all the service idle time periods to obtain the target service idle time period.

3. The data monitoring method according to claim 1, characterized in that: After the step of scanning all second target data corresponding to the second scanning end time in the second database based on the preset second probe, the method includes: For the first data, if the second database does not contain third data identical to the first data, a second result indicating data synchronization failure is generated; If third data identical to the first data exists in the second database, calculating a specified absolute value of a difference between a first storage time of the first data and a third storage time of the third data; If the absolute value of the specified difference is greater than the time length threshold, a third result of data synchronization failure is generated.

4. The data monitoring method according to claim 1, characterized in that: The data monitoring method further includes: Obtaining resource consumption information of each of the databases during data synchronization; Acquire multiple state recognition models generated by training based on a preset first number of different training sample sets and a second number of different machine learning models, and determine a target state recognition model from all the state recognition models; wherein each of the training sample sets is combined one by one with each of the machine learning models to obtain a corresponding multiple training combinations, and the state recognition models of the same number as the training combinations are generated based on the training combination training; the number of the target state recognition models is greater than 1; Based on the target state recognition model and the resource consumption information, generating an operation state corresponding to each of the databases; If there is an abnormal state in all the operating states, obtaining a target database corresponding to the abnormal state, generating and displaying alarm information corresponding to the target database; If there is no abnormal state in all the operating states, a reminder message indicating that the database is operating normally is generated and displayed.

5. The data monitoring method according to claim 4, characterized in that: The step of determining a target state recognition model from all the state recognition models comprises: Obtaining a preset test sample set, inputting the test sample set into each of the state recognition models respectively, and generating a first evaluation score for each of the state recognition models according to a first calculation rule corresponding to a first evaluation index; Filter out a first state recognition model whose first evaluation score is greater than a preset first evaluation score threshold from all the state recognition models; Inputting the test sample sets into the first state recognition models respectively, and generating second evaluation scores for the first state recognition models according to second preset calculation rules corresponding to second evaluation indicators; Filter out a second state recognition model whose second evaluation score is greater than a preset second evaluation score threshold from all the first state recognition models; Based on the first evaluation score and the second evaluation score of each of the second state recognition models, generating a comprehensive evaluation score of each of the second state recognition models according to a second preset rule; Sorting the comprehensive evaluation scores in descending order to obtain corresponding sorting results; Starting from the first ranked comprehensive evaluation score in the ranking results, obtaining the target comprehensive evaluation scores of the target number in sequence; A model corresponding to the target comprehensive evaluation score is obtained from the second state recognition model to obtain the target state recognition model.

6. The data monitoring method according to claim 5, characterized in that: The step of generating a comprehensive evaluation score of each second state recognition model according to a second preset rule based on the first evaluation score and the second evaluation score of each second state recognition model comprises: Acquire a first importance value corresponding to the first evaluation index; and, Obtaining a second importance value corresponding to the second evaluation indicator; Based on the first evaluation score and the second evaluation score of each second state recognition model, the first importance value and the second importance value, a preset calculation formula is called to generate a comprehensive evaluation score of each second state recognition model.

7. The data monitoring method according to claim 4, characterized in that: The step of generating the operating states corresponding to the respective databases based on the target state recognition model and the resource consumption information comprises: Inputting the resource consumption information of the designated database into each of the target state recognition models respectively; wherein the designated database is any one of all the databases; Receiving the designated operation states corresponding to the resource consumption information of the designated database respectively generated by each of the target state recognition models; If all the designated operating states are normal, the operating state of the designated database is determined to be normal; otherwise, the operating state of the designated database is determined to be abnormal.

8. A data monitoring device, characterized in that: include: A first acquisition module is used to synchronize data between multiple preset databases during a target service idle time period, and to acquire the last probe scan end time of each database after each database completes data synchronization; wherein the databases include at least a first database and a second database; A first scanning module, configured to scan all first target data corresponding to a first scanning end time in the first database based on a preset first probe, and obtain a first storage time of the first data; wherein the first scanning end time is an end time of a previous probe scanning of the first database, and the first data is any one of all the first target data; A second scanning module, configured to scan all second target data in the second database corresponding to a second scanning end time based on a preset second probe; wherein the second scanning end time is the last probe scanning end time of the second database; The first generating module is used to generate a first result of successful data synchronization for each of the first data, if there is second data identical to each of the first data in the second database, and the absolute value of the difference between the second storage time of each of the second data and the corresponding first storage time of each of the first data is less than a preset time length threshold.

9. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Bidirectional synchronous monitoring method and system for remote computer room data

    CN105490868A

  • Query request allocation method, database middleware system and electronic device

    CN108121782A