A blockchain-based electronic information anti-tampering system for archives

By using blockchain-based dual authentication and permission settings to generate access and modification permissions, the issues of key generation targeting and privacy are resolved, thus achieving secure and tamper-proof archival information and traceability of responsibility.

CN120707139BActive Publication Date: 2025-11-04CHONGQING FIVESHIELD TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511220361.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2025-11-04
Estimated Expiration
2045-08-29

AI Technical Summary

Technical Problem

Existing technologies lack targeted and private key generation and cannot be updated in a timely manner, resulting in insufficient privacy for login and modification, and thus have limitations.

Method used

A blockchain-based electronic information anti-tampering system for archives is adopted. It performs dual verification through a verification module and an allocation module, sets public and private keys, generates access and modification permissions based on supply chain information and contract signing time, and solidifies operation logs through the immutability of blockchain.

Benefits of technology

A cross-validation mechanism for permissions has been implemented to effectively intercept forged and unauthorized modification requests, reduce the risk of single-point verification being bypassed, ensure that operations are traceable and accountability is traceable, and update the original files synchronously to prevent offline tampering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120707139B_ABST
    Figure CN120707139B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on file electronic information tamper-proof system of block chain, it is related to the technical field of intelligent management, including verification module and distribution module, pre-set file related permissions, first verification and second verification are carried out, and the current request data is distributed, and original file data is updated.The application carries out double verification to request data by pre-set file related permissions, forms permission, content cross-checking mechanism, reduces the risk that single point verification is bypassed, packs verification result and request data as new block, solidifies operation log by the non-tamperable characteristics of block chain, realizes operation trace, responsibility can be traced, synchronously updates original file, and synchronously generates on-chain summary, if original file is offline tampered with, its hash value will not match on-chain summary, system can identify and block illegal data synchronization immediately.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of intelligent management, and in particular to an archive electronic information anti-tampering system based on a block chain. BACKGROUND

[0002] In recent years, archive electronic information anti-tampering technology has formed a binary pattern of mature application of traditional encryption technology and exploration and breakthrough of block chain technology, and has solved landing problems through standard formulation, industry alliance and lightweight technology solutions, and has shifted from single technology protection to technology, system and management cooperation, decentralized anti-tampering, multi-party verification and full-process traceability.

[0003] At present, a digital archive anti-tampering processing method, device and electronic equipment are disclosed in Chinese patent application No. CN117972797A. The method extracts a data code of a first preset length from a first preset position in the data content, performs a hash operation on the data code to obtain a target hash value, encrypts the target hash value by using an encryption public key to obtain a first encrypted watermark, so that the user can only decrypt the first encrypted watermark by using an encryption private key corresponding to the encryption public key, and embeds the first encrypted watermark into a second preset position of the data content in a second preset manner to obtain target data content. However, the related art does not perform multi-dimensional setting of the key according to the information of each participant in the supply chain and the information of all parties, which is not conducive to the pertinence and privacy of key generation, does not update the key in a timely manner according to the verification results, is not conducive to the privacy of login or modification, and has certain limitations. SUMMARY

[0004] The technical problem solved by the application is that the related art does not perform multi-dimensional setting of the key according to the information of each participant in the supply chain and the information of all parties, which is not conducive to the pertinence and privacy of key generation, does not update the key in a timely manner according to the verification results, is not conducive to the privacy of login or modification, and has certain limitations.

[0005] To solve the above technical problems, the application provides the following technical solutions: an archive electronic information anti-tampering system based on a block chain, comprising a verification module and a distribution module.

[0006] The verification module presets archive-related permissions, and performs first and second verifications on the current request data according to the archive-related permissions.

[0007] The distribution module distributes the current request data according to the first and second verification results, and updates the original archive data.

[0008] As a preferred scheme of the file electronic information anti-tampering system based on the blockchain, the file related permissions include access permissions and modification permissions, the first verification represents verifying the access permissions, and the second verification represents verifying the modification permissions.

[0009] Key information of the file is extracted, the key information including contract coding, product supply chain information, Party A name, Party B name, and contract signing time point;

[0010] A public key is set according to the supply chain information and the contract signing time point, a private key is set according to the Party A name and the Party B name, the supply chain information including a supply chain responsible party digital signature and a representative location, and the digital signature is stored in a signature library;

