Document management method and device and related equipment

By deploying a document management device in a blockchain system, the problem of non-substantial modifications being identified as tampering in blockchain technology is solved, thus simplifying document management and improving security.

CN120872901APending Publication Date: 2025-10-31HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410544678.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-30
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

When using blockchain technology for document management, even non-substantive modifications are considered tampering, leading to false alarms and cumbersome processes, which increases the difficulty of document management.

Method used

Deploying a document management device in a blockchain system can determine whether there are any non-substantial modifications by comparing differences in document versions and sending notification messages to clients, thus simplifying the document management process.

Benefits of technology

It avoids false alarms about document tampering, reduces the difficulty and complexity of document management, and improves security and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120872901A_ABST
    Figure CN120872901A_ABST
Patent Text Reader

Abstract

The invention provides a document management method and device and related equipment, the device is deployed in a block chain system, the block chain system establishes a communication connection with a storage system, the storage system is used for storing document data, the block chain system is used for storing an address of the document data, and when a document in a node is read, the address of the document data is read. If different versions of the document are different, whether the difference is a substantial difference or not can be determined through the document management device, and if the difference is not the substantial difference, the user can be prompted that the difference is a subtle difference, so that false alarms of some document tampering are avoided, and the user experience is improved. According to the document management method and device, the problem that fine modification is affirmed to be tampered due to the fact that document management is conducted through the block chain technology is solved, the document management difficulty and the process complexity degree are reduced, meanwhile, due to the fact that the document management device is deployed in the block chain system, the comparison process of documents of different versions is conducted on the block chain, and safety is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage, and more particularly to a document management method, apparatus, and related equipment. Background Technology

[0002] In business processes, important documents such as legal documents, contracts, and audit records may need to be transferred between different systems. During this transfer, it's impossible to guarantee that the documents haven't been tampered with. Therefore, introducing blockchain technology for document authentication is crucial. Blockchain's decentralized, highly transparent, and robust security features make it an ideal choice for ensuring document immutability. Typically, using blockchain technology for document management involves calculating the document's hash value when storing it. When retrieving the document, if the hash value read is different from the hash value at storage, it indicates that the document has been altered, thus ensuring document immutability.

[0003] However, these important documents may require minor adjustments during business processes, rather than substantial modifications. For example, correcting typos or adjusting wording. Whenever a document changes, its hash value changes. Using blockchain technology for document management could lead to these non-substantive modifications being flagged as tampering, causing false alarms and increasing the difficulty and complexity of document management. Summary of the Invention

[0004] This application provides a document management method, apparatus, and related equipment to address the problem that using blockchain technology for document management can lead to false alarms, where even non-substantial modifications are identified as tampering, increasing the difficulty and complexity of document management.

[0005] Firstly, a document management method is provided. This method is applied to a document management device deployed in a blockchain system. The blockchain system is communicatively connected to a storage system, which stores document data. The blockchain system includes multiple nodes, each of which stores the address information of the document data within the storage system. The method includes the following steps: the document management device receives a document reading request sent by a client. The document reading request includes first version information and second version information of the document to be read. The device obtains the first address information of the first document corresponding to the first version information from the nodes in the blockchain system, and obtains the second address information of the second document corresponding to the second version information. Based on the first and second address information, the device obtains the first and second documents from the storage system. The device compares the first and second documents to obtain difference data. Based on the difference data, the device determines the similarity between the first and second documents. Based on the similarity, the device sends a prompt message to the client. The prompt message indicates whether there are any non-substantial modifications between the first and second documents.

[0006] Implementing the method described in the first aspect involves deploying a document management device on the blockchain. When data on the blockchain is read, the document management device can determine whether the data has been substantially modified, thereby avoiding false alarms of document tampering. This solves the problem that minor modifications can be identified as tampering when using blockchain technology for document management, reducing the difficulty and complexity of document management. Furthermore, because the document management device is deployed within the blockchain system, the comparison process between different versions of documents is conducted on the blockchain. The blockchain environment ensures that documents are not tampered with during the comparison process, eliminating the risk of privacy leaks and enhancing security.

[0007] In one possible implementation, each node includes multiple blocks, and each block includes version information and address information of document data. The document management device includes an index, which includes block information corresponding to the version information of the document data. When the document management device obtains the first address information of the first document corresponding to the first version information from the nodes in the blockchain system, and obtains the second address information of the second document corresponding to the second version information, it can obtain the first block information corresponding to the first version information and the second block information corresponding to the second version information according to the index, and then obtain the first address information based on the first block information and the second address information based on the second block information.

[0008] In this implementation, each block stores the document's version and address. Once the version information is written to the blockchain, it is very difficult to modify or delete, thus ensuring the authenticity and reliability of the version information. This makes document changes traceable, which is highly beneficial for important documents such as contracts, legal documents, audit data, and financial data. Furthermore, the data in the blockchain is public and transparent. Multiple users can access the document's version record information through the blockchain. This transparency ensures the data's credibility and verifiability, helping users establish trust and cooperation. For example, in a supply chain, manufacturers, wholesalers, and retailers need to share supply chain documents. Once the version information of these documents is on the blockchain, if a manufacturer modifies the supply chain document, wholesalers and retailers can learn of this action through the version information and understand the evolution of the supply chain document.

[0009] In one possible implementation, multiple blocks of each node form a data chain in block order. The data chain includes a main chain and at least one side chain. The first block of each side chain is connected to a block in the main chain. The initial version of the document to be read is stored in the first block of the main chain, and the modified versions of the document to be read are stored in consecutive blocks of the side chain in version order. The side chain is connected to the first block of the main chain. The index includes the main chain block corresponding to the initial version of each document. When the document management device obtains the first address information of the first document corresponding to the first version information from the nodes in the blockchain system, and obtains the second address information of the second document corresponding to the second version information, it can obtain the main chain block corresponding to the document to be read based on the index, determine the side chain where the modified version of the document to be read is located, and then obtain the first block information corresponding to the first version information and the second block information corresponding to the second version information from the side chain in version order. Finally, it obtains the first address information based on the first block information and the second address information based on the second block information.

[0010] In the above implementation, by storing the modified versions of the document in the sidechain, consecutive versions are stored in consecutive blocks. When writing a document, the address information of the new version can be directly appended to the next block, which simplifies the write operation without the need for additional index updates and improves write efficiency. When reading a document, the versions of adjacent blocks can be read sequentially without the need for additional index lookups, which improves read efficiency.

[0011] In one possible implementation, each block can also store the hash value of the document. When reading a document, the hash values ​​of the first version of the document and the second version of the document can be compared. If the hash values ​​match, it means that the first version of the document and the second version of the document are completely identical documents, and the comparison process can be skipped.

[0012] The above implementation stores hash values ​​in blocks. Any change to the document will change the hash value. This method allows for a simple determination of whether the first and second documents are the same. If they differ, further comparison is needed to determine if the modification is non-substantial. If they are the same, no further comparison is required, simplifying the process.

[0013] In one possible implementation, the prompt message includes a third document and a difference report. The third document is generated after the difference data has been annotated in the first or second document, and the difference report includes the quantity and location information of the difference data.

[0014] Furthermore, the notification message includes a first notification message and a second notification message. The first notification message is used to notify the user that there are non-substantial modifications between the first and second documents, while the second notification message is used to notify the user that there are substantial modifications between the first and second documents. The difference report may also include a determination of whether the modification is substantial. If a substantial modification is determined, the second notification message may also include notification information indicating that manual review is required.

[0015] Furthermore, for the second notification message that is determined to be a substantial modification, its difference report can also include more information to assist manual review. Specifically, the difference report also includes key information about the document, including but not limited to the document type, title, summary, modifier, and modification time, to facilitate quick review and improve the user experience.

[0016] The above implementation method, by sending prompt messages to users, can help them determine whether the changes to the document are substantial modifications. Substantial modifications do not require prompting users for manual review, reducing unnecessary prompts caused by minor changes. Substantial modifications require prompting users that the document may have been tampered with and require manual review, thus improving the user experience.

[0017] In one possible implementation, when the document management device compares the first document and the second document to obtain difference data, it can first determine the hash value of each paragraph in the first document and the second document, determine the difference paragraphs in the first document and the second document based on the hash value of each paragraph, then determine the hash value of each sentence in the difference paragraphs, determine the difference sentences in the first document and the second document based on the hash value of each sentence, and obtain difference data, which includes the difference sentences and the context information of the difference sentences.

[0018] The above implementation method has high efficiency in hash calculation, and the hash value will change even if there is a slight difference in the input data. The paragraph with difference is identified by calculating the paragraph hash value, and the sentence with difference is identified by calculating the orange hash value. This method can quickly determine whether there is a difference in paragraph data without comparing word by word, thus improving the comparison efficiency.

[0019] In one possible implementation, after identifying the differing sentences, the differing characters and their categories, such as replacement, insertion, or deletion, can be determined. Specifically, the document management device can determine the differing characters and their categories based on the edit distance. The categories include replacement, deletion, and insertion. Specifically, the edit distance between two strings is first determined. This edit distance includes the minimum number of editing operations required to convert the first string to the second string. Editing operations include replacement, insertion, and deletion. If the conversion distance between two sentences is 0, it indicates that the two sentences are the same. If the conversion distance between two sentences is not 0, it indicates that the two sentences differ. Then, based on the editing operations, the differing data and its category, i.e., replacement, insertion, or deletion, are determined.

[0020] Specifically, this edit distance can be the Levenshtein distance. For example, if the sentences "I like to eat fruit" and "I like to eat vegetables" are to be transformed, a replacement edit operation needs to be performed to replace fruit with vegetables. Therefore, the edit distance between these two sentences is 1, the difference data is fruit, and the category is replacement. The above example is for illustration only, and this application does not impose any specific limitations.

