Method for checking and early warning final content consistency

By designing the content final consistency verification early warning method in a distributed system, using binlog to detect database changes and cyclic verification, the problem of inefficient data consistency verification in a distributed system is solved, and the rapid discovery of inconsistent data is achieved and operation convenience is improved. and database security.

CN119248788APending Publication Date: 2025-01-03HAINAN CHEZHIYITONG INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411440962.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

There are many problems with the final consistency verification of content data in distributed systems, including the inability to modify in real time, the verification process needs to be waited, and the data synchronization field needs to be added to the additional comparison. The existing solution requires a version number and the system is unwilling to add a version number. Causes inefficiency.

Method used

Design a final content consistency verification and early warning method, detect database changes through binlog, record ID status, cyclically check concurrent alarms, avoid system transformation, and quickly discover inconsistent data with simple and efficient solutions, combining virus detection and automatic storage functions to ensure data Safety.

Benefits of technology

Without changing the original system, it quickly discovered that concurrent data is inconsistent, which improves the efficiency of data content comparison, simplifies the operation process, ensures database security, and provides a convenient alarm method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248788A_ABST
    Figure CN119248788A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of early warning checking, and discloses a content final consistency checking early warning method, which comprises the following steps: [1.1] when a database is changed, finding that certain ID data is modified, added and deleted through binlog; and (1.2) searching from the ContentCheck to determine whether the content ID is already in the table, and if the content ID is not in the table, entering step (1.3), and if the content ID is not in the table, entering step (1.2). By designing a new scheme, on the premise that an original system is not changed, a relatively simple and efficient scheme is adopted, so that the purpose of quickly finding out data inconsistent with the content ID is achieved, and the problems that in the prior art, one content cannot be modified all the time, and the content cannot be modified after being modified for a period of time; checking is needed for several times in the finding process, and a period of time is needed; and when data synchronization fields are increased, comparison data needs to be supplemented, so that the efficiency of data content comparison is improved, and convenience is brought to operation and use of operators.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of early warning verification, and specifically relates to a method for content final consistency verification and early warning. Background Art

[0002] The final consistency verification of content data is a problem faced by many systems. It is necessary to discover inconsistent data and make certain processing, which can be to solve the problem or to issue an early warning. Distributed systems naturally have consistency problems. As a business system, frequent logic modifications can easily lead to synchronization data loss, field failure, field transmission errors, and other problems. The sequential nature of the transmission process can also lead to inconsistencies after concurrent transmission.

[0003] The existing verification mechanism is generally a version number verification. When the version numbers are found to be consistent, the content will be directly compared, and the difference can be determined only once. However, many systems are designed without version numbers. Adding version numbers will cause modifications to various systems. Some systems are unwilling to increase version numbers. However, the existing solutions have many problems, such as:

[0004] 1. A piece of content cannot be modified all the time, and it will not be changed for a period of time after it needs to be modified;

[0005] 2. The discovery process requires several verifications and a period of time;

[0006] 3. When the data synchronization fields increase, additional comparison data is required;

[0007] In order to verify the final consistency of automobile information content in the distributed system, it is necessary to support the data verification mechanism. In order to avoid the transformation of the original system and the modification of the content logic, it is necessary to improve it by checking N times within the specified time to verify whether it is ultimately consistent and whether an early warning is needed. Summary of the invention

[0008] The purpose of the present invention is to provide a method for content final consistency verification and early warning to solve the problems raised in the above background technology.

[0009] In order to achieve the above object, the present invention provides the following technical solution: a method for content final consistency check early warning, comprising the following steps:

[0010] [1.1] [Event trigger] When the database changes, it is found through binlog that a certain ID data has been modified, added, or deleted;

[0011] [1.2] Check from Content_Check whether there is a content ID already in the table.

[0012] If it is not in the table, go to 1.3

[0013] If it is in the table, go to 1.4;

[0014] [1.3] Record ID to Content_Check, column times = 0, status = false;

[0015] [1.4] Update the ID information in the Content_Check table, time = 0, status = false, checkTime = current time, failReason = empty;

[0016] [3.1] Get B's information (A comes from binlog, B comes from table data or an interface provided by others), and check the field information according to the verification requirements;

[0017] [3.2] Determine whether the verified information is normal.

[0018] Normal 3.3

[0019] Abnormal 3.4;

[0020] [3.3] Modify the ID status column of Content_Check, status = success;

[0021] [3.4] Modify the ID column of Content_Check, times = time + 1, status: failed, checkTime = current time, failReason: [Add exception], [Delete exception], [Modify exception], and the specific description of the mismatched columns;