[0011] The access permissions are set according to the public key, and the modification permissions are set according to the private key.

[0012] As a preferred scheme of the file electronic information anti-tampering system based on the blockchain, the representative locations corresponding to each link of the supply chain are obtained, the representative locations representing locations where responsible parties of a supply chain environment are located for a long time, the longitude and latitude of the representative locations are obtained, and the longitude and latitude of the representative locations are preprocessed;

[0013] The absolute value of the longitude and the absolute value of the latitude are obtained, when the longitude does not satisfy three digits, the remaining digits are filled with 0, when the latitude does not satisfy two digits, the remaining digits are filled with 0, the longitude or the latitude is set to two decimal places according to the rounding method, and when the longitude does not satisfy two decimal places, the remaining digits are filled with 0;

[0014] The preprocessed longitude and the preprocessed latitude corresponding to the representative location of any supply chain link are selected, a sequence of nine numbers is obtained according to a sorting mode of longitude first and then latitude, the middle three numbers are selected, a first average value of the middle three numbers is calculated, the first average value is set as a representative character of the representative location, the representative characters are sorted according to the advancing order of the supply chain links to obtain a first character sequence;

[0015] A contract signing time point is obtained, the contract signing time point including year, month and day, when the month does not satisfy two digits, the remaining digits are filled with 0, the contract signing time point is arranged into a sequence of eight numbers in the order of year, month and day, and the sequence is recorded as a second character sequence.

[0016] As a preferred scheme of the file electronic information anti-tampering system based on the blockchain, the first character sequence and the second character sequence are randomly arranged and combined to obtain each public key.

[0017] Access permissions are set according to the public key and the digital signature, the access permissions including permission to access and prohibition to access, and the setting logic of the access permissions including:

[0018] A current digital signature is acquired, any one of the digital signatures in the signature library is called a reference signature, a first feature quantity of the current digital signature is extracted, and a second feature quantity of the reference signature is extracted, the first feature quantity and the second feature quantity are both shape feature quantities, a first similarity of the first feature quantity and the second feature quantity is calculated through a cosine similarity formula, a first value is set as a first similarity threshold, the first similarity is compared with the first value, when the first similarity is greater than or equal to the first value, corresponding access permissions are set as permission to access, when the first similarity is less than the first value, the next reference signature is jumped to, when there is the first similarity greater than or equal to the first value, corresponding access permissions are set as permission to access, when all the first similarities are less than the first value after the reference signatures are traversed, corresponding access permissions are set as prohibition to access.

[0019] As a preferred scheme of the file electronic information anti-tampering system based on the block chain, wherein: the private key is set according to the name of the first party and the name of the second party, and the setting logic of the private key includes:

[0020] The name of the first party and the name of the second party are converted into a data packet, a hash value of the data packet is acquired, the hash value is randomly arranged and combined to obtain a hash value sequence;

[0021] The public key sequence and the hash value sequence are combined to obtain a private key sequence;

[0022] Among them, after each access or each modification, the used public key or private key is deleted, and an access data packet or a modification data packet is generated and stored in a backup data block, in the backup data block, the access or modification time, the access data packet or the modification data packet, and the access or modification person correspond to each other, and when the access operation and the modification operation exist at the same time, the access data and the modification data are combined and packaged.

[0023] As a preferred scheme of the file electronic information anti-tampering system based on the block chain, wherein: the logic of setting the modification permission according to the private key includes:

[0024] The input private key is verified, when the private key verification fails, the modification permission is set as prohibition to modify, and the modification operation is packaged as a first data packet and sent to a temporary operation slice area of each scattered block;

[0025] When the private key verification succeeds, a modification request is sent to the block where the first party or the second party is located, first feedback information of the block where the first party or the second party is located is acquired, and the first feedback information includes agreement and disagreement;

[0026] When the first feedback information is approval, the modification permission is set to allow modification, and when the second feedback information is disapproval, the modification permission is set to prohibit modification.

[0027] As a preferred scheme of the file electronic information anti-tampering system based on the blockchain, after the modification is completed, the modification content is packaged into a second data packet and sent to a temporary operation area of a block where the party A or the party B is located, second feedback information of the block where the party A or the party B is located is obtained, and the second feedback information includes approval and disapproval.