[0021] The above implementation method, if using character-by-character comparison to determine the differing characters in sentences, may lead to inaccurate difference data for text differences caused by insertion and deletion operations. This is because character-by-character comparison only checks whether each character is consistent in sequence, failing to capture the semantics of insertion, deletion, and replacement operations. For example, sentence A is "I don't eat fruit," and sentence B is "I don't want to eat fruit." The two sentences are semantically similar. Using hash values ​​only reveals that sentences A and B are different. Character-by-character comparison would result in differences from the third character to the last character, resulting in a difference of four characters. However, the actual difference between the two sentences is only "not" and "don't want." Calculating edit distance can effectively solve this problem. Furthermore, calculating edit distance can also obtain the difference category of the differing characters, which is helpful for subsequent document similarity calculations.

[0022] In one possible implementation, when the document management device determines the document similarity between the first document and the second document based on the difference data, it may first determine the text similarity and semantic similarity of the first document based on the difference data. The text similarity is used to indicate the character differences in the difference data between the first document and the second document, and the semantic similarity is used to indicate the semantic differences in the difference data between the first document and the second document.

[0023] In specific implementations, text similarity can be obtained through word-level similarity algorithms, such as the Okapi BM25 algorithm, TF-IDF algorithm, and cosine similarity algorithm, or based on the Levenshtein distance mentioned above; this application does not impose specific limitations on these methods. Semantic similarity can be obtained through word embedding techniques (such as Word2Vec, GloVe, and BERT) and semantic-based similarity metrics (such as WordNet); this application does not impose specific limitations on these methods either.

[0024] Optionally, semantic similarity can also be determined in conjunction with contextual information. When determining the semantic similarity between differing data, the contextual data of the differing data is extracted for semantic similarity calculation. This contextual data can be obtained through a sliding window, for example, defining a window size of 3 and using the three words before and after the differing data as contextual information; or, an attention model can be used to obtain contextual data. The attention model can identify the contextual information around the differing data and extract the contextual information related to the differing data. The above examples are for illustration, and this application does not limit the method of obtaining contextual information.

[0025] In practice, document similarity may include weights for textual similarity and semantic similarity. Users can dynamically adjust the weights based on different usage scenarios. Document similarity can be determined by weighted summation, weighted average, etc. This application does not impose any specific limitations.

[0026] The above implementation method includes semantic similarity and textual similarity in document similarity. This allows the document management device to compare documents not only based on textual differences, but also to combine contextual information and semantic features of the difference data to determine whether it is a non-substantive modification. Furthermore, the difference data includes the specific characters that differ, and the category of this difference—insertion, deletion, or replacement—which helps the document management device determine whether the difference data constitutes a substantial modification. For example, insertion may indicate supplementary information or added content; for this type of difference data, the focus should be on understanding whether the semantics of the inserted difference data affects the main expression of the sentence. Deletion may indicate the removal of some content; for this type of difference data, the focus should be on understanding whether the semantics of the deleted difference data affects the main expression of the sentence. Replacement may indicate the correction of errors or the updating of information; for this type of difference data, the focus should be on determining whether the two replaced items are synonyms or near-synonyms. The above examples illustrate that the document management device can better understand the intent and purpose of the modification through the difference type, and thus determine whether it is a substantial modification.

[0027] Secondly, a document management device is provided, which is deployed in a blockchain system. The blockchain system establishes a communication connection with a storage system. The storage system is used to store document data. The blockchain system includes multiple nodes, each node including a blockchain. The blockchain is used to store the address information of document data in the storage system. The device includes: a receiving unit for receiving a document reading request sent by a client, the document reading request including first version information and second version information of the document to be read; an obtaining unit for obtaining first address information of a first document corresponding to the first version information and second address information of a second document corresponding to the second version information from the nodes in the blockchain system; an obtaining unit for obtaining the first document and the second document from the storage system based on the first address information and the second address information; a comparison unit for comparing the first document and the second document to obtain difference data and determining the document similarity between the first document and the second document based on the difference data; and a prompting unit for sending a prompt message to the client based on the document similarity, the prompt message including whether there is substantial modification between the first document and the second document.

[0028] Implementing the apparatus described in the second aspect involves deploying a document management device on the blockchain. When data on the blockchain is read, the document management device can determine whether the data has been substantially modified, thereby avoiding false alarms of document tampering. This solves the problem that minor modifications can be identified as tampering when using blockchain technology for document management, reducing the difficulty and complexity of document management. Furthermore, because the document management device is deployed within the blockchain system, the comparison process between different versions of documents is conducted on the blockchain. The blockchain environment ensures that documents are not tampered with during the comparison process, eliminating the risk of privacy leaks and enhancing security.

[0029] In one possible implementation, each node includes multiple blocks, each block includes version information and address information of document data, the document management device includes an index, the index includes block information corresponding to the version information of document data, an acquisition unit is used to acquire first block information corresponding to first version information and second block information corresponding to second version information according to the index, and an acquisition unit is used to acquire first address information based on the first block information and acquire second address information based on the second block information.

[0030] In one possible implementation, consecutive versions of documents are stored in consecutive blocks. The index includes the block range corresponding to each document. The retrieval unit is used to retrieve the block range corresponding to the document to be read according to the index. The retrieval unit is used to retrieve the first block information corresponding to the first version information and the second block information corresponding to the second version information from the block range according to the version order. The retrieval unit is used to retrieve the first address information based on the first block information and the second address information based on the second block information.

[0031] In one possible implementation, each node in the blockchain system includes a document management device, and the address information of the document to be read is stored on the node where the document management device is located; or, the document management node in the blockchain system includes a document management device, and the address information of the document to be read is stored on other nodes, which are nodes in the blockchain system other than the document management node.

[0032] In one possible implementation, the prompt message includes a third document and a difference report. The third document is generated after the difference data has been annotated in the first or second document, and the difference report includes the quantity and location information of the difference data.

[0033] In one possible implementation, the comparison unit is used by the document management device to determine the hash value of each paragraph in the first document and the second document, and to determine the difference paragraphs in the first document and the second document based on the hash value of each paragraph. The comparison unit is also used to determine the hash value of each sentence in the difference paragraphs, and to determine the difference sentences in the first document and the second document based on the hash value of each sentence, thereby obtaining difference data, which includes the difference sentences and contextual information of the difference sentences.

[0034] In one possible implementation, the comparison unit is used to determine the text similarity and semantic similarity of the first document based on the difference data, wherein the text similarity is used to indicate the character differences in the difference data between the first document and the second document, and the semantic similarity is used to indicate the semantic differences in the difference data between the first document and the second document.

[0035] Thirdly, a blockchain system is provided, which is communicatively connected to a storage system. The storage system is used to store document data. The blockchain system includes a document management device and multiple nodes. Each node includes multiple blocks. Each block is used to store the address information of the document data in the storage system. The document management device includes unit modules of the device as described in the second aspect, and implements the method executed by the document management device as in the first aspect.

[0036] Fourthly, a computing device is provided, the computing device including a processor and a memory, the memory for storing instructions and the processor for executing the instructions, such that the computing device implements the method described in the first aspect.

[0037] Fifthly, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and the instructions are executed by a computing device or a cluster of computing devices to implement the method described in the first aspect.

[0038] In a sixth aspect, a computing device cluster is provided, the computing device cluster including at least one computing device, each of the at least one computing device including a processor and a memory, the processor of the at least one computing device being configured to execute instructions stored in the memory of the at least one computing device to cause the computing device cluster to implement the method as described in the first aspect.

[0039] In a seventh aspect, a computer program product comprising instructions is provided, the computer program product including instructions capable of running on a computing device or stored in any available medium, and when the computer program product is run on a computing device or a cluster of computing devices, causing the computing device or cluster of computing devices to perform the method described in the first aspect. Attached Figure Description

[0040] Figure 1 This is an architectural diagram of a document management device provided in this application;

[0041] Figure 2 This is an example diagram of a document management device deployed in a cloud environment according to this application;

[0042] Figure 3 This is an architectural diagram of another document management device provided in this application;

[0043] Figure 4 This is a flowchart of the steps in the storage phase of a document management method provided in this application;

[0044] Figure 5 This is a flowchart illustrating the steps of a text management method provided in this application during the reading phase;

[0045] Figure 6 This is an example diagram of a notification message interface provided in this application;

[0046] Figure 7 This is an example of an interface for another notification message provided in this application;

[0047] Figure 8 This is a schematic diagram of the structure of a document management device provided in this application;

[0048] Figure 9 This is a schematic diagram of the structure of a computing device provided in this application;

[0049] Figure 10 This is an example diagram of a computing device cluster provided in this application;

[0050] Figure 11 This is another example diagram of a computing device cluster provided in this application. Detailed Implementation

[0051] First, the application scenarios involved in this application will be explained.

[0052] Blockchain technology is a distributed ledger technology that links data together in blocks to form an immutable, continuous record. Using blockchain for document management involves calculating a document's hash value when storing it, and then storing this hash value on the blockchain. Due to the immutability of the blockchain, the document's hash value, once written to the blockchain, cannot be modified or deleted. If a document changes, a new hash value needs to be generated and written to the blockchain when storing the new document. Thus, when reading a document, if the hash value read does not match the hash value at storage, it indicates that the document has been altered, ensuring the document's immutability. This provides a robust protection mechanism for documents, allowing any data tampering to be detected. It is of significant value in scenarios requiring the protection of document authenticity and integrity, such as in the legal, financial, and medical fields.

[0053] However, these important documents may require minor adjustments during business processes, such as correcting typos or adjusting wording. Whenever a document changes, its hash value changes. Using blockchain technology for document management could lead to these minor modifications being flagged as tampering, causing false alarms and increasing the difficulty and complexity of document management.

