Method, device and equipment for updating data synchronization detection and computer storage medium
By detecting the transmission time difference in the data interaction chain and calculating the interception interval, the problem of intrusion data leakage during the database synchronization interaction is solved, and higher data security is achieved.
Patent Information
- Application Number
- CN202510248835.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-06-13
AI Technical Summary
Illegal access to the database may occur during the synchronous interaction, resulting in data leakage updates. The method of setting up intercepting nodes in the existing technology is more blind and cannot effectively improve data security.
By detecting the difference between the first preset transmission time and the first actual transmission time in the data interaction chain, it is determined whether there is intrusion data in the target database, and the interception interval is calculated based on the difference value, and a corresponding number of intercept nodes are created to intercept the intrusion data.
Accurately determine the location of intrusion data, improve the security of data updates in the database synchronization interaction, and avoid the defect of blindly setting up intercept nodes.
Smart Images

Figure CN120144670A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of databases, and particularly relates to a method, apparatus, device, and computer storage medium for detecting the synchronization of updated data. Background Art
[0002] A database is a collection of a large amount of data that is long-term stored inside a computer, organized, shareable, and uniformly managed, and can store various types of data.
[0003] In order to integrate the data in the database, different databases can synchronously exchange the updated data in the database. However, during the synchronous exchange of the updated data of the database, illegal access may occur, that is, intrusion data appears, and these intrusion data will cause the leakage of the updated data synchronized and exchanged by the database.
[0004] In the related art, the method of setting up an interception node is usually adopted to intercept the intrusion data. However, the method of setting up an interception node in this related art is relatively blind, that is, the user does not know where to set up the interception node, and the security of the updated data synchronized and exchanged by the database is relatively low. Summary of the Invention
[0005] The embodiments of this application provide a method, apparatus, device, computer storage medium, and program product for detecting the synchronization of updated data, which can improve the security of the updated data synchronized and exchanged by the database.
[0006] In a first aspect, the embodiments of this application provide a method for detecting the synchronization of updated data, and the method includes:
[0007] During the process of synchronizing the data of the first database and the second database in the distributed database through the data interaction chain, when intrusion data is detected, obtain a first preset transmission time and a first actual transmission time. The first preset transmission time represents the preset transmission time for the updated data in the synchronized distributed database to reach the intermediate node, and the first actual transmission time represents the actual transmission time for the updated data to reach the intermediate node. The intermediate node is set at the midpoint position of the data interaction chain;
[0008] Compare the difference between the first preset transmission time and the first actual transmission time with a preset value to obtain a first comparison result;
[0009] Determine that there is intrusion data in the target database according to the first comparison result. The target database includes the first database or the second database;
[0010] According to the target database, obtain the interception interval corresponding to the target database;
[0011] Create the corresponding number of interception nodes in the target database according to the interception interval to intercept the intrusion data.
[0012] In an implementable embodiment, the target database includes a second database; determining that there is intrusion data in the target database according to the first comparison result includes:
[0013] When the difference represented by the first comparison result is equal to a preset value, it is determined that there is intrusion data in the second database.
[0014] In an implementable embodiment, the method for updating data synchronization detection further includes:
[0015] When the difference represented by the first comparison result is not equal to the preset value, the difference is compared with a target difference to obtain a second comparison result; the target difference represents the difference between a second preset transmission time and a second actual transmission time, the second preset transmission time represents the preset transmission time for the updated data to pass through the data interaction chain in its entirety, and the second actual transmission speed represents the actual transmission time for the updated data to pass through the data interaction chain in its entirety;
[0016] According to the second comparison result, it is determined that there is intrusion data in the target database.
[0017] In an implementable embodiment, the target database includes a first database and a second database; determining that there is intrusion data in the target database according to the second comparison result includes:
[0018] When the absolute value of the difference represented by the second comparison result is equal to the target difference, it is determined that there is intrusion data in the first database;
[0019] When the absolute value of the difference represented by the second comparison result is less than the target difference, it is determined that there is intrusion data in the second database.
[0020] In an implementable embodiment, obtaining an interception interval corresponding to the target database according to the target database includes:
[0021] Obtain the second preset transmission time and the second actual transmission time. The second preset transmission time represents the preset transmission time for the updated data to pass through the data interaction chain in its entirety, and the second actual transmission speed represents the actual transmission time for the updated data to pass through the data interaction chain in its entirety;
[0022] Calculate the difference between the second preset transmission time and the second actual transmission time to obtain the target difference;
[0023] Determine the interception interval according to the weight coefficient, difference and target difference corresponding to the target database.
[0024] In an implementable embodiment, the weight coefficient includes a first weight coefficient, a second weight coefficient, a third weight coefficient and a fourth weight coefficient. Determining the interception interval according to the weight coefficient, difference and target difference corresponding to the target database includes:
[0025] When the target database represents the first database, determine the first weight coefficient and the second weight coefficient;
[0026] Add the difference between the target difference of each data interaction chain and the absolute value of the difference to obtain the first data;
[0027] Multiply the first data by the first weight coefficient to obtain the second data;
[0028] Add the second data and the product of the difference and the second weight coefficient to obtain the third data;
[0029] Determine the interception interval corresponding to the first database by dividing the preset target value by the third data;
[0030] When the target database represents the second database, determine the third weight coefficient and the fourth weight coefficient;
[0031] Add the absolute values of the differences of each data interaction chain to obtain the fourth data;
[0032] Multiply the fourth data by the third weight coefficient to obtain the fifth data;
[0033] Add the fifth data and the product of the target difference and the fourth weight coefficient to obtain the sixth data;
[0034] Determine the interception interval corresponding to the second database by dividing the target value by the sixth data.
[0035] In an implementable embodiment, in the process of synchronizing the data of the first database and the second database in the distributed database through the data interaction chain, before detecting the existence of intrusion data and obtaining the first preset transmission time and the first actual transmission time, the method further includes:
[0036] In response to receiving the first information, transmit the updated data through the data interaction chain based on the first information, where the first information includes the preset transmission speed and the transmission start time;
[0037] Obtain the transmission end time corresponding to the updated data;
[0038] Obtain the transmission path length of the data interaction chain;
[0039] Determine the actual transmission speed according to the ratio of the transmission path length to the difference between the transmission end time and the transmission start time;
[0040] When the difference between the actual transmission speed and the preset transmission speed is less than or equal to the preset speed threshold, determine that there is intrusion data.
[0041] In an implementable embodiment, before transmitting updated data through a data interaction chain based on the first information in response to receiving the first information, the method further includes:
[0042] In the case where it is detected that the third database does not include data corresponding to the received second information, obtaining updated data from the fourth database, the data including the updated data;
[0043] Receiving the updated data by using the third database to obtain the first database;
[0044] Classifying the source data in the fourth database according to data characteristics to obtain classified source data;
[0045] In the case where it is detected that the classified source data is inconsistent with the corresponding structure data in the fourth database, merging the classified source data and the structure data to obtain the second database;
[0046] Connecting the first database and the second database to obtain a synchronous distributed database.
[0047] In an implementable embodiment, before obtaining updated data from the fourth database in the case where it is detected that the third database does not include updated data corresponding to the received second information, the method further includes:
[0048] Receiving third information, the third information including target data characteristics;
[0049] Obtaining a target data structure and a target data quantity corresponding to the target data characteristics;
[0050] Obtaining a target feature database corresponding to the target data characteristics from the fourth database;
[0051] Obtaining target data corresponding to the target data structure and the target data quantity from the target feature database;
[0052] Generating a third database based on the target data.
[0053] In an implementable embodiment, the method for updating data synchronization detection further includes:
[0054] In the case where the difference between the actual transmission speed and the preset transmission speed is greater than the preset speed threshold, obtaining updated data by using a fifth database, the fifth database representing the database for obtaining updated data, and the fifth database including the first database or the second database;
[0055] Mapping the updated data based on the fifth database and the characteristic data and data structure corresponding to the updated data to obtain target transmission updated data;
[0056] Detect the consistency between the data features and data structures corresponding to the target transmission update data and the data feature library and data structures corresponding to the update data, and detect the consistency between the numerical values of the target transmission update data and the update data;
[0057] When it is detected that the data features and data structures corresponding to the target transmission update data are consistent with the data feature library and data structures corresponding to the update data, and the numerical values of the target transmission update data are consistent with the update data, it is determined that the fifth database is successfully updated.
[0058] In an implementable embodiment, the method for detecting update data synchronization further includes:
[0059] When it is detected that the data features and data structures corresponding to the target transmission update data are inconsistent with the data feature library and data structures corresponding to the update data, or the numerical values of the target transmission update data are inconsistent with the update data, obtain the permission list from the preset permission list database;
[0060] Modify the permission codes corresponding to the permission list so that the data features and data structures corresponding to the target transmission update data are consistent with the data feature library and data structures corresponding to the update data, and the numerical values of the target transmission update data are consistent with the update data.
[0061] In an implementable embodiment, modifying the permission codes corresponding to the permission list includes:
[0062] Modify the permission codes corresponding to the permission list, and detect whether there is an access by an abnormal permission account;
[0063] When an access by an abnormal permission account is detected, generate an abnormal permission list based on the abnormal permission account;
[0064] Generate an alarm message according to the abnormal permission list.
[0065] In a second aspect, an embodiment of the present application provides a device for detecting update data synchronization, and the device includes:
[0066] An acquisition module, which is used to acquire a first preset transmission time and a first actual transmission time when it is detected that there is intrusion data during the process of synchronizing the data of the first database and the second database in the distributed database through the data interaction chain. The first preset transmission time represents the preset transmission time for the update data in the synchronized distributed database to reach the intermediate node, and the first actual transmission time represents the actual transmission time for the update data to reach the intermediate node. The intermediate node is set at the midpoint position of the data interaction chain;
[0067] A comparison module, configured to compare the difference between a first preset transmission time and a first actual transmission time with a preset value to obtain a first comparison result;
[0068] A determination module, configured to determine that there is intrusion data in a target database according to the first comparison result, where the target database includes a first database or a second database;
[0069] An acquisition module, further configured to acquire an interception interval corresponding to the target database according to the target database;
[0070] A creation module, configured to create a corresponding number of interception nodes in the target database according to the interception interval for intercepting intrusion data.
[0071] In a third aspect, an embodiment of the present application provides a device for updating data synchronization detection, where the device includes a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the method for updating data synchronization detection according to any one of the first aspects.
[0072] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing computer program instructions, and when the computer program instructions are executed by a processor, the method for updating data synchronization detection according to any one of the first aspects is implemented.
[0073] In a fifth aspect, an embodiment of the present application provides a computer program product including a computer program, and when the computer program is executed by a processor, the method for updating data synchronization detection according to any one of the first aspects is implemented.
[0074] A method, device, device, computer storage medium, and program product for updating data synchronization detection provided by an embodiment of the present application. In the process of synchronizing data between a first database and a second database in a distributed database through a data interaction chain, when it is detected that there is intrusion data, a first preset transmission time and a first actual transmission time are acquired. The difference between the first preset transmission time and the first actual transmission time is compared with a preset value to obtain a first comparison result. According to the first comparison result, it is determined that there is intrusion data in the target database. According to the target database, an interception interval corresponding to the target database is acquired. A corresponding number of interception nodes are created in the target database according to the interception interval for intercepting intrusion data. By acquiring the first preset transmission time and the first actual transmission time, the present application can determine in which database the intrusion data appears according to the difference between the above two times, so as to be able to set interception nodes at the accurate position to intercept the intrusion data, thereby improving the security of the updated data in the database synchronization interaction. Description of the Drawings
[0075] To more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the accompanying drawings required for the embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.
[0076] Figure 1 It is a schematic flowchart of a method for detecting update data synchronization provided by an embodiment of the present application;
[0077] Figure 2 It is a schematic flowchart of a method for determining intrusion data provided by an embodiment of the present application;
[0078] Figure 3 It is a schematic flowchart of a method for determining intrusion data provided by another embodiment of the present application;
[0079] Figure 4 It is a schematic flowchart of a method for determining an interception interval provided by an embodiment of the present application;
[0080] Figure 5 It is a schematic flowchart of a method for determining an interception interval provided by another embodiment of the present application;
[0081] Figure 6 It is a schematic flowchart of a method for determining intrusion data provided by another embodiment of the present application;
[0082] Figure 7 It is a schematic flowchart of a method for obtaining a synchronized distributed database provided by an embodiment of the present application;
[0083] Figure 8 It is a schematic flowchart of a method for generating a third database provided by an embodiment of the present application;
[0084] Figure 9 It is a schematic flowchart of a method for determining successful data update provided by an embodiment of the present application;
[0085] Figure 10 It is a schematic flowchart of a method for detecting the consistency of updated data provided by an embodiment of the present application;
[0086] Figure 11 It is a schematic flowchart of a method for generating an alarm message provided by an embodiment of the present application;
[0087] Figure 12 It is a schematic structural diagram of a device for detecting update data synchronization provided by another embodiment of the present application;
[0088] Figure 13 It is a schematic structural diagram of a device for detecting update data synchronization provided by still another embodiment of the present application. Detailed implementation manners
[0089] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than limiting the present application. For those skilled in the art, the present application can be implemented without some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by showing examples of the present application.
[0090] It should be noted that in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the element.
[0091] Before elaborating on the technical solutions provided by the embodiments of the present application, for the convenience of understanding the embodiments of the present application, the problems existing in the related technologies are specifically described in the present application:
[0092] Currently, after each database updates its own data, it will synchronize and interact these updated data with other databases. For example, database A updates its own data to obtain updated data C; database B updates its own data to obtain updated data D. Subsequently, database A sends updated data C to database B, and database B sends updated data D to database A to achieve the synchronization and interaction of updated data between databases.
[0093] However, during the synchronization and interaction of updated data between databases, illegal access may occur, that is, the database is invaded by data, and these invaded data will cause the leakage of updated data synchronized and interacted by the database.
[0094] In the related technology, the method of setting up an interception node is usually adopted to intercept the invaded data, but this method is relatively blind, and users do not know where to set up the interception node. Therefore, the security of the updated data synchronized and interacted by the database is relatively low.
[0095] In addition, during the process of synchronizing and interacting data between databases, there are other problems, such as: there is a time delay during the process of synchronizing and interacting data, resulting in the database being unable to obtain the required data in a timely manner. Also, when multiple databases modify the same data simultaneously, conflicts occur, resulting in inconsistent data and ultimately causing the data to be unavailable or damaged.
[0096] Embodiments of the present application provide a method, apparatus, device, computer storage medium, and computer program product for updating data synchronization detection, which can solve at least one of the above technical problems existing in the related art.
[0097] During the process of synchronizing the data of the first database and the second database in the distributed database through the data interaction chain in the embodiment of the present application, when it is detected that there is intrusion data, the first preset transmission time and the first actual transmission time are obtained. The difference between the first preset transmission time and the first actual transmission time is compared with a preset value to obtain a first comparison result. According to the first comparison result, it is determined that there is intrusion data in the target database. According to the target database, the interception interval corresponding to the target database is obtained. In the target database, an interception node corresponding to the number of the interception intervals is created to intercept the intrusion data. By obtaining the first preset transmission time and the first actual transmission time, the present application can determine which database the intrusion data appears in according to the difference between the above two times, so that an interception node can be set at the accurate position to intercept the intrusion data, thereby improving the security of the updated data in the database synchronization interaction.
[0098] The method for updating data synchronization detection provided by the embodiments of the present application is introduced below.
[0099] Figure 1 The flowchart of the method for updating data synchronization detection provided by an embodiment of the present application is shown. As Figure 1 shown, the method may include steps S110 - S150.
[0100] S110: During the process of synchronizing the data of the first database and the second database in the distributed database through the data interaction chain, when it is detected that there is intrusion data, obtain the first preset transmission time and the first actual transmission time.
[0101] In this embodiment, during the process of synchronizing the data of the first database and the second database in the distributed database by using the data interaction chain, it is detected whether there is intrusion data. When the intrusion data is detected, the first preset transmission time and the first actual transmission time are obtained.
[0102] Among them, the data interaction chain is used for data interaction and transmission between databases.
[0103] Among them, the first preset transmission time represents the preset transmission time for the updated data in the synchronous distributed database to reach the intermediate node, the first actual transmission time represents the actual transmission time for the updated data to reach the intermediate node, and the intermediate node is set at the midpoint position of the data interaction chain.
[0104] In the step process of the embodiment of the present application, when intrusion data is detected, by obtaining the first preset transmission time and the first actual transmission time, it is convenient to subsequently determine the specific location of the intrusion data according to the first preset transmission time and the first actual transmission time.
[0105] S120: Compare the difference between the first preset transmission time and the first actual transmission time with a preset value to obtain a first comparison result.
[0106] In this embodiment, after obtaining the first preset transmission time and the first actual transmission time, calculate the difference between the first preset transmission time and the first actual transmission time, and compare this difference with the preset value to obtain a first comparison result.
[0107] S130: Determine that there is intrusion data in the target database according to the first comparison result.
[0108] In this embodiment, after obtaining the first comparison result, it can be determined that there is intrusion data in the target database according to the first comparison result.
[0109] Among them, the target database includes the first database or the second database.
[0110] S140: According to the target database, obtain the interception interval corresponding to the target database.
[0111] In this embodiment, according to the determined target database, obtain the interception interval corresponding to the target database.
[0112] In one embodiment, the interception interval corresponding to the target database can be calculated according to the parameters corresponding to the target database.
[0113] S150: Create the corresponding number of interception nodes in the target database according to the interception interval to intercept intrusion data.
[0114] In this embodiment, after determining the interception interval corresponding to the target database, create the corresponding number of interception nodes in the target database to intercept intrusion data.
[0115] It should be noted that the intrusion data intrudes inside the database and does not exist at a certain position in the data interaction chain.
[0116] In the process of synchronizing the data of the first database and the second database in the distributed database through the data interaction chain, when intrusion data is detected, the first preset transmission time and the first actual transmission time are obtained. The difference between the first preset transmission time and the first actual transmission time is compared with a preset value to obtain a first comparison result. According to the first comparison result, it is determined that there is intrusion data in the target database. According to the target database, an interception interval corresponding to the target database is obtained. In the target database, an interception node corresponding to the number of the interception intervals is created to intercept the intrusion data. By obtaining the first preset transmission time and the first actual transmission time, the present application can determine which database the intrusion data appears in according to the difference between the above two times, so that an interception node can be set at an accurate position to intercept the intrusion data, thereby improving the security of the updated data in the database synchronization interaction.
[0117] In one embodiment, the first preset transmission time can be calculated according to the preset transmission speed of the updated data in the data interaction chain and the path length of the data interaction chain; the first actual transmission time can be calculated according to the transmission start time and the transmission end time corresponding to the updated data.
[0118] In one embodiment, the expression for calculating the first preset transmission time is shown in formula (1).
[0119]
[0120] where t b represents the first preset transmission time, t 1 represents the transmission start time, and T b represents the second preset transmission time.
[0121] The expression for calculating the second preset transmission time is shown in formula (2).
[0122]
[0123] where T b represents the second preset transmission time, X represents the transmission path length of the data interaction chain, V represents the preset transmission speed, and t 1 represents the transmission start time.
[0124] In one embodiment, the expression for calculating the first actual transmission time is shown in formula (3).
[0125]
[0126] where t s represents the first actual transmission time, t 1 represents the transmission start time, and T s represents the second actual transmission time.
[0127] The expression for calculating the second actual transmission time is shown in Formula (4).
[0128] T s = t 2 - t 1 (4)
[0129] Wherein, T s represents the second actual transmission time, t 2 represents the transmission end time, and t 1 represents the transmission start time.
[0130] In one embodiment, the interception node may include an intrusion database, and the intrusion database is used to compare the consistency of the data characteristics of the intrusion data with the data characteristics in the intrusion database.
[0131] In one embodiment, after intercepting the intrusion data, the interception node may generate an abnormal interception alarm signal for notifying the user to perform corresponding processing.
[0132] In one embodiment, the target database includes a second database; according to the first comparison result, determining that there is intrusion data in the target database may include step S131.
[0133] S131: When the first comparison result indicates that the difference is equal to a preset value, it is determined that there is intrusion data in the second database.
[0134] In this embodiment, if the first comparison result indicates that the difference is equal to the preset value, it is determined that there is intrusion data in the second database.
[0135] In one example, the preset value may be 0.
[0136] In one embodiment, if the first comparison result indicates that the difference is equal to 0, it is determined that there is intrusion data in the second database.
[0137] In one example, the second database may be a database for receiving updated data.
[0138] In the embodiment of the present application, when comparing that the difference is equal to the preset value, it can accurately determine the database with intrusion data, which is convenient for subsequently setting an interception node in the database to improve the security of the updated data in the database synchronization interaction.
[0139] In one embodiment, the method for updating data synchronization detection further includes steps S132 - S133, as Figure 2 shown.
[0140] S132: When the difference indicated by the first comparison result is not equal to the preset value, compare the difference with the target difference to obtain a second comparison result.
[0141] Wherein, the target difference represents the difference between the second preset transmission time and the second actual transmission time. The second preset transmission time represents the preset transmission time for the updated data to pass through the data interaction chain throughout the process, and the second actual transmission speed represents the actual transmission time for the updated data to pass through the data interaction chain throughout the process.
[0142] In this embodiment, if the difference indicated by the first comparison result is not equal to the preset value, the difference can be compared with the target difference to obtain a second comparison result.
[0143] S133: Determine that there is intrusion data in the target database according to the second comparison result.
[0144] In this embodiment, after obtaining the second comparison result, it can be determined that there is intrusion data in the target database according to the second comparison result.
[0145] In the embodiment of the present application, when the difference is not equal to the preset value, by comparing the comparison difference with the target difference, it is further determined according to the comparison result which database has intrusion data, facilitating subsequent setting of an interception node in this database to improve the security of the updated data in the database synchronization interaction.
[0146] In one embodiment, the target database includes a first database and a second database; determining that there is intrusion data in the target database according to the second comparison result may include step S1331 and step S1332, as Figure 3 shown.
[0147] S1331: When the absolute value of the difference indicated by the second comparison result is equal to the target difference, determine that there is intrusion data in the first database.
[0148] In this embodiment, if the absolute value of the difference indicated by the second comparison result is equal to the target difference, it can be determined that there is intrusion data in the first database.
[0149] In one example, the first database may be the database that sends the updated data.
[0150] S1332: When the absolute value of the difference indicated by the second comparison result is less than the target difference, determine that there is intrusion data in the second database.
[0151] In this embodiment, if the absolute value of the difference indicated by the second comparison result is less than the target difference, it can be determined that there is intrusion data in the second database.
[0152] In one example, the second database may be the database that receives the updated data.
[0153] In the embodiment of the present application, by comparing the absolute value of the difference with the target difference, it is possible to further determine the database where the intrusion data exists.
[0154] In one embodiment, according to the target database, obtaining the interception interval corresponding to the target database may include steps S141 - S143, as Figure 4 shown.
[0155] S141: Obtain the second preset transmission time and the second actual transmission time.
[0156] Among them, the second preset transmission time represents the preset transmission time for the update data to pass through the data interaction chain in its entirety, and the second actual transmission speed represents the actual transmission time for the update data to pass through the data interaction chain in its entirety.
[0157] In this embodiment, the second preset transmission time and the second actual transmission time can be obtained.
[0158] In one embodiment, the second preset transmission time can be calculated based on the preset transmission speed of the update data in the data interaction chain and the path length of the data interaction chain; the second actual transmission time can be calculated based on the transmission start time and the transmission end time corresponding to the update data.
[0159] S142: Calculate the difference between the second preset transmission time and the second actual transmission time to obtain the target difference.
[0160] In this embodiment, when the second preset transmission time and the second actual transmission time are obtained, the difference between the second preset transmission time and the second actual transmission time can be calculated to obtain the target difference.
[0161] S143: Determine the interception interval according to the weight coefficient, difference, and target difference corresponding to the target database.
[0162] In this embodiment, when the target difference is calculated, the interception interval corresponding to the target database can be determined according to the weight coefficient, difference, and target difference corresponding to the target database.
[0163] In one embodiment, arithmetic operations can be performed on the weight coefficient, difference, and target difference corresponding to the target database to obtain the interception interval corresponding to the target database.
[0164] In one example, if the target database is the first database, the weight coefficient corresponding to the first database is L1; if the target database is the second database, the weight coefficient corresponding to the second database is L2.
[0165] In the embodiments of the present disclosure, by obtaining the second preset transmission time and the second actual transmission time, the target difference can be determined, so that the interception interval corresponding to the target database can be accurately determined.
[0166] In one embodiment, the weight coefficients include a first weight coefficient, a second weight coefficient, a third weight coefficient, and a fourth weight coefficient. Determining the interception interval according to the weight coefficient, difference, and target difference corresponding to the target database may include steps S1431 - S14310, as Figure 5 shown.
[0167] S1431: When the target database represents the first database, determine the first weight coefficient and the second weight coefficient.
[0168] In this embodiment, if the target database represents the first database, the first weight coefficient and the second weight coefficient corresponding to the first database can be obtained.
[0169] S1432: Add the difference between the target difference of each data interaction chain and the absolute value of the difference to obtain the first data.
[0170] In this embodiment, the difference between the target difference of each data interaction chain and the absolute value of the difference can be calculated and then added to obtain the first data.
[0171] It can be understood that the first database and the second database can transmit and update data through multiple data interaction chains.
[0172] S1433: Multiply the first data by the first weight coefficient to obtain the second data.
[0173] In this embodiment, after obtaining the first data, the first data can be multiplied by the first weight coefficient to obtain the second data.
[0174] S1434: Add the second data and the product of the difference and the second weight coefficient to obtain the third data.
[0175] In this embodiment, after obtaining the second data, the product of the difference and the second weight coefficient can be calculated, and then the product is added to the second data to obtain the third data.
[0176] S1435: Determine the value obtained by dividing the preset target value by the third data as the interception interval corresponding to the first database.
[0177] In this embodiment, after obtaining the third data, the value obtained by dividing the preset target value by the third data can be determined as the interception interval corresponding to the first database.
[0178] In one example, the target value can be 1.
[0179] S1436: When the target database represents the second database, determine the third weight coefficient and the fourth weight coefficient.
[0180] In this embodiment, if the target database represents the second database, the third weight coefficient and the fourth weight coefficient corresponding to the second database can be obtained.
[0181] S1437: Add the absolute values of the differences of each data interaction chain to obtain the fourth data.
[0182] In this embodiment, the absolute values of the differences of each data interaction chain can be added to obtain the fourth data.
[0183] S1438: Multiply the fourth data by the third weight coefficient to obtain the fifth data.
[0184] In this embodiment, after obtaining the fourth data, the fourth data can be multiplied by the third weight coefficient to obtain the fifth data.
[0185] S1439: Add the fifth data and the product of the target difference and the fourth weight coefficient to obtain the sixth data.
[0186] In this embodiment, after obtaining the fifth data, the product of the target difference and the fourth weight coefficient can be calculated, and then this product is added to the fifth data to obtain the sixth data.
[0187] S14310: Determine the interception interval corresponding to the second database as the value obtained by dividing the target value by the sixth data.
[0188] In this embodiment, after obtaining the sixth data, the value obtained by dividing the target value by the sixth data can be determined as the interception interval corresponding to the second database.
[0189] In one example, the expression for determining the interception interval corresponding to the first database is shown in formula (5).
[0190]
[0191] where T q represents the interception interval of the first database, n represents the number of data interaction chains, T 1 represents the difference, T 2 represents the target difference, w 1 represents the first weight coefficient, w 2 represents the second weight coefficient.
[0192] In another example, the expression for determining the interception interval corresponding to the second database is shown in formula (6).
[0193]
[0194] Among them, T g represents the interception interval of the second database, n represents the number of data interaction chains, and T 1 represents the difference, and T 2 represents the target difference, and w 3 represents the third weight coefficient, and w 4 represents the fourth weight coefficient.
[0195] According to the weight coefficient, difference, and target difference corresponding to the target database in the embodiments of the present application, the interception interval corresponding to the target database can be accurately determined.
[0196] In one embodiment, during the process of synchronizing the data of the first database and the second database in the distributed database through the data interaction chain, when it is detected that there is intrusion data, before obtaining the first preset transmission time and the first actual transmission time, the method for updating data synchronization further includes steps S210-S250, as Figure 6 shown.
[0197] S210: In response to receiving the first information, transmit the updated data through the data interaction chain based on the first information.
[0198] Among them, the first information includes the preset transmission speed and the transmission start time. The first information represents the updated data synchronization interaction trigger information. The transmission start time represents the time when the updated data starts to be sent from the database, and the preset transmission speed represents the transmission speed of the updated data preset in the data interaction chain.
[0199] In this embodiment, when the first information is received, the updated data can be transmitted through the data interaction chain according to the first information.
[0200] S220: Obtain the transmission end time corresponding to the updated data.
[0201] In this embodiment, the transmission end time corresponding to the updated data can be obtained.
[0202] Among them, the transmission end time refers to the time when the updated data reaches the database that receives the data.
[0203] S230: Obtain the transmission path length of the data interaction chain.
[0204] In this embodiment, the length of the transmission path of the data interaction chain can be obtained.
[0205] S240: Determine the actual transmission speed according to the ratio of the transmission path length to the difference between the transmission end time and the transmission start time.
[0206] In this embodiment, after obtaining the transmission path length, the difference between the transmission end time and the transmission start time can be calculated, and then the transmission path length is divided by this difference to obtain the actual transmission speed.
[0207] In one example, the expression for calculating the actual transmission speed is shown in formula (7).
[0208]
[0209] Wherein, V S represents the actual transmission speed, X represents the transmission path length of the data interaction chain, t 1 represents the transmission start time, and t 2 represents the transmission end time.
[0210] S250: When the difference between the actual transmission speed and the preset transmission speed is less than or equal to the preset speed threshold, it is determined that there is intrusion data.
[0211] In this embodiment, after calculating the actual transmission speed, the difference between the actual transmission speed and the preset transmission speed is calculated. If this difference is less than or equal to the preset speed threshold, it is determined that there is intrusion data.
[0212] Wherein, the magnitude of the preset speed threshold is not fixed and can be set according to user requirements.
[0213] In one example, the expression for calculating the difference between the actual transmission speed and the preset transmission speed is shown in formula (8).
[0214] V c =|V s -V| (8)
[0215] Wherein, V c represents the difference between the actual transmission speed and the preset transmission speed, V s represents the actual transmission speed, and V represents the preset transmission speed.
[0216] The embodiments of the present application compare the difference between the actual transmission speed of the updated data and the preset transmission speed with the preset speed threshold, which can accurately determine whether there is intrusion data in the database, facilitate subsequent execution of corresponding processing operations, and thus improve the security of the updated data for synchronous interaction.
[0217] In one embodiment, before transmitting the updated data through the data interaction chain based on the first information in response to receiving the first information, the method for updating data synchronization detection further includes steps S310 - S350, as Figure 7 shown.
[0218] S310: When it is detected that the third database does not include data corresponding to the received second information, obtain updated data from the fourth database.
[0219] Among them, the second information represents the expected demand information, that is, the problems that the user needs the database to process. The expected demand information is used to update the database, and the data includes updated data.
[0220] In this embodiment, it is detected whether the third database includes data corresponding to the second information according to the received second information. When it is detected that the third database does not include data corresponding to the received second information, obtain updated data from the fourth database.
[0221] In one embodiment, a Structured Query Language (SQL) query method can be used to determine whether the third database includes data corresponding to the second information.
[0222] S320: Use the third database to receive the updated data to obtain the first database.
[0223] In this embodiment, after obtaining the updated data, the third database can be used to receive the updated data to obtain the first database.
[0224] The step process of the embodiment of the present application uses the third database to receive the updated data to obtain the first database, which is equivalent to updating the data in the third database. It can be understood that the prerequisite for the database to perform updated data synchronization and interaction is that the database has been updated. Therefore, by updating the third database to obtain the first database, the subsequent first database and the second database can perform updated data synchronization and interaction.
[0225] S330: Classify the source data in the fourth database according to data characteristics to obtain classified source data.
[0226] Among them, the source data of the fourth database represents part of the data in the fourth database. The acquisition methods of the source data include but are not limited to methods such as sensor data collection, questionnaires, transaction records, web crawlers, and log files.
[0227] In this embodiment, the source data in the fourth database can be classified according to data characteristics to obtain classified source data.
[0228] In one embodiment, the source data in the fourth database can also be classified according to data characteristics to obtain initial classified source data, and then the data structure of the initial classified source data is converted according to a preset data structure to obtain classified source data. In this embodiment, by converting the data structure of the initial classified source data, it is used to keep the source data and the structure data consistent, and it is determined to reduce the occurrence of errors during the data comparison process.
[0229] S340: In the case where it is detected that the classified source data is inconsistent with the corresponding structure data in the fourth database, the classified source data and the structure data are merged to obtain a second database.
[0230] In this embodiment, after obtaining the classified source data, the consistency between the classified source data and the structure data in the fourth database is detected. In the case where it is detected that the classified source data is inconsistent with the corresponding structure data in the fourth database, the classified source data and the structure data are merged to obtain a second database.
[0231] In one embodiment, in the case where it is detected that the classified source data is inconsistent with the corresponding structure data in the fourth database, the classified source data and the structure data can be merged to generate an updated feature database, the source data is classified to generate multiple updated feature databases, and then each updated feature database is merged to obtain a second database.
[0232] In one embodiment, in the case where it is detected that the classified source data is consistent with the corresponding structure data in the fourth database, the classified source data is deleted.
[0233] The step process of the embodiment of the present application obtains a second database by merging the classified source data and the structure data, which is equivalent to updating the fourth database to obtain the second database.
[0234] S350: Connect the first database and the second database to obtain a synchronous distributed database.
[0235] In this embodiment, after obtaining the first database and the second database, the first database and the second database can be combined to obtain a synchronous distributed database.
[0236] In one embodiment, the first database and the second database can be generated into corresponding first nodes and second nodes, and the first node and the second node are sequentially connected through a data interaction chain to obtain a synchronous distributed database.
[0237] The embodiment of the present application can obtain the first database and the second database by receiving or merging the data in the third database and the fourth database, thereby obtaining a synchronous distributed database, which is convenient for subsequent update data synchronization interaction based on the synchronous distributed database.
[0238] In one embodiment, before obtaining updated data from the fourth database when it is detected that the third database does not include updated data corresponding to the received second information, the method for detecting updated data synchronization further includes S410 - S450, as Figure 8 shown.
[0239] S410: Receive third information.
[0240] Among them, the third information includes target data characteristics, the third information represents user demand information, and the target data characteristics include data such as numerical data, text - numerical data, full - text data, term data, image data, and audio - video data.
[0241] In this embodiment, the third information can be received.
[0242] S420: Obtain the target data structure and the target data quantity corresponding to the target data characteristics.
[0243] In this embodiment, the target data structure and the target data quantity can be determined according to the target data characteristics.
[0244] S430: Obtain the target feature database corresponding to the target data characteristics from the fourth database.
[0245] In this embodiment, after determining the target data structure and the target data quantity, the target feature database corresponding to the target data characteristics can be obtained from the fourth database.
[0246] Among them, the target data feature library includes feature databases such as numerical databases, text - numerical databases, full - text databases, term databases, image databases, and audio - video databases.
[0247] S440: Obtain the target data corresponding to the target data structure and the target data quantity from the target feature database.
[0248] In this embodiment, after obtaining the target feature database, the target data corresponding to the target data structure and the target data quantity can be obtained from the target feature database.
[0249] Among them, the target data structure can be one or more.
[0250] S450: Generate the third database based on the target data.
[0251] In this embodiment, after obtaining the target data, the third database can be generated according to the target data.
[0252] It can be understood that, in the embodiments of the present application, by receiving the third information and generating the third database according to the target data of the fourth database, the size of the third database is made smaller than the size of the fourth database. Therefore, the first database generated subsequently based on the third database is smaller and the second database generated based on the fourth database is larger. Since the embodiments of the present application perform update data synchronization interaction between a larger database and a smaller database, avoiding update data synchronization interaction between two larger databases, the latency of the update data synchronization interaction is reduced and the efficiency of the update data synchronization interaction is improved.
[0253] In one embodiment, the method for update data synchronization detection may further include steps S510 - S540, as Figure 9 shown.
[0254] S510: When the difference between the actual transmission speed and the preset transmission speed is greater than the preset speed threshold, obtain the update data by using the fifth database.
[0255] Wherein, the fifth database represents the database for obtaining the update data, and the fifth database includes the first database or the second database.
[0256] In this embodiment, if it is detected that the difference between the actual transmission speed and the preset transmission speed is greater than the preset speed threshold, the update data can be obtained by using the fifth database.
[0257] S520: Based on the fifth database, the characteristic data and data structure corresponding to the update data, map the update data to obtain the target transmission update data.
[0258] In this embodiment, after the fifth database obtains the update data, the update data can be mapped to obtain the target transmission update data according to the fifth database, the characteristic data and data structure corresponding to the update data.
[0259] In one embodiment, after the fifth database obtains the update data, the update data can be mapped into the characteristic database corresponding to the data structure according to the characteristic data and data structure corresponding to the update data to obtain the target transmission update data.
[0260] S530: Detect the consistency between the data characteristics and data structure corresponding to the target transmission update data and the data characteristic library and data structure corresponding to the update data, and detect the consistency between the value of the target transmission update data and the value of the update data.
[0261] In this embodiment, after obtaining the target transmission update data, the consistency between the data characteristics and data structure corresponding to the target transmission update data and the data characteristic library and data structure corresponding to the update data can be detected, and the consistency between the value of the target transmission update data and the value of the update data can be detected.
[0262] S540: When it is detected that the data features and data structure corresponding to the target transmission update data are consistent with the data feature library and data structure corresponding to the update data, and the value of the target transmission update data is consistent with the value of the update data, it is determined that the fifth database is successfully updated.
[0263] In this embodiment, if it is detected that the data features and data structure corresponding to the target transmission update data are consistent with the data feature library and data structure corresponding to the update data, and the value of the target transmission update data is consistent with the value of the update data, it can be determined that the fifth database is successfully updated.
[0264] In the embodiment of the present application, when the database receives the update data, the update data is detected based on the data features and data structure, which can improve the consistency of the update data synchronization interaction and reduce the probability of data unavailability or data corruption.
[0265] In one embodiment, the method for update data synchronization detection may further include step S550 and step S560, as Figure 10 shown.
[0266] S550: When it is detected that the data features and data structure corresponding to the target transmission update data are inconsistent with the data feature library and data structure corresponding to the update data, or the value of the target transmission update data is inconsistent with the value of the update data, obtain the permission list from the preset permission list database.
[0267] Among them, the preset permission list database represents the database for managing the permission list, and the permission list is used to manage the permission accounts for users to access the database.
[0268] In this embodiment, if it is detected that the data features and data structure corresponding to the target transmission update data are inconsistent with the data feature library and data structure corresponding to the update data, or it is detected that the value of the target transmission update data is inconsistent with the value of the update data, the permission list can be obtained from the preset permission list database.
[0269] S560: Modify the permission code corresponding to the permission list so that the data features and data structure corresponding to the target transmission update data are consistent with the data feature library and data structure corresponding to the update data, and the value of the target transmission update data is consistent with the value of the update data.
[0270] In this embodiment, after obtaining the permission list, the permission code corresponding to the permission list can be modified so that the data features and data structure corresponding to the target transmission update data are consistent with the data feature library and data structure corresponding to the update data, and the value of the target transmission update data is consistent with the value of the update data.
[0271] By modifying the permission list in the embodiments of the present application, the consistency between the target transmission of updated data and the updated data can be improved, thereby reducing the probability of data unavailability or data corruption.
[0272] In one embodiment, modifying the permission code corresponding to the permission list may include steps S561 - S563, as Figure 11 shown.
[0273] S561: Modify the permission code corresponding to the permission list and detect whether there is an access by an abnormal permission account.
[0274] In this embodiment, the permission code corresponding to the permission list can be modified, and it is detected whether there is an access by an abnormal permission account.
[0275] S562: Based on the abnormal permission account, generate an abnormal permission list in the case of detecting an access by an abnormal permission account.
[0276] In this embodiment, if it is detected that there is an access by an abnormal account, an abnormal permission list can be generated according to the abnormal permission account.
[0277] S563: Generate an alarm message according to the abnormal permission list.
[0278] In this embodiment, after generating the abnormal permission list, an alarm message can be generated according to the abnormal permission list to notify the user to perform corresponding processing.
[0279] In one embodiment, the user can perform an inhibition process on the abnormal permission list based on the alarm signal to prevent accessing the database.
[0280] By modifying the permission code corresponding to the permission list in the embodiments of the present application, generating an abnormal permission list and giving an alarm, the security of the database can be improved.
[0281] As Figure 12 shown, the embodiments of the present application further provide a device 1200 for detecting the synchronization of updated data. The device 1200 for detecting the synchronization of updated data includes:
[0282] An acquisition module 1201, configured to obtain a first preset transmission time and a first actual transmission time when it is detected that there is intrusion data during the process of synchronizing the data of a first database and a second database in a distributed database through a data interaction chain. The first preset transmission time represents the preset transmission time for the updated data in the synchronized distributed database to reach an intermediate node, and the first actual transmission time represents the actual transmission time for the updated data to reach the intermediate node. The intermediate node is set at the midpoint position of the data interaction chain;
[0283] A comparison module 1202, configured to compare the difference between a first preset transmission time and a first actual transmission time with a preset value to obtain a first comparison result;
[0284] A determination module 1203, configured to determine that there is intrusion data in a target database according to the first comparison result, where the target database includes a first database or a second database;
[0285] An acquisition module 1201 is further configured to obtain an interception interval corresponding to the target database according to the target database;
[0286] A creation module 1204, configured to create a corresponding number of interception nodes in the target database for intercepting intrusion data according to the interception interval.
[0287] In one embodiment, the determination module 203 is specifically configured to:
[0288] When the first comparison result indicates that the difference is equal to the preset value, it is determined that there is intrusion data in the second database.
[0289] In one embodiment, the comparison module 1202 is specifically configured to:
[0290] When the first comparison result indicates that the difference is not equal to the preset value, compare the difference with a target difference to obtain a second comparison result; the target difference represents the difference between a second preset transmission time and a second actual transmission time, the second preset transmission time represents the preset transmission time for the updated data to pass through the data interaction chain throughout the process, and the second actual transmission speed represents the actual transmission time for the updated data to pass through the data interaction chain throughout the process;
[0291] According to the second comparison result, it is determined that there is intrusion data in the target database.
[0292] In one embodiment, the determination module 203 is specifically configured to:
[0293] When the second comparison result indicates that the absolute value of the difference is equal to the target difference, it is determined that there is intrusion data in the first database;
[0294] When the second comparison result indicates that the absolute value of the difference is less than the target difference, it is determined that there is intrusion data in the second database.
[0295] In one embodiment, the acquisition module 1201 is specifically configured to:
[0296] Obtain a second preset transmission time and a second actual transmission time, where the second preset transmission time represents the preset transmission time for the updated data to pass through the data interaction chain throughout the process, and the second actual transmission speed represents the actual transmission time for the updated data to pass through the data interaction chain throughout the process;
[0297] Calculate the difference between the second preset transmission time and the second actual transmission time to obtain a target difference;
[0298] Determine an interception interval according to the weight coefficient, difference, and target difference corresponding to the target database.
[0299] In one embodiment, the determining module 203 is specifically configured to:
[0300] When the target database represents the first database, determine a first weight coefficient and a second weight coefficient;
[0301] Add the difference between the target difference of each data interaction chain and the absolute value of the difference to obtain a first data;
[0302] Multiply the first data by the first weight coefficient to obtain a second data;
[0303] Add the second data and the product of the difference and the second weight coefficient to obtain a third data;
[0304] Determine the value obtained by dividing a preset target value by the third data as the interception interval corresponding to the first database;
[0305] When the target database represents the second database, determine a third weight coefficient and a fourth weight coefficient;
[0306] Add the absolute values of the differences of each data interaction chain to obtain a fourth data;
[0307] Multiply the fourth data by the third weight coefficient to obtain a fifth data;
[0308] Add the fifth data and the product of the target difference and the fourth weight coefficient to obtain a sixth data;
[0309] Determine the value obtained by dividing the target value by the sixth data as the interception interval corresponding to the second database.
[0310] In one embodiment, the device 1200 for updating data synchronization detection further includes a transmission module, and the transmission module is configured to, in response to receiving a first message, transmit updated data through a data interaction chain based on the first message, where the first message includes a preset transmission speed and a transmission start time;
[0311] Obtain a transmission end time corresponding to the updated data;
[0312] Obtain the transmission path length of the data interaction chain;
[0313] Determine an actual transmission speed according to the ratio of the transmission path length to the difference between the transmission end time and the transmission start time;
[0314] When the difference between the actual transmission speed and the preset transmission speed is less than or equal to the preset speed threshold, it is determined that there is intrusion data.
[0315] In one embodiment, the obtaining module 1201 is specifically configured to:
[0316] When it is detected that the third database does not include the data corresponding to the received second information, obtain updated data from the fourth database, and the data includes the updated data;
[0317] Use the third database to receive the updated data to obtain the first database;
[0318] Classify the source data in the fourth database according to the data characteristics to obtain classified source data;
[0319] When it is detected that the classified source data is inconsistent with the corresponding structure data in the fourth database, merge the classified source data and the structure data to obtain the second database;
[0320] Connect the first database and the second database to obtain a synchronized distributed database.
[0321] In one embodiment, the device 1200 for updating data synchronization further includes a receiving module, and the receiving module is configured to receive third information, and the third information includes target data characteristics;
[0322] Obtain the target data structure and the target data quantity corresponding to the target data characteristics;
[0323] Obtain the target feature database corresponding to the target data characteristics from the fourth database;
[0324] Obtain the target data corresponding to the target data structure and the target data quantity from the target feature database;
[0325] Generate a third database based on the target data.
[0326] In one embodiment, the obtaining module 1201 is specifically configured to:
[0327] When the difference between the actual transmission speed and the preset transmission speed is greater than the preset speed threshold, obtain updated data by using the fifth database, where the fifth database represents the database for obtaining updated data, and the fifth database includes the first database or the second database;
[0328] Based on the characteristic data and the data structure corresponding to the fifth database and the updated data, map the updated data to obtain target transmission updated data;
[0329] Detect the consistency between the data features and data structure corresponding to the target transmission update data and the data feature library and data structure corresponding to the update data, and detect the consistency between the numerical value of the target transmission update data and the numerical value of the update data;
[0330] When it is detected that the data features and data structure corresponding to the target transmission update data are consistent with the data feature library and data structure corresponding to the update data, and the numerical value of the target transmission update data is consistent with the numerical value of the update data, it is determined that the fifth database is successfully updated.
[0331] In one embodiment, the obtaining module 1201 is specifically configured to:
[0332] When it is detected that the data features and data structure corresponding to the target transmission update data are inconsistent with the data feature library and data structure corresponding to the update data, or the numerical value of the target transmission update data is inconsistent with the numerical value of the update data, obtain a list of permissions from the preset list of authorized names database;
[0333] Modify the permission codes corresponding to the list of permissions so that the data features and data structure corresponding to the target transmission update data are consistent with the data feature library and data structure corresponding to the update data, and the numerical value of the target transmission update data is consistent with the numerical value of the update data.
[0334] In one embodiment, the device 1200 for detecting the synchronization of update data further includes a modification module, and the modification module is used to modify the permission codes corresponding to the list of permissions and detect whether there is an access by an abnormal permission account;
[0335] When an access by an abnormal permission account is detected, generate a list of abnormal permissions based on the abnormal permission account;
[0336] Generate an alarm message according to the list of abnormal permissions.
[0337] Figure 12 Each module / unit in the shown device has the function of implementing Figures 1 to 11 each step executed by the application system in, and can achieve its corresponding technical effects. For the sake of brief description, it will not be repeated here.
[0338] Figure 13 The hardware structure diagram of the update data synchronization detection provided by the embodiment of the present disclosure is shown.
[0339] In the device for detecting the synchronization of update data, it may include a processor 1301 and a memory 1302 storing computer program instructions.
[0340] Specifically, the above-mentioned processor 1301 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured as one or more integrated circuits for implementing the embodiments of the present application.
[0341] The memory 1302 may include a mass memory for data or instructions. By way of example and not limitation, the memory 1302 may include a Hard Disk Drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. In a suitable case, the memory 1302 may include removable or non-removable (or fixed) media. In a suitable case, the memory 1302 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 1302 is a non-volatile solid-state memory.
[0342] The memory 1302 may include a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk storage media device, an optical storage media device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0343] The processor 1301 reads and executes the computer program instructions stored in the memory 1302 to implement any one of the methods for updating data synchronization detection in the above embodiments.
[0344] In one example, the device for updating data synchronization detection may further include a communication interface 1303 and a bus 1304. Among them, as Figure 13 shown, the processor 1301, the memory 1302, and the communication interface 1303 are connected through the bus 1304 to complete communication with each other.
[0345] The communication interface 1303 is mainly used to implement communication between various modules, devices, units, and / or devices in the embodiments of the present application.
[0346] The bus 1304 includes hardware, software, or both, and couples the components of the online data flow metering device to each other. By way of example and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 1304 may include one or more buses. Although embodiments of the present invention describe and illustrate specific buses, the present invention contemplates any suitable bus or interconnect. Additionally, in combination with the method for updating data synchronization detection in the above embodiments, embodiments of the present application also provide a computer storage medium to implement. Computer program instructions are stored on the computer storage medium; when the computer program instructions are executed by a processor, any one of the methods for updating data synchronization detection in the above embodiments is implemented.
[0347] Embodiments of the present application also provide a computer program product, including a computer program, which when executed by a processor, implements any one of the methods for updating data synchronization detection in the above embodiments.
[0348] It should be clear that the present invention is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present invention is not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present invention.
[0349] The functional blocks shown in the above structural block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, and so on. When implemented in software, the elements of the present invention are programs or code segments for performing the required tasks. The program or code segment can be stored in a machine-readable medium or transmitted via a data signal carried in a carrier wave on a transmission medium or a communication link. A "machine-readable medium" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (ROM), flash memory, erasable read-only memory (EROM), floppy disks, compact disc read-only memory (CD-ROM), optical discs, hard disks, fiber optic media, radio frequency (RF) links, and so on. The code segment can be downloaded via a computer network such as the Internet, an intranet, and so on.
[0350] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be executed in the order mentioned in the embodiments, can be different from the order in the embodiments, or several steps can be executed simultaneously.
[0351] Aspects of the present disclosure have been described above with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block in the flowcharts and / or block diagrams, and the combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the functions / actions specified in one or more blocks of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each block in the block diagram and / or flowchart, and the combinations of blocks in the block diagram and / or flowchart, can also be implemented by dedicated hardware for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0352] The above are only specific embodiments of the present invention. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of the present invention.
Claims
1. A method for synchronous detection of update data, characterized in that: include: In the process of synchronizing data of a first database and a second database in a distributed database through a data interaction chain, when the presence of intrusion data is detected, a first preset transmission time and a first actual transmission time are obtained, wherein the first preset transmission time represents the preset transmission time for the updated data in the synchronized distributed database to reach the intermediate node, and the first actual transmission time represents the actual transmission time for the updated data to reach the intermediate node, and the intermediate node is set at the midpoint of the data interaction chain; Comparing a difference between the first preset transmission time and the first actual transmission time with a preset value to obtain a first comparison result; Determine, according to the first comparison result, that the intrusion data exists in a target database, where the target database includes the first database or the second database; According to the target database, obtaining an interception interval corresponding to the target database; An interception node having a number corresponding to the interception interval is created in the target database for intercepting the intrusion data.
2. The method according to claim 1, characterized in that The target database includes a second database; and determining, based on the first comparison result, that the target database contains the intrusion data includes: When the first comparison result indicates that the difference is equal to the preset value, it is determined that the intrusion data exists in the second database.
3. The method according to claim 1, characterized in that The method further comprises: In the case where the first comparison result indicates that the difference is not equal to the preset value, the difference is compared with the target difference to obtain a second comparison result; the target difference indicates the difference between a second preset transmission time and a second actual transmission time, the second preset transmission time indicates the preset transmission time for the update data to pass through the data interaction link in its entirety, and the second actual transmission time indicates the actual transmission time for the update data to pass through the data interaction link in its entirety; According to the second comparison result, it is determined that the intrusion data exists in the target database.
4. The method according to claim 3, characterized in that The target database includes a first database and a second database; and determining, according to the second comparison result, that the target database contains the intrusion data includes: When the second comparison result indicates that the absolute value of the difference is equal to the target difference, determining that the intrusion data exists in the first database; When the second comparison result indicates that the absolute value of the difference is smaller than the target difference, it is determined that the intrusion data exists in the second database.
5. The method according to claim 1, characterized in that The acquiring, according to the target database, an interception interval corresponding to the target database comprises: Obtaining a second preset transmission time and a second actual transmission time, wherein the second preset transmission time represents a preset transmission time for the update data to pass through the data interaction link, and the second actual transmission time represents an actual transmission time for the update data to pass through the data interaction link; Calculating a difference between the second preset transmission time and the second actual transmission time to obtain a target difference; The interception interval is determined according to the weight coefficient corresponding to the target database, the difference and the target difference.
6. The method according to claim 5, characterized in that The weight coefficients include a first weight coefficient, a second weight coefficient, a third weight coefficient, and a fourth weight coefficient, and determining the interception interval according to the weight coefficients corresponding to the target database, the difference, and the target difference includes: In a case where the target database represents the first database, determining the first weight coefficient and the second weight coefficient; Add the difference between the target difference value and the absolute value of the difference value of each data interaction chain to obtain first data; Multiplying the first data by the first weight coefficient to obtain second data; Adding the second data and the product of the difference and the second weight coefficient to obtain third data; A value obtained by dividing a preset target value by the third data is determined as an interception interval corresponding to the first database; In a case where the target database represents the second database, determining the third weight coefficient and the fourth weight coefficient; Adding the absolute values of the differences of each data interaction chain to obtain fourth data; Multiplying the fourth data by the third weight coefficient to obtain fifth data; Adding the fifth data and the product of the target difference and the fourth weight coefficient to obtain sixth data; A value obtained by dividing the target value by the sixth data is determined as an interception interval corresponding to the second database.
7. The method according to claim 1, characterized in that In the process of synchronizing the data of the first database and the second database in the distributed database through the data interaction chain, in the case where the presence of intrusion data is detected, before obtaining the first preset transmission time and the first actual transmission time, the method further includes: In response to receiving first information, transmitting the update data through the data interaction link based on the first information, the first information including a preset transmission speed and a transmission start time; Obtaining a transmission end time corresponding to the update data; Obtaining the transmission path length of the data interaction link; determining an actual transmission speed according to a ratio of the transmission path length to a difference between the transmission end time and the transmission start time; When the difference between the actual transmission speed and the preset transmission speed is less than or equal to a preset speed threshold, it is determined that intrusion data exists.
8. The method according to claim 7, characterized in that Before transmitting the update data through the data interaction link based on the first information in response to receiving the first information, the method further includes: acquiring the update data from a fourth database, the data including the update data, in the case where it is detected that the third database does not include data corresponding to the received second information; Using the third database to receive the update data, to obtain the first database; Classifying the source data in the fourth database according to data features to obtain classified source data; In the case where it is detected that the classification source data is inconsistent with the corresponding structure data in the fourth database, merging the classification source data with the structure data to obtain the second database; The first database and the second database are connected to obtain the synchronous distributed database.
9. The method according to claim 8, characterized in that Before acquiring the update data from the fourth database in the case where it is detected that the third database does not include the update data corresponding to the received second information, the method further includes: receiving third information, wherein the third information includes target data characteristics; Acquire a target data structure and a target data quantity corresponding to the target data feature; Acquire a target feature database corresponding to the target data feature from the fourth database; Acquire target data corresponding to the target data structure and the target data quantity from the target feature database; The third database is generated based on the target data.
10. The method according to any one of claims 7 to 9, characterized in that: The method further comprises: When the difference between the actual transmission speed and the preset transmission speed is greater than the preset speed threshold, obtaining update data using a fifth database, wherein the fifth database represents a database for obtaining the update data, and the fifth database includes the first database or the second database; Based on the fifth database and the characteristic data and data structure corresponding to the update data, mapping the update data to obtain target transmission update data; Detecting the consistency between the data features and data structure corresponding to the target transmission update data and the data feature library and data structure corresponding to the update data, and detecting the consistency between the value of the target transmission update data and the value of the update data; When it is detected that the data features and data structures corresponding to the target transmission update data are consistent with the data feature library and data structure corresponding to the update data, and the value of the target transmission update data is consistent with the value of the update data, it is determined that the fifth database is updated successfully.
11. The method according to claim 10, characterized in that The method further comprises: When it is detected that the data features and data structure corresponding to the target transmission update data are inconsistent with the data feature library and data structure corresponding to the update data, or the value of the target transmission update data is inconsistent with the value of the update data, obtaining the permission list from the preset permission list database; The permission code corresponding to the permission list is modified so that the data characteristics and data structure corresponding to the target transmission update data are consistent with the data characteristic library and data structure corresponding to the update data, and the value of the target transmission update data is consistent with the value of the update data.
12. The method according to claim 11, characterized in that The modifying of the permission code corresponding to the permission list includes: Modify the permission code corresponding to the permission list and detect whether there is any abnormal permission account access; In the case where access by the abnormal permission account is detected, generating an abnormal permission list based on the abnormal permission account; Generate alarm information based on the abnormal permission list.
13. A device for synchronous detection of update data, characterized in that: The device comprises: An acquisition module, wherein the acquisition module is used to acquire a first preset transmission time and a first actual transmission time when intrusion data is detected during the process of synchronizing data of a first database and a second database in a distributed database through a data interaction chain, wherein the first preset transmission time represents a preset transmission time for updated data in the synchronized distributed database to reach an intermediate node, and the first actual transmission time represents an actual transmission time for the updated data to reach the intermediate node, and the intermediate node is set at a midpoint of the data interaction chain; A comparison module, the comparison module is used to compare the difference between the first preset transmission time and the first actual transmission time with a preset value to obtain a first comparison result; a determination module, the determination module being used to determine, according to the first comparison result, that the intrusion data exists in a target database, the target database including the first database or the second database; The acquisition module is further used to acquire an interception interval corresponding to the target database according to the target database; A creation module is used to create a number of interception nodes corresponding to the interception interval in the target database for intercepting the intrusion data.
14. A device for updating data synchronization detection, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method for synchronous detection of update data according to any one of claims 1 to 12 is implemented.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method for synchronous detection of update data according to any one of claims 1 to 12 is implemented.
16. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the method for synchronous detection of update data as described in any one of claims 1 to 12.