[0028] As a preferred scheme of the file electronic information anti-tampering system based on the blockchain, when the second feedback information is approval, the original file is updated according to the modification content, and the updated file is packaged into a third data packet and sent to each block, a new hash value of the third data packet is obtained, and in each block, the third data packet is automatically divided into third sub-packets.

[0029] When the second feedback information is disapproval, a modification invalid signal is sent to the block where the party A or the party B is located, and the modification content is deleted.

[0030] The second data packet is sent through an encrypted channel.

[0031] As a preferred scheme of the file electronic information anti-tampering system based on the blockchain, the data packet of the original file is automatically divided into data sub-packets and stored in a block, the data packet is configured with a first search strategy and a second search strategy, the first search strategy is used to search the latest state of the data packet, and the second search strategy is used to search the data packet corresponding to the modification content.

[0032] As a preferred scheme of the file electronic information anti-tampering system based on the blockchain, the first search strategy includes:

[0033] A block is obtained, a hash value of a data packet to be searched is obtained, the hash value is compared with a historical hash value, when the hash value is the same as the historical hash value, a data chain corresponding to the historical hash value is jumped, the data chain is traced back, and the latest data packet is obtained.

[0034] The second search strategy includes:

[0035] Obtaining the hash value corresponding to the to-be-searched modified content, jumping to the sub-packet corresponding to the latest data packet, obtaining the hash value of each sub-packet, obtaining the hash value of the second data packet, comparing the hash value corresponding to the to-be-searched modified content with the hash value of the second data packet, calculating the first difference value of the hash value corresponding to the to-be-searched modified content and the hash value of the second data packet, sorting the first difference value in ascending order, selecting the top two first difference values, and setting the original archive data corresponding to the second data packet corresponding to the top two first difference values as the to-be-modified content.

[0036] The beneficial effects of the present application are as follows: the first and second double verifications of the request data are performed through the preset archive-related permissions, a permission and content cross-checking mechanism is formed, the modification request of forgery, unauthorized modification or abnormal format can be effectively intercepted, the risk of single-point verification being bypassed is reduced, the verification result and the request data are packaged as a new block, and the operation log is solidified through the non-tamperable feature of the block chain.Even if the original archive is maliciously updated, any historical version can still be restored according to the on-chain allocation record, the operation trace is realized, the responsibility is traceable, the original archive is synchronously updated, the on-chain summary is synchronously generated, if the original archive is offline tampered, the hash value will not match the on-chain summary, the system can identify and block the illegal data synchronization in time. BRIEF DESCRIPTION OF DRAWINGS

[0037] Figure 1 A basic flow diagram of an archive electronic information anti-tampering system based on a block chain is provided for an embodiment of the present application. DETAILED DESCRIPTION

[0038] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments.

[0039] Embodiments, refer to Figure 1 For an embodiment of the present application, an archive electronic information anti-tampering system based on a block chain is provided, which includes a verification module and a distribution module.

[0040] The verification module presets archive-related permissions, and performs first and second verifications on the current request data according to the archive-related permissions.

[0041] The distribution module distributes the current request data according to the first verification result and the second verification result, and updates the original archive data.

[0042] The application forms a permission and content cross-checking mechanism by presetting file-related permissions for first and second dual verification of the requested data, effectively intercepts fake, unauthorized or format-exception modification requests, reduces the risk of single-point verification being bypassed, packages the verification result and the requested data into a new block, and solidifies the operation log through the tamper-proof feature of the block chain. Even if the original file is maliciously updated, any historical version can still be restored based on the on-chain allocation record, realizing operation traceability, responsibility traceability, synchronous updating of the original file, and synchronous generation of the on-chain summary. If the original file is tampered offline, its hash value will not match the on-chain summary, and the system can immediately identify and block illegal data synchronization.

[0043] The file-related permissions include access permissions and modification permissions, the first verification represents verifying the access permissions, and the second verification represents verifying the modification permissions;

[0044] Key information of the file is extracted, and the key information includes contract code, product supply chain information, Party A name, Party B name, and contract signing time point;

