A data processing method, device, computer equipment and storage medium

By storing target activity data in the blockchain and generating a full audit data table, the problem of the blockchain audit ledger being unable to achieve full audit and read-write separation is solved, and audit efficiency and data integrity are improved.

CN115757415BActive Publication Date: 2025-03-11BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211482997.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-24
Publication Date
2025-03-11
Estimated Expiration
2042-11-24

AI Technical Summary

Technical Problem

The audit ledger in the blockchain cannot achieve full auditing, and cannot achieve separation of read and write and read and write verification, resulting in low audit efficiency.

Method used

By obtaining the target activity data and storing it in the current record table and history table, the first audit data and the second audit data are generated based on the fields of the full audit data table, and stored in the full audit data table to achieve read-write separation and read-write verification separation.

Benefits of technology

The completeness of data in the full audit data table is achieved, thereby ensuring the integrity and correctness of the audit and improving audit efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115757415B_ABST
    Figure CN115757415B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data processing method, device, computer equipment and storage medium, wherein the method includes: obtaining target activity data and operation data after performing target transaction operations on each target activity data; storing the first activity data in the current record table and storing the second activity data in the history record table; based on the fields in the preset full audit data table, generating the first audit data of each target activity data under each field, and the second audit data of each operation data under each field; storing the first audit data and the second audit data in the full audit data table. The full audit data table of the embodiment of the present disclosure stores the first audit data and the second audit data, that is, the data in the full audit data table is full, which can ensure the integrity and correctness of the audit; the generated current record table, history record table and full audit data table realize read-write separation and read-write verification separation, and improve the audit efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a data processing method, device, computer equipment and storage medium. Background Art

[0002] In the era of rapid development of Internet technology, the interaction between users and servers generates a large amount of user activity data. Blockchain has the functions of tamper-proof and non-repudiation. Usually, user activity data can be stored in the blockchain as transaction records to generate an audit ledger in the blockchain. Auditing the audit ledger in the blockchain can more easily confirm the responsibility, trace user data, and verify legal operations.

[0003] However, the audit ledger in the blockchain usually cannot achieve full audit, and cannot achieve read-write separation, as well as read-write verification separation, and the audit efficiency is low. Summary of the invention

[0004] The embodiments of the present disclosure at least provide a data processing method, apparatus, computer equipment, and storage medium.

[0005] In a first aspect, an embodiment of the present disclosure provides a data processing method, including:

[0006] Acquire target activity data and operation data after performing target transaction operations on each target activity data; the target activity data includes first activity data within a first preset time period and second activity data within a second preset time period; the first preset time period is the time period closest to the current time period, and the second preset time period is the time period before the first preset time period;

[0007] storing the first activity data in a current record table, and storing the second activity data in a history record table;

[0008] Based on the fields in the preset full audit data table, generate first audit data of each target activity data under each field, and second audit data of each operation data under each field;

[0009] The first audit data and the second audit data under each of the fields are stored in the full audit data table; the full audit data table is used for auditing.

[0010] In an optional implementation, the field includes a sequence identification field;

[0011] The generating of the first audit data of each target activity data under the field comprises:

[0012] Based on the arrangement order of each of the target activity data, sequence identification information of each of the target activity data under the sequence identification field is generated in a monotonically increasing manner.

[0013] In an optional implementation manner, after generating the sequence identification information of each target activity data under the sequence identification field, the method further includes:

[0014] For each target activity data, the sequence identification information corresponding to the target activity data is stored in the record table where the target activity data is located.

[0015] In an optional implementation, the field includes a transaction type field; the transaction type is used to characterize the type of target transaction operation performed on each target activity data.

[0016] In an optional implementation, the field further includes a summary field; the first audit data generated includes summary information written under the transaction type field as data;

[0017] The generating of the first audit data of each target activity data under each field includes:

[0018] For each of the target activity data, summary information of the target activity data under the summary field is generated based on the data content of the target activity data.

[0019] In an optional implementation manner, after generating summary information of each target activity data under the summary field, the method further includes:

[0020] Based on the summary information and preset verification rules, generating verification information corresponding to the summary information;

