Data audit method, device, electronic device and computer readable storage medium
By using the corresponding relationship between the identification field and the primary key in the remote multi-active architecture, and adjusting the value of the identification field to determine the unupdated data, the problem of data center business interruption and storage pressure is solved, and the efficiency of data auditing and resource saving are achieved.
Patent Information
- Application Number
- CN202011121714.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-19
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2040-10-19
AI Technical Summary
In a remote multi-active architecture, existing data audit methods require stopping data center services or increasing storage pressure, and cannot effectively detect data consistency.
By obtaining the value range of the identification field and the corresponding primary key of the data to be audited, adjusting the value of the identification field when detecting data updates, determining that the data has not been updated, and sending the value range to the second data center to determine the second data to be audited, combined with the first Perform data audit on the data to be audited, and use the corresponding relationship between the primary key and the identification field to determine the unupdated data.
It enables data auditing without stopping the business when data changes and without increasing storage pressure, saving storage resources and ensuring data consistency.
Smart Images

Figure CN112306999B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more specifically, to a data auditing method, device, electronic device, and computer-readable storage medium. Background Art
[0002] With the development of the Internet industry, the application of multi-site active-active architecture is becoming more and more common. In multi-site active-active architecture, data auditing is often required to detect whether the data between data centers is consistent. However, during data auditing, the audited data may change, which will cause the data audit to fail to proceed normally. Therefore, we need to adopt a special method to perform data auditing.
[0003] At present, one way to audit data is to stop the business of each data center and obtain the data to be audited from each data center for data audit. Obviously, this method will cause the business of the data center to be unable to operate normally; another way is to copy a copy of the data to be audited in each data center and use the copied data for data audit, but this method will cause storage pressure on the equipment and waste storage resources. Summary of the invention
[0004] The first aspect of the present application provides a data audit method, comprising:
[0005] Obtaining a value range of the identification field to be audited, and determining a plurality of first values of the identification field within the value range;
[0006] Determine primary keys corresponding to the plurality of first values, and obtain data corresponding to each primary key;
[0007] When it is detected that any data is updated, at least one unupdated data in the data is determined based on the primary key and the first values corresponding to the primary keys, and the first data to be audited is obtained based on the at least one unupdated data, the target primary key corresponding to each unupdated data, and the first values corresponding to each target primary key;
[0008] Sending the value range to the second data center so that the second data center can determine the second data to be audited based on the value range;
[0009] The second data to be audited is used for data audit in combination with the first data to be audited. The second data to be audited includes a plurality of second values of the identification field within the value range, a primary key corresponding to each second value, and corresponding data.
[0010] Optionally, when it is detected that any data is updated, determining at least one unupdated data in the data based on the primary key and the first numerical value respectively corresponding to the primary key includes:
[0011] When it is detected that any data is updated, a first value of an identification field corresponding to the any data is adjusted through a trigger;
[0012] If the adjusted first value is outside the value range, determining that at least one of the first values is not an updated first value;
[0013] A target primary key corresponding to at least one unupdated first value is determined, and at least one unupdated data is determined based on the target primary key.
[0014] Optionally, before obtaining the value range of the identification field to be audited, the method further includes:
[0015] Create a time field and use it as an identification field;
[0016] Get data operation instructions;
[0017] Based on the acquired data operation instruction, a plurality of primary keys, data respectively corresponding to the plurality of primary keys, and first values of the respectively corresponding identification fields are obtained.
[0018] Optionally, if the data operation instruction includes a data update instruction, obtaining multiple primary keys, data corresponding to the multiple primary keys respectively, and first values of the corresponding identification fields respectively based on the acquired data operation instruction includes:
[0019] Create multiple primary keys, the initial data corresponding to the multiple primary keys, and the initial time values corresponding to the time fields;
[0020] Based on the data update instruction, the initial data corresponding to the multiple primary keys are updated to obtain the data corresponding to the multiple primary keys;
[0021] The initial time value corresponding to each primary key is adjusted based on the update time of the initial data corresponding to each primary key to obtain first numerical values corresponding to the plurality of primary keys respectively.
[0022] Optionally, if the data operation instruction includes a data creation instruction, obtaining multiple primary keys, data corresponding to the multiple primary keys respectively, and first values of the corresponding identification fields respectively based on the acquired data operation instruction includes:
[0023] Based on the data creation instruction, create multiple primary keys and the data corresponding to the multiple primary keys;
[0024] The creation time of the data corresponding to each primary key is used as the first value corresponding to the primary key.
[0025] Optionally, if the data operation instruction includes a data deletion instruction, obtaining multiple primary keys, data corresponding to the multiple primary keys, and first values of the corresponding identification fields based on the acquired data operation instruction includes:
[0026] Create multiple initial primary keys, data corresponding to the multiple initial primary keys, and initial time values corresponding to the time fields;
[0027] Based on the data deletion instruction, part of the data and the primary keys and initial time values corresponding to the part of the data are deleted to obtain multiple primary keys, data corresponding to the multiple primary keys, and corresponding first values.
[0028] A second aspect of the present application provides a data audit method, comprising:
[0029] Receiving the value range to be audited sent by the first data center;
[0030] Based on the value range, second data to be audited is determined; the second data to be audited includes a plurality of second values of the identification field within the value range, a primary key corresponding to each second value, and corresponding data;
[0031] The second data to be audited is used to perform data audit in combination with the first data to be audited;
[0032] The first data to be audited is determined by the first data center to be multiple first values of the identification field within the value range and the primary keys corresponding to the first values. After obtaining the data corresponding to the primary keys, when it is detected that any data is updated, at least one non-updated data is determined based on the primary key and the first values corresponding to the primary key, and the data is obtained based on the at least one non-updated data, the target primary keys corresponding to the non-updated data, and the first values corresponding to the target primary keys.
[0033] Optionally, after determining the second data to be audited based on the value range, the method further includes:
[0034] Receiving first data to be audited sent by the first data center;
[0035] Determine a first cyclic redundancy check code of the first data to be audited and a second cyclic redundancy check code of the second data to be audited;
[0036] If the first cyclic redundancy check code and the second cyclic redundancy check code are the same, it is determined that the first data to be audited and the second data to be audited are synchronized;
[0037] If the first cyclic redundancy check code is different from the second cyclic redundancy check code, the difference data between the first data to be audited and the second data to be audited is determined.
[0038] A third aspect of the present application provides a data auditing device, comprising:
[0039] A first acquisition module, used to acquire a value range of the identification field to be audited, and determine a plurality of first values of the identification field within the value range;
[0040] A first determination module is used to determine primary keys corresponding to the plurality of first values, and obtain data corresponding to each primary key;
[0041] A second determination module is used to determine at least one unupdated data in the data based on the primary key and the first numerical value corresponding to each primary key when detecting that any data is updated, and obtain the first data to be audited based on the at least one unupdated data, the target primary key corresponding to each unupdated data, and the first numerical value corresponding to each target primary key;
[0042] A first sending module, used for sending the value range to the second data center, so that the second data center can determine the second data to be audited based on the value range;
[0043] The second data to be audited is used for data audit in combination with the first data to be audited. The second data to be audited includes a plurality of second values of the identification field within the value range, a primary key corresponding to each second value, and corresponding data.
[0044] Optionally, the second determining module is specifically configured to:
[0045] When it is detected that any data is updated, a first value of an identification field corresponding to the any data is adjusted through a trigger;
[0046] If the adjusted first value is outside the value range, determining that at least one of the first values is not an updated first value;
[0047] A target primary key corresponding to at least one unupdated first value is determined, and at least one unupdated data is determined based on the target primary key.
[0048] Optionally, the device further comprises a creation module, a second acquisition module and a generation module; before the first acquisition module acquires the value range of the identification field to be audited;
[0049] Create a module to create a time field and use the time field as an identification field;
[0050] A second acquisition module, used for acquiring data operation instructions;
[0051] The generation module is used to obtain multiple primary keys, data corresponding to the multiple primary keys respectively, and first values of the corresponding identification fields respectively based on the acquired data operation instructions.
[0052] Optionally, if the data operation instruction includes a data update instruction, a module is generated, specifically for:
[0053] Create multiple primary keys, the initial data corresponding to the multiple primary keys, and the initial time values corresponding to the time fields;
[0054] Based on the data update instruction, the initial data corresponding to the multiple primary keys are updated to obtain the data corresponding to the multiple primary keys;
[0055] The initial time value corresponding to each primary key is adjusted based on the update time of the initial data corresponding to each primary key to obtain first numerical values corresponding to the plurality of primary keys respectively.
[0056] Optionally, if the data operation instruction includes a data creation instruction, a module is generated, specifically for:
[0057] Based on the data creation instruction, create multiple primary keys and the data corresponding to the multiple primary keys;
[0058] The creation time of the data corresponding to each primary key is used as the first value corresponding to the primary key.
[0059] Optionally, if the data operation instruction includes a data deletion instruction, a module is generated, specifically for:
[0060] Create multiple initial primary keys, data corresponding to the multiple initial primary keys, and initial time values corresponding to the time fields;
[0061] Based on the data deletion instruction, part of the data and the primary keys and initial time values corresponding to the part of the data are deleted to obtain multiple primary keys, data corresponding to the multiple primary keys, and corresponding first values.
[0062] A fourth aspect of the present application provides a data auditing device, the device comprising:
[0063] A first receiving module, used for receiving a value range to be audited sent by the first data center;
[0064] A third determination module is used to determine the second data to be audited based on the value range; the second data to be audited includes a plurality of second values of the identification field within the value range, a primary key corresponding to each second value, and corresponding data;
[0065] The second data to be audited is used to perform data audit in combination with the first data to be audited;
[0066] The first data to be audited is determined by the first data center to be multiple first values of the identification field within the value range and the primary keys corresponding to the first values. After obtaining the data corresponding to the primary keys, when it is detected that any data is updated, at least one non-updated data is determined based on the primary key and the first values corresponding to the primary key, and the data is obtained based on the at least one non-updated data, the target primary keys corresponding to the non-updated data, and the first values corresponding to the target primary keys.
[0067] Optionally, the device further includes a second receiving module and a fourth determining module, a fifth determining module and a sixth determining module;
[0068] After the third determination module determines the second data to be audited based on the value range, the second receiving module is used to receive the first data to be audited sent by the first data center;
[0069] A fourth determination module, used to determine a first cyclic redundancy check code of the first data to be audited and a second cyclic redundancy check code of the second data to be audited;
[0070] a fifth determination module, configured to determine that the first data to be audited and the second data to be audited are synchronized if the first cyclic redundancy check code and the second cyclic redundancy check code are the same;
[0071] The sixth determination module is used to determine the difference data between the first data to be audited and the second data to be audited if the first cyclic redundancy check code and the second cyclic redundancy check code are different.
[0072] In a fifth aspect of an embodiment of the present application, an electronic device is provided, comprising a memory and a processor; a computer program is stored in the memory; and the processor is used to execute the method of the first aspect and its optional implementation manner and the second aspect and any one of its optional implementation manners when running the computer program.
[0073] In the sixth aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method of the first aspect and its optional implementation manner and the second aspect and any one of its optional implementation manners is implemented.
[0074] The beneficial effects of the technical solution provided by this application are:
[0075] In the present application, after obtaining the value range of the identification field to be audited and determining multiple first values of the identification field within the value range, the primary keys corresponding to the respective first values can be determined, and the data corresponding to the respective primary keys can be obtained. The data is the data used for the audit. It can be seen that the data in the present application has a corresponding relationship with both the primary key and the first value. Since the data used for the audit is changing, the data identified by the primary key after the data changes is obviously not the data used for the audit itself. Therefore, when the data changes, the first value of the identification field corresponding to the data in the present application will also change accordingly. Therefore, the present application can use the primary key and the first value of the identification field to jointly identify the data to determine the unupdated data, so that the target primary key corresponding to at least one unupdated data can be determined. The first data to be audited is obtained by using the primary key, at least one unupdated data and the first numerical value corresponding to each primary key. After the value range is sent to the second data center, the second data center can determine the second data to be audited based on the value range, and perform data audit based on the first data to be audited and the second data to be audited. It can be seen that when the data to be audited changes, the primary key and the first numerical value can be used to determine the unupdated data. In this way, no matter how the data to be audited changes, the unupdated data can be determined, that is, the data originally used for the audit. In this way, the data to be audited can be converted from dynamic data to relatively static data. Compared with the existing solutions, data audit can be performed without stopping the business of the data center, and it will not cause storage pressure on the equipment, saving storage resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.
[0077] Figure 1 A schematic diagram of an embodiment of the data audit method of the present application;
[0078] Figure 2 A schematic diagram of a scenario for the data audit method of this application;
[0079] Figure 3 This is another scenario diagram of the data audit method for this application;
[0080] Figure 4 A schematic diagram of another embodiment of the data audit method of the present application;
[0081] Figure 5 A schematic diagram of another embodiment of the data audit method of the present application;
[0082] Figure 6 A structural diagram of a data audit device for this application;
[0083] Figure 7Another structural diagram of the data audit device of this application;
[0084] Figure 8 This is a schematic diagram of the structure of the electronic device of this application. DETAILED DESCRIPTION
[0085] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present invention.
[0086] Those skilled in the art will appreciate that, unless expressly stated otherwise, the singular forms "a", "an", "" and "the" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other elements, or there may be intermediate elements. In addition, "connected" or "coupled" as used herein may include wireless connections or wireless couplings. The term "and / or" as used herein includes all or any unit and all combinations of one or more associated listed items.
[0087] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0088] First, several terms involved in this application are introduced and explained:
[0089] Remote multi-active refers to establishing independent data centers in different cities. Under the remote multi-active architecture, it is necessary to ensure that the data managed by each data center is synchronized. That is, when the data in one data center is updated, the data in the other data center also needs to be updated synchronously. In order to detect whether the data between the two data centers is synchronized, data auditing is often required;
[0090] In the existing data auditing method, the data used for auditing is changing, and the business needs to be stopped or the data needs to be copied in order to perform the data audit normally. This will affect the normal operation of the business, increase the storage pressure of the equipment, and waste equipment resources.
[0091] In order to solve the problems existing in the prior art, the present application proposes a data auditing method, which is specifically executed by the first data center. First of all, it should be noted that the first data center and the second data center are different data centers under the multi-active architecture. The first data center or the second data center can be an electronic device, and the electronic device can specifically be a terminal device or a server.
[0092] The data list of the present application includes multiple primary keys, data corresponding to the multiple primary keys, and values of identification fields corresponding to the multiple primary keys. The number of data corresponding to each primary key is multiple, and the multiple data corresponding to each primary key is presented as a row of data in the data list. At the same time, the data in the data list and the values of the identification fields can be adjusted. The first data center and the second data center both manage the data list and can adjust the data or the values of the identification fields in the data list.
[0093] Based on this, the method of this application specifically includes:
[0094] Step S101, obtaining a value range of an identification field to be audited, and determining a plurality of first values of the identification field within the value range;
[0095] The first data center obtains a value range of the identification field to be audited, and the value range may be preset, so that the first data center can determine a plurality of first values of the identification field in the data list it manages that are within the value range.
[0096] In this embodiment, the multiple first values are specifically two or more first values.
[0097] Step S102, determining primary keys corresponding to the plurality of first values, and acquiring data corresponding to each primary key;
[0098] The first data center may determine primary keys corresponding to the multiple first values respectively. Each first value may correspond to a primary key one by one, or a first value may correspond to two or more primary keys.
[0099] The primary key can uniquely identify a piece of data, and the first data center can obtain the data corresponding to each primary key.
[0100] Step S103: when it is detected that any data is updated, based on the primary key and the first values corresponding to the primary key, at least one unupdated data in the data is determined, and based on the at least one unupdated data, the target primary key corresponding to each unupdated data, and the first values corresponding to each target primary key, the first data to be audited is obtained;
[0101] In this embodiment, when the first data center detects that any data in the data list is updated, the primary key corresponding to the data will not change, but the first value of the identification field corresponding to the data will change synchronously. It can be seen that when the data is updated, the primary key can no longer uniquely identify a row of data. For example, in this implementation, if data is obtained based on the primary key, the obtained data is the updated data, not the data initially prepared for auditing;
[0102] The present application combines the primary key with the first value of the identification field to uniquely identify a piece of data. The first data center can determine at least one unupdated data in the data based on the primary key and the first value corresponding to the primary key. The specific method for determining the unupdated data will be introduced in the following embodiments.
[0103] The first data center may collectively take at least one unupdated data, a target primary key corresponding to each unupdated data, and a first value corresponding to each target primary key as the first data to be audited.
[0104] Step S104: sending the value range to the second data center, so that the second data center can determine the second data to be audited based on the value range;
[0105] The second data to be audited is used for data audit in combination with the first data to be audited. The second data to be audited includes a plurality of second values of the identification field within the value range, a primary key corresponding to each second value, and corresponding data.
[0106] If the second data center also manages the data list, that is, the second data center stores the data list, then the second data center also needs to determine the second data to be audited stored in itself, specifically:
[0107] The first data center can send the value range to the second data center, and the second data center can determine multiple second values of the identification field within the value range based on the value range. The second data center determines the primary keys corresponding to each second value based on the multiple second values, and determines the data corresponding to each primary key based on each primary key. The multiple second values, the primary keys corresponding to each second value, and the corresponding data together form the second data to be audited.
[0108] In this embodiment, the second data to be audited can be audited together with the first data to be audited to detect whether the first data to be audited is consistent with the second data to be audited, thereby determining whether the data between the two data centers are synchronized.
[0109] It can be seen that in this embodiment, after obtaining the value range of the identification field to be audited and determining multiple first values of the identification field within the value range, the primary keys corresponding to the respective first values can be determined, and the data corresponding to the respective primary keys can be obtained. The data is the data used for the audit. It can be seen that the data in the present application has a corresponding relationship with both the primary key and the first value. Since the data used for the audit is changing, the data identified by the primary key after the data changes is obviously not the data used for the audit itself. Therefore, when the data changes, the first value of the identification field corresponding to the data in the present application will also change accordingly. Therefore, the present application can use the primary key and the first value of the identification field to jointly identify the data to determine the unupdated data, so that the target data corresponding to at least one unupdated data can be determined. The first data to be audited is obtained by identifying the primary key, at least one unupdated data and the first numerical value corresponding to each primary key. After the value range is sent to the second data center, the second data center can determine the second data to be audited based on the value range, and perform data audit based on the first data to be audited and the second data to be audited. It can be seen that when the data to be audited changes, the primary key and the first numerical value can be used to determine the unupdated data in the present application. In this way, no matter how the data to be audited changes, the unupdated data can be determined, that is, the data originally used for the audit. In this way, the data to be audited can be converted from dynamic data to relatively static data. Compared with the existing solutions, data audit can be performed without stopping the business of the data center, and it will not cause storage pressure on the equipment, saving storage resources.
[0110] Furthermore, in the embodiment of the present application, the data audit method can be: calculate a first cyclic redundancy check code (CRC32) based on the first data to be audited, calculate a second cyclic redundancy check code based on the second data to be audited, and compare the two cyclic redundancy check codes to perform data audit.
[0111] For any data to be audited, the method of calculating the cyclic redundancy check code is: regard the data to be audited as a chunk, each primary key in the chunk corresponds to a piece of data, and each field of each piece of data in the chunk can be combined to calculate the cyclic redundancy check code of the chunk.
[0112] In this example, data auditing can be performed by different execution entities. There are three possible situations:
[0113] Case A: After the first data center sends the first data to be audited to the second data center, the second data center performs data audit.
[0114] After the first data center sends the first data to be audited to the second data center, the second data center performs data audit based on the first data to be audited and the second data to be audited. This situation is generally applicable to the first data center as the primary data center and the second data center as the secondary data center. The secondary data center refers to a data center that serves as an alternative when the primary data center crashes.
[0115] Case B: After the first data center sends the first cyclic redundancy check code to the second data center, the second data center performs data audit.
[0116] The present application may also be that after the first data center calculates the first cyclic redundancy check code based on the first data to be audited, the first data center sends the first cyclic redundancy check code to the second data center, and after the second data center calculates the second cyclic redundancy check code of the second data to be audited, the data audit is performed based on the first cyclic redundancy check code and the second cyclic redundancy check code. It can be seen that this situation can reduce the amount of data transmission and avoid waste of network resources compared with situation A and situation C.
[0117] Case C: Data audit is performed by third-party equipment.
[0118] The first data center sends the first data to be audited to the third-party device, and the second data center sends the second data to be audited to the third-party device, and the third-party device performs data audit based on the two data to be audited;
[0119] Or one of the first data center and the second data center sends the calculated cyclic redundancy check code corresponding to the data to be audited to the third-party device, and the other data center sends the data to be audited to the third-party device, and the third-party device performs data audit.
[0120] In this embodiment, the third-party device refers to a device other than the first data center and the second data center, and may be an electronic device, such as a terminal device or a server.
[0121] Furthermore, when it is detected in step S103 that any data is updated, at least one unupdated data in the data is determined based on the primary key and the first values respectively corresponding to the primary key, which may specifically include:
[0122] When it is detected that any data is updated, a first value of an identification field corresponding to the any data is adjusted through a trigger;
[0123] If the adjusted first value is outside the value range, determining that at least one of the first values is not an updated first value;
[0124] A target primary key corresponding to at least one unupdated first value is determined, and at least one unupdated data is determined based on the target primary key.
[0125] In this embodiment, the above-mentioned method of determining at least one unupdated data in the data based on the primary key and the first values respectively corresponding to the primary key is specifically:
[0126] When the first data center detects that any data is updated, it can adjust the first value of the identification field corresponding to any data through a trigger, so that the first value of the identification field can be adjusted to outside the above value range. A possible situation of this embodiment is: the identification field is a time field, then the value range of the identification field is the time range, and the first value is the time value. When any data is updated, the current time, that is, the update time of the data, can be used as the time value of the time field. The time value of the existing data in the data list is generally the generation time of the data, and the time range is a time range intercepted from the past time. Obviously, the current time is outside the time range.
[0127] It can be seen that the unupdated first value is still within the value range, so the first data center can determine the unupdated first value from multiple first values, and thus the first data center determines the corresponding target primary key of each unupdated first value, and determines the corresponding unupdated data based on each target primary key, thereby obtaining at least one unupdated data. The unupdated data determined in this way is static data that has not been updated. It can be seen that after any data is updated, the present application can convert the data used for auditing from dynamic data to relatively static data.
[0128] Reference Figure 2 A possible scenario of the present application is: the first data center determines that the value range of the data audit time field is T1 to T3, and the primary keys (PK) corresponding to T1 to T3 are 1, 2, 3 and 4 respectively. The first data center obtains the data and time value of the time field (MT) when the primary keys are 1, 2, 3 and 4 respectively. When PK=1, it includes data 10 and A, and the time value is T1. When PK=2, it includes data 15 and C, and the time value is T2. When PK=3, it includes data 20 and A, and the time value is T2. When PK=4, it includes data 15 and C, and the time value is T3. When the value of the C1 field in the data with PK=2 changes from 15 to 10, the current time of the device, that is, the time T4 when the data is updated, can be used as the time value of MT, and the time value of MT can be changed from T2 to T4.
[0129] Times T1 to T3 are generally the times when the corresponding data are generated, and times T1 to T3 are the times before the current time. T4 is outside the value range T1 to T3. After the data is updated, the first data center audits the data with PK 1, 3 and 4, and the data with PK 2 can be audited in the next cycle. It can be seen that when the data used for auditing changes, only the unchanged data can be audited, so that the dynamic data to be audited can be converted into relatively static data.
[0130] If the data of the two data centers during the period from T1 to T3 are synchronized, it means that the incremental change data during the period from T2 to T3 are equal.
[0131] Furthermore, in this embodiment, before step S101 obtains the value range of the identification field to be audited, the method may further include:
[0132] Create a time field and use it as an identification field;
[0133] Get data operation instructions;
[0134] Based on the acquired data operation instruction, a plurality of primary keys, data respectively corresponding to the plurality of primary keys, and first values of the respectively corresponding identification fields are obtained.
[0135] The present application may create a time field, and the field type of the time field may be a millisecond timestamp. Meanwhile, the first data center uses the time field as the above-mentioned identification field.
[0136] The first data center may also obtain a data operation instruction, and based on the obtained data operation instruction, the first data center may perform a corresponding operation to generate a plurality of first values within the above value range, primary keys corresponding to the plurality of first values, and data corresponding to the plurality of primary keys;
[0137] In this embodiment, similarly, the first value of the identification field is the time value of the time field. The data operation instruction may be at least one of a data creation instruction, a data update instruction, and a data deletion instruction. Specifically:
[0138] One possible situation is that if the data operation instruction includes a data update instruction, then obtaining multiple primary keys, data corresponding to the multiple primary keys respectively, and first values of the corresponding identification fields respectively based on the acquired data operation instruction may include:
[0139] Create multiple primary keys, the initial data corresponding to the multiple primary keys, and the initial time values corresponding to the time fields;
[0140] Based on the data update instruction, the initial data corresponding to the multiple primary keys are updated to obtain the data corresponding to the multiple primary keys;
[0141] The initial time value corresponding to each primary key is adjusted based on the update time of the initial data corresponding to each primary key to obtain first numerical values corresponding to the plurality of primary keys respectively.
[0142] In this embodiment, the first data center may create multiple primary keys, initial data corresponding to each primary key, and use the creation time of the initial data corresponding to each primary key as the initial time value of the time field corresponding to the primary key;
[0143] Based on the data update instruction, the first data center may update all or part of the initial data corresponding to the multiple primary keys, thereby obtaining the data corresponding to the multiple primary keys.
[0144] At the same time, the first numerical value corresponding to a primary key is the time value. When the initial data corresponding to a primary key is updated, the initial time value corresponding to the primary key can be adjusted based on the update time of the initial data corresponding to the primary key to obtain the time value corresponding to the primary key. Specifically, the update time of the initial data corresponding to the primary key can be used as the time value corresponding to the primary key.
[0145] It should be noted that if there are two or more data corresponding to a primary key that are updated at different times, the time value corresponding to the primary key is the update time of the most recently updated data.
[0146] Reference Figure 3 , a possible scenario of this embodiment is:
[0147] Among the n data with primary keys from 1 to n (n is an integer greater than 3), the initial data and initial time are as follows: when PK=1, data 10 and A are included, and the time value of the time field is T0; when PK=2, data 15 and C are included, and the time value of the time field is T1; when PK=3, data 20 and A are included, and the time value of the time field is T2; until PK=n, data 20 and A are included, and the time value of the time field is Tn;
[0148] Through data update, when PK is 2, the value of the C1 field is changed from the initial data 15 to 10, and the value of the C2 field is changed from the initial data C to A, then MT is modified from the initial time T1 to the current time Tn+1, and when PK is 3, the value of the C1 field is changed from 15 to 10, and the value of the C2 field is changed from C to A, then MT is modified from T2 to the current time Tn+1. Subsequently, the first data center can set the value range of the time field based on the updated data list and then perform data audit.
[0149] Another possible situation is that if the data operation instruction includes a data creation instruction, then based on the acquired data operation instruction, a plurality of primary keys, data corresponding to the plurality of primary keys respectively, and first values of the corresponding identification fields are obtained, including:
[0150] Based on the data creation instruction, create multiple primary keys and the data corresponding to the multiple primary keys;
[0151] The creation time of the data corresponding to each primary key is used as the first value corresponding to the primary key.
[0152] In this embodiment, the first data center can create multiple primary keys and create data corresponding to the multiple primary keys, and use the creation time of the data corresponding to each primary key as the first value corresponding to the primary key, thereby obtaining multiple first values within the above value range, primary keys corresponding to the multiple first values, and data corresponding to the multiple primary keys.
[0153] Another possible situation is that if the data operation instruction includes a data deletion instruction, then based on the acquired data operation instruction, a plurality of primary keys, data corresponding to the plurality of primary keys respectively, and first values of the corresponding identification fields are obtained, including:
[0154] Create multiple initial primary keys, data corresponding to the multiple initial primary keys, and initial time values corresponding to the time fields;
[0155] Based on the data deletion instruction, part of the data and the primary keys and initial time values corresponding to the part of the data are deleted to obtain multiple primary keys, data corresponding to the multiple primary keys, and corresponding first values.
[0156] In this embodiment, the first data center may create multiple primary keys, initial data corresponding to each primary key, and use the creation time of the initial data corresponding to each primary key as the initial time value of the time field corresponding to the primary key;
[0157] Based on the data deletion instruction, the first data center can delete the initial data corresponding to some primary keys and the some primary keys and the first values corresponding to the some primary keys from the data list, and use the remaining part in the data list as multiple first values within the above value range, the primary keys corresponding to the multiple first values, and the data corresponding to the multiple primary keys.
[0158] Reference Figure 4 , the initial data and initial time situation in the data list are the same as Figure 3 Consistent, no more elaboration;
[0159] By executing the data deletion instruction, the first data center can delete a piece of data with PK of 2 and the corresponding MT field value. The remaining part in the data list is: when PK=1, data 10 and A, and the time value of the time field is T0; when PK=3, data 20 and A, and the time value of the time field is T2; until PK=n, including data 20 and A, and the time value of the time field is Tn; the remaining part in the data list is the data list after deletion. The first data center can set the value range of the time field based on the data list after deletion and perform data audit.
[0160] The above describes the solution of this application from the perspective of the first data center. Figure 5 , the solution of this application is described in detail from the perspective of the second data center.
[0161] The present application also provides a data audit method, which can be performed by a second data center, and includes:
[0162] Step S501, receiving a value range to be audited sent by a first data center;
[0163] Step S502: Determine the second data to be audited based on the value range; the second data to be audited includes a plurality of second values of the identification field within the value range, a primary key corresponding to each second value, and corresponding data;
[0164] The second data to be audited is used to perform data audit in combination with the first data to be audited;
[0165] The first data to be audited is determined by the first data center to be multiple first values of the identification field within the value range and the primary keys corresponding to the first values. After obtaining the data corresponding to the primary keys, when it is detected that any data is updated, at least one non-updated data is determined based on the primary key and the first values corresponding to the primary key, and the data is obtained based on the at least one non-updated data, the target primary keys corresponding to the non-updated data, and the first values corresponding to the target primary keys.
[0166] The solution of this embodiment is Figure 1 The embodiment scheme shown is actually the same scheme, which only illustrates the data audit method of the present application from different angles. The specific implementation method and the beneficial effects produced can be referred to in Figure 1 The relevant discussion of the illustrated embodiment will not be repeated here in detail.
[0167] Furthermore, after determining the second data to be audited based on the value range in step S502, the method may further include:
[0168] Receiving first data to be audited sent by the first data center;
[0169] Determine a first cyclic redundancy check code of the first data to be audited and a second cyclic redundancy check code of the second data to be audited;
[0170] If the first cyclic redundancy check code and the second cyclic redundancy check code are the same, it is determined that the first data to be audited and the second data to be audited are synchronized;
[0171] If the first cyclic redundancy check code is different from the second cyclic redundancy check code, the difference data between the first data to be audited and the second data to be audited is determined.
[0172] In this embodiment, as mentioned above, the second data center may perform data auditing. The specific implementation method may refer to the relevant discussion of the above embodiment, which will not be repeated here.
[0173] It should be added that the second data center can compare the two cyclic redundancy check codes. If the two cyclic redundancy check codes are the same, it means that the first data to be audited and the second data to be audited are synchronized, that is, the audited data within the value range of the set time field are synchronized. If the two cyclic redundancy check codes are different, the data corresponding to the same primary key between the two data centers will be compared to find the difference data between the two data centers.
[0174] In summary, it can be seen that the data audit method of the present application is carried out by the interaction between the first data center and the second data center. The present application is explained below from the perspective of the interaction between the two data centers.
[0175] S1. The first data center creates an identification field in the data list, and at the same time, the first data center sets a trigger for the identification field.
[0176] S2. The first data center obtains a value range of the identification field to be audited, and determines a plurality of first values of the identification field within the value range;
[0177] S3. The first data center determines primary keys corresponding to the multiple first values, and obtains data corresponding to the primary keys;
[0178] For example Figure 2 In the data audit, the value range is T1 to T3, then the first data center obtains the data corresponding to PK 1 to 4 respectively, T1 is the generation time of the data with PK 1, and T2 and T3 are also the generation time of the corresponding data.
[0179] At this time, the data obtained is the data initially used for data auditing.
[0180] S4. When the first data center detects that any data is updated, the time value of the time field corresponding to the any data is adjusted based on the current time through a trigger, and the adjusted time value is outside the value range;
[0181] For example Figure 2 In the example, the value of the MT field corresponding to the primary key PK 2 changes from T2 to the current time T4, and T4 is outside the value range of T1 to T3.
[0182] S5. The first data center determines at least one unupdated first value, determines a target primary key corresponding to each of the at least one unupdated first value, and determines at least one unupdated data based on the target primary key;
[0183] For example Figure 2 In the example, the first data center determines the target primary keys to be 1, 3, and 4, and also determines the data and MT field values corresponding to the primary keys 1, 3, and 4, respectively.
[0184] S6. The first data center obtains first data to be audited based on at least one unupdated data, a target primary key corresponding to each unupdated data, and a first value corresponding to each target primary key;
[0185] S7. The first data center sends the first data to be audited and the value range to the second data center;
[0186] S8. The second data center determines the second data to be audited in the managed data list based on the value range; the second data to be audited includes a plurality of second values of the identification field within the value range, a primary key corresponding to each second value, and corresponding data;
[0187] S9. The second data center performs data audit based on the first data to be audited and the second data to be audited.
[0188] Please refer to Figure 6 The present application also provides a data auditing device, comprising:
[0189] A first acquisition module 601 is used to acquire a value range of the identification field to be audited, and determine a plurality of first values of the identification field within the value range;
[0190] A first determination module 602 is used to determine primary keys corresponding to the plurality of first values, and obtain data corresponding to each primary key;
[0191] The second determination module 603 is used to determine at least one unupdated data in the data based on the primary key and the first values corresponding to the primary keys when any data is detected to be updated, and obtain the first data to be audited based on the at least one unupdated data, the target primary key corresponding to each unupdated data, and the first values corresponding to each target primary key;
[0192] A first sending module 604, configured to send the value range to a second data center, so that the second data center can determine second data to be audited based on the value range;
[0193] The second data to be audited is used for data audit in combination with the first data to be audited, and the second data to be audited includes multiple second values of the identification field within the value range, a primary key corresponding to each second value, and corresponding data.
[0194] Optionally, the second determining module 603 is specifically configured to:
[0195] When it is detected that any data is updated, a first value of an identification field corresponding to the any data is adjusted through a trigger;
[0196] If the adjusted first value is outside the value range, determining that at least one of the first values is an unupdated first value;
[0197] Determine a target primary key corresponding to each of the at least one unupdated first values, and determine the at least one unupdated data based on the target primary key.
[0198] Optionally, the device further includes a creation module, a second acquisition module and a generation module; before the first acquisition module 601 acquires the value range of the identification field to be audited;
[0199] A creation module, used for creating a time field and using the time field as the identification field;
[0200] A second acquisition module, used for acquiring data operation instructions;
[0201] The generating module is used to obtain a plurality of primary keys, data respectively corresponding to the plurality of primary keys, and first values of the respectively corresponding identification fields based on the acquired data operation instruction.
[0202] Optionally, if the data operation instruction includes a data update instruction, the generating module is specifically used to:
[0203] Creating the plurality of primary keys, initial data corresponding to the plurality of primary keys, and initial time values corresponding to the time fields;
[0204] Based on the data update instruction, the initial data corresponding to the multiple primary keys are updated to obtain the data corresponding to the multiple primary keys;
[0205] The initial time value corresponding to each primary key is adjusted based on the update time of the initial data corresponding to each primary key to obtain the first numerical values respectively corresponding to the multiple primary keys.
[0206] Optionally, if the data operation instruction includes a data creation instruction, a generating module is specifically used to:
[0207] Based on the data creation instruction, create the multiple primary keys and the data corresponding to the multiple primary keys respectively;
[0208] The creation time of the data corresponding to each primary key is used as the first value corresponding to the primary key.
[0209] Optionally, if the data operation instruction includes a data deletion instruction, a module is generated, specifically for:
[0210] Creating a plurality of initial primary keys, data corresponding to the plurality of initial primary keys, and initial time values corresponding to the time fields;
[0211] Based on the data deletion instruction, part of the data and the primary keys and initial time values corresponding to the part of the data are deleted to obtain the multiple primary keys, the data corresponding to the multiple primary keys respectively, and the corresponding first values.
[0212] Please refer to Figure 7 The present application also applies for a data auditing device, which comprises:
[0213] The first receiving module 701 is used to receive the value range to be audited sent by the first data center;
[0214] The third determination module 702 is used to determine the second data to be audited based on the value range; the second data to be audited includes a plurality of second values of the identification field within the value range, a primary key corresponding to each second value, and corresponding data;
[0215] Wherein, the second data to be audited is used to perform data audit in combination with the first data to be audited;
[0216] The first data to be audited is determined by the first data center to be a plurality of first values of an identification field within the value range and the primary keys corresponding to the first values. After obtaining the data corresponding to the primary keys, when it is detected that any data is updated, at least one unupdated data is determined based on the primary key and the first values corresponding to the primary key, and the data is obtained based on the at least one unupdated data, the target primary keys corresponding to the unupdated data, and the first values corresponding to the target primary keys.
[0217] Optionally, the device further includes a second receiving module and a fourth determining module, a fifth determining module and a sixth determining module;
[0218] After the third determining module 702 determines the second data to be audited based on the value range, the second receiving module is used to receive the first data to be audited sent by the first data center;
[0219] A fourth determination module, used to determine a first cyclic redundancy check code of the first data to be audited and a second cyclic redundancy check code of the second data to be audited;
[0220] a fifth determination module, configured to determine that the first data to be audited and the second data to be audited are synchronized if the first cyclic redundancy check code and the second cyclic redundancy check code are the same;
[0221] The sixth determination module is configured to determine difference data between the first data to be audited and the second data to be audited if the first cyclic redundancy check code is different from the second cyclic redundancy check code.
[0222] Since the device provided in the embodiment of the present invention is a device that can execute the corresponding method in the embodiment of the present invention, based on the method provided in the embodiment of the present invention, a person skilled in the art can understand the specific implementation of the device in the embodiment of the present invention and its various variations, so how the device implements the method in the embodiment of the present invention is not described in detail here. As long as a person skilled in the art implements the device used by the method in the embodiment of the present invention, it belongs to the scope of protection of this application.
[0223] Based on Figure 1 Based on the same principle as the method shown in , an embodiment of the present application further provides an electronic device, which includes a memory and a processor; a computer program is stored in the memory; and the processor is used to execute the method provided in any optional embodiment of the present application when running the computer program.
[0224] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the method provided in any optional embodiment of the present application can be implemented.
[0225] As an example, Figure 8 , a schematic diagram of the structure of an electronic device 4000 to which the present application can be applied is shown, the electronic device includes a memory 4003 and a processor 4001, the memory 4003 stores a computer program, and the processor 4001 is used to execute any of the above methods when running the computer program.
[0226] Specifically, the electronic device may be a terminal, a server or other possible devices. Figure 8 It only shows an optional schematic structure of the electronic device. Figure 8 The structure of the electronic device 4000 shown in the figure does not constitute a limitation on the embodiments of the present application.
[0227] The processor 4001 and the memory 4003 are connected, for example, through a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the transceiver 4004 may be specifically used for communication between the electronic device 4000 and other devices.
[0228] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the content of the present application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0229] The bus 4002 may include a path to transmit information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0230] The memory 4003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.
[0231] The memory 4003 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the application code stored in the memory 4003 to implement the content shown in any of the above method embodiments.
[0232] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0233] The above are only some embodiments of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A data audit method, characterized in that: include: Obtaining a value range of the identification field to be audited, and determining a plurality of first values of the identification field within the value range; Determine primary keys corresponding to the plurality of first values, and obtain data corresponding to each primary key; When it is detected that any data is updated, a first value of an identification field corresponding to the any data is adjusted through a trigger; If the adjusted first value is outside the value range, determining that at least one of the first values is an unupdated first value; Determine a target primary key corresponding to each of the at least one unupdated first values, and determine the at least one unupdated data based on the target primary key; Obtaining first data to be audited based on the at least one unupdated data, the target primary key corresponding to each unupdated data, and the first value corresponding to each target primary key; Sending the value range to the second data center so that the second data center can determine the second data to be audited based on the value range; The second data to be audited is used for data audit in combination with the first data to be audited, and the second data to be audited includes multiple second values of the identification field within the value range, a primary key corresponding to each second value, and corresponding data.
2. The method according to claim 1, characterized in that Before obtaining the value range of the identification field to be audited, the method further includes: Creating a time field, and using the time field as the identification field; Get data operation instructions; Based on the acquired data operation instruction, a plurality of primary keys, data respectively corresponding to the plurality of primary keys, and first values of the respectively corresponding identification fields are obtained.
3. The method according to claim 2, characterized in that If the data operation instruction includes a data update instruction, then obtaining a plurality of primary keys, data corresponding to the plurality of primary keys, and first values of the identification fields corresponding to the primary keys based on the acquired data operation instruction includes: Creating the plurality of primary keys, initial data corresponding to the plurality of primary keys, and initial time values corresponding to the time fields; Based on the data update instruction, the initial data corresponding to the multiple primary keys are updated to obtain the data corresponding to the multiple primary keys; The initial time value corresponding to each primary key is adjusted based on the update time of the initial data corresponding to each primary key to obtain the first numerical values respectively corresponding to the multiple primary keys.
4. The method according to claim 2, characterized in that: If the data operation instruction includes a data creation instruction, then obtaining the plurality of primary keys, the data respectively corresponding to the plurality of primary keys, and the first values of the respectively corresponding identification fields based on the acquired data operation instruction includes: Based on the data creation instruction, create the multiple primary keys and the data corresponding to the multiple primary keys respectively; The creation time of the data corresponding to each primary key is used as the first value corresponding to the primary key.
5. The method according to claim 2, characterized in that: If the data operation instruction includes a data deletion instruction, then obtaining the plurality of primary keys, the data respectively corresponding to the plurality of primary keys, and the first values of the respectively corresponding identification fields based on the acquired data operation instruction includes: Creating a plurality of initial primary keys, data corresponding to the plurality of initial primary keys, and initial time values corresponding to the time fields; Based on the data deletion instruction, part of the data and the primary keys and initial time values corresponding to the part of the data are deleted to obtain the multiple primary keys, the data corresponding to the multiple primary keys respectively, and the corresponding first values.
6. A data audit method, characterized in that: include: Receiving the value range of the identification field to be audited sent by the first data center; Based on the value range, determining the second data to be audited; The second data to be audited includes a plurality of second values of the identification field within the value range, a primary key corresponding to each second value, and corresponding data; Wherein, the second data to be audited is used to perform data audit in combination with the first data to be audited; The first data to be audited is obtained based on the following method: Determine multiple first values of the identification field within the value range and the primary keys corresponding to the first values through the first data center, obtain the data corresponding to the primary keys, and when it is detected that any data is updated, adjust the first value of the identification field corresponding to the any data through a trigger; if the adjusted first value is outside the value range, determine at least one of the first values that has not been updated; determine the target primary key corresponding to the at least one unupdated first value, determine the at least one unupdated data based on the target primary key, and obtain the first data to be audited based on the at least one unupdated data, the target primary key corresponding to each unupdated data, and the first value corresponding to each target primary key.
7. The method according to claim 6, characterized in that After determining the second data to be audited based on the value range, the method further includes: Receiving the first data to be audited sent by the first data center; Determine a first cyclic redundancy check code of the first data to be audited and a second cyclic redundancy check code of the second data to be audited; If the first cyclic redundancy check code is the same as the second cyclic redundancy check code, it is determined that the first data to be audited and the second data to be audited are synchronized; If the first cyclic redundancy check code is different from the second cyclic redundancy check code, difference data between the first data to be audited and the second data to be audited is determined.
8. A data auditing device, characterized in that: include: A first acquisition module, used to acquire a value range of the identification field to be audited, and determine a plurality of first values of the identification field within the value range; A first determination module is used to determine primary keys corresponding to the plurality of first values, and obtain data corresponding to each primary key; A second determination module is used to adjust the first value of the identification field corresponding to any data through a trigger when it is detected that any data is updated; If the adjusted first value is outside the value range, determining that at least one of the first values is an unupdated first value; Determine a target primary key corresponding to each of the at least one unupdated first values, and determine the at least one unupdated data based on the target primary key; Obtaining first data to be audited based on the at least one unupdated data, the target primary key corresponding to each unupdated data, and the first value corresponding to each target primary key; A first sending module, used for sending the value range to a second data center, so that the second data center can determine the second data to be audited based on the value range; The second data to be audited is used for data audit in combination with the first data to be audited, and the second data to be audited includes multiple second values of the identification field within the value range, a primary key corresponding to each second value, and corresponding data.
9. A data auditing device, characterized in that: include: A first receiving module, used for receiving a value range of an identification field to be audited sent by the first data center; A third determination module, used to determine the second data to be audited based on the value range; The second data to be audited includes a plurality of second values of the identification field within the value range, a primary key corresponding to each second value, and corresponding data; Wherein, the second data to be audited is used to perform data audit in combination with the first data to be audited; The first data to be audited is obtained based on the following method: Determine multiple first values of the identification field within the value range and the primary keys corresponding to the first values through the first data center, obtain the data corresponding to the primary keys, and when it is detected that any data is updated, adjust the first value of the identification field corresponding to the any data through a trigger; if the adjusted first value is outside the value range, determine at least one of the first values that has not been updated; determine the target primary key corresponding to the at least one unupdated first value, determine the at least one unupdated data based on the target primary key, and obtain the first data to be audited based on the at least one unupdated data, the target primary key corresponding to each unupdated data, and the first value corresponding to each target primary key.
10. An electronic device, characterized in that: The electronic device comprises a memory and a processor; The memory stores a computer program; The processor is configured to execute the method according to any one of claims 1 to 7 when running the computer program.
11. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