[0045] A public key is set according to the supply chain information and the contract signing time point, and a private key is set according to the Party A name and the Party B name, the supply chain information includes a supply chain responsible party digital signature and a representative location, and the digital signature is stored in a signature library;

[0046] The access permissions are set according to the public key, and the modification permissions are set according to the private key.

[0047] In specific implementation, the permission granularity requires that any access or modification must satisfy the dual verification of the contract dimension and the role dimension at the same time, the misauthorization rate tends to be 0, the public key is bound with the supply chain information, the responsible party digital signature, the location, and the signing time, the private key is bound with the Party A and the Party B, a three-dimensional lock of time, location, and role is formed, even if the private key is leaked, an attacker must also fake the entire supply chain signature library at the same time, the attack cost increases exponentially, the digital signature library and the block chain are stored in a dual-track manner, the signature library stores hot data (millisecond-level verification), and the block chain stores cold evidence (tamper-proof), which meets the requirements of high-concurrency business and judicial evidence storage.

[0048] A representative location corresponding to each link of the supply chain is obtained, the representative location represents a location where a responsible party of a supply chain environment is located for a long time, the longitude and latitude of the representative location are obtained, and the longitude and latitude of the representative location are preprocessed;

[0049] The absolute value of the longitude and the absolute value of the latitude are obtained, when the longitude does not satisfy three digits, the remaining digits are filled with 0, when the latitude does not satisfy two digits, the remaining digits are filled with 0, the longitude or the latitude is set to two decimal places according to the rounding method, and when the longitude does not satisfy two decimal places, the remaining digits are filled with 0;

[0050] Select the pre-processed longitude and pre-processed latitude corresponding to the representative place corresponding to any supply chain link, and according to the order of longitude first and latitude second, a sequence of nine digits is obtained, the middle three digits are selected, the first average value of the middle three digits is calculated, and the first average value is set as the representative character of the representative place; according to the advancing order of the supply chain link, the representative characters are sorted to obtain a first character sequence;

[0051] Obtain the contract signing time point, the contract signing time point includes year, month and day, when the month does not satisfy two digits, the remaining digits are filled with 0, and the contract signing time point is arranged into a sequence of eight digits in the order of year, month and day, and is recorded as a second character sequence.

[0052] In specific implementation, the longitude and latitude of the representative place and the contract signing date are solidified into a sequence of the same length and the same character set (0-9 digits), which can be directly embedded into a blockchain transaction ID, a Merkle leaf node or an EPC / RFID tag, realizing end-to-end traceability of one thing one code, and the representative character obtained after zero padding, rounding, taking the middle three digits and then averaging has robustness to original coordinate changes (0.005°≈±550m does not produce new characters), while still retaining sufficient geographical differentiation, ensuring that different cities / parks will not collide, and the 9-bit first character sequence spliced in the order of link advancement naturally hashes the geographical path of the entire supply chain into a 9-byte string, which can be quickly compared with the expected path fingerprint stored on the chain to find out the fake goods or the midway replacement in seconds, and the 8-bit second character sequence and the first character sequence are combined into a 17-bit unique key, which can theoretically accommodate 10¹ 7 space combinations, satisfying more than 100 years of global contract uniqueness, the algorithm only involves 2 times of rounding, 1 time of averaging and 3 times of string cutting, and the CPU time is <0.05 ms, the 17-byte primary key saves 53% storage compared with the traditional UUID (36B), the representative place: Suzhou Industrial Park center coordinates 120.585°E, 31.298°N, longitude zero padding→120.58500→120.59, latitude zero padding→31.29800→31.30, taking 120593130→middle three digits 593→average value (5+9+3) / 3=5.66666667→rounding 6→representative character=6, other link representative characters include 2, 3 and 7 respectively, contract signing date: 2024-07-24→20240724, first character sequence (entire chain 3 links): 6237, one of the final primary keys is: 623720240724 (12 bits).

[0053] Randomly arrange and combine the first character sequence and the second character sequence to obtain each public key;

[0054] Setting access permissions according to the public key and the digital signature, the access permissions including allowing access and prohibiting access, and the setting logic of the access permissions including:

[0055] Obtaining a current digital signature, calling any digital signature in a signature library, denoted as a reference signature, extracting a first feature quantity of the current digital signature, and extracting a second feature quantity of the reference signature, the first feature quantity and the second feature quantity are both shape feature quantities, calculating a first similarity of the first feature quantity and the second feature quantity through a cosine similarity formula, setting a first value as a first similarity threshold, comparing the first similarity with the first value, when the first similarity is greater than or equal to the first value, setting the corresponding access permission as allowing access, when the first similarity is less than the first value, jumping to the next reference signature, when there is a first similarity greater than or equal to the first value, setting the corresponding access permission as allowing access, when all the first similarities are less than the first value after traversing the reference signatures, setting the corresponding access permission as prohibiting access.

[0056] In a specific implementation, a first character sequence (≥3 bits) + a second character sequence (8 bits) is randomly arranged and combined to generate 3.99*10 7 11-digit strings, which are mapped to a secp256r1 curve to obtain 3.99*10 7 non-repeated public keys, even if an attacker obtains a public key, the exhaustive probability is less than 2.5*10⁻ 8 ⁻, and brute force cracking is almost impossible. The shape feature quantity (curve contour vector, 128 dimensions) of the digital signature is used to replace the traditional binary comparison, the scanning noise is tolerated by ±3px, and the cosine similarity greater than or equal to 0.92 is regarded as the same signature handwriting, which not only retains security but also reduces false rejection caused by scanning distortion. There is no need to pre-store all public key hashes, only 1-bit flag is written on the chain to indicate the allowed / inhibited result, 99.8% of storage is saved, the first similarity threshold (0.92) is automatically fine-tuned by 30-day false rejection / false release statistics, and is updated every 24 hours to ensure that the FPR is less than 0.1% and the FNR is less than 0.2%. The first character sequence is 572, the second character sequence is 20240724, and one of the randomly arranged combinations is 24720205721→mapped to the public key 0x24720205721…A1F. The shape feature quantity V_cur of the current digital signature is [0.11, -0.23, …, 0.67], the reference signature V_ref is [0.12, -0.21, …, 0.69]→the similarity is 0.94>0.92→the flag is written as 1 (allowed).

[0057] Setting a private key according to the name of the first party and the name of the second party, and the setting logic of the private key including:

[0058] The name of party A and the name of party B are converted into data packets, a hash value of the data packets is obtained, the hash values are randomly arranged and combined to obtain a hash value sequence;

[0059] The public key sequence and the hash value sequence are combined to obtain a private key sequence;

[0060] Among them, after each access or each modification, the used public key or private key is deleted, and the access data packet or the modification data packet is generated and stored in the backup data block. In the backup data block, the access or modification time, the access data packet or the modification data packet, and the access or modification person correspond to each other. When the access operation and the modification operation exist at the same time, the access data and the modification data are combined and packaged.

[0061] In a specific implementation, the private key exists only in a one-time access / modification life cycle, and is erased immediately after the operation is completed, without any residue in the RAM and storage medium. Even if the node is physically attacked, the available private key cannot be obtained, achieving the use-and-burn principle. The private key = public key sequence (spatiotemporal encoding), hash value sequence (A and B names), and any missing factor cannot reproduce the private key. Even if an attacker intercepts all historical backup data packets, the private key cannot be reconstructed due to the lack of real-time public key sequence. The backup data block only records four tuples of 〈timestamp, operation type, hash pointer, operator DID〉, with an average of 128B per entry. In the specification, the following is added: "Party A name A, party B name B, operation type OP ∈ {read, write}, calculate name hash: h = SHA-256 (A‖B), generate real-time public key sequence: take the first character sequence (6237) + the second character sequence (e.g. 20240724) → 10 decimal mapping to secp256r1 point P, take the x coordinate 32B, calculate the private key: d_A = HMAC-SHA-256 (P_x‖h‖N) first 32B, to get the private key. Compared with the traditional full transaction content on-chain, 94% of storage is saved, and at the same time, the original content can be located at a second level through the hash pointer, realizing the on-chain indexing and off-chain cold storage hybrid mode. When access and modification almost simultaneously arrive (time difference < 50ms), the system combines the two data packets into one Merkle sub-tree node and then falls into a block, ensuring atomicity. During the pilot period, the conflict merging success rate was 100%, with no dirty read and no duplicate accounting. The auditor only needs to input the DID or time period to pull out the complete operation link within 1.3s. All records are provided with SHA-256 double hash and SM2 signature, meeting the traceable and verifiable requirements.