[0021] Generate a target digest based on the digest information, verification information corresponding to the digest information, and client signature information;

[0022] The target summary is signed, and the signed target summary is returned to the client that sent the target activity data.

[0023] In an optional implementation, the field further includes a summary field and an associated sequence identification field; the generated second audit data includes summary information when the transaction type field is a transaction type field other than data writing;

[0024] The generating of the second audit data of each of the operation data under each of the fields comprises:

[0025] For each of the operation data, using the sequence identification information of the target activity data corresponding to the operation data as the associated sequence identification information of the operation data in the associated sequence identification field;

[0026] The transaction type information of the operation data under the transaction type field and the associated sequence identification information are hashed to obtain summary information of the operation data under the summary field.

[0027] In an optional implementation, the transaction type includes data anonymization; the first audit data generated under the transaction type field of each target activity data includes data writing;

[0028] The generating of the second audit data of each of the operation data under each of the fields comprises:

[0029] The data writing of the operation data corresponding to the target activity data under the transaction type field is updated to be hidden data.

[0030] In a second aspect, an embodiment of the present disclosure further provides a data processing device, including:

[0031] an acquisition module, used to acquire target activity data and operation data after performing a target transaction operation on each target activity data; the target activity data includes first activity data within a first preset time period and second activity data within a second preset time period; the first preset time period is the time period closest to the current time period, and the second preset time period is the time period before the first preset time period;

[0032] A first storage module, used for storing the first activity data in a current record table, and storing the second activity data in a history record table;

[0033] A first generating module, configured to generate, based on the fields in the preset full audit data table, first audit data of each target activity data under each field, and second audit data of each operation data under each field;

[0034] The second storage module is used to store the first audit data and the second audit data under each of the fields in the full audit data table; the full audit data table is used when performing an audit.

[0035] In a third aspect, an embodiment of the present disclosure further provides a computer device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are performed.

[0036] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are executed.

[0037] The data processing method provided by the embodiment of the present disclosure can store the first active data within the first preset time period in the current record table, so that when the read and write operations are performed on the current record table, the operation on the historical record table and the verification process of the full audit record table will not be affected; by storing the second active data within the second preset time period in the historical record table, the reading and writing of the current record table and the verification process of the full audit record table can be performed. By storing the first audit data and the second audit data in the full audit data table, it can be ensured that the data in the full audit data table is complete, thereby ensuring the integrity and correctness of the audit. In addition, the embodiment of the present disclosure realizes the separation of reading and writing of data in different time periods, as well as the separation of reading and writing verification, by generating the current record table, the historical record table and the full audit data table, thereby improving the audit efficiency.

[0038] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.

[0040] Figure 1 A flow chart of a data processing method provided by an embodiment of the present disclosure is shown;

[0041] Figure 2A schematic diagram showing the correspondence between transaction types and digest generation methods provided by an embodiment of the present disclosure;

[0042] Figure 3 A schematic diagram of a process of writing target activity data into a full audit data table provided by an embodiment of the present disclosure is shown;

[0043] Figure 4 A schematic diagram of the structure of a data processing device provided by an embodiment of the present disclosure is shown;

[0044] Figure 5 A schematic diagram of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.

[0046] In the era of rapid development of Internet technology, the interaction between users and servers generates a large amount of user activity data. Blockchain has the functions of tamper-proof and non-repudiation. Usually, user activity data can be stored in the blockchain as transaction records to generate an audit ledger in the blockchain. Auditing the audit ledger in the blockchain can more easily confirm the responsibility, trace user data, and verify legal operations.

[0047] In the original blockchain data table (Oracle Blockchain Table) and the SQL general audit ledger on the Microsoft Structured Query Language (Microsoft SQL) server, there is no distinction between the current record table and the historical record table, and the relevant audit data in the general audit ledger (Ledger) is directly stored in the original data table as an implicit column, which cannot achieve read-write separation and read-write verification separation, resulting in low audit efficiency. In addition, the data clearing operation data is not recorded in the original blockchain data table, that is, the original blockchain data table is not the full audit data, and full audit cannot be achieved.