[0054] To address the issue of false alarms caused by minor modifications being identified as tampering when using blockchain technology for document management, this application provides a document management solution implemented through a document management device deployed within a node of the blockchain system. When data on the blockchain is read, the document management device can determine whether the data has been substantially modified, thereby avoiding false alarms of document tampering. This solution resolves the problem of minor modifications being identified as tampering when using blockchain technology for document management, reducing the difficulty and complexity of document management processes.

[0055] The technical solution provided in this application will be explained below with reference to the accompanying drawings.

[0056] Figure 1 This is an architectural diagram of a document management device provided in this application, such as... Figure 1 As shown, the architecture includes a first client 100, a blockchain system 200, a storage system 300, and a second client 400. The blockchain system 200 includes multiple nodes 210, wherein each node 210 includes a block set 211 and a document management device 212.

[0057] The number of the first client 100, the second client 400, and the storage system 300 can be one or more. There is a communication connection between the first client 100, the blockchain system 200, the storage system 300, and the second client 400. This communication connection can be a wired connection or a wireless connection. The network can be the public Internet, an internal local area network (LAN), a virtual private network (VPN), a dedicated line such as fiber optic line, copper wire, satellite connection, etc., or a wireless network such as wireless fidelity (Wi-Fi), cellular network, etc. This application does not make specific limitations.

[0058] The first client 100 and the second client 400 are deployed on terminal devices to enable human-computer interaction. The first client 100 sends user-input data, request instructions, and other information to the blockchain system 200 for processing. The first client 100 is held by the first user storing the document data, and the second client 400 is held by the second user reading the document data. In some possible implementations, if the first user reading the data and the second user storing the data are the same user, then the first client 100 and the second client 400 can also be the same client. The terminal device includes personal computers, smartphones, wearable devices, handheld processing devices, tablets, mobile laptops, augmented reality (AR) devices, virtual reality (VR) devices, smart conferencing devices, etc., without specific limitations here. The description of the computing device can be found above and will not be repeated here. The first client 100 and the second client 400 can also be deployed on physical servers, such as ARM servers or x86 servers, without specific limitations in this application.

[0059] The blockchain system 200 can be deployed on computing devices, or on a cluster of computing devices composed of multiple computing devices. The computing devices can be bare metal servers (BMS), virtual machines, containers, or storage devices. A BMS refers to a general-purpose physical server, such as an ARM server or an x86 server; a virtual machine refers to a complete computer system simulated by software, possessing full hardware system functionality and running in a completely isolated environment. Any task that can be performed on a physical computer can also be performed in a virtual machine. When creating a virtual machine on a computing device, a portion of the physical machine's hard drive and memory capacity needs to be used as the virtual machine's hard drive and memory capacity. Each virtual machine has an independent basic input / output system (BIOS), hard drive, and operating system, and can be operated like a physical machine. A container is a portable software unit that can combine an application and all its dependencies into a single software package. This package is not limited by the underlying host operating system, thus eliminating the need to build complex environments and simplifying the application development and deployment process. In specific implementations, the computing device cluster can be a cloud data center, an enterprise private cluster, or a hybrid cloud environment, i.e., a deployment mode that uses both public and private clouds simultaneously; this application does not impose specific limitations.

[0060] The blockchain system 200 includes multiple nodes 210, each of which can be a computing device or a cluster of computing devices. The description of the computing device or cluster is as described above and will not be repeated here. In specific implementations, when the blockchain system 200 is deployed on a cluster of computing devices, each node 210 in the blockchain system 200 can be a computing device within that cluster, or a smaller cluster within that cluster; this application does not impose specific limitations.

[0061] Storage system 300 can be deployed in storage devices or storage arrays. Storage devices can be hard disk drives (HDDs), solid-state drives (SSDs), mechanical hard disks (HDDs), USB flash drives (USB), flash memory, SD cards (Secure Digital Memory Cards), Memory Sticks, etc., and this application does not impose specific limitations. Storage arrays can be redundant arrays of independent disks (RAID), network attached storage (NAS), storage area networks (SANs), etc., and this application does not impose specific limitations. The storage device can also be a virtual storage device provided by a cloud storage service. In this embodiment, documents are stored in storage system 300, and the document's storage address is stored in blockchain system 200. Storage system 300 is an external storage system of blockchain system 200, such as a distributed file system or cloud storage service, and this application does not impose specific limitations.

[0062] In specific implementations, the first client 100 and the second client 400 can be software or applications running on terminal devices or computing devices controlled by the user, such as personal computer (PC) clients, web clients accessed through browsers, application (APP) clients running on mobile terminals, or consoles of cloud platforms. This application does not impose any specific limitations.

[0063] In this embodiment, the first client 100 processes the document and sends a document storage request to the blockchain system 200. The second client 400 reads the document and sends a document reading request to the blockchain system 200. The technical solution of this application can obtain the document based on the document reading request and determine whether there are any non-substantial modifications made to the document during storage or between multiple versions requested by the user. Non-substantial modifications refer to formal modifications to the document that do not affect its content. Non-substantial modifications may include correcting typos, modifying formatting, converting synonyms, grammatical corrections, simplifying expressions, and standardizing language. Substantial modifications, on the other hand, refer to modifications other than formal modifications. Substantial modifications substantially alter and revise the document, changing its content, logical structure, or core ideas.

[0064] For example, in one application scenario, the first client is the client of the hospital management system, and the document is the patient's health record. The second client 400 is the application for the patient's health record. The blockchain system 200 and the storage system 300 are used to store the health record. The patient can read the health record through the second client 400. If the health record is modified, the technical solution of this application can enable the patient to know in a timely manner whether the change is a substantial modification. Substantive modifications in the medical scenario may be modifications to data such as the patient's symptom description, drug prescription, and treatment suggestions. Non-substantive modifications may be modifications to punctuation, correction of typos, synonym conversion, grammatical correction, etc.

[0065] In another application scenario, the first client 100 is the law firm's document management system client, where the documents are legal documents. The second client 400 is the client's legal document review application. The blockchain system 200 and storage system 300 are used to store the legal documents. Clients can read the legal documents through the second client 400. If the legal documents are modified, the technical solution provided in this application allows clients to promptly know whether the change constitutes a substantive modification. Substantive modifications in a legal context may involve adjustments or changes to clauses, responsibilities, obligations, etc., in the legal documents. Non-substantive modifications may include changes to punctuation, corrections of typos, synonym conversions, grammatical corrections, etc.

[0066] In another application scenario, the first client 100 is the client of the enterprise's financial management system, and the documents are financial data, such as transaction records and reports. The second client 400 is an external audit application. The blockchain system 200 and the storage system 300 are used to store the financial data. External auditors can read the enterprise's financial data through the second client 400. If the financial data is modified, the technical solution provided in this application can enable external auditors to promptly know whether the change constitutes a material modification. In a financial scenario, a material modification might be a change to the terms of a contract, such as modifying the price, delivery time, or scope of liability. A non-material modification might be a change to punctuation, correcting typos, or replacing synonyms.

[0067] The examples above are for illustrative purposes only, and this application does not limit the application scenarios.

[0068] In specific implementations, the first client 100 can be a client specifically used for storing documents; or, the first client 100 can be a comprehensive client that includes not only storage functions but also other related functions such as document processing functions; or, the first client 100 can be a cloud platform client used by users to purchase and rent cloud services to achieve document storage functions. This application does not impose specific limitations. Similarly, the second client 400 can also be a client specifically used for reading documents, or a comprehensive client, or a cloud platform client. This application does not impose specific limitations.

[0069] It should be noted that this architecture can have multiple first clients 100 and multiple second clients 400. For example, multiple first clients 100 may modify the document, while multiple second clients 400 may need to read the document. Furthermore, first clients 100 and second clients 400 can also be the same client. For instance, if user A and user B modify the document, and user A needs to query the document, the client used by user A when modifying the document is called first client 100, and the client used when reading the document is called second client 400. In this case, first client 100 and second client 400 can be the same client; these distinguishing names are used to differentiate between different data processing stages.

[0070] The preceding text described in detail the possible deployment methods of the first client 100, the blockchain system 200, the storage system 300, and the second client 400. In actual deployment, flexible deployment can be carried out based on specific application scenarios and business needs. The following section provides examples of the actual deployment methods of the first client 100, the blockchain system 200, the storage system 300, and the second client 400 in specific application scenarios.

[0071] Taking the application scenario described above as an example, the first client 100 is the client of the enterprise's financial management system, and the documents are financial data, such as transaction records and reports. The second client 400 is an external audit application. In this scenario, the first client 100, the blockchain system 200, and the storage system 300 can be deployed on the enterprise's office equipment. For example, the blockchain system 200 can be implemented using Hyperledger Fabric, and the storage system 300 can be implemented using the InterPlanetary File System (IPFS). The first client 100 can be deployed on the office computers of financial staff, the blockchain system 200 can be deployed on the server cluster in the company's data center, the storage system 300 can be deployed on the enterprise's independent storage server, or on the hard drives of the server cluster where the blockchain system 200 is located, and the second client 400 can be deployed on the office computers of external auditors.

[0072] Of course, the aforementioned blockchain system 200 and storage system 300 can also be deployed in a cloud environment. In this case, the first client 100 and the second client 400 can be clients of the cloud platform, but the first client 100 is held by the company's finance staff, and the second client 400 is held by external auditors. For example, Figure 2 This is an example diagram of a document management device deployed in a cloud environment, as provided in this application. Figure 2 As shown, an enterprise's employees can initiate a purchase request for data conversion cloud services through the first client 100. After the first client 100 sends the purchase request to the cloud platform, the cloud platform can provide the first client 100 and the second client 400 with access to the blockchain system 200. Enterprise employees can use the first client 100 to store transaction data, and external auditors can use the second client 400 to read the transaction data.

