A blockchain-based archive sharing platform
By designing a blockchain -based file sharing platform, the credible sharing of archives is realized, the problem of file sharing in existing technology is solved, and the application scope and security of the archives are improved.
Patent Information
- Application Number
- CN202210334982.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-31
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2042-03-31
AI Technical Summary
At present, there is a lack of trusted archive sharing solutions. The existing blockchain-based archive sharing management platform can only realize the anti-counterfeiting effect of information content, but cannot realize the sharing of archives.
A blockchain -based file sharing platform is designed, including archives receiving modules, archives regulation modules, archives certificate modules and file sharing modules. Receive the file scanning and description information through the file receiving module. The file regulation module is set to set the preset patch area for each file type, and the watermark is added to each copy. The file deposit module is uploaded to the blockchain. File sharing modules establish file indexes and verify the authenticity of the identity and archives of the request.
Perform the file scanning through the blockchain, so that the electronic archives have a voucher effect, reduce the management cost of files, and improve the application scope of files; improve the security of file sharing by improving patch watermarks; The privacy security of the field area protection files.
Smart Images

Figure CN114692184B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and in particular to a file sharing platform based on blockchain. Background Art
[0002] Archives refer to original records of various forms with preservation value directly formed by people in various social activities. Original record is its essential attribute. It is precisely because archives have original record and voucher effect that archives are still mainly preserved in the form of paper. Preserving archives in paper form not only requires a special place, but also has high storage costs, and is not easy to find and share. As a result, archives are usually not used again after being preserved, and the social benefits of archives are difficult to play. Blockchain is a decentralized distributed storage technology. The data stored on the blockchain has the characteristics of being tamper-proof, transparent and traceable, and can therefore provide credible proof. Researching new archive management technologies in combination with blockchain has become an important research topic in the current field.
[0003] For example, a blockchain-based archive sharing management platform includes an archive storage mechanism operation module, a front-end application module, an interface module, a platform business module and an archive storage module. The archive storage module is connected to the front-end application module through the platform business module and the interface module in turn. The interface module is also connected to the archive storage mechanism operation module. The platform business module includes an index module and a verification module. Its technical solution enables users or authorized third-party institutions to conduct anti-counterfeiting verification on archives obtained through this platform, thereby ensuring the integrity and authenticity of the obtained archives. However, it can only realize the anti-counterfeiting effect of information content, has a limited scope of application, and cannot realize the sharing of archives. Summary of the invention
[0004] The technical problem to be solved by the present invention is that there is currently a lack of a trusted file sharing solution. A blockchain-based file sharing platform is proposed, which can realize trusted file sharing.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is: a blockchain-based archive sharing platform, including an archive receiving module, an archive organizing module, an archive evidence storage module and an archive sharing module, the archive receiving module receives archive scans and archive description information, the archive description information records the archive type, source department and search field, the archive organizing module sets a preset patch area for each archive type, cuts the image of the archive scan in the preset area as a patch, fills the preset area with white, copies the patch several times, obtains N copies of the patch, adds a watermark to each copy, the watermark includes an archive hash value and a matter to be handled, the watermark of the copies of the N patches traverses the possible values of the matter to be handled, the archive evidence storage module extracts the hash value of the archive scan as the archive hash value, extracts the hash value of the copy of each patch, incorporates it into the patch hash value set, extracts The hash values of the archive hash value and the patch hash value set are used as the evidence hash value, the evidence hash value is uploaded to the blockchain storage, the corresponding block height is obtained, the value of the search field on the archive scan is identified as the search key value, the archive sharing module establishes an archive index, the archive index records the archive type, the search key value, the archive hash value, the patch hash value set, the evidence hash value and the block height, the archive sharing module receives the archive sharing request sent by the requester, verifies the identity of the requester, queries the archive index to obtain the archive scan whose search key value matches the search value provided in the archive sharing request, and provides the archive scan, the patch that matches the handling matters provided in the archive sharing request, the archive hash value, the patch hash value set, the evidence hash value and the block height to the requester, and the requester verifies the archive hash value, the patch hash value set and the evidence hash value, and determines that the received archive scan is authentic.
[0006] Preferably, the watermark also includes an N-digit hexadecimal number, and the archive sharing module extracts the hash value of the requester's identity, the evidence hash value, the matter to be handled and the timestamp, which is recorded as the matter hash value. When selecting a patch, the N-digit hexadecimal number contained in the watermark of the patch is made to be the same as the last N digits of the matter hash value.
[0007] Preferably, the file sharing module establishes a counting table, which records the number of requests for file scans. The file sharing module extracts the number of requests, the requester's identity, the evidence hash value, the hash value of the matter to be handled and the timestamp, which are recorded as the matter hash value.
[0008] Preferably, the pixel offset of the watermark position relative to the upper left corner of the patch is set as an offset function of an N-bit hexadecimal number. When adding a watermark to the patch, the adding position of the watermark is determined according to the pixel offset obtained by the offset function.
[0009] Preferably, the field area of each file type is manually labeled, the field area is associated with the field name, the hash value of the field area is extracted and included in the partition hash value set, the hash value of the area outside the field area and the patch area is extracted and included in the partition hash value set, the hash value of the partition hash value set is extracted as the file hash value, the partition hash value and the field area position are associated with the file scan and stored, the file sharing module stores a matter table, the matter table records the field name set required for handling matters, when the file sharing module provides the file scan to the requester, the field area not required for the matter is covered with a masking color, and then the file scan, the corresponding patch, the partition hash value set, the file hash value, the patch hash value set, the evidence hash value and the block height are provided to the requester, the requester extracts the hash value of the field area not covered by the masking color, verifies that it exists in the partition hash value set, verifies that the hash value of the area outside the field area and the patch area exists in the partition hash value set, and then verifies that the evidence hash value is consistent with the evidence hash value stored on the blockchain, and then determines that the received file scan is authentic.
[0010] Preferably, the file arrangement module establishes a file template for each file type, and the file template is obtained by scanning a blank file of the same file type. After receiving the file scan, the pixel difference between the file scan and the file template at each pixel position is calculated, and the first byte length and the second byte length are preset. The maximum value represented by the first byte length is M1, and the minimum value represented by the second byte length is M2. If the pixel difference is less than M1, the first byte length is used to represent it, and if the pixel difference is not less than M1, the second byte length is used to represent it. If the byte length of adjacent pixels changes, M1 or M2 is inserted between the two pixels, and the inserted value occupies the same byte length as the byte length occupied by the adjacent pixel before the previous pixel. When the file sharing module reads the file scan, the pixel difference is superimposed on the file template to obtain the file scan.
[0011] The substantial effects of the present invention are as follows: by storing archive scans through blockchain, electronic archive scans also have the effect of credentials, so that paper archives no longer need to be stored, reducing archive management costs, and electronic archive scans are easier to find and share, which can increase the application scope of archives; the improved sticker watermark can prevent shared archives from being used for other purposes, thereby improving the security of archive sharing; by covering unnecessary field areas, the leakage of archive information can be reduced, which helps to protect the privacy and security of archives. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 This is a schematic diagram of the file sharing platform of Example 1.
[0013] Figure 2 This is a schematic diagram of the archive scanned copy evidence storage in Example 1.
[0014] Figure 3 This is a schematic diagram of adding watermarks in Example 1.
[0015] Figure 4 A schematic diagram is added for the covering color of Example 2.
[0016] Among them: 10. File receiving module, 20. File organization module, 30. File evidence module, 31. File hash value, 32. Evidence hash value, 33. Patch hash value set, 40. File sharing module, 50. Blockchain, 61. Patch, 62. Watermark, 71. Field area, 72. Masking color. DETAILED DESCRIPTION
[0017] The specific implementation of the present invention will be further described below through specific examples in conjunction with the accompanying drawings.
[0018] Embodiment 1:
[0019] A blockchain-based archive sharing platform, see attached Figure 1 , including an archive receiving module 10, an archive organizing module 20, an archive notarization module 30 and an archive sharing module 40, wherein the archive receiving module 10 receives an archive scan and archive description information, wherein the archive description information records the archive type, source department and search field, and the archive organizing module 20 sets a preset patch area for each archive type, cuts the image of the archive scan in the preset area as a patch 61, fills the preset area with white, copies the patch 61 several times, obtains N copies of the patch 61, and adds a watermark 62 to each copy, see the attached Figure 2, the watermark 62 includes the archive hash value 31 and the handling items, the watermark 62 of the copies of N patches 61 traverses the possible values of the handling items, the archive evidence module 30 extracts the hash value of the archive scan as the archive hash value 31, extracts the hash value of each copy of the patch 61, and incorporates it into the patch hash value set 33, extracts the hash values of the archive hash value 31 and the patch hash value set 33 as the evidence hash value 32, uploads the evidence hash value 32 to the blockchain 50 for storage, obtains the corresponding block height, identifies the value of the search field on the archive scan as the search key value, and the archive sharing module 40 establishes an archive index, which records the archive type, Retrieve key value, archive hash value 31, patch hash value set 33, evidence hash value 32 and block height, the archive sharing module 40 receives the archive sharing request sent by the requester, verifies the identity of the requester, queries the archive index to obtain the archive scanned copy whose retrieval key value matches the retrieval value provided by the archive sharing request, and provides the archive scanned copy, the patch 61 that matches the matters provided by the archive sharing request, the archive hash value 31, the patch hash value set 33, the evidence hash value 32 and the block height to the requester. After the requester verifies the archive hash value 31, the patch hash value set 33 and the evidence hash value 32, it determines that the received archive scanned copy is authentic and reliable. After the archive scanned copy is stored as evidence through the blockchain 50, the archive scanned copy cannot be tampered with, thereby providing a proof of authenticity for the archive scanned copy, so that the archive scanned copy has the effect of a voucher. It is very convenient to complete the search and sharing of archives in an electronic form. The archives and archive scanned copies are generated by the trusted department and submitted to the archive receiving module 10. When handling related matters subsequently, the file sharing module 40 can search and share, and handle matters based on the scanned copies of the files, which can facilitate people to handle matters.
[0020] The file sharing module 40 establishes a counting table, which records the number of requests for file scans. The file sharing module 40 extracts the number of requests, the identity of the requester, the evidence hash value 32, the hash value of the task and the timestamp, and records them as the task hash value.
[0021] Please see attached Figure 3 , the watermark 62 also includes an N-bit hexadecimal number. The file sharing module 40 extracts the hash value of the requester's identity, the evidence hash value 32, the item to be handled and the timestamp, and records it as the item hash value. When selecting a patch, the N-bit hexadecimal number contained in the watermark 62 of the patch is the same as the last N bits of the item hash value. When the shared file scan is used for other purposes, the misappropriator cannot provide a watermark 62 that matches the new item hash value. This can prevent the shared file scan from being used for other purposes, and ensure the security of file sharing.
[0022] Add watermark 62 to the patch, and watermark 62 includes matters and 3 hexadecimal numbers. Table 3 records 9 matters to be handled, so it is necessary to establish 9*16^3=36864 watermarks, generate 36864 patches, and extract the hash value of each patch. The hash value does not take up much storage space. And there is no need to store all 36864 patches with watermark 62. After generating a patch with watermark 62 and extracting the hash value, the patch with watermark 62 can be deleted, and only the hash values of all patches need to be retained. Store a patch without watermark 62, and record the location where watermark 62 is added once. Since the text content of watermark 62 can be derived, after recording the location where watermark 62 is added, the derived watermark text content can be added to the patch according to the location where the watermark is added. Therefore, the storage space consumed is not large.
[0023] Set the pixel offset of the watermark position relative to the upper left corner of the patch with respect to the offset function of N-bit hexadecimal numbers. When adding a watermark to the patch, determine the location of the watermark according to the pixel offset obtained by the offset function. The last N bits of the watermark need to be the same as the last N bits of the hash value of the transaction. With the watermark adding position offset function, the outside world can not infer the location of the watermark.
[0024] The beneficial technical effect of this embodiment is: the archive scans are stored through the blockchain 50, so that the electronic archive scans also have the effect of certificates, so that paper archives are no longer necessary to store, reducing the cost of archive management, and the electronic archive scans are easier to find and share, which can increase the application scope of the archives; the improved sticker watermark can prevent the shared archives from being used for other purposes, thereby improving the security of archive sharing.
[0025] Embodiment 2:
[0026] A file sharing platform based on blockchain. This embodiment proposes specific improvements on the sharing of file scans based on the first embodiment. Figure 4In this embodiment, the field area 71 of each file type is manually marked, the field area 71 is associated with the field name, the hash value of the field area 71 is extracted, and included in the partition hash value set, the hash value of the field area 71 and the area outside the patch area is extracted, and included in the partition hash value set, and the hash value of the partition hash value set is extracted as the file hash value 31, and the partition hash value and the field area 71 position are associated with the file scanned copy for storage, and the file sharing module 40 stores a matter table, which records the field name set required for handling matters. When the file sharing module 40 provides the file scanned copy to the requester, the handling The field area 71 not needed for the event is covered with a masking color 72, and then the file scan, the corresponding patch, the partition hash value set, the file hash value 31, the patch hash value set 33, the evidence hash value 32 and the block height are provided to the requester. The requester extracts the hash value of the field area 71 not covered by the masking color 72, verifies that it exists in the partition hash value set, verifies that the hash value of the field area 71 and the area outside the patch area exists in the partition hash value set, and then verifies that the evidence hash value 32 is consistent with the evidence hash value 32 stored on the blockchain 50, and then determines that the received file scan is authentic. Figure 4 As shown in , when the matter to be handled does not require a professional title, when sharing the scanned copy of the "Registration Form for Educational Qualifications and Professional Titles", the field area 71 of the professional title can be covered with a masking color 72 to keep the professional title confidential. The matter can be handled using the information recorded in other field areas 71. At the same time, it does not affect the proof of the authenticity of the scanned copy of the file.
[0027] The file arrangement module 20 establishes a file template for each file type. The file template is obtained by scanning a blank file of the same file type. After receiving the file scan, the pixel difference between the file scan and the file template at each pixel position is calculated, and the first byte length and the second byte length are preset. The maximum value represented by the first byte length is M1, and the minimum value represented by the second byte length is M2. If the pixel difference is less than M1, the first byte length is used for representation, and if the pixel difference is not less than M1, the second byte length is used for representation. If the byte length of adjacent pixels changes, M1 or M2 is inserted between the two pixels, and the inserted value occupies the same byte length as the byte length occupied by the adjacent pixel before the previous pixel. When the file sharing module 40 reads the file scan, the pixel difference is superimposed on the file template to obtain the file scan.
[0028] For a specific file type, such as a paper application form or qualification certificate, the content is formatted and only requires filling in information and signing in a few designated locations. Therefore, most of the pixel values in this type of file scans are the same without considering differences in scanning equipment and light. For example, various informed consent forms have the same content and require people to sign at the end. When the scanning equipment has good repeatability and the placement position is basically the same during scanning, the obtained file scans will have a large number of similar areas, and the pixel value differences in these areas are extremely small.
[0029] For example, when the archive scan uses RGB to represent the color. Each pixel has three channels, and each channel occupies 1 byte, that is, 8 bits. The value range of each channel is [0,255]. When representing the pixel difference, 5 bits are used, and the first bit represents the positive and negative signs, that is, the difference represented by the subsequent 4 bits is added or subtracted from the corresponding channel value of the corresponding pixel position on the archive template. The range represented by 4 bits is [0,15]. Then the value of M1 is 15, and the value of M2 is 0. For pixel points whose channel values exceed the value range that can be represented by 5 bits, the difference is no longer used, but 1 byte is used to directly represent the value of each channel.
[0030] Table 1 Representation of several adjacent pixel values
[0031] Then the binary representation of the adjacent pixel values of the above-mentioned archive scan is:
[0032] (10101,11010,10110), (11010100,11010010,11010010), …, (01000,00100,01001).
[0033] Add M1 and M2 as intervals: (10101,11010,10110), M1: (01111,01111,01111), (11010100,11010010,11010010), …, M2: (00000000,00000000,00000000), (01000,00100,01001).
[0034] Finally, the binary representation of several pixels is:
[0035] 10101110101011001111011111010100110100101011010010…0000000000000000000000010000010001001.
[0036] When the above-mentioned pixels are read, it is set to the pixel difference mode, that is, 5x3 bits are read at a time. Then it is divided into 3 5-bit binary numbers, which are the difference between the pixel values of the first pixel and the same pixel position of the file template. If the first bit of the 5 bits is 1, it is a negative value, and if the first bit is 0, it is a positive value. Get (-5,-10,-6), combined with the file template, the first pixel can be restored. Read 5x3 bits backward again, and find that the pixel differences of the three channels are all positive 15, that is, the value of M1, so the 5x3 bits are discarded. Then read 8x3 bits downward, that is, directly read the values of the 3 channels of the next pixel, and directly restore the pixel. Keep reading downward until a certain 8x3 bits are read, and the read values are all 0, then the 8x3 bits are discarded. Then switch to the mode of reading 5x3 bits downward to continue reading. Since (0,0,0) in RGB represents pure black, and the archive scan is affected by the printing saturation and lighting, the black part in the obtained archive scan will appear as a dark gray close to black, and it is almost impossible to be pure black. Therefore, M2 will not cause distortion of the archive scan. Even if there is pure black in the archive scan, the archive receiving module 10 can replace the pure black pixels with (1,1,1) in batches. If the three channels of the pixel difference between a pixel at a certain position and the pixel of the archive template are exactly 15, the pixel difference is not used to represent the pixel, and one byte is used to directly represent the pixel.
[0037] Compared with the first embodiment, this embodiment can reduce the leakage of file information by covering the unnecessary field area 71, which helps to protect the privacy and security of the file.
[0038] The above-described embodiment is only a preferred solution of the present invention and does not limit the present invention in any form. There are other variations and modifications without exceeding the technical solution described in the claims.
Claims
1. A blockchain-based archive sharing platform, characterized in that: It includes file receiving module, file organizing module, file storage module and file sharing module. The file receiving module receives a file scan and file description information, wherein the file description information records the file type, source department and search field. The file arrangement module sets a preset patch area for each file type, cuts the image of the file scan in the preset area as a patch, fills the preset area with white, copies the patch several times, obtains N copies of the patch, and adds a watermark to each copy. The watermark includes the file hash value and the handling items. The watermarks of the copies of the N patches traverse the possible values of the handling items. The archive evidence module extracts the hash value of the archive scan as the archive hash value, extracts the hash value of each patch copy, incorporates it into the patch hash value set, extracts the hash value of the archive hash value and the hash value set of the patch as the evidence hash value, uploads the evidence hash value to the blockchain storage, and obtains the corresponding block height. The value of the search field on the archive scan is identified as the search key value, and the archive sharing module establishes an archive index, which records the archive type, search key value, archive hash value, patch hash value set, evidence hash value and block height. The archive sharing module receives the archive sharing request sent by the requester, verifies the identity of the requester, queries the archive index to obtain the archive scan whose search key value matches the search value provided in the archive sharing request, and provides the archive scan, the patch that matches the handling items provided in the archive sharing request, the archive hash value, the patch hash value set, the evidence hash value and the block height to the requester. After the requester verifies the archive hash value, the patch hash value set and the evidence hash value, it determines that the received archive scan is authentic; Manually mark the field area of each file type, associate the field area with the field name, extract the hash value of the field area, include it in the partition hash value set, extract the hash value of the area outside the field area and the patch area, include it in the partition hash value set, extract the hash value of the partition hash value set as the file hash value, associate the partition hash value and the field area position with the file scan for storage, the file sharing module stores a matter table, the matter table records the field name set required for handling matters, when the file sharing module provides the file scan to the requester, the field area not required for the matter is covered with a masking color, and then the file scan, the corresponding patch, the partition hash value set, the file hash value, the patch hash value set, the evidence hash value and the block height are provided to the requester, the requester extracts the hash value of the field area not covered by the masking color, verifies that it exists in the partition hash value set, verifies that the hash value of the area outside the field area and the patch area exists in the partition hash value set, and then verifies that the evidence hash value is consistent with the evidence hash value stored on the blockchain, and then determines that the received file scan is authentic.
2. According to the blockchain-based archive sharing platform of claim 1, it is characterized in that: The watermark also includes an N-digit hexadecimal number. The archive sharing module extracts the hash value of the requester's identity, the evidence hash value, the processing items and the timestamp, and records them as the item hash value. When selecting a patch, the N-digit hexadecimal number contained in the watermark of the patch is made to be the same as the last N digits of the item hash value.
3. According to the blockchain-based archive sharing platform of claim 2, it is characterized in that: The file sharing module establishes a counting table, which records the number of requests for file scans. The file sharing module extracts the number of requests, the identity of the requester, the hash value of the evidence, the hash value of the matter to be handled and the timestamp, and records them as the matter hash value.
4. A blockchain-based archive sharing platform according to claim 2 or 3, characterized in that: Set the pixel offset of the watermark position relative to the upper left corner of the patch with respect to the offset function of the N-bit hexadecimal number. When adding a watermark to the patch, determine the location of adding the watermark based on the pixel offset obtained by the offset function.
5. A blockchain-based archive sharing platform according to any one of claims 1 to 3, characterized in that: The file arrangement module establishes a file template for each file type, and the file template is obtained by scanning a blank file of the same file type. After receiving the file scan, the pixel difference between the file scan and the file template at each pixel position is calculated, and the first byte length and the second byte length are preset. The maximum value represented by the first byte length is M1, and the minimum value represented by the second byte length is M2. If the pixel difference is less than M1, the first byte length is used to represent it, and if the pixel difference is not less than M1, the second byte length is used to represent it. If the byte length of adjacent pixels changes, M1 or M2 is inserted between the two pixels, and the byte length occupied by the inserted value is the same as the byte length occupied by the adjacent pixel before the previous pixel. When the file sharing module reads the file scan, the pixel difference is superimposed on the file template to obtain the file scan.
Citation Information
Patent Citations
Archive management method and device based on block chain, equipment and storage medium
CN112560093A
Block chain-based intellectual property data evidence storage and right confirmation method
CN113378218A