[0048] In the databases Proven DB and Ledger DB, although there are full audit ledgers, the stored data does not support structured storage and transactions, and cannot achieve read-write separation, as well as read-write verification separation, resulting in low audit efficiency.

[0049] Based on this, the present disclosure provides a data processing method, including: obtaining target activity data, and operation data after performing target transaction operations on each target activity data; the target activity data includes first activity data within a first preset time period and second activity data within a second preset time period; storing the first activity data in a current record table, and storing the second activity data in a historical record table; based on the fields in a preset full audit data table, generating first audit data for each target activity data under each field, and second audit data for each operation data under each field; storing the first audit data and second audit data under each field in the full audit data table.

[0050] In the above embodiment, by storing the first active data within the first preset time period in the current record table, when performing a read operation on the current record table, the operation on the historical record table and the verification process of the full audit record table may not be affected; by storing the second active data within the second preset time period in the historical record table, when performing a data clearing operation on the historical record table, the reading and writing of the current record table and the verification process of the full audit record table may not be affected. By storing the first audit data and the second audit data in the full audit data table, it can be ensured that the data in the full audit data table is complete, thereby ensuring the integrity and correctness of the audit. In addition, the embodiment of the present disclosure realizes the separation of reading and writing of data in different time periods, as well as the separation of reading and writing verification, by generating the current record table, the historical record table and the full audit data table, thereby improving the audit efficiency.

[0051] The defects existing in the above schemes and the proposed solutions are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the present disclosure for the above problems below should be the contributions made by the inventor to the present disclosure during the disclosure process.

[0052] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0053] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0054] To facilitate understanding of this embodiment, a data processing method disclosed in the embodiment of the present disclosure is first introduced in detail. The executor of the data processing method provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities.

[0055] See also Figure 1 FIG. 1 is a flowchart of a data processing method provided by an embodiment of the present disclosure, wherein the method includes S101 to S104, wherein:

[0056] S101: Acquire target activity data and operation data after performing target transaction operations on each of the target activity data; the target activity data includes first activity data within a first preset time period and second activity data within a second preset time period; the first preset time period is the time period closest to the current time period, and the second preset time period is the time period before the first preset time period.

[0057] It should be noted that the acquisition and use of the target activity data here is authorized by the user. The method of acquiring and using personal information can refer to the relevant description in the specific implementation of this disclosure.

[0058] The data processing method provided by the embodiment of the present disclosure is applied to a scenario in which target activity data is stored in a regional chain in the form of an audit ledger and the audit ledger in the blockchain is audited.

[0059] Here, the target activity data may include, for example, system activity data or user activity data, etc., which may not be specifically limited here. Here, each target activity data may be obtained from the client. The target transaction operation may include operations such as writing data, clearing data, and hiding data. Here, the target activity data in different time periods may be obtained, and may specifically include first activity data in the current first time period and second activity data in the second preset time period.

[0060] The operation data generated after the target transaction operation is performed on the target activity data may include information such as the operation content, the operation object, and the operation time.

[0061] S102: storing the first activity data in a current record table, and storing the second activity data in a history record table.

[0062] Here, the current record table (Current Table, which can also be recorded as Table) can include field information of explicit columns (Explicit Columns) and field information of implicit columns (Implicit Column). The data content of the first activity data can be recorded in the current record table, and the data content of the first activity data is stored in the explicit column. The implicit column in the current record table can store the sequence identification information of the first activity data in the full audit data table (Ledger Table), such as the journal sequence number (JSN). The table structure of the full audit data table and the generation process of the sequence identification information will be described in detail later.

[0063] As shown in Table 1, this is the table structure of the current record table.

[0064] Table 1

[0065]

[0066] In Table 1, the current record table includes explicit column fields and implicit column fields. The explicit column fields include three column fields, namely C1 field, C2 field, and C3 field. The C1 field, C2 field, and C3 field store corresponding data content respectively. The implicit column field includes the JSN field, and the sequence identification information 00000008 is stored under JSN.