[0073] In its implementation, the cloud platform also maintains various basic resources, including computing resources, storage resources, network resources, and security resources, to meet the computing needs of the blockchain system 200 under different scales and loads. These computing resources can be dynamically scaled according to the usage requirements of the blockchain system 200, ensuring its stable operation. The storage system 300 can also be a cloud service of the data center, such as elastic cloud service or cloud storage service. Users can purchase blockchain services and cloud storage services, configure cloud storage services to store transaction data, and configure blockchain services to store addresses for transaction data. The above examples are for illustrative purposes only and are not intended to impose specific limitations in this application.

[0074] It should be understood that the above application scenarios are for illustrative purposes only. The actual deployment of the first client 100, blockchain system 200, storage system 300, and second client 400 can be flexibly adapted to actual business needs. These will not be listed here.

[0075] In this embodiment of the application, each node 210 in the blockchain system 200 may include a block set 211 and a document management device 212. The block set 211 is used to store data such as document address information, hash value, and version information. The block set 211 includes multiple blocks, for example... Figure 1 Blocks 1 through N are shown. Multiple blocks in block set 211 are sequentially linked to form a data chain. This data chain is a chain-like data structure, and the data is cryptographically guaranteed to be immutable. Document management device 212 is used to determine whether the document read from block set 211 has changed since it was stored when the second client 400 reads the document. If it has changed, it determines whether the change is a substantial change.

[0076] In specific implementations, the document management device 212 can be implemented through software or hardware. As an example of a software functional unit, the document management device 212 may include code running on computing instances. These computing instances may include at least one of physical hosts (computing devices), virtual machines, and containers. Furthermore, the aforementioned computing instances may be one or more. For example, the document management device 212 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.

[0077] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0078] As an example of a hardware functional unit, the document management device 212 may include at least one computing device, such as a server. Alternatively, the document management device 212 may be implemented using a CPU, an ASIC, or a PLD. The aforementioned PLD may be implemented using a CPLD, FPGA, GAL, DPU, NPU, SoC, offload card, accelerator card, or any combination thereof.

[0079] The document management device 212 includes multiple computing devices that can be distributed within the same region or in different regions. Similarly, the multiple computing devices included in the document management device 212 can be distributed within the same Availability Zone (AZ) or in different AZs. Likewise, the multiple computing devices included in the document management device 212 can be distributed within the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, GALs, DPUs, NPUs, SoCs, offloading cards, and accelerator cards.

[0080] In one possible implementation, the document management device 212 can be deployed inside each node 210, that is, Figure 1 In the architecture shown, the internal structure of each node is the same as that of node 210, including block set 211 and document management device 212. When the document of each node is read, the document management device 212 on the node can determine whether the document has been substantially modified, generate a comparison report, and then send the document and comparison report to the second client 400.

[0081] In another possible implementation, the document management device 212 can be deployed within some nodes 210, while other nodes do not include the document management device 212, but only include the block set 211, for example... Figure 1 In the architecture shown, in addition to node 210, other nodes may only include block set 211. When the documents stored by all nodes are read by the second client 400, the documents are first sent to node 210. After the document management device 212 of node 210 determines whether the document has been substantially modified, a comparison report is generated, and then the document and the comparison report are sent to the second client 400.

[0082] In another possible implementation, the document management device 212 can be deployed outside of node 210. Figure 3 This is an architectural diagram of another document management device provided in this application, such as... Figure 3 As shown, in this architecture, the blockchain system 200 includes multiple nodes 210 and one or more document management nodes 220, which are connected by communication. Node 210 includes a block set 211, and document management node 220 includes a document management device 212.

[0083] exist Figure 3 In the architecture shown, node 210 is used to store data, so multiple nodes 210 can form the main chain of the blockchain system 200. The document management node 220 can then be a node in this main chain. Alternatively, the blockchain system 200 can also include an auxiliary chain or a management chain, and the document management node 220 can also be a node in this auxiliary chain or management chain. However, it is necessary to ensure that the document management node 220 can communicate with multiple nodes 210 of the main chain. This ensures that when a document on node 210 is read by the second client 400, the document management node 220 can determine whether the document has been substantially modified, generate a comparison report, and then send the document and the comparison report to the second client 400.

[0084] It needs to be explained that, Figure 3 In the architecture shown, the document management device 212 can be implemented through software or hardware. For details on the specific software and hardware implementation methods, please refer to [reference needed]. Figure 1The description will not be repeated here.

[0085] In this embodiment, when the first client 100 sends a document storage request to the blockchain system 200, the node 210 can store the document in the storage system 300 and store the document's storage address and hash value in a block in the block set 211. After the document is modified, the new version of the document is stored in the storage system 300, and the new version's storage address and hash value are stored in the next block in the block set 211. In this way, after the document is modified multiple times, the node 210 can store the address information and corresponding hash values ​​of multiple versions of the document. When the second client 400 sends a document read request to the blockchain system 200, the node 210 can obtain the address information and corresponding hash value of the corresponding version based on the version information carried in the document read request. After reading the document based on the address information, the node 210 calculates the hash value of the document. If the hash value is inconsistent with the hash value of the version stored by the node 210, it indicates that the document has changed. At this time, the document management device 212 can determine whether the document has been substantially modified, thereby solving the problem that minor modifications may be identified as tampering when using blockchain technology for document management, reducing the difficulty and complexity of document management.

[0086] Meanwhile, since the document management device 212 is deployed in a blockchain system, when determining whether a document has been substantially modified, the comparison process between different versions of the document can be conducted on the blockchain. The blockchain environment ensures that the document will not be tampered with during the comparison process, and there is no risk of privacy leakage, thus enhancing security. The document management device 212 can also be implemented based on blockchain smart contracts or applications on blockchain nodes, without relying on external services, reducing external risks and improving the security of the solution.

[0087] In summary, the document management system provided in this application, by deploying a document management device on a blockchain system, can determine whether the data has been substantially modified when it is read from the blockchain. This avoids false alarms of document tampering, solves the problem that minor modifications may be identified as tampering when using blockchain technology for document management, and reduces the difficulty and complexity of document management.

[0088] The architecture of the document management system provided in this application has been described in detail above. The following section will combine... Figures 4-9 This application provides an explanation of the document management method provided, which can be applied to, for example... Figures 1 to 3 In the document management device 212 of the document management system shown. Among them, Figure 4 This describes the steps and procedures within the storage phase. Figure 5The steps and procedures for the reading phase are described.

[0089] Figure 4 This is a flowchart illustrating the steps of a document management method provided in this application during the storage phase, as follows: Figure 4 The method shown may include the following steps:

[0090] S410: The first client 100 sends a document storage request to the document management device 212.

[0091] Optionally, a document storage request may include document data, which may include files in various forms such as text, numbers, images, and code. It may be a file containing structured data (such as tables) or unstructured data (such as images and audio), and this application does not impose any specific limitations. The document data may be initial document data or document data modified from initial document data, and this application does not impose any specific limitations.

[0092] Optionally, a document storage request may include relevant document information, such as document name, document metadata, storage location preference, authentication information, permission information, and other optional parameters. Document metadata refers to data describing the document, including the document's creator, creation time, last modification time, read permission settings, etc. Storage location preference includes whether the document is to be stored on a specific node or a specific storage service provider. Authentication information is used to determine the legitimacy of the first client 100, and permission information is used to determine the permissions of the first client 100, which may specifically be a digital signature. Other optional parameters include storage expiration time, storage fees, etc., which are not specifically limited in this application.

[0093] Optionally, after receiving a document storage request, the document management device 212 can authenticate the first client 100 based on the authentication information in the request and verify the first client 100's usage permissions based on the permission information, ensuring that the first client 100 has the authority to store documents. After successful authentication and permission verification, step S420 is executed. This effectively prevents unauthorized access or operation, protects document security, and helps establish a secure and reliable document storage and management system.

[0094] S420: The document management device 212 determines the hash value of the document data.

[0095] In a specific implementation, the document management device 212 can perform hash calculations on document data to obtain hash values. Hash calculation is a process of converting an input of arbitrary length into a fixed-length string using a hash algorithm; this string is the hash value. Hash calculation has the following characteristics: determinism (for the same input value, the result is the same regardless of how many times it is hashed); fast computation (the hash value is calculated quickly regardless of the input); avalanche effect (if the input changes slightly, the output hash value will differ greatly); and one-wayness (the original input value cannot be deduced from the hash value). Based on these characteristics, when document data is stored in the storage system 300, the document can be authenticated by calculating its hash value. Thus, when the document is read, if the hash value of the read document differs from the hash value at storage, it indicates that the document has been modified. In a specific implementation, the hash algorithm may include MD5, SHA-1, SHA-256, etc., and this application does not impose a specific limitation.

[0096] S430: The document management device 212 sends document data to the storage system 300.

[0097] In its implementation, before the document management device 212 sends document data to the storage system 300, the storage system 300 can perform authorization verification on the document management device 212. This ensures that only authorized document management devices 212 can store documents on the storage system 300, preventing document leakage or tampering due to unauthorized access. Authorization verification can be achieved through digital certificates, API keys, or other methods. Furthermore, by authorizing the document management device 212, the storage system 300 can prevent malicious users from sending a large number of invalid requests, which could lead to system resource paralysis. Simultaneously, the storage system 300 can record the storage records of different document management devices 212 for subsequent traceability.

[0098] In a specific implementation, the document management device 212 can establish a secure connection with the storage system 300 and use encrypted communication protocols such as HTTPS and SSL / TLS to protect the security of data transmission. The document management device 212 can transmit the entire document or transmit it in segments; this application does not make any specific limitations.

[0099] It should be understood that since the document data is stored outside the blockchain, it is necessary to ensure the security of the document in the off-chain environment. The document management device 212 performs identity verification and access control on the first client 100, and the storage system 300 performs authorization verification on the document management device 212. The security verification operations at different stages can effectively prevent unauthorized access and operation, and protect the security of the document.