[0062] The logic of setting the modification permission according to the private key includes:

[0063] The input private key is verified. When the private key verification fails, the modification permission is set to be prohibited from modification, and the modification operation is packaged as a first data packet and sent to a temporary operation slice area of each scattered block;

[0064] When the private key verification is successful, a modification request is sent to the block where Party A or Party B is located, and first feedback information of the block where Party A or Party B is located is obtained, the first feedback information including agreement and disagreement;

[0065] When the first feedback information is agreement, the modification permission is set to allow modification, and when the second feedback information is disagreement, the modification permission is set to prohibit modification.

[0066] After the modification is completed, the modification content is packaged into a second data packet, and sent to a temporary operation slice area of the block where Party A or Party B is located, and second feedback information of the block where Party A or Party B is located is obtained, the second feedback information including agreement and disagreement.

[0067] In a specific implementation, the private key verification directly blocks the modification to prevent any single-point key leakage, i.e., tampering. Through private key verification and twice confirmation of the blocks of Party A and Party B, double-factor authorization is realized. Even if an attacker forges a private key, the attacker still needs to hijack the block nodes of Party A and Party B at the same time, and the attack probability is <10⁻¹². The failed or pending modification operation is packaged into a temporary operation slice area (logically, a side-chain of each block), which is physically isolated from the official ledger, thereby avoiding dirty writing and enabling automatic recovery of garbage data within 24 hours, with a block expansion rate controlled at 0.8% / month. The modification request and confirmation information are completed in a cross-block round trip within 300 ms through an inter-chain light client protocol (actual measurement: <10 ms in a local area network, and <300 ms across provinces), which ensures that the confirmation is still in seconds in a high-concurrency scenario (>1000 TPS). The temporary slice area uses Bloom-filter+7-day rolling snapshot, and the 7-day automatic cleaning after failure saves 93% of storage compared to the traditional all-failed transactions permanently remaining in the chain, and reduces the cross-provincial bandwidth occupancy by 68%.

[0068] When the second feedback information is agreement, the original archive is updated according to the modification content, and the updated archive is packaged into a third data packet and sent to each block, and a new hash value of the updated third data packet is obtained, and in each block, the third data packet is automatically divided into each third sub-data packet;

[0069] When the second feedback information is disagreement, a modification invalid signal is sent to the block where Party A or Party B is located, and the modification content is deleted;

[0070] The second data packet is sent through an encrypted channel.

[0071] In a specific implementation, the original file update is only performed when the second feedback information is an approval, and a third data packet is immediately broadcast to all blocks. After receiving the third sub-data packet, any node can complete the consistency check within 300 ms by comparing the new hash value, completely eliminating half-written or dirty reading. The third sub-data packet is automatically divided into 64 KB, and (k+m)=(6+3) Reed-Solomon encoding is used. Any 3 nodes offline can still be completely restored, the system availability is ≥99.97%, the new hash value of the third data packet is written in the block header of the new block as a global hash lock. If an attacker attempts to rollback, only one hash comparison is needed to find the inconsistency, and the rollback success rate is 0. The second data packet uses an encrypted channel of AES-256-GCM and ECDH temporary key throughout. When the second feedback is different, the system immediately sends a modification invalid signal to nodes A and B and triggers a secure erase. The memory and temporary area are overwritten three times (0x00, 0xFF, random number), and the residual information entropy is <10⁻¹ 0 .

[0072] The data packet of the original file is automatically divided into data sub-packets and stored in the block. The data packet is configured with a first search strategy and a second search strategy. The first search strategy is used to search for the latest state of the data packet, and the second search strategy is used to search for the data packet corresponding to the modification content.

[0073] The first search strategy includes:

[0074] Obtain a block, obtain the hash value of the data packet to be searched, compare the hash value with the historical hash value, when the hash value is the same as the historical hash value, jump to the data chain corresponding to the historical hash value, trace back to the data chain to obtain the latest data packet;

[0075] The second search strategy includes:

[0076] Obtain the hash value corresponding to the modification content to be searched, jump to the sub-data packet corresponding to the latest data packet, obtain the hash value of each sub-data packet, obtain the hash value of the second data packet, compare the hash value corresponding to the modification content to be searched with the hash value of the second data packet, calculate the first difference value of the hash value corresponding to the modification content to be searched and the hash value of the second data packet, sort the first difference value in ascending order, select the top two first difference values, and set the original file data corresponding to the second data packet corresponding to the top two first difference values as the modification content to be searched.

[0077] In a specific implementation, by writing the hash value of the latest file directly into the block header, any node only needs to perform one hash comparison to determine whether it is the latest one. If the hash has not changed, the system automatically traces back along the historical hash chain O(logn) to locate the latest data packet within an average of 0.18 seconds. If the hash has changed, the current block is immediately hit, avoiding full-chain scanning. The hash of the modified content is compared with the hash of all second data packets (modification proposals) to obtain the first difference. After sorting in ascending order, the top two sub-packets are taken as the most likely corresponding original file slices.

[0078] The present application performs first and second double verification on the requested data through preset file-related permissions, forming a permission and content cross-checking mechanism, which can effectively intercept counterfeit, unauthorized or format-exception modification requests, reduce the risk of single-point verification being bypassed, package the verification result and the requested data into a new block, and solidify the operation log through the tamper-proof feature of the block chain. Even if the original file is maliciously updated, any historical version can still be restored based on the on-chain allocation record, realizing operation traceability, responsibility traceability, synchronous updating of the original file, and synchronous generation of the on-chain summary. If the original file is tampered offline, its hash value will not match the on-chain summary, and the system can immediately identify and block illegal data synchronization.

[0079] Those skilled in the art will appreciate that embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media having computer-usable program code embodied in the medium. The storage media are implemented by any type of volatile or non-volatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. These computer program instructions can also be stored in a computer readable storage medium that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer readable storage medium produce a manufactured product including instruction means, which realizes the flow Figure 1 one flow or multiple flows and / or blocksFigure 1 the function specified in the one or more blocks.

[0080] It should be noted that the above-mentioned embodiments are only used to illustrate the technical solutions of the present application, not to limit the present application. Although the present application is described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or equivalent replaced without departing from the spirit and scope of the technical solutions of the present application, and they should be covered in the scope of the claims of the present application.

Claims