[0067] The table structure of the history table (also known as the Payload Table) can be the same as the table structure of the current record table. Here, the history table can also include the field information of the explicit columns (Explicit Columns) and the field information of the implicit columns (Implicit Column). The data content of the second activity data can be recorded in the history table, and the data content of the second activity data is stored in the explicit columns. The implicit columns in the history table can store the sequence identification information of the second activity data in the full audit data table (Ledger Table), such as JSN. As shown in Table 2, this is the table structure of the current record table.

[0068] Table 2

[0069]

[0070] In Table 2, the history record table includes explicit column fields and implicit column fields. The explicit column fields include three column fields, namely, C1 field, C2 field, and C3 field. The C1 field, C2 field, and C3 field store corresponding data content respectively. The implicit column field includes the JSN field, and the sequence identification information 00000001 is stored under JSN.

[0071] It should be noted that the data content and sequence identification information in Table 1 and Table 2 are only for illustration and are not real information. In practice, the data content and sequence identification information in Table 1 and Table 2 may be any possible form of information.

[0072] S103: Based on the fields in the preset full audit data table, generate first audit data of each target activity data under each field, and second audit data of each operation data under each field.

[0073] S104: storing the first audit data and the second audit data under each of the fields in the full audit data table; the full audit data table is used for auditing.

[0074] Here, the full audit data table may include at least one preset field. In the disclosed embodiment, the first audit data under each field may represent the verification information corresponding to the target activity data; and the second audit data under each field may represent the verification information corresponding to the operation data.

[0075] In a specific implementation, the fields in the full audit data table may include a sequence identifier (JSN) field, a transaction type (Trantype) field, a digest (Digest) field, a user name (User Name) field (represented by User here), a client signature (C-Sign) field, and an associated sequence identifier (R-JSN) field.

[0076] The user name under the User Name field may represent the name, ID, and other information of the user who writes data into the full audit data table.

[0077] The client signature information under the client signature field may represent the signature information of the client on the target activity data or operation data.

[0078] The sequence identification information under the sequence identification field can represent the arrangement order of each data stored in the full audit data table. In one embodiment, in the process of generating the first audit data of each target activity data under the sequence identification field, the sequence identification information of each target activity data under the sequence identification field can be generated in a monotonically increasing manner based on the arrangement order of each target activity data. After performing a target transaction operation on each target activity data, corresponding sequence identification information can be generated for the operation data corresponding to each target activity data, and then the operation data can be stored in the full audit data table according to the sequence identification information. That is, in the full audit data table, all data can be stored in the monotonically increasing order of the sequence identification information.

[0079] Table 3 shows the table structure of a full audit data table.

[0080] Table 3

[0081] JSN Digest User Trantype C-Sign R-JSN 00000001 Hash1 User1 I Sign1 JSN1 00000002 Hash2 User2 D Sign2 JSN2 00000003 Hash3 User3 H Sign3 JSN3

[0082] In Table 3, there are a sequence identification (JSN) field, a digest field, a user name field, a transaction type (Trantype) field, a client signature (C-Sign) field, and an associated sequence identification (R-JSN) field. As can be seen from Table 3, the sequence identification information JSN includes 00000001, 00000002, and 00000003, that is, multiple data are arranged in a monotonically increasing order according to the sequence identification information. In addition, the digest information under the digest field is respectively hash value Hash1, hash value Hash2, and hash value Hash3; the user name information under the user name field is respectively User1, User2, and User3; the transaction type under the transaction type (Trantype) field is respectively data writing I, data clearing D, and data being concealed H; the client signature information under the client signature (C-Sign) field is respectively Sign1, Sign2, and Sign3; and the associated sequence identification information under the associated sequence identification (R-JSN) field is respectively JSN1, JSN2, and JSN3. It should be noted that the information in each field in Table 3 is only for illustration.

