CN114157435A - Document processing method and device based on block chain technology and client - Google Patents

Document processing method and device based on block chain technology and client Download PDF

Info

Publication number
CN114157435A
CN114157435A CN202111476897.1A CN202111476897A CN114157435A CN 114157435 A CN114157435 A CN 114157435A CN 202111476897 A CN202111476897 A CN 202111476897A CN 114157435 A CN114157435 A CN 114157435A
Authority
CN
China
Prior art keywords
client
data
account book
signature information
document
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111476897.1A
Other languages
Chinese (zh)
Other versions
CN114157435B (en
Inventor
赵筑雨
何文仲
吕飞
林家杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guizhou Qianchi Information Co ltd
Original Assignee
Guizhou Qianchi Information Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guizhou Qianchi Information Co ltd filed Critical Guizhou Qianchi Information Co ltd
Priority to CN202111476897.1A priority Critical patent/CN114157435B/en
Publication of CN114157435A publication Critical patent/CN114157435A/en
Application granted granted Critical
Publication of CN114157435B publication Critical patent/CN114157435B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the application discloses a document processing method, a document processing device and a client based on a block chain technology, wherein the method applied to a first client side comprises the following steps: establishing network connection with a second client through a broadcasting mechanism; the second client is a client in an open state except the first client in the local area network; generating account book signature information according to first account book information in a first local account book file of a first client; sending a data request to a second client through a broadcasting mechanism; the data request comprises encrypted document data and account book signature information; and the second client verifies the account book signature information after receiving the data request, and adopts a corresponding processing scheme for the document data according to the verification result. The embodiment scheme realizes distributed storage of the document data at the client, realizes decentralization, realizes tamper resistance and undeniable property of the document, improves network security, is simple in scheme and low in cost, and provides a technical basis for plug and play.

Description

Document processing method and device based on block chain technology and client
Technical Field
The present invention relates to a document processing technology, and in particular, to a method, an apparatus, and a client for processing a document based on a block chain technology.
Background
The existing office products (such as WPS and other software) are mainly applied to the public field, the network office function of the existing office products is mainly used for realizing collaborative editing and document sharing on an open network, and a server client mode is adopted, so that a public cloud or a server needs to be established.
The internal network of a part of large or important enterprises is complex and has more safety equipment, and the traditional network document collaborative editing technology or system in a cloud mode or a server client mode cannot meet the safety requirement, cannot deploy application, or cannot realize bidirectional collaborative editing under the mechanism;
part of large or important enterprises have high requirements on document security and need to be capable of preventing falsification and reliably recording modification and downloading record information; the simple log recording mode adopted by the existing software cannot realize tamper resistance and non-repudiation of documents.
At present, enterprises require to control office cost and realize efficient document editing and sharing, a traditional server mode is complex to deploy and high in construction and maintenance cost, once a server is in a problem, collaborative office editing cannot be carried out, and a new collaborative convenient technology with plug and play and high reliability is needed.
Disclosure of Invention
The embodiment of the application provides a document processing method, a document processing device and a client based on a block chain technology, which can realize distributed storage of document data at the client, realize decentralization, prevent falsification of documents and undeniable confirmation of the documents, improve network security, have simple scheme and low cost, and provide a technical basis for plug and play.
The embodiment of the application provides a document processing method based on a block chain technology, which is applied to a first client side, wherein the first client side is any client side needing to synchronize document data in a preset local area network; the method may include:
establishing network connection with one or more second clients in the local area network through a broadcasting mechanism; the second client is a client in an open state except the first client in the local area network;
generating account book signature information according to first account book information in a first local account book file corresponding to the first client;
sending a data request to a second client terminal which establishes network connection through the broadcasting mechanism; the data request comprises encrypted document data and the account book signature information; and after receiving the data request, each second client establishing network connection verifies the account book signature information, and adopts a corresponding processing scheme for the document data according to a verification result.
In an exemplary embodiment of the present application, the establishing a network connection with one or more second clients in an open state in a preset local area network through a broadcast mechanism may include:
traversing the IP address of a second client in the local area network, and sending a connection request to the traversed second client through the broadcasting mechanism;
receiving return information of one or more second clients, wherein the return information comprises information that the second clients are in an open state, establishing network connection with the one or more second clients, and recording the IP addresses of the second clients sending the return information.
In an exemplary embodiment of the present application, the first ledger information may include any one or more of: saving the file name of the document data, the storage path of the document data, the updating time of the document data and the IP address of the first client;
the generating of the account book signature information according to the first account book information in the first local account book file corresponding to the first client may include: and carrying out encryption operation on the file name, the storage path, the updating time and the IP address of the second client by a preset encryption algorithm to obtain unique identification information as the account book signature information.
In an exemplary embodiment of the present application, the method may further include:
when an editable file containing the document data is uploaded to the first client, reading the file content of the editable file and converting a data stream, and compressing the editable file; and/or the presence of a gas in the gas,
and sending the data request to a second client side for establishing network connection in a multi-process concurrent mode.
In an exemplary embodiment of the present application, the method may further include:
the local area network is constructed in advance, and a corresponding IP address is configured for each client in the local area network; the client is the first client or the second client.
In an exemplary embodiment of the present application, the method may further include:
and when any client in the local area network starts a preset platform and accesses a local IP address and a uniform resource locator Url address of a designated port through the preset platform, determining that the any client is in an open state.
The embodiment of the present application further provides a document processing apparatus based on a blockchain technology, which may include a first processor and a first computer-readable storage medium, where the first computer-readable storage medium stores first instructions, and when the first instructions are executed by the first processor, the document processing apparatus based on a blockchain technology applied to a first client side implements any one of the above-mentioned document processing methods.
The embodiment of the application also provides a document processing method based on the block chain technology, which is applied to a second client side, wherein the second client side is a client side which is in an open state except the first client side in a preset local area network; the first client is any client needing to synchronize the document data in a preset local area network; the method may include:
establishing network connection with a first client sending a connection request through a broadcasting mechanism in the local area network;
receiving a data request sent by the first client through the broadcast mechanism; the data request comprises encrypted document data and account book signature information; the account book signature information is generated by the first client according to first account book information in a first local account book file corresponding to the first client;
and verifying the account book signature information extracted from the data request, and adopting a corresponding processing scheme for the document data according to a verification result.
In an exemplary embodiment of the application, the verifying the ledger signing information extracted from the data request may include:
comparing the ledger signature information extracted from the data request with locally stored ledger signature information;
when the ledger signature information extracted from the data request is consistent with the locally stored ledger signature information, determining as a first verification result;
and when the ledger signature information extracted from the data request is inconsistent with the locally stored ledger signature information, determining as a second verification result.
In an exemplary embodiment of the present application, the applying a corresponding processing scheme to the document data according to the verification result may include:
when the verification result is the first verification result, saving the document data as modified data;
and when the verification result is the second verification result, saving the document data as new data.
The embodiment of the present application further provides a document processing apparatus based on blockchain technology, which may include a second processor and a second computer-readable storage medium, where the second computer-readable storage medium stores a second instruction, and when the second instruction is executed by the second processor, the document processing apparatus based on blockchain technology applied to a second client side implements any one of the above-mentioned document processing methods.
The embodiment of the application also provides a client which can comprise the document processing device based on the block chain technology.
Compared with the related art, the embodiment of the application can comprise the following steps: establishing network connection with one or more second clients in the local area network through a broadcasting mechanism; the second client is a client in an open state except the first client in the local area network; generating account book signature information according to first account book information in a first local account book file corresponding to the first client; sending a data request to a second client terminal which establishes network connection through the broadcasting mechanism; the data request comprises encrypted document data and the account book signature information; and after receiving the data request, each second client establishing network connection verifies the account book signature information, and adopts a corresponding processing scheme for the document data according to a verification result. According to the embodiment, distributed storage of each client is achieved through a broadcasting mechanism, decentralization is achieved, account book signature information achieves that the client has independent account book management and unified and verifiable signature records, so that falsification prevention and undeniable document identification of the document are achieved, network safety is improved through a local area network, the embodiment of the application is simple in scheme and low in cost, and a technical basis is provided for plug and play.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. Other advantages of the present application may be realized and attained by the instrumentalities and combinations particularly pointed out in the specification and the drawings.
Drawings
The accompanying drawings are included to provide an understanding of the present disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the examples serve to explain the principles of the disclosure and not to limit the disclosure.
FIG. 1 is a flowchart of a document processing method based on blockchain technology applied to a first client side according to an embodiment of the present application;
fig. 2 is a schematic diagram of a network connection of a client in an open state in a local area network according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating file synchronization performed by each node in the same block according to an embodiment of the present application;
fig. 4 is a schematic diagram illustrating two requests performed by a broadcast mechanism between clients according to an embodiment of the present application;
FIG. 5 is a block diagram of a document processing apparatus based on blockchain technology applied to a first client side according to an embodiment of the present application;
FIG. 6 is a flowchart of a document processing method based on blockchain technology applied to a second client side according to an embodiment of the present application;
FIG. 7 is a block diagram of a document processing apparatus based on blockchain technology applied to a second client side according to an embodiment of the present application;
fig. 8 is a block diagram illustrating a client according to an embodiment of the present disclosure.
Detailed Description
The present application describes embodiments, but the description is illustrative rather than limiting and it will be apparent to those of ordinary skill in the art that many more embodiments and implementations are possible within the scope of the embodiments described herein. Although many possible combinations of features are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are possible. Any feature or element of any embodiment may be used in combination with or instead of any other feature or element in any other embodiment, unless expressly limited otherwise.
The present application includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The embodiments, features and elements disclosed in this application may also be combined with any conventional features or elements to form a unique inventive concept as defined by the claims. Any feature or element of any embodiment may also be combined with features or elements from other inventive aspects to form yet another unique inventive aspect, as defined by the claims. Thus, it should be understood that any of the features shown and/or discussed in this application may be implemented alone or in any suitable combination. Accordingly, the embodiments are not limited except as by the appended claims and their equivalents. Furthermore, various modifications and changes may be made within the scope of the appended claims.
Further, in describing representative embodiments, the specification may have presented the method and/or process as a particular sequence of steps. However, to the extent that the method or process does not rely on the particular order of steps set forth herein, the method or process should not be limited to the particular sequence of steps described. Other orders of steps are possible as will be understood by those of ordinary skill in the art. Therefore, the particular order of the steps set forth in the specification should not be construed as limitations on the claims. Further, the claims directed to the method and/or process should not be limited to the performance of their steps in the order written, and one skilled in the art can readily appreciate that the sequences may be varied and still remain within the spirit and scope of the embodiments of the present application.
The embodiment of the application provides a document processing method based on a block chain technology, which is applied to a first client side, wherein the first client side is any client side needing to synchronize document data in a preset local area network; as shown in fig. 1, the method may comprise steps S101-S103:
s101, establishing network connection with one or more second clients in the local area network through a broadcasting mechanism; the second client is a client in an open state except the first client in the local area network;
s102, generating account book signature information according to first account book information in a first local account book file corresponding to the first client;
s103, sending a data request to a second client side for establishing network connection through the broadcasting mechanism; the data request comprises encrypted document data and the account book signature information; and after receiving the data request, each second client establishing network connection verifies the account book signature information, and adopts a corresponding processing scheme for the document data according to a verification result.
In the exemplary embodiment of the application, a broadcast mechanism and a digital signature technology (such as ledger signature information) are combined to realize a document synchronization method of a block chain mode of multi-client data transmission and authentication in a local area network. The broadcast mechanism realizes distributed storage of each client, realizes decentralization, realizes independent account book management and unified and verifiable signature records of the client by account book signature information, thereby realizing the falsification prevention and the non-repudiation of the document, and improving the network security through the local area network.
In an exemplary embodiment of the present application, the method may further include:
the local area network is constructed in advance, and a corresponding IP (Internet protocol) address is configured for each client in the local area network; the client is the first client or the second client.
In the exemplary embodiment of the present application, it is also necessary to test a communicable network environment of the client direct IP usage command PING, the specified port usage command TELNET within the local area network.
In an exemplary embodiment of the present application, the method may further include:
and when any client in the local area network starts a preset platform and accesses a local IP address and a uniform resource locator Url address of a designated port through the preset platform, determining that the any client is in an open state.
In an exemplary embodiment of the present application, the preset platform may be an application APP, an applet, a web platform, and the like, and a specific implementation manner of the preset platform is not limited herein.
In the exemplary embodiment of the present application, for example, after starting an APP application for each client in a local area network, a browser may be used to access the native IP and the Url address of a specified port, that is, a browsing operation may be performed on a corresponding application interface (e.g., a Web interface), so that the current client may be regarded as an independent node in an open state, as shown in fig. 2.
In the exemplary embodiment of the present application, when a new client changes from the off state to the on state, it may be considered that a new node joins. When a plurality of clients are all in an open state and under the current network of the same lan, the nodes formed by the plurality of clients can be regarded as being combined into one block, as shown in fig. 2. When any new node is added into a block, data synchronization can be firstly carried out with other nodes in the block through the document processing method of the embodiment of the application.
In the exemplary embodiment of the present application, as shown in fig. 3, any node in an open state may combine with a digital signature to other clients in an open state in a local area network through a broadcast mechanism, check the content of the account book signature information between the clients, and implement automatic update of data according to a check result, thereby ensuring that files of all nodes under a block are up-to-date and unified.
In an exemplary embodiment of the present application, the method may further include:
when an editable file containing the document data is uploaded to the first client, reading of file content of the editable file and conversion of a data stream are encrypted, and the editable file is compressed.
In the exemplary embodiment of the application, for an editable file, when the file is uploaded to a client, reading of file content and conversion of data stream can be encrypted and compressed (pako.min.js), the file is stored as a text file of a ciphertext character string, a desired file format can be obtained only by reading file data based on an application interface and then decompressing, encrypting, displaying and downloading, and the security of the data file is further ensured.
In the exemplary embodiment of the present application, for example, during the transmission of the table editable file in the block, the Web front end may encrypt and compress the data stream of the table editable file, and then send a multi-process concurrent request (including a connection request and a data request) to the application back end through a broadcast mechanism, so as to improve the efficiency of collaborative editing and updating.
In an exemplary embodiment of the present application, the establishing a network connection with one or more second clients in an open state in a preset local area network through a broadcast mechanism may include:
traversing the IP address of a second client in the local area network, and sending a connection request to the traversed second client through the broadcasting mechanism;
receiving return information of one or more second clients, wherein the return information comprises information that the second clients are in an open state, establishing network connection with the one or more second clients, and recording the IP addresses of the second clients sending the return information.
In the exemplary embodiment of the present application, as shown in fig. 4, in the lan mode, the first client needs to send two requests, the first request is to establish a connection (may be referred to as a connection request), and the second request is to transmit data (may be referred to as a data request).
In the exemplary embodiment of the application, when a first request is sent, a first client a may obtain a local IP address and a designated port, and send a connection request to other client addresses by designating the port and traversing a local area network address range in a multi-process concurrency mode; and if one or more second clients B are in the open state and receive the connection request, feeding back the open state to the first client A.
In the exemplary embodiment of the present application, the first client a takes the second clients B, to which the return information is fed back, as communicable clients, and records the IP addresses of these second clients B.
In the exemplary embodiment of the present application, the IP address of the second client B is used as the target address for the first client a to subsequently send the data request.
In an exemplary embodiment of the present application, before broadcasting the second request (data request), the first client a first generates and encrypts (MD5) the digitally signed content (i.e. ledger signing information) about the data request of this time, and sends the digitally signed content in sending data to each second client B after making the network connection.
In an exemplary embodiment of the present application, the first ledger information may include any one or more of: saving the file name of the document data, the storage path of the document data, the updating time of the document data and the IP address of the first client;
the generating of the ledger signature information according to the first ledger information in the first local ledger file corresponding to the first client a itself may include: and carrying out encryption operation on the file name, the storage path, the updating time and the IP address of the first client B through a preset encryption algorithm to obtain unique identification information as the account book signature information.
In an exemplary embodiment of the present application, after each first client a completes a data request each time, any client (including the first client a and the second client B) participating in the broadcast will update the ledger record in the native ledger file, and the ledger information may include: the method comprises the steps that information such as file names, storage paths, updating time, client IP addresses and the like is generated, unique identification information of a preset encryption algorithm (for example, an irreversible encryption MD5 algorithm) is generated according to the information, account book signature information is obtained, and the problems of file information unification and client trust are solved by comparing and checking the account book signature information after a second client B receives a data request in the steps.
In an exemplary embodiment of the present application, after the first client a generates the ledger signing information, a second request (data request) may be sent to the second client B which establishes the network connection. Specifically, the user may operate on the interface of the first client a, send data for transmission, and send a data request to the second client B in a multi-thread concurrent manner based on the IP address list of the second client B recorded in the foregoing scheme.
In an exemplary embodiment of the application, after receiving a data request, the second client B verifies the ledger signature information extracted from the data request, and applies a corresponding processing scheme to the document data according to a verification result.
In an exemplary embodiment of the present application, verifying the ledger signature information extracted from the data request may include:
comparing the ledger signature information extracted from the data request with locally stored ledger signature information;
when the ledger signature information extracted from the data request is consistent with the locally stored ledger signature information, determining as a first verification result;
and when the ledger signature information extracted from the data request is inconsistent with the locally stored ledger signature information, determining as a second verification result.
In the exemplary embodiment of the present application, the second client B receives the data request, extracts the ledger signature information in the data request, and compares the ledger signature information with the locally stored ledger signature information.
In an exemplary embodiment of the present application, the ledger signature information stored locally by the second client B is generated by the second ledger information in the second local ledger file corresponding to the second client B itself. The second ledger information may include any one or more of: and saving the file name of the document data, the storage path of the document data, the updating time of the document data and the IP address of the second client B. Generating unique identification information of a preset encryption algorithm (for example, the irreversible encryption MD5 algorithm) according to the above information, and acquiring the account book signature information stored locally by the second client B.
In the exemplary embodiment of the present application, the corresponding ledger signing information in the first client a and the second client B should be the same for the same document data. Therefore, when the second client B verifies the ledger signature information in the data request sent by the first client a, the ledger signature information extracted from the data request can be compared with the locally stored ledger signature information.
In an exemplary embodiment of the present application, the applying a corresponding processing scheme to the document data according to the verification result may include:
when the verification result is the first verification result, saving the document data as modified data;
and when the verification result is the second verification result, saving the document data as new data.
In the exemplary embodiment of the present application, if the verification result is the first verification result (the two account book signature information are consistent), it is indicated that the document data stored in the second client B is updated (may be regarded as modified), so the document data extracted in the data request may be used as modified data to update the corresponding document data in the second local account book file; if the verification result is the second verification result (the two account book signature information are inconsistent), it indicates that the document data stored in the second client B is not updated (it can be regarded that the document information is not stored in the second client B originally, and the document data in the current data request is a new document), so that the document data extracted from the data request can be used as the new data, and the new data is added to the second local account book file.
In an exemplary embodiment of the present application, after the document data processing operation is completed, the second client B may modify the content of the second ledger information to update the second ledger information, and may generate the latest digital signature information (i.e., generate the latest ledger signature information from the updated second ledger information).
In the exemplary embodiment of the present application, after each second client B completes the above operations, the result may be fed back to the first client a, and the first client a also updates the first ledger information and the digital signature information in the self-service device (i.e., generates the latest ledger signature information according to the updated first ledger information), so as to ensure the uniformity of the digital signature in each client.
The embodiment of the present application further provides a document processing apparatus 1 based on the blockchain technology, as shown in fig. 5, which may include a first processor 11 and a first computer-readable storage medium 12, where the first computer-readable storage medium 12 stores therein first instructions, and when the first instructions are executed by the first processor 11, the document processing method based on the blockchain technology, applied to the first client side, as described in any one of the above items is implemented.
In an exemplary embodiment of the present application, the foregoing embodiments of the document processing method applied to the first client side based on the block chain technology are all applicable to the embodiment of the apparatus, and are not described in detail herein.
The embodiment of the application also provides a document processing method based on the block chain technology, which is applied to a second client side, wherein the second client side is a client side which is in an open state except the first client side in a preset local area network; the first client is any client needing to synchronize the document data in a preset local area network; as shown in fig. 6, the method may include S201-S203:
s201, establishing network connection with a first client side which sends a connection request through a broadcasting mechanism in the local area network;
s202, receiving a data request sent by the first client through the broadcasting mechanism; the data request comprises encrypted document data and account book signature information; the account book signature information is generated by the first client according to first account book information in a first local account book file corresponding to the first client;
s203, verifying the account book signature information extracted from the data request, and adopting a corresponding processing scheme for the document data according to a verification result.
In the exemplary embodiment of the present application, as shown in fig. 4, in the lan mode, the first client needs to send two requests, the first request is to establish a connection (may be referred to as a connection request), and the second request is to transmit data (may be referred to as a data request).
In the exemplary embodiment of the application, when a first request is sent, a first client a may obtain a local IP address and a designated port, and send a connection request to other client addresses by designating the port and traversing a local area network address range in a multi-process concurrency mode; and if one or more second clients B are in the open state and receive the connection request, feeding back the open state to the first client A.
In the exemplary embodiment of the present application, the first client a takes the second clients B, to which the return information is fed back, as communicable clients, and records the IP addresses of these second clients B.
In the exemplary embodiment of the present application, the IP address of the second client B is used as the target address for the first client a to subsequently send the data request.
In an exemplary embodiment of the present application, before broadcasting the second request (data request), the first client a first generates and encrypts (MD5) the digitally signed content (i.e. ledger signing information) about the data request of this time, and sends the digitally signed content in sending data to each second client B after making the network connection.
In an exemplary embodiment of the present application, the first ledger information may include any one or more of: saving the file name of the document data, the storage path of the document data, the updating time of the document data and the IP address of the first client;
the generating of the ledger signature information according to the first ledger information in the first local ledger file corresponding to the first client a itself may include: and carrying out encryption operation on the file name, the storage path, the updating time and the IP address of the first client B through a preset encryption algorithm to obtain unique identification information as the account book signature information.
In an exemplary embodiment of the present application, after each first client a completes a data request each time, any client (including the first client a and the second client B) participating in the broadcast will update the ledger record in the native ledger file, and the ledger information may include: the method comprises the steps that information such as file names, storage paths, updating time, client IP addresses and the like is generated, unique identification information of a preset encryption algorithm (for example, an irreversible encryption MD5 algorithm) is generated according to the information, account book signature information is obtained, and the problems of file information unification and client trust are solved by comparing and checking the account book signature information after a second client B receives a data request in the steps.
In an exemplary embodiment of the present application, after the first client a generates the ledger signing information, a second request (data request) may be sent to the second client B which establishes the network connection. Specifically, the user may operate on the interface of the first client a, send data for transmission, and send a data request to the second client B in a multi-thread concurrent manner based on the IP address list of the second client B recorded in the foregoing scheme.
In an exemplary embodiment of the application, after receiving a data request, the second client B verifies the ledger signature information extracted from the data request, and applies a corresponding processing scheme to the document data according to a verification result.
In an exemplary embodiment of the present application, verifying the ledger signature information extracted from the data request may include:
comparing the ledger signature information extracted from the data request with locally stored ledger signature information;
when the ledger signature information extracted from the data request is consistent with the locally stored ledger signature information, determining as a first verification result;
and when the ledger signature information extracted from the data request is inconsistent with the locally stored ledger signature information, determining as a second verification result.
In the exemplary embodiment of the present application, the second client B receives the data request, extracts the ledger signature information in the data request, and compares the ledger signature information with the locally stored ledger signature information.
In an exemplary embodiment of the present application, the ledger signature information stored locally by the second client B is generated by the second ledger information in the second local ledger file corresponding to the second client B itself. The second ledger information may include any one or more of: and saving the file name of the document data, the storage path of the document data, the updating time of the document data and the IP address of the second client B. Generating unique identification information of a preset encryption algorithm (for example, the irreversible encryption MD5 algorithm) according to the above information, and acquiring the account book signature information stored locally by the second client B.
In the exemplary embodiment of the present application, the corresponding ledger signing information in the first client a and the second client B should be the same for the same document data. Therefore, when the second client B verifies the ledger signature information in the data request sent by the first client a, the ledger signature information extracted from the data request can be compared with the locally stored ledger signature information.
In an exemplary embodiment of the present application, the applying a corresponding processing scheme to the document data according to the verification result may include:
when the verification result is the first verification result, saving the document data as modified data;
and when the verification result is the second verification result, saving the document data as new data.
In the exemplary embodiment of the present application, if the verification result is the first verification result (the two account book signature information are consistent), it is indicated that the document data stored in the second client B is updated (may be regarded as modified), so the document data extracted in the data request may be used as modified data to update the corresponding document data in the second local account book file; if the verification result is the second verification result (the two account book signature information are inconsistent), it indicates that the document data stored in the second client B is not updated (it can be regarded that the document information is not stored in the second client B originally, and the document data in the current data request is a new document), so that the document data extracted from the data request can be used as the new data, and the new data is added to the second local account book file.
In an exemplary embodiment of the present application, after the document data processing operation is completed, the second client B may modify the content of the second ledger information to update the second ledger information, and may generate the latest digital signature information (i.e., generate the latest ledger signature information from the updated second ledger information).
In the exemplary embodiment of the present application, after each second client B completes the above operations, the result may be fed back to the first client a, and the first client a also updates the first ledger information and the digital signature information in the self-service device (i.e., generates the latest ledger signature information according to the updated first ledger information), so as to ensure the uniformity of the digital signature in each client.
In the exemplary embodiment of the present application, other related operations in the block, such as establishment of a folder hierarchy, file uploading, and the like, may be directly and asynchronously sent by the operation end (any client), as in the document processing method described above, to complete real-time synchronization of all clients in the block.
The embodiment of the present application further provides a document processing apparatus 2 based on the blockchain technology, as shown in fig. 7, which may include a second processor 21 and a second computer-readable storage medium 22, where the second computer-readable storage medium 22 stores a second instruction, and when the second instruction is executed by the second processor 21, the document processing method based on the blockchain technology applied to the second client side as described in any one of the above is implemented.
In an exemplary embodiment of the present application, the foregoing embodiments of the document processing method applied to the second client side based on the block chain technology are all applicable to the embodiment of the apparatus, and are not described in detail herein.
The embodiment of the present application further provides a client 3, as shown in fig. 8, which may include the document processing apparatus 1 based on the blockchain technology and the document processing apparatus 2 based on the blockchain technology.
In an exemplary embodiment of the present application, the foregoing embodiments of the document processing method based on the blockchain technique applied to the first client and the second client are all applicable to the embodiment of the apparatus, and are not described herein again.
In exemplary embodiments of the present application, at least the following advantages are included:
1. and (3) block synchronization: according to the block chain technology, local distributed storage is realized on the basis of an enterprise internal local area network mode, a distributed account book is used for accounting every operation record, each local operation is broadcasted to other machines in an open state in the local area network to synchronize local files, tampering is prevented, and document reliability and record modification traces are guaranteed.
2. Decentralization-multiple machine combination: each machine can be used independently and in combination, the machines are not in master-slave relation, when a new machine is started, the new machine is compared with other machines for the ledger record (namely ledger signature information), and the data file is updated and synchronized locally. The mode does not need a server, not only saves investment, but also is free from maintenance, is plug-and-play, can be used only in a terminal networking mode, and has high reliability. Under the mode of no need of a server, the cooperation of the office terminals in the same area can be well adapted to the complex network and information security environment of an enterprise.
3. Online collaborative editing: and uploading files according to the online checking and online editing functions of the business, realizing the collaborative editing work of the files and optimizing the office mode.
4. Compression encryption and decryption: and the data file adopts compression and encryption and decryption technologies, so that the transmission speed is increased, the data safety is guaranteed, and the data safety requirements of enterprises are met.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.

Claims (10)

1. A document processing method based on a block chain technology is characterized in that the method is applied to a first client side, and the first client side is any client side needing to synchronize document data in a preset local area network; the method comprises the following steps:
establishing network connection with one or more second clients in the local area network through a broadcasting mechanism; the second client is a client in an open state except the first client in the local area network;
generating account book signature information according to first account book information in a first local account book file corresponding to the first client;
sending a data request to a second client terminal which establishes network connection through the broadcasting mechanism; the data request comprises encrypted document data and the account book signature information; and after receiving the data request, each second client establishing network connection verifies the account book signature information, and adopts a corresponding processing scheme for the document data according to a verification result.
2. The method of claim 1, wherein the establishing a network connection with one or more second clients in an on state in a predetermined local area network via a broadcast mechanism comprises:
traversing the IP address of a second client in the local area network, and sending a connection request to the traversed second client through the broadcasting mechanism;
receiving return information of one or more second clients, wherein the return information comprises information that the second clients are in an open state, establishing network connection with the one or more second clients, and recording the IP addresses of the second clients sending the return information.
3. The method of claim 1, wherein the first ledger information comprises any one or more of: saving the file name of the document data, the storage path of the document data, the updating time of the document data and the IP address of the first client;
the generating of account book signature information according to the first account book information in the first local account book file corresponding to the first client includes: and carrying out encryption operation on the file name, the storage path, the updating time and the IP address of the second client by a preset encryption algorithm to obtain unique identification information as the account book signature information.
4. A method of document processing based on blockchain technology according to any one of claims 1 to 3, wherein the method further comprises:
when an editable file containing the document data is uploaded to the first client, reading the file content of the editable file and converting a data stream, and compressing the editable file; and/or the presence of a gas in the gas,
and sending the data request to a second client side for establishing network connection in a multi-process concurrent mode.
5. A document processing apparatus based on a block chain technology, comprising a first processor and a first computer readable storage medium, wherein the first computer readable storage medium stores therein first instructions, and when the first instructions are executed by the first processor, the document processing apparatus based on the block chain technology implements the document processing method according to any one of claims 1 to 4.
6. A document processing method based on a block chain technology is characterized in that the method is applied to a second client side, wherein the second client side is a client side which is in an open state except a first client side in a preset local area network; the first client is any client needing to synchronize the document data in a preset local area network; the method comprises the following steps:
establishing network connection with a first client sending a connection request through a broadcasting mechanism in the local area network;
receiving a data request sent by the first client through the broadcast mechanism; the data request comprises encrypted document data and account book signature information; the account book signature information is generated by the first client according to first account book information in a first local account book file corresponding to the first client;
and verifying the account book signature information extracted from the data request, and adopting a corresponding processing scheme for the document data according to a verification result.
7. The method of claim 6, wherein the verifying the ledger signature information extracted from the data request comprises:
comparing the ledger signature information extracted from the data request with locally stored ledger signature information;
when the ledger signature information extracted from the data request is consistent with the locally stored ledger signature information, determining as a first verification result;
and when the ledger signature information extracted from the data request is inconsistent with the locally stored ledger signature information, determining as a second verification result.
8. The method for processing documents according to block chain technology of claim 7, wherein said applying a corresponding processing scheme to said document data according to the verification result comprises:
when the verification result is the first verification result, saving the document data as modified data;
and when the verification result is the second verification result, saving the document data as new data.
9. A document processing apparatus based on a block chain technology, comprising a second processor and a second computer readable storage medium, wherein the second computer readable storage medium stores a second instruction, and when the second instruction is executed by the second processor, the document processing apparatus based on the block chain technology implements the document processing method based on the block chain technology according to any one of claims 6 to 8.
10. A client, characterized by comprising the document processing apparatus based on blockchain technology according to claim 5 and claim 9.
CN202111476897.1A 2021-12-02 2021-12-02 Document processing method and device based on blockchain technology and client Active CN114157435B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111476897.1A CN114157435B (en) 2021-12-02 2021-12-02 Document processing method and device based on blockchain technology and client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111476897.1A CN114157435B (en) 2021-12-02 2021-12-02 Document processing method and device based on blockchain technology and client

Publications (2)

Publication Number Publication Date
CN114157435A true CN114157435A (en) 2022-03-08
CN114157435B CN114157435B (en) 2024-05-17

Family

ID=80452908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111476897.1A Active CN114157435B (en) 2021-12-02 2021-12-02 Document processing method and device based on blockchain technology and client

Country Status (1)

Country Link
CN (1) CN114157435B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115426208A (en) * 2022-11-03 2022-12-02 中孚信息股份有限公司 Decentralized document cooperation system and method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109118223A (en) * 2018-08-21 2019-01-01 上海点融信息科技有限责任公司 For managing the method, apparatus and medium of electronic data in block chain
CN110719574A (en) * 2019-10-15 2020-01-21 腾讯科技(深圳)有限公司 Network access method and related equipment
CN111159100A (en) * 2019-11-21 2020-05-15 深圳壹账通智能科技有限公司 Block chain file access method and device, computer equipment and storage medium
CN112005236A (en) * 2018-04-24 2020-11-27 国际商业机器公司 Document access over blockchain networks
US20200389291A1 (en) * 2018-09-18 2020-12-10 Baidu Online Network Technology (Beijing) Co" Ltd. Data processing method and apparatus for blockchain, and storage medium
CN113128999A (en) * 2019-12-31 2021-07-16 航天信息股份有限公司 Block chain privacy protection method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112005236A (en) * 2018-04-24 2020-11-27 国际商业机器公司 Document access over blockchain networks
CN109118223A (en) * 2018-08-21 2019-01-01 上海点融信息科技有限责任公司 For managing the method, apparatus and medium of electronic data in block chain
US20200389291A1 (en) * 2018-09-18 2020-12-10 Baidu Online Network Technology (Beijing) Co" Ltd. Data processing method and apparatus for blockchain, and storage medium
CN110719574A (en) * 2019-10-15 2020-01-21 腾讯科技(深圳)有限公司 Network access method and related equipment
CN111159100A (en) * 2019-11-21 2020-05-15 深圳壹账通智能科技有限公司 Block chain file access method and device, computer equipment and storage medium
CN113128999A (en) * 2019-12-31 2021-07-16 航天信息股份有限公司 Block chain privacy protection method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115426208A (en) * 2022-11-03 2022-12-02 中孚信息股份有限公司 Decentralized document cooperation system and method

Also Published As

Publication number Publication date
CN114157435B (en) 2024-05-17

Similar Documents

Publication Publication Date Title
CN107294729B (en) Communication method and device between different nodes in block chain
CN108234539B (en) File uploading, downloading and transmitting method and device
CN1988535B (en) Synchronous method, system for file storage and customer terminal
CN106878265B (en) Data processing method and device
CN101217431B (en) A method and system of photos in synchronous mobile terminal network TV and network album
WO2019075978A1 (en) Data transmission method and apparatus, computer device, and storage medium
CN107105050B (en) Storage and downloading method and system for service objects
CN111935110B (en) Method and device for controlling permission of tenant to access container instance
CN112565393B (en) File uploading method, downloading method, device, computer equipment and storage medium
CN104980482A (en) File transmitting method and device, file receiving method and device
CN108093015B (en) File transmission system
CN104348870A (en) Data management method and system of cloud storage system based on trusted timestamp
CN108694331B (en) Data storage method, device and system and computer readable storage medium
CN108289074B (en) User account login method and device
CN109672752A (en) The synchronous method of data and node
US20240163119A1 (en) Device management method, system, and apparatus
CN114157435B (en) Document processing method and device based on blockchain technology and client
CN113129008B (en) Data processing method, device, computer readable medium and electronic equipment
CN114726872A (en) Data synchronization method and device, computer equipment and storage medium
CN111327680B (en) Authentication data synchronization method, device, system, computer equipment and storage medium
CN113766031B (en) Method and device for storing note resources and related equipment
CN106937281B (en) Terminal application management method and device, terminal and server
CN112182009B (en) Block chain data updating method and device and readable storage medium
CN102333070A (en) Method and device for obtaining information
Quinn et al. Forensic analysis and remote evidence recovery from syncthing: An open source decentralised file synchronisation utility

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant