A database information tracing method, apparatus and electronic device
By embedding audit logs and watermarks on the blockchain in the database, and combining blockchain technology with the data auditing mechanism of the auditing system, the problems of data loss, tampering, and forgery in traditional traceability systems are solved, thereby improving the reliability and credibility of database information and supporting evidence collection by public security, procuratorate, courts, and judicial authorities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-31
- Publication Date
- 2026-03-13
AI Technical Summary
Traditional traceability systems cannot guarantee the integrity, reliability, and accuracy of database information, and there are problems such as data loss, tampering, and forgery, which affect the evidence collection by public security organs, procuratorates, courts, and judicial authorities.
By embedding database audit logs and watermarks onto the blockchain, and utilizing blockchain technology for traffic diversion and traceability, combined with the data auditing mechanism of the audit system, the accuracy and reliability of log records are ensured.
It improves the credibility and trustworthiness of database information, enables real-time tracking and protection of database information, and enhances the authenticity and reliability of data.
Smart Images

Figure CN116204856B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of blockchain technology, and in particular to a database information tracing method, apparatus, and electronic device. Background Technology
[0002] Currently, to ensure the evidence collection by public security, procuratorate, court, and judicial authorities, most systems have established traceability channels to achieve full-process verification of database information entry and verification. However, with the development of data information, traditional traceability systems suffer from a series of problems such as data loss, data tampering, data forgery, and data corruption, thus failing to guarantee the integrity, reliability, and accuracy of the data. Therefore, improving the credibility of database information traceability is a technical problem that needs to be solved. Summary of the Invention
[0003] The main technical problem solved by the embodiments of the present invention is to provide a database information traceability method, device and electronic device, which can ensure that the data cannot be forged or destroyed by embedding database audit logs and watermarks on the blockchain, improve the feasibility of log data auditing, thereby enhance the credibility of audit log and watermark traceability, and facilitate real-time tracking and protection of database information.
[0004] In a first aspect, embodiments of the present invention provide a database information tracing method, the method comprising: acquiring traffic data to be accessed in a database; performing traffic splitting processing on logs based on the traffic data to be accessed; uploading the split logs to the database; and tracing the information uploaded to the database through an auditing system to determine the correctness of the log records.
[0005] In some embodiments, the logs include audit logs; the process of routing the logs according to the traffic data to be accessed includes: obtaining the hierarchical information of the audit logs; wherein the hierarchical information of the audit logs includes: a first log with traffic data less than or equal to a first threshold and a second log with traffic data greater than the first threshold; processing the first logs and processing the second logs.
[0006] In some embodiments, processing the first log and processing the second log include: encrypting the first log; uploading the encrypted first log to the blockchain and storing the uploading result in a database; reassembling the log set of the second log and calculating the hash value of the log set; uploading the processed second log to the blockchain and storing the uploading result of the second log in a database.
[0007] In some embodiments, the logs further include watermark-embedded logs; the process of splitting the logs according to the traffic data to be accessed further includes: uploading the watermark-embedded logs to the blockchain and storing them in the database.
[0008] In some embodiments, an auditing system is used to trace the information uploaded to the blockchain database. The auditing system provides a data auditing mechanism to determine the correctness of audit logs, including: obtaining the audit logs and blockchain transaction information stored in the database, the blockchain transaction information including transaction hashes and public keys; determining the classification information of the audit logs; wherein the classification information of the audit logs includes: third logs less than or equal to a second threshold and fourth logs greater than the second threshold; processing the third logs and processing the fourth logs; querying the on-chain data of the blockchain transaction information using the transaction hashes; and verifying the issuer using the transaction hashes and the public keys.
[0009] In some embodiments, processing the third log and processing the fourth log include: obtaining log records of the third log and the fourth log and the blockchain transaction information from the database, and processing the log records and the blockchain transaction information; encrypting and protecting the processed third log; reassembling the fourth log; obtaining a reassembled log set; sorting the log set; and calculating the hash value of the log set.
[0010] In some embodiments, the blockchain transaction information includes hash values on the blockchain;
[0011] The step of tracing the information uploaded to the blockchain and stored in the database through the auditing system to determine the correctness of the log records includes: determining whether the hash value of the log set matches the hash value on the blockchain; if yes, indicating that the data is consistent and the log record is correct; if no, indicating that the data is inconsistent and the log record is corrupted.
[0012] Secondly, embodiments of the present invention provide a database information tracing device, the device comprising: an acquisition module for acquiring traffic data to be accessed in a database; a processing module for performing traffic splitting processing on logs according to the traffic data to be accessed; an input module for uploading the split-processed logs to the database; and a judgment module for tracing the information uploaded to the database through an auditing system, wherein the auditing system provides a data auditing mechanism for judging the correctness of log records.
[0013] Thirdly, embodiments of the present invention provide an electronic device, the electronic device comprising:
[0014] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the database information tracing method as described above.
[0015] Fourthly, embodiments of the present invention provide a non-volatile computer-readable storage medium storing computer-executable instructions for causing a computer to execute the database information tracing method described above.
[0016] The advantages of the database information tracing method proposed in this invention, which differs from existing technologies, are:
[0017] This invention proposes a database information tracing method, apparatus, and electronic device. The method involves streamlining traffic data in a database, uploading the streamed logs to the blockchain, and using a data auditing mechanism provided by an auditing system to trace the audit logs and watermark-embedded logs. Because this method utilizes blockchain technology to reliably store and use database log information, it enhances the credibility and legal effect of the logs. The data auditing mechanism provided by the auditing system improves the authenticity and reliability of the audit logs. The watermarking algorithm combined with blockchain technology achieves the purpose of tracing, which is beneficial for evidence collection by public security, procuratorate, courts, and judicial authorities.
[0018] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0019] One or more embodiments are illustrated by way of example with reference to the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements having the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0020] Figure 1 This is a flowchart of a database information tracing method provided in an embodiment of the present invention;
[0021] Figure 2 This is a schematic diagram of the log entry process provided in another embodiment of the present invention;
[0022] Figure 3 This is an embodiment of the present invention. Figure 1 A schematic diagram of the sub-process of S2 in the middle;
[0023] Figure 4 This is an embodiment of the present invention. Figure 3 A schematic diagram of the sub-process of S22 in the middle;
[0024] Figure 5 This is a schematic diagram of the log uploading process provided in another embodiment of the present invention;
[0025] Figure 6 This is an embodiment of the present invention. Figure 1 A schematic diagram of the sub-processes of S4 in the middle;
[0026] Figure 7 This is an embodiment of the present invention. Figure 6 A schematic diagram of the sub-process of S43 in China;
[0027] Figure 8 This is a schematic diagram of the log audit process provided in another embodiment of the present invention;
[0028] Figure 9 This is a schematic diagram of the structure of a database information tracing device provided in an embodiment of the present invention;
[0029] Figure 10 This is a schematic diagram of the hardware structure of an electronic device provided by the present invention. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0031] It should be noted that, unless otherwise specified, the various features in the embodiments of the present invention can be combined with each other, and all are within the protection scope of the present invention. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different module division or in a different order than that shown in the device schematic diagram or the flowchart.
[0032] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items.
[0033] To ensure the evidence collection efforts of public security, procuratorial, judicial, and legal authorities, most institutions have established traceability channels to achieve full-process verification of database information entry and checks. Currently, the traditional database storage solution is a centralized storage solution. The audit logs generated by the database auditing system and the watermark information embedded in the data watermarking system are stored one by one in the database. This storage solution is prone to a series of problems such as data loss, data tampering, data forgery, and data damage, thus failing to guarantee the integrity, reliability, and accuracy of the stored data, which is detrimental to the evidence collection efforts of public security, procuratorial, and judicial authorities.
[0034] To address the aforementioned issues, embodiments of the present invention provide a database information tracing method, apparatus, and electronic device, applicable to data information storage and verification. This method can improve the authenticity and reliability of stored data information and enhance its credibility.
[0035] Figure 1 This is a flowchart of a database information tracing method according to an embodiment of the present invention. The method includes the following steps:
[0036] Step S1: Obtain the traffic data to be accessed from the database;
[0037] A database is a repository for organizing, storing, and managing data according to a data structure. It is a large collection of organized, shareable, and uniformly managed data that is stored long-term in a computer.
[0038] In this embodiment, in order to record the dynamics of the database system in real time and manage the database in a standardized manner, it is necessary to perform traffic auditing and log recording on the traffic data to be accessed during the process of obtaining the traffic data of the database, so as to strengthen the recording of network behavior of the database and improve data information security.
[0039] Step S2: Perform traffic splitting on the logs based on the traffic data to be accessed;
[0040] Logs are records of events generated by network devices, systems, and service programs during their operation. Each log entry records the date, time, user, and description of the relevant operation. These logs can contain valuable data or worthless data.
[0041] Different types of logs require different operation methods and different types of information to be extracted. Therefore, the logs need to be split into streams so that logs of the same type can be processed centrally, which helps to improve the efficiency of the system.
[0042] Step S3: Upload the logs after the traffic splitting process to the blockchain and store them in the database;
[0043] "On-chain" refers to on-chain registration, which means recording data information on the blockchain. After being on-chain, each detail can be clearly viewed, making the data information readily available.
[0044] The blockchain is a distributed shared ledger and internet database containing individual storage units that record all communication information between various block nodes within a certain period. Blocks are linked through a random hash algorithm. The data or information stored within it is characterized by decentralization, immutability, full traceability, and transparency.
[0045] After the logs in the database are sorted and processed according to different categories, the logs are recorded on the blockchain to ensure the security and reliability of the logs.
[0046] Step S4: The information uploaded to the blockchain and stored in the database is traced through the auditing system to determine the correctness of the log records.
[0047] Tracing the source refers to seeking the origin of history upstream. Tracing the source refers to tracing the source of information, which means finding the origin of data information and reproducing the historical state of data information in the logs that have been recorded on the blockchain.
[0048] Data auditing refers to the inspection conducted to ensure the integrity and consistency of data in order to improve data quality. Data auditing is a complete data quality control chain, from data collection, preprocessing, comparison, analysis, early warning, notification and problem repair.
[0049] When tracing the information uploaded to the blockchain or when tracing the source of forged or damaged logs, the correctness of the logs is judged based on the data auditing mechanism provided by the auditing system, and the current status of the logs is determined, thereby improving the reliability and credibility of the data information.
[0050] Figure 2 Please refer to the schematic diagram of another log entry process provided by the technical solution of the present invention. Figure 2 In this embodiment of the invention, the traffic data is audited through an audit service platform. Audit logs are selected and basic information of all logs is recorded. The selected audit logs are then split, uploaded to the blockchain, stored in the database, and their hash values are uploaded to the blockchain. It should be noted that the four steps of log splitting, logging to the blockchain, storing in the database, and uploading the hash values to the blockchain are performed simultaneously on the log storage service platform. Finally, the processed audit logs are stored on the consortium blockchain platform.
[0051] In this embodiment of the invention, after obtaining the traffic data to be accessed from the database, the logs are split according to the traffic data to be accessed, and the split logs are uploaded to the database. An auditing system is used to trace the information uploaded to the database. The auditing system provides a data auditing mechanism to determine the correctness of the log records. The database information tracing method provided by this invention first reliably stores the logs in the database, and then verifies the data information, including forged or corrupted data, through an auditing mechanism when tracing the data information uploaded to the database, thus ensuring the reliability of the data information.
[0052] In some embodiments, such as Figure 3 As shown, the log includes audit logs, and step S2 above may further include the following steps:
[0053] Step S21: Obtain the hierarchical information of the audit logs; wherein the hierarchical information of the audit logs includes: a first log with data traffic less than or equal to a first threshold and a second log with data traffic greater than the first threshold;
[0054] Step S22: Process the first log and process the second log.
[0055] The audit logs are processed differently depending on their data volume. One type is the first log, which is less than or equal to a first threshold and is a high-level log with a relatively small data volume. The other type is the second log, which is greater than the first threshold and is a low-to-medium level log with a large data volume. The first log, with its lower data volume, is processed relatively simply, while the second log, with its relatively higher data volume, requires more complex processing such as reassembly.
[0056] In some embodiments, such as Figure 4 As shown, step S22 above may further include the following steps:
[0057] Step S221: Encrypt and protect the first log;
[0058] Step S222: Upload the encrypted first log to the blockchain and store the uploading result in the database;
[0059] Step S223: Reassemble the first log into a log set and calculate the hash value of the log set;
[0060] Step S224: Upload the processed first log to the blockchain and store the uploading result of the first log into the database.
[0061] For the first log set, since the log data volume is relatively low, it does not need to be reorganized. It only needs to be encrypted and protected before being stored on the blockchain. Then, the first log set and related records stored on the blockchain are saved in a database. For the second log, since the log data volume is high, it cannot be directly encrypted and protected. Therefore, the second log needs to be reorganized. The reorganization method is as follows: First, the log file needs to be dumped, i.e., the second log file containing current information about the system status written by the computer. This information may include the current time and date, detailed information about previously executed commands on the system, and other data information. Second, log intervals are recorded. Then, the logs are sorted to obtain a log set. The hash value of the log set is calculated. Then, the log set and its basic information are stored on the blockchain. Finally, the log set and related records stored on the blockchain are saved in a database.
[0062] In some embodiments, the log further includes a watermark embedded in the log, and step S2 above may further include the following steps:
[0063] Step S23: Embed the watermark in the log and store it on the blockchain.
[0064] Because the watermark-embedded log is imbued with a simulated data watermark after being retrieved from the database, it possesses high security, strong detectability, and high confidentiality. Therefore, it does not require encryption or reassembly. It should be noted that during the watermark embedding stage, watermark information, such as time, algorithm, watermark details, watermark algorithm, data owner, and distribution recipient, is stored on the blockchain. The watermark-embedded log and related records stored on the blockchain are then saved in the database.
[0065] Figure 5 Please refer to the schematic diagram of another log uploading process provided by the technical solution of the present invention. Figure 5This invention performs traffic auditing on the collected traffic, records log processing information, and then splits the audited data traffic into audit logs and watermark-embedded logs, generating a global serial number. The watermark-embedded logs are directly stored in the database. The audit logs also need to be judged in terms of their level. If they are high-level audit logs, they are directly encrypted. If they are not high-level audit logs, they need to be dumped into log files first, the log range is recorded, the logs are sorted, and the hash value of the sorted log set is calculated. Transaction information is created for the encrypted high-level audit logs and the recombined non-high-level audit logs, the transaction private key is obtained, the transaction data information is signed and confirmed, the transaction information is "broadcast" in the blockchain network, verified and confirmed by nodes and stored on the blockchain, and the relevant transaction information is stored in the database.
[0066] In some embodiments, such as Figure 6 As shown, step S4 above includes the following steps:
[0067] Step S41: Obtain the audit logs and blockchain transaction information stored in the database, wherein the blockchain transaction information includes transaction hashes and public keys;
[0068] Step S42: Determine the classification information of the audit log; wherein, the classification information of the audit log includes: a third log less than or equal to the second threshold and a fourth log greater than the second threshold;
[0069] Step S43: Process the third log and process the fourth log;
[0070] Step S44: Query the on-chain data of the blockchain transaction information using the transaction hash;
[0071] Step S45: Verify the issuer using the transaction hash and the public key.
[0072] A transaction hash is a unique transaction number used to identify a transfer. Each hash corresponds to a unique transaction, which ensures the privacy and security of the transaction.
[0073] Public keys are commonly used for encrypting session keys, verifying digital signatures, or encrypting data that can be decrypted using the corresponding private key. The private key is the secret half of the key pair used with the public key algorithm. The part that is made public is called the public key, and the part that is kept secret is called the private key. A key pair obtained through a certain algorithm can be guaranteed to be unique worldwide.
[0074] When querying audit logs or performing watermark tracing in the audit system, a data audit mechanism is provided. This mechanism associates the log records stored in the database with the transaction details on the blockchain to obtain the audit logs stored in the database and the transaction information on the blockchain. Since the data volume of audit logs varies, they need to be classified and processed. The data on the blockchain is queried based on the transaction hash, and the issuer is verified through the transaction hash and public key. Finally, the correctness of the logs is verified based on the processed logs and records on the blockchain.
[0075] In some embodiments, such as Figure 7 As shown, step S43 above also includes the following steps:
[0076] Step S431: Obtain the log records of the third log and the fourth log in the database and the blockchain transaction information, and process the log records and the blockchain transaction information;
[0077] Step S432: Encrypt and protect the processed third log;
[0078] Step S433: Reassemble the fourth log;
[0079] Step S434: Obtain the reassembled log set;
[0080] Step S435: Sort the log set;
[0081] Step S436: Calculate the hash value of the log set.
[0082] The third log and the fourth log obtained from the database are used for encryption. The third log has a relatively small data volume, so it is only necessary to construct the original log and then encrypt the constructed log. The fourth log, however, has a large data volume and cannot be directly encrypted. Therefore, the fourth log needs to be reassembled. The reassembly method involves first constructing an original log set, then sorting the log set, and finally calculating the hash value of the sorted log set.
[0083] In some embodiments, the blockchain transaction information includes hash values on the blockchain, and the process of tracing the information uploaded to the blockchain and stored in the database through an auditing system to determine the correctness of the log records includes the following steps:
[0084] Step S4311: Determine whether the hash value of the log set matches the hash value on the blockchain;
[0085] Step S4312: If yes, indicate that the data is consistent and the log record is correct;
[0086] Step S4313: If not, indicate that the data is inconsistent and the log record is corrupted.
[0087] The system matches the hash value of the log set calculated by the system with the hash value on the blockchain to determine the correctness of the data when auditing logs or tracing watermarks. If the hash values of the two are consistent, it means that the log record is correct. If the hash values of the two are inconsistent, it means that the log has been corrupted.
[0088] Figure 8 Please refer to the schematic diagram of another log auditing process provided by the technical solution of the present invention. Figure 8 In this embodiment of the invention, when querying audit logs in the audit system, the corresponding transaction details are queried through the provided data audit mechanism to determine whether the audit log is a high-level log. If it is a high-level audit log, the original log needs to be constructed and then encrypted. If it is not a high-level log, the original log set needs to be constructed first, sorted, and the hash value of the sorted log set needs to be calculated. Based on the transaction hash in the transaction details, the relevant transaction data information on the blockchain is queried, and the issuer of the transaction is verified. The hash value of the locally calculated log set is compared with the hash value on the blockchain. If the hash values are consistent, the audit log record is correct; if the hash values are inconsistent, the audit log has been corrupted.
[0089] Figure 9 This is a schematic diagram of a database information tracing device provided in an embodiment of the present invention. Please refer to it. Figure 9 The database information tracing device 100 in this embodiment includes an acquisition module 101, a processing module 102, an input module 103, and a judgment module 104.
[0090] The acquisition module 101 is used to acquire traffic data to be accessed from the database;
[0091] Processing module 102 is used to perform traffic splitting processing on the logs based on the traffic data to be accessed;
[0092] The database entry module 103 is used to upload the logs after the traffic splitting process to the database.
[0093] The judgment module 104 is used to trace the information uploaded to the blockchain through the audit system in order to determine the correctness of the log records.
[0094] In this embodiment, the acquisition module 101 is used to acquire the traffic data to be accessed from the database platform. The processing module 102 is used to process the traffic data to be accessed. Since the volume of traffic data varies, the log processing method also differs. If it is a watermark-embedded log, it can be directly stored on the blockchain. If it is an audit log, it needs to be reassembled and processed. For audit logs, it is first determined whether the audit log is of a high level. If it is a high-level log, it needs to be encrypted. If it is not a high-level log, it needs to be dumped to a log file, the log range recorded, the log sorted, and finally the hash value of the log set calculated. The storage module 103 is used to upload the processed logs to the blockchain and store them in the database. The stored data must include not only the hash value of the logs but also the basic information recorded during the log processing. All of this information needs to be stored in the database. The judgment module 104 is used to query audit logs or trace the source of watermark-embedded logs to determine the correctness of the log records.
[0095] It should be noted that the database information tracing device 100 described above can execute the database information tracing method provided in the embodiments of the present invention, and has the corresponding functional modules for executing the method. Technical details not described in detail in this embodiment of the database information tracing device 100 can be found in the database information tracing method provided in the embodiments of the present invention.
[0096] Figure 10 Please refer to the schematic diagram of an electronic device provided in an embodiment of the present invention. Figure 10 The electronic device 200 includes:
[0097] One or more processors 201 and storage 202, Figure 10 Take a processor 201 as an example.
[0098] The processor 201 and the memory 202 can be connected via a bus or other means. Figure 10 Taking the example of a connection between China and Israel via a bus.
[0099] The memory 202, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the database information tracing method in the embodiments of the present invention. The processor 201 executes various functional applications and data processing of the electronic device 200 by running the non-volatile software programs, instructions, and modules stored in the memory 202, thereby implementing the database information tracing method of the above-described method embodiments.
[0100] The memory 202 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the database information tracing device 200. Furthermore, the memory 202 may include high-speed random access memory 202, and may also include non-volatile memory 202, such as at least one disk storage device 202, a flash memory device, or other non-volatile solid-state memory 202. In some embodiments, the memory 202 may optionally include memory 202 remotely located relative to the processor 201, and these remote memories 202 can be connected to the database information tracing device 200 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0101] One or more modules are stored in the memory 202. When executed by one or more processors 201, they perform the database information tracing method in any of the above method embodiments, for example, the method described above. Figure 1 Method steps S1 to S4, Figure 3 Method steps S21 to S22, Figure 4 Method steps S221 to S224, Figure 6 Method steps S41 to S45, Figure 7 Method steps S431 to S436 are implemented. Figure 9 The functions of modules 101-104 in the document.
[0102] It should be noted that the above-described database information tracing device can execute the database information tracing method provided in the embodiments of the present invention, and has the corresponding functional modules and beneficial effects of the method. Technical details not described in detail in the embodiments of the database information tracing device can be found in the database information tracing method provided in the embodiments of the present invention.
[0103] This invention also provides a non-volatile computer-readable storage medium storing computer-executable instructions that are executed by one or more processors, for example... Figure 10 One of the processors 201 can be configured to execute the database information tracing method in any of the above method embodiments, for example, to execute the method described above. Figure 1 Method steps S1 to S4, Figure 3 Method steps S21 to S22, Figure 4 Method steps S221 to S224, Figure 6 Method steps S41 to S45, Figure 7 Method steps S431 to S436 are implemented. Figure 9 The functions of modules 101-104 in the document.
[0104] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0105] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software and a general-purpose hardware platform, or of course, using hardware. Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0106] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; under the concept of the present invention, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the present invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A database information tracing method, characterized in that, include: Retrieve the traffic data to be accessed from the database; The logs are split into streams based on the traffic data to be accessed; The logs after the traffic splitting process are uploaded to the blockchain and stored in the database. The information uploaded to the blockchain and stored in the database is traced through an auditing system to determine the accuracy of the log records. The logs include audit logs; The step of performing log routing based on the traffic data to be accessed includes: obtaining the hierarchical information of the audit logs; wherein the hierarchical information of the audit logs includes: a first log with traffic data less than or equal to a first threshold and a second log with traffic data greater than the first threshold; processing the first log and processing the second log; The processing of the first log and the processing of the second log include: encrypting the first log; uploading the encrypted first log to the blockchain and storing the uploading result in a database; reassembling the log set of the second log and calculating the hash value of the log set; uploading the processed second log to the blockchain and storing the uploading result of the second log in a database.
2. The method according to claim 1, characterized in that, The log also includes watermarked logs; The process of routing the logs based on the traffic data to be accessed also includes: The watermark is embedded in the log and then uploaded to the database.
3. The method according to claim 1, characterized in that, The information uploaded to the blockchain and stored in the database is traced through an auditing system. This auditing system provides a data auditing mechanism to determine the accuracy of the audit logs, including: Obtain the audit logs and blockchain transaction information stored in the database, wherein the blockchain transaction information includes transaction hashes and public keys; Determine the classification information of the audit logs; wherein the classification information of the audit logs includes: third logs less than or equal to the second threshold and fourth logs greater than the second threshold; The third log is processed, and the fourth log is also processed; The on-chain data of the blockchain transaction information can be queried using the transaction hash; The issuer is verified using the transaction hash and the public key.
4. The method according to claim 3, characterized in that, The processing of the third log and the processing of the fourth log include: Obtain the log records of the third log and the fourth log in the database, as well as the blockchain transaction information, and process the log records and the blockchain transaction information; The processed third log is encrypted for protection; The fourth log is reconstructed; Obtain the reassembled log set; Sort the log set; Calculate the hash value of the log set.
5. The method according to claim 4, characterized in that, The blockchain transaction information includes hash values on the blockchain; The process of tracing the information uploaded to the blockchain and stored in the database through an auditing system to determine the correctness of the log records includes: Determine whether the hash value of the log set matches the hash value on the blockchain; If so, the message indicates that the data matches and the log record is correct; If not, an error message will be displayed indicating data inconsistency and corrupted log records.
6. A database information tracing device, characterized in that, include: The acquisition module is used to retrieve traffic data to be accessed from the database; The processing module is used to perform traffic splitting processing on the logs based on the traffic data to be accessed; The database entry module is used to upload the logs after the traffic splitting process to the database. The judgment module is used to trace the information uploaded to the blockchain and stored in the database through the auditing system in order to determine the correctness of the log records; The database information tracing device is used to perform the method as described in any one of claims 1 to 5.
7. An electronic device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the database information tracing method according to any one of claims 1-5.
8. A non-volatile computer-readable storage medium, characterized in that, The non-volatile computer-readable storage medium stores computer-executable instructions for causing a computer to perform the database information tracing method as described in any one of claims 1-5.
Citation Information
Patent Citations
Network information log audit system
CN105049232A
SGX based cloud platform audit log protection method
CN109561110A