[0083] After generating the sequence identification information corresponding to the target activity data, the first activity data in the current record table and the second activity data in the history record table can be associated with each first audit data in the full audit data table, respectively. In one embodiment, for each target activity data, the sequence identification information corresponding to the target activity data can be stored in an implicit column in the record table where the target activity data is located. That is, the sequence identification information in the implicit column in the record table where the target activity data is located refers to the sequence identification information in the corresponding full audit data table, that is, the sequence identification information in the implicit column in the record table where the target activity data is located has an anchoring relationship with the sequence identification information in the corresponding full audit data table. It can be understood here that the target activity data corresponding to the sequence identification information in the current record table or the history record table and the audit data corresponding to the sequence identification information in the corresponding full audit data table correspond to the same transaction. For example, the target activity data corresponding to the sequence identification information 00000001 in the current record table and the audit data corresponding to the sequence identification information 00000001 in the full audit data table correspond to the same transaction.

[0084] Among them, each transaction type under the transaction type field can represent the type of target transaction operation performed on each target activity data.

[0085] Here, the transaction type may include a data writing transaction, a data clearing transaction, a data hiding transaction, a data anonymizing transaction, and a time transaction.

[0086] Specifically, the transaction of data writing may refer to the transaction operation of writing the target activity data into the full audit data table. Exemplarily, the transaction of data writing may be represented by "I".

[0087] The data clearing transaction may refer to a transaction operation of clearing the target activity data, and here may refer to a transaction operation of clearing the second activity data in the history record table. Exemplarily, the data clearing transaction may be represented by "D".

[0088] The data-anonymous transaction may refer to a transaction operation in which data is anonymized, and here may refer to a transaction operation in which data is anonymized for the first activity data in the current record table or the second activity data in the history record table. Exemplarily, the data-anonymous transaction may be represented by "U".

[0089] A transaction in which data is concealed may refer to the transaction operation in which data is concealed. Exemplarily, a transaction in which data is concealed may be represented by "H". In one embodiment, when the first audit data generated for each target activity data under the transaction type field includes data write ("I"), after a transaction operation in which data is concealed occurs on the target activity data, that is, when the transaction type is data concealment, the operation data corresponding to the target activity data may be updated from data write ("I") under the transaction type field to data concealed ("H").

[0090] A time-based transaction may refer to a transaction operation in which the generated summary information is signed using the timestamp of a trusted timing center. For example, a time-based transaction may be represented by "T".

[0091] The summary field can record summary information of each row of target activity data in the current record table and the history record table.

[0092] In the full audit data table, the method of generating summaries can be different for different transaction types. Figure 2 The correspondence between transaction types and the way of generating summaries is shown.

[0093] Here, the transaction type is first determined. When the transaction type is data writing, summary information of the target activity data under the transaction type field can be generated. That is, the generated first audit data includes summary information under the transaction type field of data writing.

[0094] Specifically, when the transaction type is data writing, such as Figure 2As shown, the summary information of the target activity data under the summary field can be generated based on the data content of the target activity data, which can be expressed as Digest_of[C1,C2,C3]. Specifically, the summary information can be obtained by performing a hash calculation on each data content. The obtained summary information is written into the current record table or the historical record table where the target activity data is located.

[0095] In one implementation, after the summary information of each target activity data is generated under the summary field, verification information corresponding to the summary information may be generated based on the summary information and a preset verification rule.

[0096] The verification information here may be a set of information to be verified generated on the summary information tree. The verification information may be used to verify the audit data corresponding to the current summary information and all audit data before the audit data. The verification information corresponding to the summary information may be stored in a verification information index table.

[0097] Then, based on the summary information, the verification information corresponding to the summary information, and the client signature information, a target summary can be generated.

[0098] After the target digest is signed, the signed target digest may be returned to the client.

[0099] In the case where the transaction type is other than data writing, summary information of the operation data under the transaction type field can be generated. That is, the generated second audit data includes summary information of the transaction type field other than data writing. Specifically, Figure 2 As shown, for data clearing transaction types, summary information can be generated according to the transaction type "D" and the corresponding associated sequence identification information "R_JSN", which can be specifically expressed as Digest_of['D',R_JSN], and the corresponding target activity data in the current record table and the historical record table are deleted; for data hiding transaction types, summary information can be generated according to the transaction type "U" and the corresponding associated sequence identification information "R_JSN", which can be specifically expressed as Digest_of['U',R_JSN], and the current record table or historical record table is updated according to the hidden target activity data; and the current record table (or historical record table) is associated with the full audit data table using the associated sequence identification information, and the transaction type "I" in the full audit data table is set to "H"; for time transactions, summary information can be generated according to the transaction type "T" and the corresponding associated sequence identification information "R_JSN", which can be specifically expressed as Digest_of['T',R_JSN], and the full audit data table is updated according to the generated summary information.