[0022] [2.1]

Event trigger

[0023] [2.2] Find Content_Check, status = false and times <= timesMax (configured) and (checkTime + timeInterval (configured)) < current time

[0024] If yes, go to 3.1

[0025] If no, proceed to 2.3;

[0026] [2.3] Send an alarm with corresponding content to relevant persons.

[0027] Such a solution design can use a relatively simple and efficient solution without changing the original system, so as to quickly find data inconsistent with the content ID.

[0028] Preferably, the database is provided with a virus detection and killing system, and the virus detection and killing system detects and kills viruses once every two hours.

[0029] Setting up a regular virus check function can effectively prevent viruses from invading the database, ensuring the security of the database while avoiding the adverse effects caused by the theft or loss of database information.

[0030] Preferably, the loop execution has the function of automatically storing information, and the loop execution stores data once each time it is executed.

[0031] The design of the automatic information storage function of the cyclic execution system can effectively avoid data loss.

[0032] Preferably, the check record table (Content_Check) includes content ID (contentId), check times (times), and check results (status).

[0033] The verification record table can clearly display the number of content ID verifications and the verification results.

[0034] Preferably, the final check time (checkTime) can be achieved in millisecond level, and the range of the millisecond level is 1 millisecond to 200 milliseconds.

[0035] The millisecond-level design improves the efficiency of verification and can quickly verify content.

[0036] Preferably, the check requirement includes a maximum number of checks (timesMax) and a check interval (timeInterval), and the check interval (timeInterval) is in units of minutes and seconds.

[0037] The maximum number of checks and the check interval are configured by the system and can be modified.

[0038] Preferably, the corresponding content is sent via email, mobile phone text message and communication APP, and the sending method of the corresponding content can be independently selected by the relevant person.

[0039] This design allows relevant people to choose the way to send content according to their own needs, thereby making it convenient for relevant people to receive and receive notifications.

[0040] Preferably, the binlog is a binary file that only records changes to the data in the table and the table structure. The binlog has three formats that can be set through binlog-format.

[0041] Binlog directly records SQL statements, or records the original SQL logic, so binlog belongs to the logical log.

[0042] Preferably, the check field information is used to store information of a specific type, and the data type of the check field information determines the type and range of data that can be stored.

[0043] Each field has a unique identifier, called a field name, which is used to identify and reference a specific data item in a database or table.

[0044] The beneficial effects of the present invention are as follows:

[0045] The present invention designs a new solution, which can achieve the purpose of quickly finding inconsistent data with a relatively simple and efficient solution without changing the original system, and solves the problems in the prior art that a content cannot be modified all the time, and will not be changed for a period of time after it is modified; the discovery process requires several verifications and a period of time; when the data synchronization field increases, it is necessary to supplement the comparison data, etc., thereby improving the efficiency of data content comparison and bringing convenience to the operation of operators. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a flowchart of the present invention. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] like Figure 1 As shown, an embodiment of the present invention provides a method for checking and warning of final consistency of content, comprising the following steps:

[0049] [1.1] [Event trigger] When the database changes, it is found through binlog that a certain ID data has been modified, added, or deleted;

[0050] [1.2] Check from Content_Check whether there is a content ID already in the table.

[0051] If it is not in the table, go to 1.3

[0052] If it is in the table, go to 1.4;

[0053] [1.3] Record ID to Content_Check, column times = 0, status = false;

[0054] [1.4] Update the ID information in the Content_Check table, time = 0, status = false, checkTime = current time, failReason = empty;

[0055] [3.1] Get B's information (A comes from binlog, B comes from table data or an interface provided by others), and check the field information according to the verification requirements;

[0056] [3.2] Determine whether the verified information is normal.

[0057] Normal 3.3

[0058] Abnormal 3.4;

[0059] [3.3] Modify the ID status column of Content_Check, status = success;

[0060] [3.4] Modify the ID column of Content_Check, times = time + 1, status: failed, checkTime = current time, failReason: [Add exception], [Delete exception], [Modify exception], and the specific description of the mismatched columns;

[0061] [2.1]

Event trigger

[0062] [2.2] Find Content_Check, status = false and times <= timesMax (configured) and (checkTime + timeInterval (configured)) < current time

[0063] If yes, go to 3.1

[0064] If no, proceed to 2.3;

[0065] [2.3] Send an alarm with corresponding content to relevant persons.

[0066] Such a solution design can use a relatively simple and efficient solution without changing the original system, so as to quickly find data inconsistent with the content ID.

