CN111221569A - Document updating method and server - Google Patents

Document updating method and server Download PDF

Info

Publication number
CN111221569A
CN111221569A CN202010014151.8A CN202010014151A CN111221569A CN 111221569 A CN111221569 A CN 111221569A CN 202010014151 A CN202010014151 A CN 202010014151A CN 111221569 A CN111221569 A CN 111221569A
Authority
CN
China
Prior art keywords
updated
homomorphic
subfiles
segmentation
subfile
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
CN202010014151.8A
Other languages
Chinese (zh)
Other versions
CN111221569B (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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202010014151.8A priority Critical patent/CN111221569B/en
Publication of CN111221569A publication Critical patent/CN111221569A/en
Application granted granted Critical
Publication of CN111221569B publication Critical patent/CN111221569B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/73Program documentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a document updating method and a server, wherein the method comprises the following steps: generating a homomorphic calculation function and homomorphic parameters according to the content information to be updated, wherein the content information to be updated is information obtained by comparing the original document with the document to be updated; determining the identifier of the subfile to be updated according to the content information to be updated, wherein the subfile to be updated is a file to be updated in the segmentation subfiles, and the segmentation subfile is a file obtained by segmenting the original document; generating an updating parameter according to the homomorphic calculation function, the parameter encryption result and the identification and the number corresponding to the subfile to be updated, wherein the parameter encryption result is obtained by homomorphic encryption of the homomorphic parameter by adopting a homomorphic encryption public key; and sending the update parameters to the block chain network so that the storage node server updates the segmentation sub-files stored by the storage node server according to the update parameters. The working efficiency is improved, and the waste of resources is avoided.

Description

Document updating method and server
Technical Field
The invention relates to the technical field of computer application, in particular to a document updating method and a server.
Background
A software document or source code document refers to text associated with a software system and its software engineering process. The types of software documents include software requirement documents, design documents, test documents, user manuals, and the like. The requirement document, the design document and the test document are generally written by a developer in the software development process, and non-process documents such as a user manual are written by a special non-technical writer. The software document can improve the efficiency of software development, ensure the quality of software, guide and help developers to update the software in the using process of the software, and simultaneously, the corresponding software document also needs to be updated synchronously in the software updating and testing process.
Generally, in the updating process of a software document, the content of the software document needs to be encrypted to ensure the security of the updated content; when the content of the encrypted software document is updated again, all the content of the software document needs to be uploaded to the server again, and for the software document only needing to be updated in part of chapters, the operation reduces the working efficiency and wastes resources.
Disclosure of Invention
Therefore, the invention provides a document updating method and a server, which aim to solve the problems of low working efficiency and resource waste caused by the fact that when the content of an encrypted software document is updated again, all the content of the software document needs to be uploaded to the server again in the prior art.
In order to achieve the above object, a first aspect of the present invention provides a document updating method, including: generating a homomorphic calculation function and homomorphic parameters according to the content information to be updated, wherein the content information to be updated is information obtained by comparing the original document with the document to be updated; determining the identifier of the subfile to be updated according to the content information to be updated, wherein the subfile to be updated is a file to be updated in the segmentation subfiles, and the segmentation subfile is a file obtained by segmenting the original document; generating an updating parameter according to the homomorphic calculation function, the parameter encryption result and the identification and the number corresponding to the subfile to be updated, wherein the parameter encryption result is obtained by homomorphic encryption of the homomorphic parameter by adopting a homomorphic encryption public key; and sending the update parameters to the block chain network so that the storage node server updates the segmentation sub-files stored by the storage node server according to the update parameters.
In some embodiments, before the step of generating a homomorphic computation function according to the content information to be updated, the method further includes: segmenting an original document to obtain N segmentation subfiles, and distributing corresponding identifications and numbers for the segmentation subfiles, wherein N is an integer greater than or equal to 1; establishing a mapping relation between the N segmentation sub-files and all leaf nodes except a root node of the hash tree structure; and respectively carrying out homomorphic encryption on the N segmentation subfiles by adopting a homomorphic encryption public key, and transmitting the obtained N encrypted segmentation subfiles to a block chain network so as to enable the storage node server to store the segmentation subfiles, wherein the homomorphic encryption public key is a secret key generated according to a homomorphic key generation algorithm.
In some embodiments, after the step of sending the update parameter to the blockchain network, so that the storage node server updates the partition subfile stored by the storage node server according to the update parameter, the method further includes: acquiring a segmentation subfile, a number corresponding to the segmentation subfile and a leaf node value of a hash tree corresponding to the segmentation subfile, which are stored in a storage node server, from a block chain network; adding the values of the leaf nodes in sequence according to the serial numbers to obtain a sum result, wherein the serial numbers are continuous numbers; and carrying out homomorphic decryption on the addition result by using a homomorphic encryption private key to obtain an updated document, wherein the homomorphic encryption private key is a secret key generated according to a homomorphic secret key generation algorithm.
In some embodiments, the value of the root node of the hash tree is a value obtained by adding values of all leaf nodes included in the hash tree, the value of the leaf node is a value obtained by homomorphically encrypting the partition subfile using a homomorphic encryption public key, and the value of the leaf node is a value obtained by sequentially adding values of all child leaf child nodes subordinate thereto in order of number.
In some embodiments, the step of generating a homomorphic computation function according to the content information to be updated includes: generating homomorphic calculation functions and homomorphic parameters according to the content information to be updated, wherein the homomorphic calculation functions and the homomorphic parameters meet the following rules: and calculating the segmentation subfiles and the corresponding homomorphism parameters by using homomorphism calculation functions to obtain the subfiles to be updated corresponding to the segmentation subfiles.
In order to achieve the above object, a second aspect of the present invention provides a document updating method, including: acquiring updating parameters sent by a user node server from a block chain network, wherein the updating parameters comprise homomorphic calculation functions, parameter encryption results and identifications and numbers corresponding to subfiles to be updated, the parameter encryption results are obtained by homomorphic encryption of homomorphic parameters corresponding to the subfiles to be updated by the user node server by adopting homomorphic encryption public keys, the subfiles to be updated are files to be updated in segmentation subfiles, and the segmentation subfiles are files obtained by segmenting original documents; calculating the updating parameters according to the homomorphic encryption calculation function to obtain the subfiles to be updated; and updating the locally stored segmentation subfiles by using the subfiles to be updated according to the identification and the number.
In some embodiments, the step of calculating the update parameter according to a homomorphic cryptographic calculation function to obtain the subfile to be updated includes: calculating the updating parameters according to the homomorphic encryption calculation function to obtain a calculation result; and sampling a homomorphic encryption private key, performing homomorphic decryption on the calculation result to obtain the subfile to be updated, wherein the homomorphic encryption private key is a secret key generated according to a homomorphic key generation algorithm.
In some embodiments, before the step of obtaining the update parameters sent by the user node server from the blockchain network, the method further includes: acquiring N encrypted subfiles sent by a user node server from a block chain network, wherein the encrypted subfiles are files obtained by homomorphic encryption of the subfiles by the user node server by adopting a homomorphic encryption public key, mapping relations exist between the N subfiles and all leaf nodes of a Hash tree except a root node, and N is an integer greater than or equal to 1; respectively carrying out homomorphic decryption on the N encrypted segmentation sub-files to correspondingly obtain N segmentation sub-files; and selecting M sub-files from the N sub-files to be stored locally according to the capacity of a storage space, wherein the capacity of the storage space is larger than the file storage capacity, the file storage capacity is obtained by adding the file sizes of the M sub-files, M is an integer larger than or equal to 1, and M is smaller than or equal to N.
In order to achieve the above object, a third aspect of the present invention provides a user node server, including: the function generation module is used for generating homomorphic calculation functions and homomorphic parameters according to the content information to be updated, wherein the content information to be updated is information obtained by comparing the original document with the document to be updated; the determining module is used for determining the identifier of the subfile to be updated according to the content information to be updated, wherein the subfile to be updated is a file to be updated in the segmentation subfiles, and the segmentation subfile is a file obtained by segmenting the original document; the updating parameter generating module is used for generating updating parameters according to the homomorphic calculation function, the parameter encryption result and the identification and the number corresponding to the subfile to be updated, wherein the parameter encryption result is obtained by homomorphic encryption of homomorphic parameters by adopting a homomorphic encryption public key;
and the sending module is used for sending the updating parameters to the block chain network so that the storage node server updates the segmentation subfiles stored by the storage node server according to the updating parameters.
In order to achieve the above object, a fourth aspect of the present invention provides a storage node server, comprising: the acquisition module is used for acquiring the update parameters sent by the user node server from the block chain network, wherein the update parameters comprise homomorphic calculation functions, parameter encryption results and identifications and numbers corresponding to the subfiles to be updated, the parameter encryption results are obtained by homomorphic encryption of homomorphic parameters corresponding to the subfiles to be updated by the user node server by adopting a homomorphic encryption public key, the subfiles to be updated are files to be updated in the segmentation subfiles, and the segmentation subfiles are files obtained by segmenting original documents; the calculation module is used for calculating the updating parameters according to the homomorphic encryption calculation function to obtain the subfiles to be updated; and the updating module is used for updating the locally stored segmentation subfiles by using the subfiles to be updated according to the identification and the serial number.
The invention has the following advantages: the content information to be updated is obtained by comparing the original document with the document to be updated, so that a homomorphic calculation function and homomorphic parameters can be generated according to the content information to be updated, then the identification of the subfile to be updated is determined according to the content information to be updated, the homomorphic calculation function, a parameter encryption result obtained by homomorphic encryption of the homomorphic parameters by adopting a homomorphic encryption public key, the identification of the subfile to be updated and the corresponding number are sent to a block chain network as the updating parameters, so that a storage node server can receive the updating parameters, and the corresponding segmentation subfiles are updated according to the updating parameters, so that the original document can be updated only by uploading all the contents of the document to be updated to the server, and the updating of the original document can be completed only by updating the subfiles to be updated stored in the storage node server, the working efficiency is improved, and the waste of resources is avoided.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention.
Fig. 1 is a flowchart of a document updating method according to a first embodiment of the present invention.
Fig. 2 is a flowchart of a document updating method according to a second embodiment of the present invention.
Fig. 3 is a flowchart of a document updating method according to a third embodiment of the present invention.
Fig. 4 is a flowchart of a document updating method based on a blockchain technique according to a fourth embodiment of the present invention.
Fig. 5 is a flowchart of a document updating method using a Markle hash tree according to a fifth embodiment of the present invention.
Fig. 6 is a branch structure diagram of a Markle hash tree according to a fifth embodiment of the present invention.
Fig. 7 is a block diagram illustrating a user node server according to a sixth embodiment of the present invention.
Fig. 8 is a block diagram illustrating a storage node server according to a seventh embodiment of the present invention.
In the drawings:
4010: user node server 4020: storage node server
4021: storage node server a 4022: storage node server B
701: the generation module 702: determining module
703: the sending module 801: acquisition module
802: the calculation module 803: updating module
Detailed Description
The following detailed description of embodiments of the invention refers to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present invention, are given by way of illustration and explanation only, not limitation.
A first embodiment of the present invention relates to a document updating method. The method is used for improving the efficiency of document updating and avoiding the waste of resources.
The following describes implementation details of the document updating method in this embodiment in detail, and the following is only for facilitating understanding of the implementation details of the present solution and is not necessary for implementing the present solution.
Fig. 1 is a flowchart of a document updating method in this embodiment, which can be used for a user node server. The method may include the following steps.
In step 101, a homomorphic calculation function and homomorphic parameters are generated according to the content information to be updated.
The content information to be updated is information obtained by comparing the original document and the document to be updated.
For example, when the original document c needs to be updated to the document c + to be updated, comparing the original document c with the document c + to be updated, so that the information of the content to be updated includes the contents of the first chapter and the fourth chapter of the original document c, and then generating the homomorphic calculation function f and the homomorphic parameter ca according to the contents of the first chapter and the fourth chapter. In specific implementation, the homomorphic calculation function f and the homomorphic parameter ca satisfy the following relationship: f (c, ca) ═ c +. Namely, the original document c and the corresponding homomorphic parameter ca are calculated by using the homomorphic calculation function f, and the document c + to be updated corresponding to the original document c can be obtained.
In step 102, the identifier of the subfile to be updated is determined according to the content information to be updated.
The subfile to be updated is a file to be updated in the segmentation subfiles, and the segmentation subfile is a file obtained by segmenting the original document. For example, dividing the original document a into 5 pieces, 5 divided subfiles can be obtained: a1, a2, A3, a4, and a 5. If the subfiles to be updated, namely the subfile A2 and the subfile A3, need to be updated according to the content information to be updated, namely the subfile A2 and the subfile A3, the corresponding subfiles to be updated are identified as A2 and A3.
In step 103, an update parameter is generated according to the homomorphic calculation function, the parameter encryption result, and the identifier and the number corresponding to the subfile to be updated.
It should be noted that the parameter encryption result is obtained by homomorphic encrypting the homomorphic parameter by using a homomorphic encryption public key, where the homomorphic encryption public key is a secret key generated according to a homomorphic key generation algorithm.
In step 104, the update parameters are sent to the blockchain network.
When a storage node server in the blockchain network acquires the update parameters sent by the user node server through the blockchain network, the segmentation subfiles stored by the storage node server can be updated according to the update parameters. The segmentation subfiles stored on the storage node server are the latest subfiles, and the latest subfiles can be conveniently acquired by subsequent user nodes.
In some embodiments, a homomorphic calculation function and homomorphic parameters are generated according to the content information to be updated, and the homomorphic calculation function and the homomorphic parameters satisfy the following rules: and calculating the segmentation subfiles and the corresponding homomorphism parameters by using homomorphism calculation functions to obtain the subfiles to be updated corresponding to the segmentation subfiles.
For example, the homomorphic parameter corresponding to the subfile a1 is ca1, the homomorphic parameter corresponding to the subfile a2 is ca2, and then the homomorphic parameter corresponding to the subfile a1 is ca1 by using the homomorphic calculation function f, so that the subfile a1+ to be updated is obtained, that is, the following relationship is satisfied: f (a1, ca1) ═ a1 +; similarly, the homomorphism parameter corresponding to the segmentation subfile a2 using the homomorphism calculation function f is ca2, and the subfile a2+ to be updated is obtained, and the following relationship is also satisfied: f (a2, ca2) ═ a2 +.
In the embodiment, the content information to be updated is obtained by comparing the original document with the document to be updated, so that a homomorphic calculation function and homomorphic parameters can be generated according to the content information to be updated, then the identifier of the subfile to be updated is determined according to the content information to be updated, the homomorphic calculation function, a parameter encryption result obtained by homomorphic encryption of the homomorphic parameters by adopting a homomorphic encryption public key, the identifier of the subfile to be updated and the corresponding number are sent to a block chain network as the updating parameters, so that a storage node server can receive the updating parameters and update the corresponding segmentation subfiles according to the updating parameters, thereby avoiding that the original document can be updated by uploading all the contents of the document to be updated to a server, only the subfile to be updated stored by a storage node server needs to be updated, and improving the working efficiency, the waste of resources is avoided.
A second embodiment of the present invention relates to a document updating method. The second embodiment is substantially the same as the first embodiment, and mainly differs therefrom in that: and establishing a mapping relation between the Markle hash tree and each divided sub-document, and improving the updating efficiency of the updated document.
FIG. 2 is a flowchart of a document updating method in this embodiment, which can be used in a user node server. The method may include the following steps.
In step 201, the original document is segmented to obtain N segmentation subfiles, and corresponding identifiers and numbers are assigned to the segmentation subfiles.
Wherein N is an integer greater than or equal to 1. For example, the original document C is divided into n divided subfiles, and the identifier and the division number of each divided subfile are obtained correspondingly: c1, C2, C3, … …, Cn, and C1+ C2+ C3+ … + Cn.
In step 202, a mapping relationship between the N subfiles and all leaf nodes except the root node of the hash tree structure is established.
It should be noted that the mapping relationship includes: the root node value of the hash tree is obtained by adding the values of all leaf nodes included in the hash tree, the leaf node value is obtained by homomorphically encrypting the partition subfile by using a homomorphic encryption public key, and the leaf node value is obtained by sequentially adding the values of all sub-leaf sub-nodes subordinate to the leaf node value according to the numbering sequence.
For example, the original document C is divided into n subfiles, and the identifier and the division number of each subfile are obtained correspondingly: c1, C2, C3, … …, Cn, and C1+ C2+ C3+ … + Cn. In the Markle hash tree, a value of each leaf node of the Markle hash tree is obtained by homomorphically encrypting the corresponding subfile using a homomorphic encryption public key, for example, Enc (C1), Enc (C2), Enc (C3) … Enc (Cn) are respectively and correspondingly recorded in each leaf node, where Enc (C1) represents a value obtained by homomorphic encryption public key by the user node server 4010 for homomorphic encryption of the subfile C1 using the homomorphic encryption public key, Enc (C2) represents a value obtained by homomorphic encryption public key by the user node server 4010 for homomorphic encryption of the subfile C2 using the homomorphic encryption public key, Enc (C3) represents a value obtained by homomorphic encryption public key by the user node server 4010 for homomorphic encryption of the subfile C3 using the homomorphic encryption public key, … …, Enc (Cn) represents a value obtained by homomorphic encryption public key by the user node server 4010 for homomorphic encryption of the subfile Cn. The value of the root node of the Markle hash tree is obtained by adding the values of all leaf nodes included in the Markle hash tree (i.e., Enc (C1), Enc (C2), Enc (C3) … Enc (cn)), and the value of any leaf node is obtained by sequentially adding the values of all child leaf child nodes subordinate thereto in the order of the division number.
In step 203, the N subfiles are homomorphically encrypted using the homomorphic encryption public key, and the obtained N encrypted subfiles are transmitted to the blockchain network.
When a storage node server to which the blockchain network is connected acquires the N encrypted partition subfiles sent by the user node server from the blockchain network, one or more partition subfiles can be selected for storage according to the size of the local storage space of the storage node server.
For example, when N equals 7, i.e., the user node server splits the original document C into 7 different split subfiles, B1, B2, B3, B4, B5, B6, and B7: the first storage node server may select split subfiles B1, B2, and B3 for storage; the second storage node server may select split subfiles B4, B5, B6, and B7 for storage.
In step 204, a homomorphic calculation function and homomorphic parameters are generated according to the content information to be updated.
In step 205, the identifier of the subfile to be updated is determined according to the content information to be updated.
In step 206, update parameters are generated according to the homomorphic calculation function, the parameter encryption result, and the identifier and the number corresponding to the subfile to be updated.
In step 207, the update parameters are sent to the blockchain network.
It should be noted that steps 204 to 207 in this embodiment are the same as steps 101 to 104 in the first embodiment, and are not described herein again.
In a specific implementation, after step 207, the method may further include: acquiring a segmentation subfile, a number corresponding to the segmentation subfile and a leaf node value of a hash tree corresponding to the segmentation subfile, which are stored in a storage node server, from a block chain network; adding the values of the leaf nodes in sequence according to the serial numbers to obtain a sum result, wherein the serial numbers are continuous numbers; and carrying out homomorphic decryption on the addition result by using a homomorphic encryption private key to obtain an updated document, wherein the homomorphic encryption private key is a secret key generated according to a homomorphic secret key generation algorithm.
When a user node server wants to acquire a latest document after completing one or more times of document updating, downloading a number corresponding to a latest segmentation subfile and a leaf node value of a hash tree corresponding to the segmentation subfile, which are stored by each storage node server, from each storage node server in a block chain network according to a mapping relation between the segmentation subfiles and the hash tree; and then, adding all the continuous numbers once to obtain the value of the root node of the hash tree, wherein the value of the root node corresponds to the latest document, and then, only the value of the root node needs to be processed, for example, the value of the root node is homomorphically decrypted by using a homomorphic encryption private key, so that the latest document can be obtained.
When the updated document is specifically acquired, only a few chapters with the most updated original document or chapters corresponding to user requirements can be acquired. For example, if chapter 1 and chapter 8 of the original document need to be updated, the subfiles corresponding to chapter 1 are C3, C4, and C5, and the subfiles corresponding to chapter 8 are C26 and C27, the user node server 4010 needs to process the contents of the chapters respectively, each chapter constitutes an independent small Markle hash tree, the root nodes of the two Markle hash trees are Enc (C3+) + Enc (C4+) + Enc (C5+), Enc (C26+) + Enc (C27+), and the user node server 4010 uses its own homomorphic encryption private key to perform calculation to obtain Dec (Enc (C3+) + Enc (C4+) + Enc (C5+)), that is to obtain the latest document in chapter 1. Similarly, the user node server 4010 performs calculation using its own homomorphic encryption private key to obtain Dec (Enc (C26+) + Enc (C27+)), and obtains the latest document in chapter 8.
In the embodiment, according to the structure of the hash tree, the mapping relation is established between the divided subfiles and all leaf nodes except the root node in the hash tree, so that the user node server can find the subfiles to be updated more quickly according to the hash tree, the document updating speed is increased, the working efficiency is improved, and the waste of resources is avoided. The method and the device enable the user to obtain the latest document more quickly and conveniently, and improve the user experience.
A third embodiment of the present invention relates to a document updating method. FIG. 3 is a flowchart of a document updating method in this embodiment, which can be used for a storage node server. The method may include the following steps.
In step 301, update parameters sent by the user node server are obtained from the blockchain network.
The updating parameters comprise homomorphic calculation functions, parameter encryption results and identification and numbers corresponding to the subfiles to be updated, the parameter encryption results are obtained by homomorphic encryption of homomorphic parameters corresponding to the subfiles to be updated by the user node server through homomorphic encryption public keys, the subfiles to be updated are files to be updated in the segmentation subfiles, and the segmentation subfiles are files obtained by segmenting original documents.
In step 302, the update parameters are calculated according to the homomorphic encryption calculation function, and the subfile to be updated is obtained.
In some embodiments, the update parameters are calculated according to a homomorphic encryption calculation function to obtain a calculation result; and sampling a homomorphic encryption private key, performing homomorphic decryption on the calculation result to obtain the subfile to be updated, wherein the homomorphic encryption private key is a secret key generated according to a homomorphic key generation algorithm.
It should be noted that the homomorphic encryption private key used by the storage node server corresponds to the homomorphic encryption public key used by the user node server, and only the corresponding storage node server can acquire the update parameter sent by the user node server, so as to acquire the subfile to be updated, thereby improving the security of the file information in the transmission process.
In step 303, the locally stored segmentation subfiles are updated with the subfiles to be updated according to the identification and the number.
It should be noted that each storage node server only acquires the subfile to be updated that is consistent with the identifier and the number of the locally stored segmentation subfile, so that the subfile to be updated can be updated on the storage node server, and a user node server can conveniently and quickly acquire the latest segmentation subfile. For example, according to the identifier and the partition number of the partition subfile C3, the storage node server may search for the locally stored partition subfile, obtain the partition subfile consistent with the identifier and the partition number, and update the partition subfile C3 locally stored by the storage node server to the subfile C3+ to be updated.
In this embodiment, obtain the update parameter that user node server sent from the block chain network through storage node server, use homomorphic encryption calculation function to calculate the update parameter, obtain the subfile that waits to update, and then according to this mark and the serial number that the subfile that waits to update corresponds, look for the segmentation subfile of local storage, use the segmentation subfile that waits to update the subfile update local storage, the segmentation subfile of assurance storage is all newest, convenience of customers node server is when updating the document, can be quick obtain newest document, and the work efficiency is improved, and the user experience is improved.
In some embodiments, before step 301, the following steps may be further included:
in step 3011, the N encrypted segment subfiles sent by the user node server are obtained from the blockchain network.
The encrypted subfiles are files obtained by homomorphic encryption of the subfiles by a user node server by adopting a homomorphic encryption public key, mapping relations exist between N subfiles and all leaf nodes of the Hash tree except a root node, and N is an integer greater than or equal to 1;
in step 3012, the N encrypted subfiles are decrypted homomorphically, and N subfiles are obtained correspondingly.
In step 3013, according to the capacity of the storage space, M subfiles are selected from the N subfiles to be stored locally,
wherein the capacity of the storage space is larger than a file storage capacity, the file storage capacity is a capacity obtained by adding file sizes of the M divided subfiles, M is an integer greater than or equal to 1, and M is less than or equal to N. For example, when a storage node server has a storage space capacity of 30M and acquires a plurality of subfiles from a blockchain network, there is a possibility that a subfile with a size of 5M, C1, C2, C3, C4, etc. may be acquired, but the storage node server can store only a file with a size of 30M at most, and therefore, the storage node server selects and stores the subfile C1, C2, and C3, and discards another subfile, such as C4.
In this embodiment, through carrying out homomorphic decryption to N segmentation subfiles after encrypting, correspond and obtain N segmentation subfiles, and then according to the capacity of storage space of storage node server self, select suitable segmentation subfile to store, guarantee the integrality of segmenting the subfile, make things convenient for the nimble segmentation subfile that obtains of user node server, promote the speed that the document is updated, improve work efficiency.
A fourth embodiment of the present invention relates to a document updating method. Fig. 4 is a flowchart of a document updating method based on the blockchain technique in this embodiment. When the size of the document does not exceed the preset threshold, the document is not divided, namely the number of the divided sub-files is 1. Specifically, a document update system is constituted by the user node server 4010 and the storage node server 4020, and the document update system communicates through a block chain network. The document update step is as follows.
In step 401, the user node server 4010 generates a homomorphic encryption public key and a homomorphic encryption private key according to a homomorphic key generation algorithm. For example, assume that the document is c. After the user node server 4010 prepares the document c, homomorphic encryption is performed on the document c to obtain a homomorphic encryption result enc (c) of the document c.
In step 402, the user node server 4010 signs enc (c) using its own private blockchain key, and broadcasts the signed enc (c) to the blockchain network.
In step 403, when the user node server 4010 needs to update the document c to a document c +, the document c is compared with the document c +, content information to be updated is obtained, and then a homomorphic calculation function f and a homomorphic parameter ca are generated according to the content information to be updated, where the homomorphic calculation function f and the homomorphic parameter ca meet the following relationship: f (c, ca) ═ c +. Namely, the original document c and the corresponding homomorphic parameter ca are calculated by using the homomorphic calculation function f, and the updated document c + can be obtained.
In step 404, the user node server 4010 generates an update parameter according to the identifier of the document c, the homomorphic calculation function f, and the homomorphic encryption result enc (ca). Then, the update parameter is signed by using the block chain private key of the user node server 4010, and the signed update parameter is sent to the block chain network.
The homomorphic encryption result enc (ca) is a result obtained by homomorphic encrypting the homomorphic parameter ca by the user node server 4010.
In step 405, after receiving the signed update parameter sent in step 404, the storage node server 4020 storing the document c verifies the private key of the signature, and after the verification is passed, the storage node server 4020 processes the update parameter using a homomorphic cryptographic calculation function to obtain and store the calculation result to the local, that is, store the document c + + to the local.
The homomorphic encryption calculation function may be represented as c + + ═ Evaluate (f, enc (c), enc (ca)), where f represents the homomorphic calculation function, enc (c) represents a result obtained by homomorphic encryption of the document c, enc (ca) represents a result obtained by homomorphic encryption of the homomorphic parameter ca, ca represents the homomorphic parameter, and c + + represents the updated document stored in the storage node server 4020.
In step 406, when the user node server 4010 wants to obtain an updated document from the blockchain network, the document c + + may be downloaded to the local of the user node server 4010 from the storage node server 4020, and then, the document c + + is calculated using a homomorphic decryption algorithm function to obtain Dec (c + +), where c + + should be equal to Enc (c +), and Dec (c + +) should be equal to c +; the updated document c + is obtained.
In the embodiment, the content information to be updated is obtained by comparing the original document with the document to be updated, so that a homomorphic calculation function and homomorphic parameters can be generated according to the content information to be updated, then the identifier of the subfile to be updated is determined according to the content information to be updated, the homomorphic calculation function, a parameter encryption result obtained by homomorphic encryption of the homomorphic parameters by adopting a homomorphic encryption public key, the identifier of the subfile to be updated and the corresponding number are sent to a block chain network as the updating parameters, so that a storage node server can receive the updating parameters and update the corresponding segmentation subfiles according to the updating parameters, thereby avoiding that the original document can be updated by uploading all the contents of the document to be updated to a server, only the subfile to be updated stored by a storage node server needs to be updated, and improving the working efficiency, the waste of resources is avoided.
A fifth embodiment of the present invention relates to a document updating method. FIG. 5 is a flowchart of a document updating method using a Markle hash tree. When the size of the document exceeds a preset threshold value, the document is segmented to obtain N segmentation sub-files, a mapping relation between the Markle hash tree and the N segmentation sub-files is established, and the document updating efficiency is improved. Specifically, a document update system is constituted by a plurality of storage node servers such as a user node server 4010, a storage node server a4021, and a storage node server B4022, and communicates through a block chain network. The document update step is as follows.
In step 501, the user node server 4010 generates a homomorphic encryption public key and a homomorphic encryption private key according to a homomorphic key generation algorithm, for example, assuming that the document is C, the user node server 4010 fragments the document C through a Markle hash tree to obtain N subfiles of partitions.
For example, fig. 6 is a branch structure diagram of a Markle hash tree, in which a document C is divided into n subfiles, and the identifier and the division number of each subfile are obtained: c1, C2, C3, … …, Cn, and C1+ C2+ C3+ … + Cn. In the Markle hash tree, a value of each leaf node of the Markle hash tree is obtained by homomorphically encrypting the corresponding subfile using a homomorphic encryption public key, for example, Enc (C1), Enc (C2), Enc (C3) … Enc (Cn) are respectively and correspondingly recorded in each leaf node, where Enc (C1) represents a value obtained by homomorphic encryption public key by the user node server 4010 for homomorphic encryption of the subfile C1 using the homomorphic encryption public key, Enc (C2) represents a value obtained by homomorphic encryption public key by the user node server 4010 for homomorphic encryption of the subfile C2 using the homomorphic encryption public key, Enc (C3) represents a value obtained by homomorphic encryption public key by the user node server 4010 for homomorphic encryption of the subfile C3 using the homomorphic encryption public key, … …, Enc (Cn) represents a value obtained by homomorphic encryption public key by the user node server 4010 for homomorphic encryption of the subfile Cn. The value of the root node of the Markle hash tree is obtained by adding the values of all leaf nodes included in the Markle hash tree (i.e., Enc (C1), Enc (C2), Enc (C3) … Enc (cn)), and the value of any leaf node is obtained by sequentially adding the values of all child leaf child nodes subordinate thereto in the order of the division number.
In step 502, the user node server 4010 signs Enc (C1), Enc (C2), and Enc (C3) … Enc (cn) with its own zone chain private key, respectively, and obtains and sends signed Enc (C1), signed Enc (C2), signed Enc (C3), and signed Enc (cn) of … … to the zone chain network.
In step 503, the storage node server a4021 and the storage node server B4022 respectively receive the signed and homomorphically encrypted subfiles C1, C2, C3, … …, Cn in step 502, then verify the private key signatures of the signed Enc (C1), signed Enc (C2), signed Enc (C3), … … signed Enc (Cn), and if the private key signatures are verified, select one or more subfiles to store according to the size of their local storage space.
For example, n is equal to 7, the storage node server a4021 selects the subfiles C1, C2, C3 for storage; the storage node server B4022 selects and stores the subfiles C4, C5, C6, and C7.
In step 504, when the user node server 4010 needs to update the document C to the document C +, the document C + is compared with the respective subfiles C1, C2, C3, … …, and Cn in step 501, and it is known that the updated part only relates to the subfiles C3 and C6, and only the subfile C3 needs to be updated to the subfile C3+ to be updated, and the subfile C6 needs to be updated to the subfile C6+ to be updated. The user node server 4010 generates a homomorphic calculation function f and a homomorphic parameter ca, which satisfy the following relationship, from the difference between the subfile C3 and the subfile C3+ to be updated and the difference between the subfile C6 and the subfile C6+ to be updated: f (C3, ca3) ═ C3 +; f (C6, ca6) ═ C6 +.
In step 505, the user node server 4010 homomorphically encrypts the homomorphic parameter ca3 and the homomorphic parameter ca6 respectively to obtain homomorphic encryption results Enc (ca3) and Enc (ca6), then generates a first update parameter according to the homomorphic computation function f, Enc (ca3), the identifier and the division number of the document division subfile C3, signs the first update parameter by using the private key of the block chain of the user node server 4010, and sends the signed first update parameter to the block chain network; meanwhile, a second update parameter is generated according to the homomorphic calculation function f, the Enc (ca6), the identifier of the subfile C6 and the partition number of the subfile, the second update parameter is signed by using the own block chain private key of the user node server 4010, and the signed second update parameter is sent to the block chain network. The storage node server storing the subfile C3 and the subfile C6 is enabled to obtain the first update parameter and the second update parameter, respectively.
In step 506, the storage node server a4021 obtains the first update parameter signed by the private key of the user node server 4010 from the blockchain network, and first verifies the private key signature of the first update parameter. When the verification is passed, obtaining first updating parameters, namely homomorphic computing functions f, Enc (ca3), the identification of the segmentation subfile C3 and the segmentation number; then, a homomorphic encryption calculation function C3+ +, namely Evaluate (f, Enc (C3), Enc (ca3) is operated to obtain a subfile C3+ +, then, a homomorphic decryption algorithm function is used to calculate the subfile C3+ + to be updated to obtain Dec (C3+ +), C3+ + should be equal to Enc (C3+), Dec (C3+ +) should be equal to C3+ due to the characteristic of homomorphic encryption, and then, the updated subfile C3+ to be updated can be obtained, and the locally stored subfile C3 is updated to the subfile C3+ to be updated according to the identification and the segmentation serial number of the subfile C3.
Meanwhile, the storage node server B4022 acquires the second update parameter signed by the private key of the user node server 4010 from the blockchain network, and first verifies the private key signature of the second update parameter. When the verification is passed, obtaining second updating parameters, namely homomorphic computing functions f, Enc (ca6), the identification of the segmentation subfile C6 and the segmentation number; then, a homomorphic encryption calculation function C6+ +, namely Evaluate (f, Enc (C6), Enc (ca6) is operated to obtain a subfile C6+ +, then, a homomorphic decryption algorithm function is used to calculate the subfile C6+ + to be updated to obtain Dec (C6+ +), C6+ + should be equal to Enc (C6+), Dec (C6+ +) should be equal to C6+ due to the characteristic of homomorphic encryption, and then, the updated subfile C6+ to be updated can be obtained, and the locally stored subfile C6 is updated to the subfile C6+ to be updated according to the identification and the segmentation serial number of the subfile C6.
In step 507, when the user node server 4010 wants to obtain an updated document from the blockchain network, the user node server 4010 can obtain homomorphically encrypted stored values of all the segmentation subfiles from different storage node servers. Then, arranging the storage values according to the rule of the leaf nodes of the Markle Hash tree, and sequentially adding the storage values to obtain the value of the root node of the whole Markle Hash tree; the user node server 4010 uses its own homomorphic encryption private key to homomorphically decrypt the value of the root node, and obtains the latest document.
Similarly, if the user node server 4010 only needs to update several chapters of the original document (for example, the first 100 pages of the original document, or update the third chapter and the sixth chapter, etc.), only needs to download the document portions to be updated from each storage node server in the block chain network according to the identifier and the partition number of the subfile, and then combine the subfiles to be updated according to the combination mode of the Markle tree, so as to obtain the document chapters to be updated.
For example, the third chapter of the updated document is stored on storage node server a4021, i.e., segmentation subfile C3 +; the sixth chapter of the updated document is stored on storage node server B4022, namely segmentation subfile C6 +; the user node server 4010 only needs to download the segmentation subfile C3+ from the storage node server a 4021; the partition subfile C6+ is downloaded from storage node server B4022. And correspondingly updating the chapters of the original document according to the identifications and the segmentation numbers of the segmentation sub-documents.
It should be noted that, if the division number is not a continuous number, the homomorphic encryption results of the respective division subfiles may not be directly added, and need to be processed separately. For example, if chapter 1 and chapter 12 of the original document need to be updated, the subfiles corresponding to chapter 1 are C3, C4, and C5, and the subfiles corresponding to chapter 12 are C26 and C27, the user node server 4010 needs to process the contents of the chapters respectively, each chapter forms an independent small Markle hash tree, the root nodes of the two Markle hash trees respectively have Enc (C3+) + Enc (C4+) + Enc (C5+), Enc (C26+) + Enc (C27+), and the user node server 4010 uses its own homomorphic encryption private key to perform calculation to obtain DeC (Enc (C3+) + Enc (C4+) + Enc (C5+)), and thus the latest document in chapter 1 can be obtained. Similarly, the user node server 4010 performs calculation using its own homomorphic encryption private key to obtain Dec (Enc (C26+) + Enc (C27+)), and obtains the latest document in chapter 12.
In the embodiment, according to the structure of the hash tree, the mapping relationship is established between the divided subfiles and all leaf nodes except the root node in the hash tree, so that the user node server can find the subfiles to be updated more quickly according to the hash tree, the document updating speed is increased, the working efficiency is improved, and the waste of resources is avoided. The method and the device enable the user to obtain the latest document more quickly and conveniently, and improve the user experience.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
A sixth embodiment of the present invention relates to a user node server, and specific implementation of the server may refer to the related description of the first embodiment, and repeated details are not repeated. It should be noted that, for specific implementation of the server in this embodiment, reference may also be made to the related description of the second embodiment, and reference may also be made to the related description of the fourth embodiment, but the server is not limited to the above three examples, and other examples that are not described are also within the protection scope of the server.
As shown in fig. 7, the user node server mainly includes: the function generating module 701 is configured to generate a homomorphic calculation function and homomorphic parameters according to content information to be updated, where the content information to be updated is information obtained by comparing an original document with a document to be updated; the determining module 702 is configured to determine, according to the content information to be updated, an identifier of a subfile to be updated, where the subfile to be updated is a file to be updated in the subfiles, and the subfile to be updated is a file obtained by segmenting the original document; the update parameter generation module 703 is configured to generate an update parameter according to the homomorphic calculation function, the parameter encryption result, and the identifier and the number corresponding to the subfile to be updated, where the parameter encryption result is a result obtained by homomorphic encrypting the homomorphic parameter by using a homomorphic encryption public key; the sending module 704 is configured to send the update parameter to the blockchain network, so that the storage node server updates the partition subfile stored in the storage node server according to the update parameter.
A seventh embodiment of the present invention relates to a storage node server, and specific implementation of the server may refer to the related description of the third embodiment, and repeated descriptions are omitted. It should be noted that, the specific implementation of the server in the present embodiment may also refer to the related description in the fourth embodiment, but is not limited to the above two embodiments, and other non-illustrated embodiments are also within the protection scope of the server.
As shown in fig. 8, the storage node server mainly includes: the obtaining module 801 is configured to obtain, from a block chain network, update parameters sent by a user node server, where the update parameters include a homomorphic calculation function, a parameter encryption result, and an identifier and a number corresponding to a subfile to be updated, the parameter encryption result is a result obtained by homomorphic encrypting the subfile to be updated by the user node server using a homomorphic encryption public key, the subfile to be updated is a file to be updated in a subfile to be updated, and the subfile to be updated is a file obtained by segmenting an original document; the calculation module 802 is configured to calculate a parameter encryption result according to a homomorphic calculation function, and obtain a subfile to be updated; the update module 803 is configured to update the locally stored segmentation subfiles with the subfiles to be updated according to the identifier and the number.
It should be noted that each module referred to in this embodiment is a logical module, and in practical applications, one logical unit may be one physical unit, may be a part of one physical unit, and may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, elements that are not so closely related to solving the technical problems proposed by the present invention are not introduced in the present embodiment, but this does not indicate that other elements are not present in the present embodiment.
It will be understood that the above embodiments are merely exemplary embodiments taken to illustrate the principles of the present invention, which is not limited thereto. It will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the spirit and substance of the invention, and these modifications and improvements are also considered to be within the scope of the invention.

Claims (10)

1. A document update method, the method comprising:
generating a homomorphic calculation function and homomorphic parameters according to content information to be updated, wherein the content information to be updated is information obtained by comparing an original document with a document to be updated;
determining the identifier of a subfile to be updated according to the content information to be updated, wherein the subfile to be updated is a file to be updated in the segmentation subfiles, and the segmentation subfile is a file obtained by segmenting the original document;
generating an updating parameter according to the homomorphic calculation function, a parameter encryption result and the identification and the number corresponding to the subfile to be updated, wherein the parameter encryption result is obtained by homomorphic encryption of the homomorphic parameter by adopting a homomorphic encryption public key;
and sending the updating parameters to a block chain network so that the storage node server updates the segmentation sub-files stored by the storage node server according to the updating parameters.
2. The method according to claim 1, wherein before the step of generating a homomorphic computation function according to the content information to be updated, the method further comprises:
dividing the original document to obtain N sub-divided files, and allocating corresponding identifiers and numbers to the sub-divided files, wherein N is an integer greater than or equal to 1;
establishing a mapping relation between the N segmentation sub-files and all leaf nodes except a root node of the hash tree structure;
and respectively carrying out homomorphic encryption on the N segmentation subfiles by adopting a homomorphic encryption public key, and transmitting the obtained N encrypted segmentation subfiles to a block chain network so as to enable a storage node server to store the segmentation subfiles, wherein the homomorphic encryption public key is a secret key generated according to a homomorphic key generation algorithm.
3. The method according to claim 2, wherein after the step of sending the update parameters to the blockchain network so that the storage node server updates the partition subfiles stored by the storage node server according to the update parameters, the method further comprises:
acquiring the segmentation subfiles, numbers corresponding to the segmentation subfiles and leaf nodes of a hash tree corresponding to the segmentation subfiles, which are stored by a storage node server, from a block chain network;
adding the values of the leaf nodes in sequence according to the serial numbers to obtain a sum result, wherein the serial numbers are continuous numbers;
and homomorphic decryption is carried out on the addition result by using a homomorphic encryption private key to obtain an updated document, wherein the homomorphic encryption private key is a secret key generated according to a homomorphic secret key generation algorithm.
4. The method according to claim 2 or 3, wherein the value of the root node of the hash tree is a value obtained by adding values of all leaf nodes included in the hash tree, the value of the leaf node is a value obtained by homomorphically encrypting the subfile using a homomorphic encryption public key, and the value of the leaf node is a value obtained by sequentially adding values of all child leaf child nodes subordinate thereto in order of numbering.
5. The method according to claim 1, wherein the step of generating a homomorphic computation function according to the content information to be updated comprises:
generating a homomorphic calculation function and homomorphic parameters according to the content information to be updated, wherein the homomorphic calculation function and the homomorphic parameters meet the following rules:
and calculating the segmentation subfiles and the corresponding homomorphism parameters by using the homomorphism calculation function to obtain subfiles to be updated corresponding to the segmentation subfiles.
6. A document update method, the method comprising:
acquiring update parameters sent by a user node server from a block chain network, wherein the update parameters comprise homomorphic calculation functions, parameter encryption results and identifications and numbers corresponding to subfiles to be updated, the parameter encryption results are obtained by homomorphic encryption of homomorphic parameters corresponding to the subfiles to be updated by the user node server by adopting homomorphic encryption public keys, the subfiles to be updated are files to be updated in segmentation subfiles, and the segmentation subfiles are files obtained by segmenting original documents;
calculating the updating parameters according to a homomorphic encryption calculation function to obtain the subfiles to be updated;
and updating the locally stored segmentation subfiles by using the subfiles to be updated according to the identification and the serial numbers.
7. The method according to claim 6, wherein the step of calculating the update parameter according to a homomorphic cryptographic calculation function to obtain the subfile to be updated comprises:
calculating the updating parameters according to the homomorphic encryption calculation function to obtain a calculation result;
and sampling a homomorphic encryption private key, performing homomorphic decryption on the calculation result, and obtaining the subfile to be updated, wherein the homomorphic encryption private key is a secret key generated according to a homomorphic secret key generation algorithm.
8. The method according to claim 6 or 7, wherein before the step of obtaining the update parameters sent by the user node server from the blockchain network, the method further comprises:
acquiring N encrypted partition subfiles sent by the user node server from a block chain network, wherein the encrypted partition subfiles are files obtained by homomorphic encryption of the partition subfiles by the user node server by adopting a homomorphic encryption public key, mapping relations exist between the N partition subfiles and all leaf nodes of a hash tree except a root node, and N is an integer greater than or equal to 1;
respectively carrying out homomorphic decryption on the N encrypted segmentation sub-files to correspondingly obtain N segmentation sub-files;
and selecting M of the N segmentation sub-files to be stored locally according to the capacity of a storage space, wherein the capacity of the storage space is larger than the file storage capacity, the file storage capacity is obtained by adding the file sizes of the M segmentation sub-files, M is an integer larger than or equal to 1, and M is smaller than or equal to N.
9. A user node server, comprising:
the function generation module is used for generating homomorphic calculation functions and homomorphic parameters according to the content information to be updated, wherein the content information to be updated is information obtained by comparing an original document with the document to be updated;
the determining module is used for determining the identifier of the subfile to be updated according to the content information to be updated, wherein the subfile to be updated is a file to be updated in the segmentation subfiles, and the segmentation subfile is a file obtained by segmenting the original document;
an update parameter generation module, configured to generate an update parameter according to the homomorphic calculation function, a parameter encryption result, and an identifier and a number corresponding to the subfile to be updated, where the parameter encryption result is a result obtained by homomorphically encrypting the homomorphic parameter by using a homomorphic encryption public key
And the sending module is used for sending the updating parameters to the block chain network so that the storage node server updates the segmentation subfiles stored by the storage node server according to the updating parameters.
10. A storage node server, comprising:
the system comprises an acquisition module, a block chain network and a block chain processing module, wherein the acquisition module is used for acquiring update parameters sent by a user node server from the block chain network, the update parameters comprise homomorphic calculation functions, parameter encryption results and identifications and numbers corresponding to subfiles to be updated, the parameter encryption results are obtained by homomorphic encryption of homomorphic parameters corresponding to the subfiles to be updated by the user node server by adopting a homomorphic encryption public key, the subfiles to be updated are files to be updated in subfiles, and the subfiles to be updated are files obtained by segmenting original documents;
the calculation module is used for calculating the updating parameters according to a homomorphic encryption calculation function to obtain the subfiles to be updated;
and the updating module is used for updating the locally stored segmentation subfiles by using the subfiles to be updated according to the identifications and the serial numbers.
CN202010014151.8A 2020-01-07 2020-01-07 Document updating method and server Active CN111221569B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010014151.8A CN111221569B (en) 2020-01-07 2020-01-07 Document updating method and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010014151.8A CN111221569B (en) 2020-01-07 2020-01-07 Document updating method and server

Publications (2)

Publication Number Publication Date
CN111221569A true CN111221569A (en) 2020-06-02
CN111221569B CN111221569B (en) 2023-07-25

Family

ID=70831030

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010014151.8A Active CN111221569B (en) 2020-01-07 2020-01-07 Document updating method and server

Country Status (1)

Country Link
CN (1) CN111221569B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112686004A (en) * 2020-12-30 2021-04-20 海南大学 Block chain-based single-document multi-interface editing method
CN112929464A (en) * 2021-02-22 2021-06-08 中国电子信息产业集团有限公司第六研究所 Identification analysis method, device, system, dynamic adapter and readable storage medium
CN115470506A (en) * 2022-10-28 2022-12-13 山东华翼微电子技术股份有限公司 Homomorphic mapping-based secure file system implementation method

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102196429A (en) * 2011-04-27 2011-09-21 暨南大学 Encrypted data fusion method for wireless sensor network
US8635465B1 (en) * 2012-03-28 2014-01-21 Emc Corporation Counter-based encryption of stored data blocks
CN105320899A (en) * 2014-07-22 2016-02-10 北京大学 User-oriented cloud storage data integrity protection method
US20160323098A1 (en) * 2015-04-28 2016-11-03 United States Government As Represented By The Secretary Of The Navy System and Method for High-Assurance Data Storage and Processing based on Homomorphic Encryption
WO2017036547A1 (en) * 2015-09-04 2017-03-09 Nec Europe Ltd. Method for providing encrypted data in a database and method for searching on encrypted data
CN107770154A (en) * 2017-09-22 2018-03-06 中国科学院信息工程研究所 Block chain reliable data storage method, terminal and system based on cloud storage
CN108777613A (en) * 2018-06-01 2018-11-09 杭州电子科技大学 The deblocking method for secure storing of heat transfer agent Virtual Service in Internet of Things
CN109615378A (en) * 2019-01-24 2019-04-12 上海点融信息科技有限责任公司 Multi-party computations method, apparatus and readable storage medium storing program for executing based on block chain
CN109861829A (en) * 2019-03-15 2019-06-07 上海海事大学 The just auditing system of cloud data and its auditing method for supporting dynamic to update
CN110276684A (en) * 2019-05-20 2019-09-24 阿里巴巴集团控股有限公司 In conjunction with the receipt storage method and node of type of transaction and event functions type
CN110390212A (en) * 2019-07-31 2019-10-29 中国工商银行股份有限公司 Based on the supply of material monitoring method of block chain, node apparatus
CN110417781A (en) * 2019-07-30 2019-11-05 中国工商银行股份有限公司 File encryption management method, client and server based on block chain

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102196429A (en) * 2011-04-27 2011-09-21 暨南大学 Encrypted data fusion method for wireless sensor network
US8635465B1 (en) * 2012-03-28 2014-01-21 Emc Corporation Counter-based encryption of stored data blocks
CN105320899A (en) * 2014-07-22 2016-02-10 北京大学 User-oriented cloud storage data integrity protection method
US20160323098A1 (en) * 2015-04-28 2016-11-03 United States Government As Represented By The Secretary Of The Navy System and Method for High-Assurance Data Storage and Processing based on Homomorphic Encryption
WO2017036547A1 (en) * 2015-09-04 2017-03-09 Nec Europe Ltd. Method for providing encrypted data in a database and method for searching on encrypted data
CN107770154A (en) * 2017-09-22 2018-03-06 中国科学院信息工程研究所 Block chain reliable data storage method, terminal and system based on cloud storage
CN108777613A (en) * 2018-06-01 2018-11-09 杭州电子科技大学 The deblocking method for secure storing of heat transfer agent Virtual Service in Internet of Things
CN109615378A (en) * 2019-01-24 2019-04-12 上海点融信息科技有限责任公司 Multi-party computations method, apparatus and readable storage medium storing program for executing based on block chain
CN109861829A (en) * 2019-03-15 2019-06-07 上海海事大学 The just auditing system of cloud data and its auditing method for supporting dynamic to update
CN110276684A (en) * 2019-05-20 2019-09-24 阿里巴巴集团控股有限公司 In conjunction with the receipt storage method and node of type of transaction and event functions type
CN110417781A (en) * 2019-07-30 2019-11-05 中国工商银行股份有限公司 File encryption management method, client and server based on block chain
CN110390212A (en) * 2019-07-31 2019-10-29 中国工商银行股份有限公司 Based on the supply of material monitoring method of block chain, node apparatus

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DINO MACEDO AMARAL等: "Hy-SAIL: Hyper-Scalability, Availability and Integrity Layer for Cloud Storage Systems", vol. 7, pages 1 - 12 *
王栋: "基于同态加密的动态多副本数据持有性验证方法研究", no. 2, pages 137 - 107 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112686004A (en) * 2020-12-30 2021-04-20 海南大学 Block chain-based single-document multi-interface editing method
CN112929464A (en) * 2021-02-22 2021-06-08 中国电子信息产业集团有限公司第六研究所 Identification analysis method, device, system, dynamic adapter and readable storage medium
CN112929464B (en) * 2021-02-22 2022-06-24 中国电子信息产业集团有限公司第六研究所 Identification analysis method, device, system, dynamic adapter and readable storage medium
CN115470506A (en) * 2022-10-28 2022-12-13 山东华翼微电子技术股份有限公司 Homomorphic mapping-based secure file system implementation method
CN115470506B (en) * 2022-10-28 2023-03-10 山东华翼微电子技术股份有限公司 Homomorphic mapping-based secure file system implementation method

Also Published As

Publication number Publication date
CN111221569B (en) 2023-07-25

Similar Documents

Publication Publication Date Title
Gorbunov et al. Riding on asymmetry: efficient ABE for branching programs
CN111221569B (en) Document updating method and server
CN112182644B (en) Data processing method and device and electronic equipment
US7346160B2 (en) Randomization-based encryption apparatus and method
US10484170B2 (en) Custom encryption function for communications between a client device and a server device
WO2017122696A1 (en) Anonymous search system, anonymous search method, and anonymous search program
JP6120961B2 (en) Generation and verification of alternative data with a specific format
CN115225409B (en) Cloud data safety duplicate removal method based on multi-backup joint verification
CN114127724A (en) Integrity audit for multi-copy storage
Poh et al. Searchable symmetric encryption over multiple servers
US20170170958A1 (en) Communication control device, communication control method, and computer program product
Liu et al. Analysis of RIPEMD-160: new collision attacks and finding characteristics with MILP
Kennedy et al. Overlaying conditional circuit clauses for secure computation
CN109831405B (en) File protection method and device on cloud platform
Dobraunig et al. Differential cryptanalysis of SipHash
CN116260572B (en) Data hash processing method, data verification method and electronic equipment
US20090319805A1 (en) Techniques for performing symmetric cryptography
CN112818404A (en) Data access permission updating method, device, equipment and readable storage medium
KR102132685B1 (en) Apparatus and method for order-revealing encryption
CN115510490A (en) Method, device, system and equipment for inquiring encrypted data shared by non-secret keys
CN113515769B (en) Big data rediscovery method and device based on hidden data
JP5970193B2 (en) SEARCH SYSTEM, SEARCH METHOD, AND SEARCH PROGRAM
CN115589316A (en) Data encryption transmission method and device, electronic equipment and storage medium
CN113761585B (en) Data processing method, device and system
CN116888597A (en) Multi-key secure deduplication using locking fingerprints

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