[0100] S440: The storage system 300 stores document data and sends address information to the document management device 212.

[0101] In a specific implementation, the address information can be the address where the storage system 300 stores the document data. This address can be a Uniform Resource Locator (URL), a file path, etc., for subsequent access by the document management device 212. This application does not impose any specific limitations. The storage system 300 can also encrypt the address information and send the encrypted address information using a highly secure encrypted communication protocol.

[0102] In practice, after receiving the document data, the storage system 300 can perform an integrity check on the document data to ensure that the document data has not been tampered with or damaged during transmission.

[0103] Optionally, the document management device 212 may also send the hash value obtained in S420 along with the document data to the storage system 300. After receiving the hash value and the document data, the storage system 300 performs a hash calculation on the document data to obtain a calculated hash value. The calculated hash value is compared with the received hash value. If they are inconsistent, it indicates that the document may have been tampered with or damaged during the data transmission. At this time, the storage system 300 may send a prompt message to the document management device 212, requesting the document management device 212 to resend the document data.

[0104] Optionally, the document management device 212 may only send document data to the storage system 300. After the storage system calculates the hash value of the document data, it stores the document data and then sends the hash value and address information to the document management device 212. In this way, the document management device 212 can determine whether the hash value calculated in S420 is consistent with the received hash value. If they are inconsistent, it means that the document may have been tampered with or damaged during the data transmission. That is to say, the entity that performs the integrity check on the document and determines whether the document has been damaged during the transmission can be the document management device 212 or the storage system 300. The specific entity can be determined according to the actual business environment, and this application does not make specific limitations.

[0105] Optionally, the storage system 300 may also send document metadata, including file name, size, creation time, etc., to the document management device 212. This information can help the document management device 212 better manage and track documents. This application does not impose any specific limitations on this information.

[0106] S450: The document management device 212 sends address information and hash value to the block set 211.

[0107] Optionally, the block set 211 may include one or more blockchains, each blockchain comprising multiple blocks. Each block stores the address information and hash value of a version of the document. It should be understood that the security and data immutability of a blockchain primarily stem from its chained storage structure. Each block includes the hash value of the previous block and the hash value of the current block, creating a chained dependency between each block in a blockchain and the previous block. If any block in the chain is changed, the hash values ​​of all subsequent blocks need to be recalculated, which is impractical in practice. Therefore, storing each version of the document in a block enhances the security and immutability of the document version. At the same time, this approach makes the historical version changes of each document clear and direct. The stored content of each block is a specific version of the document. When reading the document, the document management device 212 can easily view all historical versions of the document through the blockchain, ensuring the integrity and consistency of the versions.

[0108] Optionally, the document management device 212 can also send key document information to the block set 211 for storage. Each block includes not only the document's address and hash value, but also key document information. This key information can be provided to the user when the second client 400 reads the document, improving the user's document review efficiency. The key information includes the document's summary, modification date, modifier, document type, keywords, and tags, etc., which are not specifically limited in this application. The key document information is generated by the document management device 212 based on the document's metadata. This metadata can be carried in the request sent by the first client 100, carried when the storage system 300 sends address information, or extracted by the document management device 212 from the document content, which is also not specifically limited in this application.

[0109] S460: Block set 211 stores address information and hash value.

[0110] In practice, blocks can store document address information, hash value, version information, and key information. For details, please refer to the relevant description of S450, which will not be repeated here.

[0111] It should be noted that the reference Figure 1 As can be seen from the embodiments, the blockchain system 200 may include multiple nodes 210, each node 210 includes a block set 211, the block set 211 includes multiple blocks, the multiple blocks are combined in a sequentially connected manner to form a chain data structure, each node 210 in the blockchain system 200 stores the same block set 211, after data is written into the block set 211 of any node, that node can synchronize the data to the block sets 211 of other nodes.

[0112] If each node includes a document management device 212, for example Figure 1 In the architecture shown, the first client 100 can send a document storage request to a node in the blockchain system 200. The document management device 212 on that node can execute steps S410 to S460 to store the document in the off-chain storage system 300 and store the document's address information, hash value, version information, key information, and other data in the block set 211. Then, based on the blockchain's synchronization mechanism, the node can synchronize the data to the block sets 211 of other nodes, so that each node's block set stores the document's address information, hash value, version information, key information, and other data.

[0113] If not every node includes a document management device 212, for example Figure 3 In the architecture shown, the first client 100 can send the document storage request to the document management node 220 in the blockchain system 200. The document management device 212 on the node can establish a link with a certain node in the blockchain and send the document's address information, hash value, version information, key information and other data to that node. The node stores these data in the block set 211, and then synchronizes the data to the block sets 211 of other nodes based on the blockchain's synchronization mechanism, so that each node's block set stores the document's address information, hash value, version information, key information and other data.

[0114] In the specific implementation, when block set 211 stores address information and hash values, node 210 can create a new block at the end of the blockchain, store the address information and hash value in that block, and then update the index. In this way, the block order corresponds to the order in which the documents were written. At this point, consecutive blocks may store different versions of different documents. Blocks can also be categorized according to document type; for example, the main chain corresponds to commonly used document types, while secondary chains correspond to less common document types.

[0115] Alternatively, node 210 can store different versions of the same document in the same sidechain. In the blockchain system 200, multiple blocks from each node form a data chain in block order. The data chain includes a main chain and at least one sidechain, with the first block of each sidechain connected to a block in the main chain. In this application, the sidechain is connected to the block containing the initial version of the document, and consecutive blocks on the sidechain store information about consecutive versions of the document. The main chain stores the base versions of different documents.

[0116] Alternatively, if the document is modified frequently, node 210 can create an independent chain for each document, storing different versions of the same document in consecutive blocks of that chain in version order. All versions of document A form a dedicated chain in version order, and all versions of document B form another dedicated chain in version order. In this way, all versions of each document can be stored sequentially on their dedicated chains without interfering with each other. This method is suitable for large documents that are modified frequently, such as large technical documents, legal documents, or project plans.

[0117] S470: Block set 211 sends block information containing storage address information and hash value to document management device 212.

[0118] S480: Document management device 212 updates index.

[0119] In its specific implementation, the document management device 212 includes an index that records the block information corresponding to each version of each document. This allows the system to determine the block containing the desired version when reading a document, and then retrieve the storage address and hash value from that block. Based on the block information fed back from the block set 211, the document management device 212 can update the index.

[0120] Optionally, if the block set 211 writes the document's address information, hash value, version information, and other data to the last block in the writing order, the index may include the block information corresponding to each version of the document.

[0121] Optionally, if block set 211 writes the initial version of the document on the main chain and writes the modified versions sequentially on the side chains in the order of writing, then the index may include the block information of the main chain corresponding to each document.

[0122] Optionally, if block set 211 writes different documents on different private chains, the index may include private chain information corresponding to each document.

[0123] It should be understood that by storing consecutive versions on consecutive blocks, new versions can be directly appended to the next block, simplifying write operations without requiring additional index updates or lookups, thus improving write efficiency. Furthermore, when a user reads a version of a document, versions of adjacent blocks can be read sequentially without additional index lookups, further improving read efficiency.

[0124] The preceding text has described in detail the steps of the storage phase of the text management method provided in this application. The following section will combine... Figure 5 The steps and procedures of the document management method provided in this application during the reading phase are explained.

[0125] Figure 5This is a flowchart illustrating the steps of a text management method provided in this application during the reading phase. This method can be applied to... Figures 1-3 In the document management device shown, such as Figure 5 As shown, the method may include the following steps:

[0126] S510: The second client 400 sends a document reading request to the document management device 212.

[0127] Optionally, the document reading request may include document information and version information, wherein the document information is used to determine the document that the second user holding the second client 400 wants to read, and the version information is used to determine the version of the document that the user wants to read.

[0128] In specific implementations, document information may include document identifiers, reading parameters, permission verification information, reading methods, and format information. The document identifier includes the document's name, ID, or other unique identifier; reading parameters include the starting position and length of the document to be read; permission verification information includes the authentication and permission information of the second client 400. The document management device 212 can proceed to the next step only after confirming that the identity and permissions of the second client 400 meet the requirements, ensuring that only authorized second client 400 can read the document; the reading method includes reading all content or partial content; and the format information includes the format of the document data that the second client 400 expects to receive. It should be understood that the above examples are for illustrative purposes, and document information may include more content, which is not specifically limited in this application.

[0129] Furthermore, the version information may include first version information and second version information, wherein the first version information is used to obtain the first document, and the second version information is used to obtain the second document, and the first document and the second document are different versions of the same document. For example, if the first version information is the base version V1, and the second version information is the latest version V4, then the first document is document X of version V1, and the second document is document X of version V4. The above example is for illustration only, and this application does not impose any specific limitations.

[0130] Optionally, the first version information is the version the user requests to read, and the second version information is the version compared with the first version information. Specifically, the first version information is input by the user, and the second version information can be either user-inputted or a system default. Simply put, when initiating a document reading request, the user can input the first version they want to read and the second version they want to compare it with. Alternatively, the user can only input the first version they want to read, and the system will use the default version as the second version to compare with the first version. The default version can be the initial version or the version preceding the first version input by the user; this application does not impose specific limitations.

[0131] It should be noted that when a user reads a document, the document management device 212 can provide the user with one or more versions of the document based on the index. If there is only one version, the document reading request will only include one version of the document. If there are multiple versions, a document reading request can be generated based on at least two versions selected by the user.

[0132] S520: The document management device 212 obtains the first address information and the first hash value of the first document from the block set 211, and obtains the second address information and the second hash value of the second document.

[0133] Optionally, if the block set 211 writes the document's address information, hash value, version information, and other data into the last block in the writing order, the index can include the block information corresponding to each version of the document. Based on the index, the document management device 212 can quickly obtain the block where the first document is located and the block where the second document is located.