[0100] Specifically, for each operation data, the sequence identification information of the target activity data corresponding to the operation data can be used as the associated sequence identification information of the operation data under the associated sequence identification field; then the transaction type information and the associated sequence identification information of the operation data under the transaction type field are hashed to obtain the summary information of the operation data under the summary field.

[0101] Here, the associated sequence identification information under the associated sequence identification field may represent sequence identification information used to associate the target activity data with the operation data.

[0102] The operation data is generated after the target transaction operation is performed on the corresponding target activity data. Therefore, in order to associate the operation data with the corresponding target activity data, the sequence identification information of the corresponding target activity data can be used as the associated sequence identification information of the operation data under the associated sequence identification field. That is, the operation data can be associated with the corresponding target activity data through the associated sequence identification information under the associated sequence identification field.

[0103] Here, the meaning represented by the association sequence identification information under the association sequence identification field is related to the corresponding transaction type.

[0104] Specifically, when the transaction type is "T", the associated sequence identification information may indicate that the value comes from a temporal transaction anchor. When the transaction type is "U", the associated sequence identification information may indicate that the value is the JSN value of the concealed target activity data. When the transaction type is "H", the associated sequence identification information may indicate that the value is the JSN value of the data-hidden transaction operation corresponding to the concealed target activity data. When the transaction type is "D", the associated sequence identification information may indicate that the value is the termination boundary value of the cleared JSN. When the transaction type is "I", the value of the associated sequence identification information is a null value, which is indicated as a null value NULL.

[0105] Figure 3 The flowchart of writing the target activity data into the full audit data table is shown in FIG. Figure 3 As shown, first, the user writes the target activity data to the client; then, based on the target activity data to be written, a monotonically increasing sequence identification information JSN value corresponding to each target activity data is generated, and the JSN value is written into the sequence identification field JSN of the full audit data table.

[0106] Next, for each target activity data, according to the data content of the target activity data, the summary information of the target activity data under the summary field is generated, and the summary information of each target activity data is written into the summary field Digest of the full audit data table.

[0107] Next, verification information is generated according to the summary information of each target activity data and the preset verification rules, and the verification information is stored in the verification information index table.

[0108] Here, the client signature information corresponding to each target activity data can also be obtained, and the client signature information can be written into the client signature field C-Sign of the full audit data table.

[0109] Then, based on the summary information, the verification information corresponding to the summary information, and the client signature information, a target summary h is generated.

[0110] Finally, the server signs the target summary h and returns it to the client.

[0111] In the above embodiment, by storing the first active data within the first preset time period in the current record table, when performing a read operation on the current record table, the operation on the historical record table and the verification process of the full audit record table may not be affected; by storing the second active data within the second preset time period in the historical record table, when performing a data clearing operation on the historical record table, the reading and writing of the current record table and the verification process of the full audit record table may not be affected. By storing the first audit data and the second audit data in the full audit data table, it can be ensured that the data in the full audit data table is complete, thereby ensuring the integrity and correctness of the audit. In addition, the embodiment of the present disclosure realizes read-write separation, as well as read-write verification separation, by generating the current record table, the historical record table and the full audit data table, thereby improving the audit efficiency.

[0112] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0113] Based on the same inventive concept, a data processing device corresponding to the data processing method is also provided in the embodiment of the present disclosure. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned data processing method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0114] Reference Figure 4 , which is a schematic diagram of the structure of a data processing device provided by an embodiment of the present disclosure, the device comprises: an acquisition module 401, a first storage module 402, a first generation module 403, and a second storage module 404; wherein,