[0067] The database is equipped with a virus detection system, which detects and kills viruses every two hours.

[0068] Setting up a regular virus check function can effectively prevent viruses from invading the database, ensuring the security of the database while avoiding the adverse effects caused by the theft or loss of database information.

[0069] The loop execution has the function of automatically storing information, and the data will be stored once each time the loop is executed.

[0070] The design of the automatic information storage function of the cyclic execution system can effectively avoid data loss.

[0071] The check record table (Content_Check) includes the content ID (contentId), the number of checks (times), and the check result (status).

[0072] The verification record table can clearly display the number of content ID verifications and the verification results.

[0073] Among them, the final check time (checkTime) can be achieved in millisecond level, and the range of millisecond level is one millisecond to two hundred milliseconds.

[0074] The millisecond-level design improves the efficiency of verification and can quickly verify content.

[0075] The verification requirements include the maximum number of verification times (timesMax) and the verification interval (timeInterval), and the verification interval (timeInterval) is in minutes and seconds.

[0076] The maximum number of checks and the check interval are configured by the system and can be modified.

[0077] The corresponding content is sent via email, mobile phone text message and communication APP, and the relevant person can choose one of the sending methods independently.

[0078] This design allows relevant people to choose the way to send content according to their own needs, thereby making it convenient for relevant people to receive and receive notifications.

[0079] Among them, binlog is a binary file that only records changes to the data in the table and the table structure. There are three formats of binlog that can be set through binlog-format.

[0080] Binlog directly records SQL statements, or records the original SQL logic, so binlog belongs to the logical log.

[0081] The check field information is used to store specific types of information, and the data type of the check field information determines the type and range of data that can be stored.

[0082] Each field has a unique identifier, called a field name, which is used to identify and reference a specific data item in a database or table.

[0083] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0084] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for content final consistency check and early warning, characterized in that: The following steps are involved: [1.1] [Event trigger] When the database changes, it is found through binlog that a certain ID data has been modified, added, or deleted; [1.2] Check from Content_Check whether there is a content ID already in the table. If it is not in the table, go to 1.3 If it is in the table, go to 1.4; [1.3] Record ID to Content_Check, column times = 0, status = false; [1.4] Update the ID information in the Content_Check table, times = 0, status = false, checkTime = current time, failureReason = empty; [3.1] Get B's information (A comes from binlog, B comes from table data or an interface provided by others), and check the field information according to the verification requirements; [3.2] Determine whether the verified information is normal. If normal, enter 3.3 If abnormal, proceed to 3.4; [3.3] Modify the ID status column of Content_Check, status = success; [3.4] Modify the ID column of Content_Check, times = times + 1, status: failed, checkTime = current time, failureReason: [Add exception], [Delete exception], [Modify exception], and the specific description of the mismatched columns; [2.1]【Event trigger】loop execution, from the first time, or the last execution is completed; [2.2] Find Content_Check, status = false and times <= timesMax (configured) and (checkTime + timeInterval (configured)) < current time If yes, go to 3.1 If no, proceed to 2.3; [2.3] Send an alarm with corresponding content to relevant persons.

2. A method for content final consistency check and early warning according to claim 1, characterized in that: The database is provided with a virus detection and killing system, and the virus detection and killing system detects and kills viruses once every two hours.

3. A method for content final consistency check and early warning according to claim 1, characterized in that: The loop execution has the function of automatically storing information, and the loop execution stores data once every time it is executed.

4. A method for content final consistency check and early warning according to claim 1, characterized in that: The check record table (Content_Check) includes content ID (contentId), check times (times) and check results (status).

5. A method for content final consistency check and early warning according to claim 1, characterized in that: The final check time (checkTime) can be achieved in millisecond level, and the range of the millisecond level is 1 millisecond to 200 milliseconds.

6. A method for content final consistency check and early warning according to claim 1, characterized in that: The check requirement includes a maximum number of checks (timesMax) and a check interval (timeInterval), and the check interval (timeInterval) is in minutes and seconds.

7. A method for content final consistency check and early warning according to claim 1, characterized in that: The corresponding content is sent via email, mobile phone text message and communication APP, and the relevant person can independently select one of the sending methods of the corresponding content.

8. A method for content final consistency check and early warning according to claim 1, characterized in that: The binlog is a binary file that only records changes to the data in the table and the table structure. The binlog has three formats that can be set through binlog-format.

9. A method for content final consistency check and early warning according to claim 1, characterized in that: The check field information is used to store information of a specific type, and the data type of the check field information determines the type and range of data that can be stored.