[0134] If block set 211 writes the initial version of the document on the main chain and writes the modified versions sequentially on the side chains in the order of writing, the index can include the block information of the main chain corresponding to each document. The document management device 212 can determine the initial version corresponding to the document based on the index, and then search for the required version sequentially along the side chains connected to the initial version.

[0135] If the block set 211 writes different documents on different private chains, the index can include the private chain information corresponding to each document. The document management device 212 can determine the private chain corresponding to the document based on the index, and then search for the required version along the private chain in sequence.

[0136] S530: The document management device 212 determines whether the first hash value and the second hash value are consistent.

[0137] In the specific implementation, S580 is executed when the documents are consistent, and S540-S570 are executed when they are inconsistent. It should be understood that "consistent" means the first and second documents are completely identical, and S580 can be executed to read the documents and return them to the second client 400, along with a message indicating that the two versions of the documents entered by the user are the same. "Inconsistent" means there are differences between the first and second documents, and in this case, S540 can be executed to perform the subsequent document comparison operation.

[0138] S540: The document management device 212 obtains the first document and the second document from the storage system 300.

[0139] In a specific implementation, the document management device 212 can read the first document and the second document from the storage system 300 based on the first address information and the second address information obtained in S520.

[0140] S550: The document management device 212 compares the first document and the second document to obtain a third document with marked differences.

[0141] In practice, the difference data may include characters or sentences that differ between the first and second documents. Annotation methods may include font color, highlighting, bolding, underlining, etc., and this application does not impose specific limitations. The third document may be obtained by annotating the difference data based on the first document requested by the user. The difference data may also include difference types, such as replacement, insertion, or deletion.

[0142] In one possible implementation, if the document is relatively short, the document management device 212 can compare the two texts character by character, directly traversing and comparing the characters, marking the different characters or the sentences in which the characters are located as difference data, and obtaining a third document.

[0143] In another possible implementation, if the document is long, comparing it by character traversal is inefficient. In this case, the document management device can first compare the two documents by paragraph order to identify the paragraphs that are different. Then, it can compare the sentences of the paragraphs that are different to identify the sentences that are different. The sentences are marked as difference data to obtain the third document. Of course, it is also possible to further compare the sentences that are different word by word to identify the characters that are different. The characters are marked as difference data to obtain the third document.

[0144] In practical implementation, during segment-by-segment comparison, the segment data can be hashed to generate a corresponding hash value. If the hash values ​​match, the two segments are identical and no further processing is needed. If the hash values ​​do not match, the two segments are different, and further sentence comparison can proceed. It should be understood that hash calculations are highly efficient, and even slight differences in the input data will change the hash value. Using this type of algorithm can quickly determine whether there are differences in segment data, eliminating the need for word-by-word comparison and improving comparison efficiency.

[0145] Optionally, during sentence comparison, the corresponding strings for each sentence can be generated using the hash conversion or MD5 conversion methods described above. If the strings match, the two sentences are identical and no further processing is needed. If the strings do not match, the two sentences are different and can be marked as discrepancy data to obtain a third document. If it is necessary to determine which specific characters in the sentences are inconsistent, the two sentences can be compared character by character to obtain the discrepancy data.

[0146] Optionally, when comparing sentences, the two sentences can be regarded as strings, and then the edit distance between the two strings is determined. The edit distance includes the number of minimum edit operations required to convert the first string into the second string. The edit operations include replacement, insertion, and deletion. If the conversion distance between the two sentences is 0, it means the two sentences are the same. If the conversion distance between the two sentences is not 0, it means the two sentences are different. Then, based on the edit operations, the category of the difference data is determined, that is, replacement, insertion, or deletion.

[0147] Specifically, the edit distance can be the Levenshtein distance. For example, for the two sentences "I like to eat fruits" and "I like to eat vegetables", if they are to be converted, one replacement edit operation needs to be performed, replacing "fruits" with "vegetables". So the edit distance between these two sentences is 1, and the difference data is "fruits", and the category is replacement. The above example is for illustration, and the present application does not make specific limitations.

[0148] It should be understood that if the method of literal comparison is used to determine the difference data, problems such as inaccurate difference data may occur due to text differences caused by insertion and deletion operations. This is because literal comparison only compares whether each character is the same in order and cannot capture the semantics of insertion, deletion, and replacement operations. For example, sentence A is "I don't eat fruits" and sentence B is "I don't want to eat fruits". The semantics of the two sentences are actually similar, but literal comparison will result in all characters from the third character to the last character being different. The difference data is 4 characters, but in fact, the difference data between the two sentences is only "don't" and "don't want". Calculating the edit distance can well solve this problem.

[0149] S560: The document management device 212 determines the document similarity based on the difference data and generates a difference report.

[0150] In specific implementation, the document similarity includes text similarity and semantic similarity. The text similarity can be obtained through word-level similarity algorithms, such as the Okapi BM25 algorithm, TF-IDF algorithm, cosine similarity algorithm, etc., and can also be obtained based on the above Levenshtein distance. The present application does not make specific limitations. The semantic similarity can be obtained through word embedding techniques (such as Word2Vec, GloVe, BERT), methods based on semantic similarity metrics (such as WordNet), etc. The present application does not make specific limitations.

[0151] Optionally, semantic similarity can also be determined in conjunction with contextual information. When determining the semantic similarity between differing data, the contextual data of the differing data is extracted for semantic similarity calculation. This contextual data can be obtained through a sliding window, for example, defining a window size of 3 and using the three words before and after the differing data as contextual information; or, an attention model can be used to obtain contextual data. The attention model can identify the contextual information around the differing data and extract the contextual information related to the differing data. The above examples are for illustration, and this application does not limit the method of obtaining contextual information.

[0152] In practice, document similarity may include weights for textual similarity and semantic similarity. Users can dynamically adjust the weights based on different usage scenarios. Document similarity can be determined by weighted summation, weighted average, etc. This application does not impose any specific limitations.

[0153] Optionally, the difference report may include information on the differences and document similarity. The difference information may include the number of differing data points and the location of each differing data point, helping users quickly locate the differences. The difference report may also include a judgment result on whether the modification is substantial. For example, if the document similarity is higher than a threshold, it is judged as a non-substantial modification, and the user does not need to be notified that the document has been tampered with, reducing unnecessary reminders for minor changes. If the similarity is not higher than the threshold, it is judged as a substantial modification, and the user needs to be notified that the document is likely to have been tampered with, requiring manual review. Furthermore, the difference report may include more information to assist manual review, such as the type of differing data, keywords, and title extraction results; this application does not impose specific limitations on this.

[0154] Optionally, the difference report also includes key information about the document. As mentioned above, each block includes not only the document's address and hash value, but also key information about the document. If manual review is required to determine whether the document's differences constitute a substantial modification, the notification message can also include the document's key information. This allows users who are reviewing the document to determine its type, title, summary, author, and modification time based on the key information, facilitating quick review and improving the user experience.

[0155] S570: The document management device 212 sends a prompt message to the second client 400. The prompt message includes at least the third document and the difference report.

[0156] Optionally, if the document similarity is higher than a threshold, it is determined that the first document and the second document have not been substantially modified, and a first prompt message is sent to the second client 400. The first prompt message is used to notify the user that the first document and the second document have not been substantially modified, the documents have not been tampered with, and no manual review is required. The first prompt message may include relevant links to the third document and the difference report for the user to view.

[0157] Optionally, if the document similarity is not higher than a threshold, it is determined that the first document and the second document have been substantially modified, and a second prompt message is sent to the second client 400. The second prompt message is used to notify the user that the first document and the second document have been substantially modified, the documents may have been tampered with, and manual review is required. The second prompt message may include part of the content or related links of the third document and the difference report for the user to view.

[0158] For example, Figure 6 This is an example screenshot of a notification message interface provided in this application. Figure 7 This is an example diagram of another prompt message interface provided in this application, wherein, Figure 6 The message shown is to remind the user that no substantial changes have been made to the document. Figure 7 The message shown is a reminder to the user that substantial changes have been made and require manual review.

[0159] like Figure 6 and Figure 7 As shown, the interface may include a document reading area 610 and a document display area 620.

[0160] The document reading area 610 is used to obtain a document reading request. This area may include a document name text box, a read version dropdown, a compare version dropdown, a read control, and a cancel control. The document name text box is used to input the document name; the read version dropdown is used to obtain the first version; and the compare version dropdown is used to obtain the second version. When the user clicks the read control, the second client 400 can initiate a document reading request to the user. When the user clicks the cancel control, the document name text box, read version dropdown, and compare version dropdown can be reset, allowing the user to select again.

[0161] The document display area 620 is used to display the document to the user, and the document display area 620 may also include a prompt message 630.

[0162] exist Figure 6 In the interface shown, prompt message 630 is used to notify the user that there are minor differences between the version of the document being read and the version being compared. These differences are not substantial modifications and may be due to typos or wording changes made by version 3 to version 4. Prompt message 630 may also include links to the difference document and the difference report. When the user clicks on the difference document, the document display area 620 can display the difference document. When the user clicks on the difference report, the document display area can display the difference report. The difference document is the third document marked with difference information mentioned above.

[0163] exist Figure 7In the interface shown, message 640 notifies the user that there is a significant difference between the read version and the comparison version of the document, constituting a substantial modification. Message 630 may also include links to the difference document and the difference report. When the user clicks on the difference document, the document display area 620 displays the difference document; when the user clicks on the difference report, the document display area displays the difference report. The difference document is the third document marked with the difference information mentioned above. Message 640 may also include a notification for manual review. If the user clicks "Yes," a relevant interface for manual review will pop up; examples are not provided here.