[0115] The acquisition module 401 is used to acquire target activity data and operation data after performing a target transaction operation on each target activity data; the target activity data includes first activity data within a first preset time period and second activity data within a second preset time period; the first preset time period is the time period closest to the current time period, and the second preset time period is the time period before the first preset time period;

[0116] A first storage module 402, configured to store the first activity data in a current record table, and store the second activity data in a history record table;

[0117] A first generating module 403 is used to generate first audit data of each target activity data under each field and second audit data of each operation data under each field based on the fields in the preset full audit data table;

[0118] The second storage module 404 is used to store the first audit data and the second audit data under each of the fields in the full audit data table; the full audit data table is used when performing an audit.

[0119] In an optional implementation, the field includes a sequence identification field;

[0120] The first generating module 403, in executing the step of generating the first audit data of each target activity data under the field, is specifically used to:

[0121] Based on the arrangement order of each of the target activity data, sequence identification information of each of the target activity data under the sequence identification field is generated in a monotonically increasing manner.

[0122] In an optional implementation manner, after generating the sequence identification information of each target activity data under the sequence identification field, the device further includes:

[0123] The third storage module is used to store, for each target activity data, the sequence identification information corresponding to the target activity data in the record table where the target activity data is located.

[0124] In an optional implementation, the field includes a transaction type field; the transaction type is used to characterize the type of target transaction operation performed on each target activity data.

[0125] In an optional implementation, the field further includes a summary field; the first audit data generated includes summary information written under the transaction type field as data;

[0126] The first generating module 403, when executing the step of generating the first audit data of each target activity data under each field, is specifically used to:

[0127] For each of the target activity data, summary information of the target activity data under the summary field is generated based on the data content of the target activity data.

[0128] In an optional implementation manner, after generating summary information of each target activity data under the summary field, the device further includes:

[0129] A second generating module: generating verification information corresponding to the summary information based on the summary information and preset verification rules;

[0130] A third generating module, configured to generate a target digest based on the digest information, verification information corresponding to the digest information, and client signature information;

[0131] The return module is used to sign the target summary and return the signed target summary to the client that sent the target activity data.

[0132] In an optional implementation, the field further includes a summary field and an associated sequence identification field; the generated second audit data includes summary information when the transaction type field is a transaction type field other than data writing;

[0133] The first generating module 403, when executing the step of generating the second audit data of each operation data under each field, is specifically used to:

[0134] For each of the operation data, using the sequence identification information of the target activity data corresponding to the operation data as the associated sequence identification information of the operation data in the associated sequence identification field;

[0135] The transaction type information of the operation data under the transaction type field and the associated sequence identification information are hashed to obtain summary information of the operation data under the summary field.

[0136] In an optional implementation, the transaction type includes data anonymization; the first audit data generated under the transaction type field of each target activity data includes data writing;

[0137] The first generating module 403, when executing the step of generating the second audit data of each operation data under each field, is specifically used to:

[0138] The data writing of the operation data corresponding to the target activity data under the transaction type field is updated to be hidden data.

[0139] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0140] Based on the same technical concept, the embodiment of the present disclosure also provides a computer device. Figure 5 As shown, it is a schematic diagram of the structure of a computer device 500 provided in an embodiment of the present disclosure, including a processor 501, a memory 502, and a bus 503. Among them, the memory 502 is used to store execution instructions, including a memory 5021 and an external memory 5022; the memory 5021 here is also called an internal memory, which is used to temporarily store the operation data in the processor 501, and the data exchanged with the external memory 5022 such as a hard disk. The processor 501 exchanges data with the external memory 5022 through the memory 5021. When the computer device 500 is running, the processor 501 communicates with the memory 502 through the bus 503, so that the processor 501 executes the following instructions:

[0141] Acquire target activity data and operation data after performing target transaction operations on each target activity data; the target activity data includes first activity data within a first preset time period and second activity data within a second preset time period; the first preset time period is the time period closest to the current time period, and the second preset time period is the time period before the first preset time period;

[0142] storing the first activity data in a current record table, and storing the second activity data in a history record table;

[0143] Based on the fields in the preset full audit data table, generate first audit data of each target activity data under each field, and second audit data of each operation data under each field;