1. A blockchain-based electronic archival information anti-tampering system, characterized in that, Includes a verification module and an allocation module; The verification module presets file-related permissions and performs a first and second verification on the currently requested data based on the file-related permissions. The allocation module allocates the currently requested data and updates the original archive data based on the first verification result and the second verification result. The file-related permissions include access permissions and modification permissions. The first verification represents verifying access permissions, and the second verification represents verifying modification permissions. Extract key information from the file, including contract code, product supply chain information, name of Party A, name of Party B, and contract signing date; The public key is set according to the supply chain information and the contract signing time, and the private key is set according to the names of Party A and Party B. The supply chain information includes the digital signature and representative location of the responsible party in the supply chain. The digital signature is stored in a signature library. Set access permissions based on the public key, and set modification permissions based on the private key; Obtain representative locations corresponding to each link in the supply chain. These representative locations are the locations where the responsible parties in the supply chain environment are located for a long time. Obtain the longitude and latitude of the representative locations and preprocess them. The logic for setting the private key includes: The names of Party A and Party B are converted into data packets, the hash values ​​of the data packets are obtained, and the hash values ​​are randomly arranged and combined to obtain a hash value sequence. The public key sequence is combined with the hash value sequence to obtain the private key sequence; Obtain the absolute values ​​of longitude and latitude. If the longitude is less than three digits, fill the remaining digits with 0. If the latitude is less than two digits, fill the remaining digits with 0. According to the rounding method, set the longitude or latitude to two decimal places. If the longitude is less than two decimal places, fill the remaining digits with 0. Select the preprocessed longitude and preprocessed latitude of the representative location corresponding to any supply chain link. According to the sorting method of longitude first and latitude second, a sequence of nine numbers is obtained. Select the middle three numbers and calculate the first average value of the middle three numbers. Set the first average value as the representative character of the representative location. According to the advancement order of the supply chain links, sort the representative characters to obtain the first character sequence. Obtain the contract signing time point, which includes year, month and day. When the month does not meet the requirement of two digits, fill the remaining digits with 0. Arrange the contract signing time points into an eight-digit sequence according to the order of year, month and day, and record it as the second character sequence. The first and second character sequences are randomly arranged and combined to obtain the various public keys; Access permissions are set based on the public key and digital signature. These access permissions include allowing and denying access. The logic for setting these access permissions includes: Obtain the current digital signature, retrieve any digital signature from the signature library and denote it as the reference signature, extract the first feature of the current digital signature, and extract the second feature of the reference signature. Both the first and second feature are shape features. Calculate the first similarity between the first and second feature using the cosine similarity formula, set the first value as the first similarity threshold, and compare the first similarity with the first value. When the first similarity is greater than or equal to the first value, set the corresponding access permission to allow access. When the first similarity is less than the first value, jump to the next reference signature. When there is a first similarity greater than or equal to the first value, set the corresponding access permission to allow access. When all reference signatures are traversed and all first similarities are less than the first value, set the corresponding access permission to deny access. Private keys are set according to the names of Party A and Party B. After each access or modification, the public key or private key that has been used is deleted, and an access data packet or modification data packet is generated and stored in a backup data block. In the backup data block, the access or modification time, access data packet or modification data packet, and accesser or modifier correspond to each other. When access operation and modification operation exist at the same time, the access data and modification data are merged and packaged. The logic for setting and modifying permissions based on the private key includes: The input private key is verified. If the private key verification fails, the modification permission is set to prohibit modification, and the modification operation is packaged into the first data packet and sent to the temporary operation area of ​​each distributed block. Once the private key is successfully verified, a modification request is sent to the block where Party A or Party B is located, and the first feedback information of the block where Party A or Party B is located is obtained. The first feedback information includes agreement and disagreement. When the first feedback message is "agree", the modification permission is set to "allow modification"; when the second feedback message is "disagree", the modification permission is set to "disable modification".

2. The blockchain-based electronic archival information anti-tampering system as described in claim 1, characterized in that: After the modifications are completed, the modified content is packaged into a second data packet and sent to the temporary operation area of ​​the block where Party A or Party B is located to obtain the second feedback information of the block where Party A or Party B is located. The second feedback information includes agreement and disagreement.

3. The blockchain-based electronic archival information anti-tampering system as described in claim 2, characterized in that: When the second feedback message is "agree", the original file is updated according to the modification content, and the updated file is packaged into a third data packet and sent to each block. The new hash value of the updated third data packet is obtained. In each block, the third data packet is automatically divided into each third sub-data packet. When the second feedback message is "disagree", an invalid modification signal is sent to the block where Party A or Party B is located, and the modified content is deleted; The second data packet is sent through an encrypted channel.

4. The blockchain-based electronic archival information anti-tampering system as described in claim 3, characterized in that: The original archive data packets are automatically divided into data sub-packets and stored in blocks. A first search strategy and a second search strategy are configured for the data packets. The first search strategy is used to search for the latest status of the data packets, and the second search strategy is used to search for data packets corresponding to the modified content.

5. A blockchain-based electronic archival information anti-tampering system as described in claim 4, characterized in that: The first search strategy includes: Obtain any block, obtain the hash value of the data packet to be searched, compare the hash value with the historical hash value, when the hash value is the same as the historical hash value, jump to the data chain corresponding to the historical hash value, trace the data chain, and obtain the latest data packet; The second search strategy includes: Obtain the hash value corresponding to the content to be searched and modified, jump to the sub-data packet corresponding to the latest data packet, obtain the hash value of each sub-data packet, obtain the hash value of the second data packet, compare the hash value corresponding to the content to be searched and modified with the hash value of the second data packet, calculate the first difference between the hash value corresponding to the content to be searched and modified and the hash value of the second data packet, sort the first difference in ascending order, select the top two first differences, and set the original file data corresponding to the second data packet corresponding to the top two first differences as the content to be modified.

Citation Information

Patent Citations

  • Tamper-proof processing method and device for digital archives and electronic equipment

    CN117972797A

  • File management method and device based on alliance blockchain

    CN111475836A

  • Block chain data management method and system

    CN119397578A