[0164] In summary, the document management method provided in this application, by deploying a document management device on a blockchain, allows for the determination of whether substantial modifications have occurred when data on the blockchain is read. This avoids false alarms of document tampering and solves the problem that minor modifications can be mistaken for tampering when using blockchain technology for document management, thus reducing the difficulty and complexity of document management. Furthermore, since the document management device is deployed within the blockchain system, the comparison process between different versions of documents is conducted on the blockchain. The blockchain environment ensures that documents are not tampered with during the comparison process, eliminating the risk of privacy leaks and enhancing security. This document management device 212 can also be implemented based on blockchain smart contracts or applications on blockchain nodes, eliminating reliance on external services, reducing external risks, and improving the security of the solution.

[0165] The above text combined Figures 4-7 The document management method provided in this application will be explained below, in conjunction with... Figure 8 Examples of possible internal unit modules of the document management device provided in this application are given below.

[0166] Figure 8 This is a structural example diagram of a document management device provided in this application. The document management device can be... Figures 1-7 The document management device 212 in the embodiment, such as Figure 8 As shown, the document management device 212 may include a receiving unit 2121, an acquiring unit 2122, a comparison unit 2123, and a prompting unit 2124. Among them, Figure 8 by Figure 1 Taking the architecture shown as an example, let's illustrate the internal unit modules of the document management device 212. That is, the document management device 212 is deployed inside node 210. Figure 3 In the architecture shown, when the document management device 212 is deployed on the document management node 220, its internal unit modules and Figure 8 Similarly, the description will not be repeated here.

[0167] The receiving unit 2121, acquiring unit 2122, comparing unit 2123, and prompting unit 2124 can all be implemented in software or in hardware. For example, the implementation of the receiving unit 2121 will be described below. Similarly, the implementation of the acquiring unit 2122, comparing unit 2123, and prompting unit 2124 can refer to the implementation of the receiving unit 2121.

[0168] As an example of a software functional unit, receiving unit 2121 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the aforementioned computing instance may be one or more. For example, receiving unit 2121 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same Availability Zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.

[0169] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same VPC or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0170] As an example of a hardware functional unit, the receiving unit 2121 may include at least one computing device, such as a server. Alternatively, the receiving unit 2121 may be implemented using a central processing unit (CPU), an ASIC, or a PLD. The PLD may be implemented using a CPLD, FPGA, GAL, DPU, NPU, SoC, offload card, accelerator card, or any combination thereof.

[0171] The multiple computing devices included in receiving unit 2121 can be distributed in the same region or in different regions. Similarly, the multiple computing devices included in module A can be distributed in the same Availability Zone (AZ) or in different AZs. Likewise, the multiple computing devices included in document comparison unit 2124 can be distributed in the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, GALs, DPUs, NPUs, SoCs, offloading cards, and accelerator cards.

[0172] It should be noted that, in other embodiments, the steps implemented by the receiving unit 2121, the acquiring unit 2122, the comparison unit 2123, and the prompting unit 2124 can be specified as needed. The receiving unit 2121, the acquiring unit 2122, the comparison unit 2123, and the prompting unit 2124 respectively implement different steps in the document management method to realize all the functions of the document management device 212.

[0173] The functions of the receiving unit 2121, the acquiring unit 2122, the comparison unit 2123, and the prompting unit 2124 will be explained below.

[0174] The receiving unit 2121 is used to receive a document reading request sent by the client. The document reading request includes first version information and second version information of the document to be read. Specifically, it is used to implement... Figure 5 The S510 and its optional steps are shown.

[0175] The acquisition unit 2122 is used to obtain the first address information of the first document corresponding to the first version information and the second address information of the second document corresponding to the second version information from nodes in the blockchain system. Specifically, it is used to implement... Figure 5 The S520 and its optional steps are shown.

[0176] The acquisition unit 2122 is used to acquire a first document and a second document from the storage system based on first address information and second address information. Specifically, it is used to implement... Figure 5 The S530, S540 and their optional steps are shown.

[0177] The comparison unit 2123 is used to compare the first document and the second document to obtain difference data, and to determine the document similarity between the first document and the second document based on the difference data. Specifically, it is used to implement... Figure 5 The S550, S560 and their optional steps are shown.

[0178] The prompting unit 2124 is used to send a prompt message to the client based on document similarity. The prompt message indicates whether there is a substantial or non-substantial modification between the first document and the second document. Specifically, it is used to implement... Figure 5 The S570 and its optional steps are shown.

[0179] In one possible implementation, the blockchain in node 210 includes multiple blocks, each block including document version information and storage address. The document management device includes an index, which includes block information corresponding to the document version. The acquisition unit 2122 is used to acquire first block information corresponding to first version information and second block information corresponding to second version information according to the index. The acquisition unit 2122 is also used to acquire first address information based on the first block information and second address information based on the second block information.

[0180] In one possible implementation, consecutive versions of documents are stored in consecutive blocks, and the index includes the block range corresponding to each document. The retrieval unit is used to retrieve the block range corresponding to the document to be read according to the index. The retrieval unit 2122 is used to retrieve the first block information corresponding to the first version information and the second block information corresponding to the second version information from the block range according to the version order. The retrieval unit 2122 is used to retrieve the first address information based on the first block information and the second address information based on the second block information.

[0181] In one possible implementation, each node in the blockchain system includes a document management device, and the address information of the document to be read is stored on the blockchain of the node where the document management device is located; or, the document management node in the blockchain system includes a document management device, and the address information of the document to be read is stored on the blockchain of other nodes, which are nodes in the blockchain system other than the document management node.

[0182] In one possible implementation, the prompt message includes a third document and a difference report. The third document is generated after the difference data has been annotated in the first or second document, and the difference report includes the quantity and location information of the difference data.

[0183] In one possible implementation, the comparison unit 2123 is used by the document management device to determine the hash value of each paragraph in the first document and the second document, and to determine the difference paragraphs in the first document and the second document based on the hash value of each paragraph. The comparison unit 2123 is also used to determine the hash value of each sentence in the difference paragraphs, and to determine the difference sentences in the first document and the second document based on the hash value of each sentence, thereby obtaining difference data. The difference data includes the difference sentences and the context information of the difference sentences.

[0184] In one possible implementation, the comparison unit 2123 is used to determine the text similarity and semantic similarity of the first document based on the difference data, wherein the text similarity is used to indicate the character differences in the difference data between the first document and the second document, and the semantic similarity is used to indicate the semantic differences in the difference data between the first document and the second document.

[0185] It needs to be explained that, Figure 8 This is one exemplary division of the document management device 212. The document management device 212 may also include more or fewer unit modules. For example, the comparison unit and the prompting unit may be merged. Alternatively, the document management device 212 may also include a storage unit for receiving a document storage request sent by the first client and storing the document in the storage system 300. Figure 8 The document shown is stored at address A1 for version V1, at address A2 for version V2, and so on. The document's storage address is stored in block set 211 of node 210. Block set 211 includes multiple blocks, each of which can store the document's storage address, version information, and hash value. For example... Figure 8 In the block set 211 shown, block 1 stores the address A1 and hash value XXX1 of version V1, block 2 stores the address A2 and hash value XXX2 of version V2, and so on.

[0186] In summary, the document management device provided in this application, by deploying it on a blockchain, can determine whether data has been substantially modified when it is read, thereby avoiding false alarms of document tampering and solving the problem that minor modifications can be identified as tampering when using blockchain technology for document management. This reduces the difficulty and complexity of document management. Furthermore, because the document management device is deployed on a blockchain system, the comparison process between different versions of documents is conducted on the blockchain. The blockchain environment ensures that documents are not tampered with during the comparison process, eliminating the risk of privacy leaks and enhancing security. This document management device 212 can also be implemented based on blockchain smart contracts or applications on blockchain nodes, without relying on external services, reducing external risks and improving the security of the solution.

[0187] The document management method and document management device provided in this application have been described in detail above. The following section, in conjunction with... Figures 9-11 The computing device provided in this application will be explained.

[0188] Figure 9 This is a schematic diagram of the structure of a computing device provided in this application, such as... Figure 9As shown, the computing device 900 includes a bus 902, a processor 904, a memory 906, and a communication interface 908. The processor 904, memory 906, and communication interface 908 communicate with each other via the bus 902. The computing device 900 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 900. The computing device 900 can be any of the aforementioned... Figures 1-8 The document management device 212 in the embodiment.

[0189] The 902 bus can be a Peripheral Component Interconnect Express (PCIe) bus, an Extended Industry Standard Architecture (EISA) bus, a Unified Bus (Ubus or UB), a Compute Express Link (CXL) bus, a Cache Coherent Interconnect for Accelerators (CCIX) bus, etc. The Unified Bus is also known as the Lingqu bus. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 9 The bus 902 is represented by only one line, but this does not mean that there is only one bus or one type of bus. The bus 902 may include a path for transmitting information between various components of the computing device 900 (e.g., memory 906, processor 904, communication interface 908). The unified bus may also be called the Lingqu bus.

[0190] The processor 904 may include any one or more computing devices such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP) or a digital signal processor (DSP), an ASIC, an FPGA, a CPLD, an NPU, a SoC, an offload card, or an accelerator card.

[0191] Memory 906 may include volatile memory, such as random access memory (RAM). Processor 904 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD). Furthermore, memory 906 may also be implemented using storage class memory (SCM), phase change memory (PCM), or other types of storage media.

[0192] It is worth noting that the same type of storage medium can be configured in the same computing device to realize the function of memory 906, or two or more types of storage media can be configured to realize the function of memory 906. This application does not limit this.

[0193] The memory 906 stores executable program code, and the processor 904 executes the executable program code to implement the functions of the aforementioned document management device 212, including... Figure 9 The functions of the receiving unit, acquiring unit, comparison unit, and prompting unit shown are configured to implement the document management method provided in this application. That is, the memory 906 stores instructions for executing the document management method.

[0194] The communication interface 908 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device 900 and other devices or communication networks.