[0144] The first audit data and the second audit data under each of the fields are stored in the full audit data table; the full audit data table is used for auditing.

[0145] The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the data processing method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0146] The present disclosure also provides a computer program product that carries a program code. The program code includes instructions that can be used to execute the steps of the data processing method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.

[0147] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).

[0148] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.

[0149] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0150] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0151] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0152] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be based on the protection scope of the claims.

Claims

1. A data processing method based on blockchain, characterized in that: include: Acquire target activity data and operation data after performing target transaction operations on each of the target activity data; The target activity data includes first activity data within a first preset time period and second activity data within a second preset time period; the first preset time period is the time period closest to the current time period, and the second preset time period is the time period before the first preset time period; storing the first activity data in a current record table, and storing the second activity data in a history record table; Based on the fields in the preset full audit data table, generate first audit data of each target activity data under each field, and second audit data of each operation data under each field; storing the first audit data and the second audit data under each of the fields in the full audit data table; The full audit data table is used when conducting an audit.

2. The method according to claim 1, characterized in that The fields include a sequence identification field; The generating of the first audit data of each target activity data under the field comprises: Based on the arrangement order of each of the target activity data, sequence identification information of each of the target activity data under the sequence identification field is generated in a monotonically increasing manner.

3. The method according to claim 2, characterized in that After generating the sequence identification information of each target activity data under the sequence identification field, the method further includes: For each target activity data, the sequence identification information corresponding to the target activity data is stored in the record table where the target activity data is located.

4. The method according to claim 1, characterized in that: The fields include a transaction type field; the transaction type is used to characterize the type of target transaction operation performed on each target activity data.

5. The method according to claim 4, characterized in that The field also includes a summary field; the first audit data generated includes summary information written under the transaction type field as data; The generating of the first audit data of each target activity data under each field includes: For each of the target activity data, summary information of the target activity data under the summary field is generated based on the data content of the target activity data.

6. The method according to claim 5, characterized in that After generating summary information of each target activity data under the summary field, the method further includes: Based on the summary information and preset verification rules, generating verification information corresponding to the summary information; Generate a target digest based on the digest information, verification information corresponding to the digest information, and client signature information; The target summary is signed, and the signed target summary is returned to the client that sent the target activity data.

7. The method according to claim 4, characterized in that The field also includes a summary field and an associated sequence identification field; the generated second audit data includes summary information when the transaction type field is a transaction type field other than data writing; The generating of the second audit data of each of the operation data under each of the fields comprises: For each of the operation data, using the sequence identification information of the target activity data corresponding to the operation data as the associated sequence identification information of the operation data in the associated sequence identification field; The transaction type information of the operation data under the transaction type field and the associated sequence identification information are hashed to obtain summary information of the operation data under the summary field.

8. The method according to claim 4, characterized in that The transaction type includes data anonymity; the first audit data generated for each target activity data under the transaction type field includes data writing; The generating of the second audit data of each of the operation data under each of the fields comprises: The data writing of the operation data corresponding to the target activity data under the transaction type field is updated to be hidden.

9. A data processing device based on blockchain, characterized in that: include: An acquisition module, used for acquiring target activity data and operation data after performing a target transaction operation on each of the target activity data; The target activity data includes first activity data within a first preset time period and second activity data within a second preset time period; the first preset time period is the time period closest to the current time period, and the second preset time period is the time period before the first preset time period; A first storage module, used for storing the first activity data in a current record table, and storing the second activity data in a history record table; A first generating module, configured to generate, based on the fields in the preset full audit data table, first audit data of each target activity data under each field, and second audit data of each operation data under each field; A second storage module is used to store the first audit data and the second audit data under each of the fields in the full audit data table; The full audit data table is used when conducting an audit.

10. A computer device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the data processing method according to any one of claims 1 to 8 are performed.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data processing method according to any one of claims 1 to 8 are executed.

Citation Information

Patent Citations

  • Data acquisition method, device and equipment and storage medium

    CN111858658A

  • Data auditing method, device and equipment of block chain and readable storage medium

    CN114564757A