[0195] As one possible implementation, the computing device 900 may also include a chip system, which includes a processor and a power supply circuit. The power supply circuit supplies power to the processor, and the processor executes the operation steps corresponding to the document management method. For simplicity, further details are omitted here. The processor can be implemented using a CPU, or it can be implemented using computing devices or AI chips such as GPUs, DPUs, NPUs, XPUs, SoCs, offloading cards, or accelerator cards.

[0196] As one possible implementation, the computing device 900 may include multiple types of processors 904, meaning the computing device 900 is a heterogeneous device. For example, the computing device 900 may include a CPU and a GPU, and at least one of the processors 904 can execute the operation steps corresponding to the document management method. For the sake of brevity, further details will not be elaborated here.

[0197] This application also provides a computing device cluster. For example... Figure 10 As shown, Figure 10 This is an example diagram of a computing device cluster provided in this application, which includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0198] like Figure 10 As shown, the computing device cluster includes at least one computing device 900. The memory 906 of one or more computing devices 900 in the computing device cluster may store the same instructions for executing document management methods. Each computing device 900 may be a node in a blockchain system, and this node may include a document management device.

[0199] In some possible implementations, the memory 906 of one or more computing devices 900 in the computing device cluster may also store partial instructions for executing the document management method. In other words, a combination of one or more computing devices 900 can jointly execute the instructions for executing the document management method.

[0200] It should be noted that the memory 906 in different computing devices 900 within the computing device cluster can store different instructions, each used to execute a portion of the functions of the document management device 212. That is, the instructions stored in the memory 906 of different computing devices 900 can implement the functions of one or more modules within the document management device 212.

[0201] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 11 One possible implementation is shown. For example... Figure 11 As shown, Figure 11 This is an example diagram of another computing device cluster structure provided in this application. Two computing devices, 900A and 900B, are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this type of possible implementation, the memory 906 in computing device 900A stores instructions for performing the functions of an acquisition unit and a receiving unit. Simultaneously, the memory 906 in computing device 900B stores instructions for performing the functions of a comparison unit and a prompting unit.

[0202] Figure 11The connection method between the computing device clusters shown can be based on the system's processing capacity, so the unit modules are distributed on different computing devices. The functions of the receiving unit and the acquisition unit are executed by computing device 900A, and the functions of the comparison unit and the prompting unit are executed by computing device 900B.

[0203] It should be understood that Figure 11 The functions of the computing device 900A shown can also be performed by multiple computing devices 900. Similarly, the functions of the computing device 900B can also be performed by multiple computing devices 900.

[0204] In some possible implementations, the memory 906 of one or more computing devices 900 in the computing device cluster may also store partial instructions for executing the document management method. In other words, a combination of one or more computing devices 900 can jointly execute the instructions for executing the document management method.

[0205] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform a document management method.

[0206] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to perform a document management method, or instruct the computing device to perform a document management method.

[0207] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application 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. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of this application.

Claims

1. A document management method, characterized in that, The method is applied to a document management device deployed in a blockchain system. The blockchain system is communicatively connected to a storage system, which stores document data. The blockchain system includes multiple nodes, each storing the address information of the document data within the storage system. The method includes: The document management device receives a document reading request sent by the client, the document reading request including first version information and second version information of the document to be read; The document management device obtains the first address information of the first document corresponding to the first version information from the nodes in the blockchain system, and obtains the second address information of the second document corresponding to the second version information. The document management device retrieves the first document and the second document from the storage system based on the first address information and the second address information; The document management device compares the first document and the second document to obtain difference data, and determines the similarity between the first document and the second document based on the difference data; Based on the similarity, the document management device sends a prompt message to the client, which indicates whether there are any non-substantial modifications between the first document and the second document.

2. The method according to claim 1, characterized in that, Each node includes multiple blocks, each block includes version information of the document data and address information, and the document management device includes an index, which includes block information corresponding to the version information of the document data; The document management device obtains the first address information of the first document corresponding to the first version information from the nodes in the blockchain system, and obtains the second address information of the second document corresponding to the second version information by: The document management device obtains the first block information corresponding to the first version information and the second block information corresponding to the second version information according to the index; The document management device obtains the first address information based on the first block information and obtains the second address information based on the second block information.

3. The method according to claim 2, characterized in that, The multiple blocks of each node form a data chain in block order. The data chain includes a main chain and at least one side chain. The first block of each side chain is connected to a block in the main chain. The initial version of the document to be read is stored in the first block of the main chain, and the modified version of the document to be read is stored in consecutive blocks of the side chain in version order. The side chain is connected to the first block of the main chain. The index includes the main chain block corresponding to the initial version of each document. The document management device obtains the first address information of the first document corresponding to the first version information from the nodes in the blockchain system, and obtains the second address information of the second document corresponding to the second version information, including: The document management device obtains the main chain block corresponding to the document to be read based on the index, and determines the side chain where the modified version of the document to be read is located; The document management device obtains the first block information corresponding to the first version information and the second block information corresponding to the second version information from the side chain according to version order; The document management device obtains the first address information based on the first block information and obtains the second address information based on the second block information.

4. The method according to any one of claims 1 to 3, characterized in that, The notification message includes a third document and a difference report. The third document is generated by annotating the difference data in the first document or the second document. The difference report includes the quantity and location information of the difference data.

5. The method according to any one of claims 1 to 4, characterized in that, The document management device compares the first document and the second document to obtain difference data, including: The document management device determines the hash value of each paragraph in the first document and the second document, and determines the difference paragraphs in the first document and the second document based on the hash value of each paragraph; The document management device determines the hash value of each sentence in the difference paragraph, determines the difference sentences between the first document and the second document based on the hash value of each sentence, and obtains the difference data, which includes the difference sentences and the context information of the difference sentences.

6. The method according to any one of claims 1 to 5, characterized in that, The document management device determines the document similarity between the first document and the second document based on the difference data, including: Based on the difference data, the document management device determines the text similarity and semantic similarity of the first document. The text similarity is used to indicate the character differences in the difference data between the first document and the second document, and the semantic similarity is used to indicate the semantic differences in the difference data between the first document and the second document.

7. A document management device, characterized in that, The document management device is deployed on a blockchain system, which establishes a communication connection with a storage system. The storage system is used to store document data, and the blockchain system includes multiple nodes, each node including a blockchain. The blockchain is used to store the address information of the document data in the storage system. The device includes: The receiving unit is configured to receive a document reading request sent by the client, wherein the document reading request includes first version information and second version information of the document to be read; The acquisition unit is used to acquire the first address information of the first document corresponding to the first version information and the second address information of the second document corresponding to the second version information from the nodes in the blockchain system. The acquisition unit is configured to acquire the first document and the second document from the storage system based on the first address information and the second address information; The comparison unit is used to compare the first document and the second document to obtain difference data, and to determine the document similarity between the first document and the second document based on the difference data; The prompting unit is used to send a prompt message to the client based on the document similarity, the prompt message including whether there is any substantial modification between the first document and the second document.

8. The apparatus according to claim 7, characterized in that, Each node includes multiple blocks, each block includes version information of the document data and address information, and the document management device includes an index, which includes block information corresponding to the version information of the document data; The acquisition unit is used to acquire, according to the index, the first block information corresponding to the first version information and the second block information corresponding to the second version information; The acquisition unit is used to acquire the first address information based on the first block information and to acquire the second address information based on the second block information.

9. The apparatus according to claim 8, characterized in that, Documents in consecutive versions are stored in consecutive blocks, and the index includes the block range corresponding to each document. The acquisition unit is used to acquire the block range corresponding to the document to be read according to the index. The acquisition unit is used to acquire, in version order, the first block information corresponding to the first version information and the second block information corresponding to the second version information from the block range; The acquisition unit is used to acquire the first address information based on the first block information and to acquire the second address information based on the second block information.

10. The apparatus according to any one of claims 7 to 9, characterized in that, Each node in the blockchain system includes the document management device, and the address information of the document to be read is stored on the node where the document management device is located; or, The document management node in the blockchain system includes the document management device, and the address information of the document to be read is stored on other nodes, which are nodes in the blockchain system other than the document management node.

11. The apparatus according to any one of claims 7 to 10, characterized in that, The notification message includes a third document and a difference report. The third document is generated by annotating the difference data in the first document or the second document. The difference report includes the quantity and location information of the difference data.

12. The apparatus according to any one of claims 7 to 11, characterized in that, The comparison unit is used by the document management device to determine the hash value of each paragraph in the first document and the second document, and to determine the difference paragraphs in the first document and the second document based on the hash value of each paragraph. The comparison unit is used to determine the hash value of each sentence in the difference paragraph, determine the difference sentences between the first document and the second document based on the hash value of each sentence, and obtain the difference data, which includes the difference sentences and the context information of the difference sentences.

13. The apparatus according to claims 7 to 12, characterized in that, The comparison unit is used to determine the text similarity and semantic similarity of the first document based on the difference data. The text similarity is used to indicate the character differences in the difference data between the first document and the second document, and the semantic similarity is used to indicate the semantic differences in the difference data between the first document and the second document.

14. A blockchain system, wherein the blockchain system is communicatively connected to a storage system, the storage system being used to store document data, the blockchain system comprising a document management device and multiple nodes, each node comprising multiple blocks, each block being used to store address information of the document data in the storage system, the document management device comprising unit modules of the device as described in any one of claims 7 to 13.

15. A computer program product containing instructions, characterized in that, When the instruction is executed by the computing device, the computing device performs the operational steps of the method as described in any one of claims 1 to 6.

16. A computing device, characterized in that, The computing device includes a processor and a memory, the memory being used to store instructions and the processor being used to execute the instructions such that the computing device performs the operational steps of the method as described in any one of claims 1 to 6.

17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed by a computing device or a cluster of computing devices, implement the operational steps of the method as described in any one of claims 1 to 6.