CN111310238A - File management method and device - Google Patents

File management method and device Download PDF

Info

Publication number
CN111310238A
CN111310238A CN202010089341.6A CN202010089341A CN111310238A CN 111310238 A CN111310238 A CN 111310238A CN 202010089341 A CN202010089341 A CN 202010089341A CN 111310238 A CN111310238 A CN 111310238A
Authority
CN
China
Prior art keywords
file
hash value
directory
list
storage system
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
CN202010089341.6A
Other languages
Chinese (zh)
Other versions
CN111310238B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010089341.6A priority Critical patent/CN111310238B/en
Publication of CN111310238A publication Critical patent/CN111310238A/en
Application granted granted Critical
Publication of CN111310238B publication Critical patent/CN111310238B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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

Landscapes

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

Abstract

The embodiment of the application provides a file management method and device. The method comprises the following steps: generating a first file and a first file directory, wherein the first file directory is used for summarizing the content of the first file; sending the first file to a file storage system to obtain a first hash value of the first file; writing the first file directory and the first hash value into a first file list corresponding to the first file; writing the first file list to a blockchain network for managing the first file. The technical scheme of the embodiment of the application can effectively improve the quality of file management, particularly the quality of file management under the condition of multi-party cooperation.

Description

File management method and device
Technical Field
The application relates to the technical field of computers and the Internet, in particular to a file management method and device.
Background
In a file management scenario, for example, a scenario in which a file is managed under a multi-party collaboration condition, a unified and fixed file management system is usually configured, and each party has a right to transmit the file to the file management system or obtain the file from the file management system, or has a right to directly change the file in the file management system, thereby implementing management of the file. However, how to improve the quality of managing files under the multi-party collaboration situation is an urgent technical problem to be solved.
Disclosure of Invention
Embodiments of the present application provide a file management method, an apparatus, a computer-readable medium, and an electronic device, so that quality of managing a file under a multi-party collaboration condition can be improved at least to a certain extent.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of an embodiment of the present application, there is provided a file management method including: generating a first file and a first file directory, wherein the first file directory is used for summarizing the content of the first file; sending the first file to a file storage system to obtain a first hash value of the first file; writing the first file directory and the first hash value into a first file list corresponding to the first file; writing the first file list to a blockchain network for managing the first file.
According to an aspect of an embodiment of the present application, there is provided a file management apparatus including: a generating unit configured to generate a first file and a first file directory, the first file directory being used to summarize contents of the first file; the first sending unit is used for sending the first file to a file storage system to obtain a first hash value of the first file; a first writing unit, configured to write the first file directory and the first hash value into a first file list corresponding to the first file; and the second writing unit is used for writing the first file list into a block chain network so as to manage the first file.
In some embodiments of the present application, based on the foregoing scheme, the first sending unit is configured to: and sending the first file to a file storage system to obtain a first MD5 hash value or SHA-1 hash value of the first file.
In some embodiments of the present application, based on the foregoing scheme, the first sending unit is configured to: generating a public and private key pair, wherein the public and private key pair comprises a public key and a private key; writing the public key to the blockchain network; signing the first file through the private key to obtain a signed first file; and sending the signed first file to a file storage system.
According to an aspect of an embodiment of the present application, there is provided a file management method including: acquiring a first file list of a first file from a block chain network, wherein the first file list comprises a first hash value of the first file; acquiring the first file from a file storage system; and according to the first file and the first hash value, performing first verification on the first file so as to manage the first file.
According to an aspect of an embodiment of the present application, there is provided a file management apparatus including: a first obtaining unit, configured to obtain a first file list of a first file from a blockchain network, where the first file list includes a first hash value of the first file; a second acquisition unit configured to acquire the first file from a file storage system; and the verification unit is used for performing first verification on the first file according to the first file and the first hash value so as to manage the first file.
In some embodiments of the present application, based on the foregoing solution, the verification unit is configured to: performing hash processing on the first file to obtain a second hash value of the first file; and performing first verification on the first file according to the first hash value and the second hash value.
In some embodiments of the present application, based on the foregoing solution, the verification unit is configured to: when the first hash value and the second hash value are the same, the first file is successfully verified; and when the first hash value is not the same as the second hash value, the first file is unsuccessfully verified.
In some embodiments of the present application, based on the foregoing solution, the verification unit is further configured to: before first verification is carried out on the first file, a public key is obtained from a block chain network; and performing second verification on the signed first file based on the public key.
In some embodiments of the present application, based on the foregoing solution, the first file list further includes a first file directory of the first file, and the apparatus further includes a second sending unit, configured to modify the first file based on the first file directory after performing first verification on the first file, so as to obtain a second file and a second file directory, where the second file directory is used to summarize contents of the second file; sending the second file to a file storage system to obtain a second hash value of the second file; a third writing unit, configured to write the second file directory and the second hash value into a second file list corresponding to the second file; a fourth writing unit, configured to write the second file list to a blockchain network, so as to manage the second file.
According to an aspect of embodiments of the present application, there is provided a computer-readable medium on which a computer program is stored, the computer program, when executed by a processor, implementing a file management method as described in the above embodiments.
According to an aspect of an embodiment of the present application, there is provided an electronic device including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the file management method as described in the above embodiments.
In the technical solutions provided in some embodiments of the present application, on one hand, a generated first file is sent to a file storage system to obtain a first hash value of the first file, and on the other hand, the first file directory and the first hash value are written into a first file list corresponding to the first file, and the first file list is written into a block chain network. Specifically, since the first file list including the first hash value of the first file and the first file directory of the first file is correspondingly stored in the blockchain network, the blockchain network can ensure that the content in the first file list is not falsifiable and forged, so that the security of the first file directory and the first hash value in the first file list can be improved. Furthermore, other file management parties can verify the authenticity of the first file stored in the file storage system according to the first hash value of the first file, and therefore the security of the first file is improved. Therefore, by the technical scheme, the quality of file management can be effectively improved, particularly the quality of file management under the condition of multi-party cooperation.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 shows a schematic diagram of an exemplary system architecture to which aspects of embodiments of the present application may be applied;
FIG. 2 illustrates an exemplary diagram of an environment in which a file management method is implemented according to one embodiment of the present application;
FIG. 3 shows a flow diagram of a file management method according to an embodiment of the present application;
FIG. 4 illustrates a detailed flow diagram for sending the first file to a file storage system according to one embodiment of the present application;
FIG. 5 shows a block diagram of a file management apparatus according to an embodiment of the present application;
FIG. 6 shows a flow diagram of a file management method according to an embodiment of the present application;
FIG. 7 illustrates a detailed flow diagram for a first validation of the first document according to one embodiment of the present application;
FIG. 8 shows a detailed flowchart of a first validation of the first document according to one embodiment of the present application;
FIG. 9 illustrates a flowchart of a method prior to a first validation of the first document, according to one embodiment of the present application;
FIG. 10 illustrates a flowchart of a method after a first validation of the first document, according to one embodiment of the present application;
FIG. 11 shows a block diagram of a file management apparatus according to an embodiment of the present application;
FIG. 12 illustrates an interactive process diagram for managing defect files under multi-party collaboration according to one embodiment of the application;
FIG. 13 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied.
As shown in fig. 1, the system architecture may include a terminal device (e.g., one or more of a smartphone 101, a tablet computer 102, and a portable computer 103 shown in fig. 1, but may also be a desktop computer, etc.), a network 104, and a server 105. The network 104 serves as a medium for providing communication links between terminal devices and the server 105. Network 104 may include various connection types, such as wired communication links, wireless communication links, and so forth.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, server 105 may be a server cluster comprised of multiple servers, or the like.
It should be noted that the file management method provided in the embodiment of the present application is generally executed by a terminal device (for example, the portable computer 103), and accordingly, the file management apparatus is generally disposed in the terminal device. However, in other embodiments of the present application, the server 105 may also have similar functions as the terminal device, so as to execute the file management scheme provided by the embodiments of the present application.
FIG. 2 illustrates an exemplary diagram of an environment in which a file management method is implemented according to one embodiment of the present application.
The file management method provided by the application is generally used in a file management scenario (for example, a scenario in which a file is managed on multiple management platforms) with participation of multiple parties.
Therefore, in an embodiment of the present application, as shown in fig. 2, the file management method proposed in the present application may be implemented in the first management platform 201 shown in fig. 2, the second management platform 204, or the nth management platform 205. Specifically, for example, a first file directory of a first file and the first file is generated by the first management platform 201, where the first file directory is used to summarize the content of the first file, then the first management platform sends the first file to the file storage system to obtain a first hash value of the first file, after obtaining the first hash value of the first file, the first management platform writes the first file directory and the first hash value into a first file list corresponding to the first file (that is, the first file list includes the content of the first file directory and the first hash value), and finally, the first management platform writes the first file list into the block chain network to be used for managing the file.
It should be noted that the first management platform may also generate the first hash value according to the first file, and then send the first file to the file storage system.
In an embodiment of the present application, as shown in fig. 2, another file management method proposed in the present application may also be implemented in the first management platform 201, or in the second management platform 204, or in the nth management platform 205, as shown in fig. 2. Specifically, for example, the first management platform 201 first obtains a first file list of a first file from a blockchain network, where the first file list includes a first hash value of the first file, then obtains the first file from a file storage system, and finally, the first management platform 201 performs first verification on the first file according to the first file and the first hash value, so as to manage the file.
In the above embodiment, by storing the first file in the file storage system and writing the first file directory and the first hash value of the first file in the blockchain network, the tamper resistance of the first file directory and the first hash value in the first file list and the authenticity of the first file can be ensured while ensuring that the data amount in the blockchain network does not swell rapidly (if the first file is stored directly in the blockchain network, the rapid swelling of the data amount in the blockchain network is brought, and thus the blockchain network is crashed). And further, the efficiency and the quality of file management, particularly the file management under the condition of multi-party cooperation, can be effectively improved.
The following describes details of implementation of the technical solution of the embodiment of the present application in detail from the perspective of different administrators:
it is noted that the terms first, second and the like in the description and claims of the present application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the objects so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in other sequences than those illustrated or described herein.
From the perspective of the first management platform:
the embodiment provides a file management method, wherein the method can be executed on a first management platform.
Referring to fig. 3, a flowchart of a file management method according to an embodiment of the present application is shown, which may be performed by a device having a calculation processing function, such as the terminal device shown in fig. 1, or the server shown in fig. 3. As shown in fig. 3, the file management method includes at least steps 310 to 370.
The following will explain steps 310 to 370 in fig. 3 in detail:
in step 310, a first file and a first file directory are generated, the first file directory summarizing contents of the first file.
In the present application, the form of the first file may be various, for example, it may be a text file, a media file, or other form of file. Specifically, the text file is taken as an example, the text file may be a code text file surrounding a specific software product under the condition of party cooperation, and the first file directory may be a content introduction or a bug (problem) existing in each chapter, node and point in the code text file.
In step 330, the first file is sent to a file storage system, so as to obtain a first hash value of the first file.
In one embodiment of the present application, sending the first file to the file storage system may be implemented by the steps shown in fig. 4.
Referring to fig. 4, a detailed flowchart of sending the first file to the file storage system according to an embodiment of the present application is shown, which may specifically include steps 331 to 334:
step 331, a public-private key pair is generated, the public-private key pair comprising a public key and a private key.
Step 332, writing the public key into the blockchain network.
Step 333, signing the first file through the private key to obtain a signed first file.
Step 334, the signed first file is sent to a file storage system.
In an embodiment of the present application, the obtained first hash value of the first file may be an MD5 hash value.
In an embodiment of the present application, the obtained first hash value of the first file may also be an SHA-1 hash value.
It should be noted that, in the present application, the first hash value related to the first file may be generated by the first management platform according to the first file, or may be generated by the file storage system according to the first file.
With continued reference to fig. 3, in step 350, a first file manifest for the first file is generated based on the first file directory and the first hash value.
After the first file directory and the first hash value are written into a first file list corresponding to the first file, the first file list comprises the first file directory and the first hash value of the first file.
Furthermore, the first file list may further include a first file number, and the first file may be accurately and quickly determined in the file storage system by the first file number.
In step 370, the first file manifest is written to a blockchain network for managing the first file.
The file management method provided by the embodiment has the advantages that: because the content in the blockchain network cannot be tampered and forged, the first file list including the first hash value of the first file and the first file directory of the first file is correspondingly stored in the blockchain network, and therefore the safety of the first file directory and the first hash value in the first file list can be improved. Furthermore, other file management parties can verify the authenticity of the first file stored in the file storage system according to the first hash value of the first file, so that the security of the first file is improved, and the management of the first file is facilitated.
The embodiment also provides a file management device, which can be used for executing the file management method in the embodiment of the application. For details that are not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the document management method described above in the present application.
FIG. 5 shows a block diagram of a file management apparatus according to an embodiment of the present application.
Referring to fig. 5, a file management apparatus 500 according to an embodiment of the present application includes: a generating unit 501, a first transmitting unit 502, a first writing unit 503, and a second writing unit 504.
Wherein the generating unit 501 is configured to generate a first file and a first file directory, the first file directory being used to summarize the content of the first file; a first sending unit 502, configured to send the first file to a file storage system, to obtain a first hash value of the first file; a first writing unit 503, configured to write the first file directory and the first hash value into a first file list corresponding to the first file; a second writing unit 504, configured to write the first file list to a blockchain network, so as to manage the first file.
In some embodiments of the present application, based on the foregoing scheme, the first sending unit 502 is configured to: and sending the first file to a file storage system to obtain a first MD5 hash value or SHA-1 hash value of the first file.
In some embodiments of the present application, based on the foregoing scheme, the first sending unit 502 is configured to: generating a public and private key pair, wherein the public and private key pair comprises a public key and a private key; writing the public key to the blockchain network; signing the first file through the private key to obtain a signed first file; and sending the signed first file to a file storage system.
From the perspective of the second management platform:
the embodiment provides a file management method, wherein the method can be executed on a second management platform.
Referring to fig. 6, a flowchart of a file management method according to an embodiment of the present application is shown, which may be performed by a device having a calculation processing function, such as the terminal device shown in fig. 1, or the server shown in fig. 3. As shown in fig. 3, the file management method at least includes steps 620 to 660.
The following describes steps 620 to 660 in fig. 6 in detail:
in step 620, a first file list of a first file is obtained from a blockchain network, where the first file list includes a first hash value of the first file.
When the first file needs to be managed, a first file list including a first hash value of the first file is first obtained from the blockchain network, and specifically, the first file list may be obtained from the blockchain network according to a first file number.
In steps 640 through 660, retrieving the first file from a file storage system; and according to the first file and the first hash value, performing first verification on the first file so as to manage the first file.
In an embodiment of the present application, performing the first verification on the first file according to the first file and the first hash value may be implemented by the steps shown in fig. 7.
Referring to fig. 7, a detailed flowchart illustrating a first verification of the first file according to an embodiment of the present application may specifically include steps 661 to 662:
and step 661, performing hash processing on the first file to obtain a second hash value of the first file.
Step 662, performing a first verification on the first file according to the first hash value and the second hash value.
In a specific implementation of an embodiment, performing the first verification on the first file according to the first hash value and the second hash value may be implemented by the steps shown in fig. 8.
Referring to fig. 8, a detailed flowchart of performing a first verification on the first document according to an embodiment of the present application is shown, which may specifically include steps 6621 to 6622:
step 6621, if the first hash value is the same as the second hash value, then the first verification is successful for the first file.
Step 6622, when the first hash value and the second hash value are not the same, the first verification of the first file is unsuccessful.
Specifically, on the one hand, since the file in the block chaining network has non-tamper-property and non-forgery-property, the authenticity of the first hash value of the first file manifest acquired from the block chaining network can be ensured. On the other hand, since the hash values obtained by hashing different files are different and unique, the second hash value is obtained by hashing the first file, and if the first hash value is the same as the second hash value, the first file is true, so that the reliability of the verification of the first file in the file storage system by the first hash value can be ensured.
In an embodiment of the present application, the first file is a signed first file, for example, the first file may be encrypted by a private key, and further, before performing the first verification on the first file, the method may further perform the steps shown in fig. 9.
Referring to fig. 9, a flowchart of a method before performing the first verification on the first file according to an embodiment of the present application is shown, which may specifically include steps 651 to 652:
step 651, obtaining the public key from the blockchain network.
Step 652, performing a second verification on the signed first file based on the public key.
Specifically, the principle of performing the second verification on the signed first file based on the public key is as follows: for a management platform generating a first file, the first file is signed by a private key to obtain a signed first file. For other management platforms, when the first file needs to be managed, the signed first file can be decrypted through a public key to verify whether the first file is really generated by the real management platform, and if the first file cannot be decrypted, the first file is not really generated by the real management platform. In this way, illegal persons or organizations can be prevented from uploading false first files in the file storage system.
In one embodiment of the present application, after performing the first verification on the first document, a method may also be implemented as shown in fig. 10.
Referring to fig. 10, a flowchart of a method after performing the first verification on the first document according to an embodiment of the present application is shown, which may specifically include steps 671 to 674:
671, modifying the first file based on the first file directory to obtain a second file and a second file directory, where the second file directory is used to summarize the content of the second file.
In the process of managing the first file, after the first file passes the verification of the management platform, when the data content in the first file needs to be changed, because the data content in the first file is summarized in the first file directory, the management platform can refer to the first file directory, efficiently and accurately correct the first file, and correspondingly generate the second file and the second file directory.
Step 672, sending the second file to a file storage system to obtain a second hash value of the second file.
Step 673, writing the second file directory and the second hash value into a second file list corresponding to the second file.
Step 674, writing the second file list to a blockchain network for managing the second file.
The embodiment also provides an apparatus embodiment of the present application, which may be used to execute the file management method in the foregoing embodiment of the present application. For details that are not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the document management method described above in the present application.
FIG. 11 shows a block diagram of a file management apparatus according to an embodiment of the present application.
Referring to fig. 11, a file management apparatus 1100 according to an embodiment of the present application includes: a first acquisition unit 1101, a second acquisition unit 1102, and a verification unit 1103.
The first obtaining unit 1101 is configured to obtain a first file list of a first file from a blockchain network, where the first file list includes a first hash value of the first file; a second obtaining unit 1102, configured to obtain the first file from a file storage system; a verification unit 1103, configured to perform first verification on the first file according to the first file and the first hash value, so as to manage the first file.
In some embodiments of the present application, based on the foregoing solution, the verification unit 1103 is configured to: performing hash processing on the first file to obtain a second hash value of the first file; and performing first verification on the first file according to the first hash value and the second hash value.
In some embodiments of the present application, based on the foregoing solution, the verification unit 1103 is configured to: when the first hash value and the second hash value are the same, the first file is successfully verified; and when the first hash value is not the same as the second hash value, the first file is unsuccessfully verified.
In some embodiments of the present application, based on the foregoing solution, the verification unit 1103 is further configured to: before first verification is carried out on the first file, a public key is obtained from a block chain network; and performing second verification on the signed first file based on the public key.
In some embodiments of the present application, based on the foregoing solution, the first file list further includes a first file directory of the first file, and the apparatus further includes a second sending unit, configured to modify the first file based on the first file directory after performing first verification on the first file, so as to obtain a second file and a second file directory, where the second file directory is used to summarize contents of the second file; sending the second file to a file storage system to obtain a second hash value of the second file; a third writing unit, configured to write the second file directory and the second hash value into a second file list corresponding to the second file; a fourth writing unit, configured to write the second file list to a blockchain network, so as to manage the second file.
The present application further provides a file management system, including: the system comprises a first management platform, a second management platform, a block chain network and a file storage system. The first management platform is used for generating a first file and a first file directory, wherein the first file directory is used for summarizing the content of the first file, sending the first file to a file storage system to obtain a first hash value of the first file, writing the first file directory and the first hash value into a first file list corresponding to the first file, and writing the first file list into a block chain network to be used for managing the first file; the second management platform is used for acquiring a first file list of a first file from a blockchain network, wherein the first file list comprises a first hash value of the first file, acquiring the first file from a file storage system, and performing first verification on the first file according to the first file and the first hash value so as to manage the first file; the block chain network is used for recording a first file list of a first file written by the first management platform; the file storage system is used for storing a first file sent by a first management platform and correspondingly generating a first hash value of the first file
In some embodiments of the present application, based on the foregoing solution, the first management platform is further configured to send the first file to a file storage system, so as to obtain a first MD5 hash value or a SHA-1 hash value of the first file.
In some embodiments of the present application, based on the foregoing scheme, the first management platform is further configured to generate a public and private key pair, where the public and private key pair includes a public key and a private key, write the public key into the blockchain network, sign the first file through the private key, obtain a signed first file, and send the signed first file to a file storage system.
In some embodiments of the application, based on the foregoing scheme, the second management platform is further configured to perform hash processing on the first file to obtain a second hash value of the first file, and perform first verification on the first file according to the first hash value and the second hash value.
In some embodiments of the application, based on the foregoing scheme, the second management platform is further configured to perform, when the first hash value is the same as the second hash value, the first verification on the first file, and when the first hash value is not the same as the second hash value, the first verification on the first file is unsuccessful.
In some embodiments of the application, based on the foregoing solution, the second management platform is further configured to obtain a public key from a blockchain network before performing first verification on the first file, and perform second verification on the signed first file based on the public key.
In some embodiments of the application, based on the foregoing scheme, the second management platform is further configured to modify the first file to obtain a second file and a second file directory based on the first file directory after the first file is subjected to the first verification, where the second file directory is used to summarize the content of the second file, send the second file to a file storage system to obtain a second hash value of the second file, write the second file directory and the second hash value into a second file list corresponding to the second file, and write the second file list into a blockchain network to manage the second file.
In order to make the present application more easily understood by those skilled in the art, the present application will be described below in a specific application scenario with reference to fig. 12.
Referring to fig. 12, an interactive process diagram for managing a defect file under multi-party collaboration is shown according to an embodiment of the present application.
With the business evolution of the internet +, the overall research and development of projects need multi-party collaboration, not only across departments within a company, but also across companies or across organizations. In the process of developing and developing the stacking process, multiple parties need to cooperate to perform function verification, capacity performance verification, disaster tolerance test verification and the like of the whole system, for example, in the process of cooperatively developing a certain software product by multiple departments, after a defect or a bug exists in the software product in the test verification process, the software product with the defect needs to be corrected by the other departments, namely, the code file (such as a code document) corresponding to the defective software product is corrected and managed. If the conventional defect management system is used for management, a certain management party may delete or modify the defect content and state in the code file artificially due to misoperation or evasion of responsibility, so that error tracing is caused, and the quality and efficiency of managing the defect file under the condition of multi-party cooperation are reduced to a great extent.
While the file management method disclosed in the present application can effectively solve this problem, it should be noted that the "file" mentioned in the above description may refer to a defect code file (e.g. a defect code document) corresponding to a defective software product in the application scenario. Referring to fig. 12, the application scenario is specifically implemented as follows:
step 1201, the test management platform finds a defect by testing the software product, generates a first defect file and a first defect file directory, and sends the first defect file to the file storage system to obtain a first hash value of the first defect file.
Step 1202, the test management platform generates a first defect file list according to the first defect file directory and the first hash value, and writes the first defect file list into the block chain network.
Step 1203, the development management platform obtains a first defect file list from the block chain network.
Step 1204, the development management platform obtains the first defect file from the file storage system, and verifies the authenticity of the first defect file according to the first hash value in the first defect file list.
Step 1205, the development management platform finds that the first defect file has other defects, so that the defect content is increased to obtain a second defect file, a second defect file directory is correspondingly obtained, and the second defect file is sent to the file storage system to obtain a second hash value of the second defect file.
In step 1206, the development management platform generates a second defect file list according to the second defect file directory and the second hash value, and writes the second defect file list into the block chain network.
Step 1207, the product management platform obtains a second defect file list from the blockchain network.
In step 1208, the product management platform obtains the second defect file from the file storage system, and verifies the authenticity of the second defect file according to the second hash value in the second defect file list.
Step 1209, the product management platform supplements the defect content by analyzing the second defect file or the second defect file directory to obtain a third defect file, correspondingly obtains a third defect file directory, and sends the third defect file to the file storage system to obtain a third hash value of the third defect file.
Step 1210, the product management platform generates a third defect file list according to the third defect file directory and the third hash value, and writes the third defect file list into the block chain network.
Step 1211, the development management platform obtains a third defect file list from the block chain network.
Step 1212, the development management platform acquires the third defect file from the file storage system, and verifies the authenticity of the third defect file according to the third hash value in the third defect file list.
Step 1213, the development management platform corrects the defect content in the third defect file according to the third defect file directory in the third defect file list to obtain a qualified file, correspondingly obtains a qualified file directory, and sends the qualified file to the file storage system to obtain the hash value of the qualified file.
Step 1214, the development management platform generates a qualified file list according to the qualified file directory and the hash value of the qualified file, and writes the qualified file list into the block chain network.
In step 1215, the test management platform obtains a list of eligible files from the blockchain network.
Step 1216, the test management platform obtains the qualified files from the file storage system, verifies the authenticity of the qualified files according to the hash values of the qualified files in the list of the qualified files, and then tests the qualified files again to determine that there is no defect.
In step 1217, the project management platform obtains a list of eligible files from the blockchain network.
In step 1218, the project management platform obtains the qualified file from the file storage system, verifies the authenticity of the qualified file according to the hash value of the qualified file in the list of qualified files, and manages the qualified file in other aspects.
In the technical solutions provided in some embodiments of the present application, on one hand, a generated first file is sent to a file storage system to obtain a first hash value of the first file, and on the other hand, the first file directory and the first hash value are written into a first file list corresponding to the first file, and the first file list is written into a block chain network. Specifically, since the first file list including the first hash value of the first file and the first file directory of the first file is correspondingly stored in the blockchain network, the blockchain network can ensure that the content in the first file list is not falsifiable and forged, so that the security of the first file directory and the first hash value in the first file list can be improved. Furthermore, other file management parties can verify the authenticity of the first file stored in the file storage system according to the first hash value of the first file, and therefore the security of the first file is improved. Therefore, by the technical scheme, the quality of file management can be effectively improved, particularly the quality of file management under the condition of multi-party cooperation.
FIG. 13 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
It should be noted that the computer system 1300 of the electronic device shown in fig. 13 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 13, a computer system 1300 includes a Central Processing Unit (CPU)1301 that can perform various appropriate actions and processes, such as performing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 1302 or a program loaded from a storage portion 1308 into a Random Access Memory (RAM) 1303. In the RAM 1303, various programs and data necessary for system operation are also stored. The CPU 1301, the ROM 1302, and the RAM 1303 are connected to each other via a bus 1304. An Input/Output (I/O) interface 1305 is also connected to bus 1304.
The following components are connected to the I/O interface 1305: an input portion 1306 including a keyboard, a mouse, and the like; an output section 1307 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage portion 1308 including a hard disk and the like; and a communication section 1309 including a network interface card such as a LAN (Local area network) card, a modem, or the like. The communication section 1309 performs communication processing via a network such as the internet. A drive 1310 is also connected to the I/O interface 1305 as needed. A removable medium 1311 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1310 as necessary, so that a computer program read out therefrom is mounted into the storage portion 1308 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via communications component 1309 and/or installed from removable media 1311. The computer program executes various functions defined in the system of the present application when executed by a Central Processing Unit (CPU) 1301.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method described in the above embodiments.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A method of file management, the method comprising:
generating a first file and a first file directory, wherein the first file directory is used for summarizing the content of the first file;
sending the first file to a file storage system to obtain a first hash value of the first file;
writing the first file directory and the first hash value into a first file list corresponding to the first file;
writing the first file list to a blockchain network for managing the first file.
2. The method of claim 1, wherein sending the first file to a file storage system to obtain a first hash value of the first file comprises:
and sending the first file to a file storage system to obtain a first MD5 hash value or SHA-1 hash value of the first file.
3. The method of claim 1, wherein sending the first file to a file storage system comprises:
generating a public and private key pair, wherein the public and private key pair comprises a public key and a private key;
writing the public key to the blockchain network;
signing the first file through the private key to obtain a signed first file;
and sending the signed first file to a file storage system.
4. A method of file management, the method comprising:
acquiring a first file list of a first file from a block chain network, wherein the first file list comprises a first hash value of the first file;
acquiring the first file from a file storage system;
and according to the first file and the first hash value, performing first verification on the first file so as to manage the first file.
5. The method of claim 4, wherein the first verifying the first file according to the first file and the first hash value comprises:
performing hash processing on the first file to obtain a second hash value of the first file;
and performing first verification on the first file according to the first hash value and the second hash value.
6. The method of claim 5, wherein the first verifying the first file according to the first hash value and the second hash value comprises:
when the first hash value and the second hash value are the same, the first file is successfully verified;
and when the first hash value is not the same as the second hash value, the first file is unsuccessfully verified.
7. The method of claim 4, wherein the first file is a signed first file, and wherein prior to first verifying the first file, the method further comprises:
acquiring a public key from a block chain network;
and performing second verification on the signed first file based on the public key.
8. The method of claim 4, wherein the first file list further comprises a first file directory of the first file, and wherein after performing the first verification on the first file, the method further comprises:
modifying the first file based on the first file directory to obtain a second file and a second file directory, wherein the second file directory is used for summarizing the content of the second file;
sending the second file to a file storage system to obtain a second hash value of the second file;
writing the second file directory and the second hash value into a second file list corresponding to the second file;
writing the second file list to a blockchain network for managing the second file.
9. A file management apparatus, characterized in that the apparatus comprises:
a generating unit configured to generate a first file and a first file directory, the first file directory being used to summarize contents of the first file;
the first sending unit is used for sending the first file to a file storage system to obtain a first hash value of the first file;
a first writing unit, configured to write the first file directory and the first hash value into a first file list corresponding to the first file;
and the second writing unit is used for writing the first file list into a block chain network so as to manage the first file.
10. A file management apparatus, characterized in that the apparatus comprises:
a first obtaining unit, configured to obtain a first file list of a first file from a blockchain network, where the first file list includes a first hash value of the first file;
a second acquisition unit configured to acquire the first file from a file storage system;
and the verification unit is used for performing first verification on the first file according to the first file and the first hash value so as to manage the first file.
CN202010089341.6A 2020-02-12 2020-02-12 File management method and device Active CN111310238B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010089341.6A CN111310238B (en) 2020-02-12 2020-02-12 File management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010089341.6A CN111310238B (en) 2020-02-12 2020-02-12 File management method and device

Publications (2)

Publication Number Publication Date
CN111310238A true CN111310238A (en) 2020-06-19
CN111310238B CN111310238B (en) 2024-05-14

Family

ID=71150943

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010089341.6A Active CN111310238B (en) 2020-02-12 2020-02-12 File management method and device

Country Status (1)

Country Link
CN (1) CN111310238B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107077557A (en) * 2016-12-29 2017-08-18 深圳前海达闼云端智能科技有限公司 The method and device that software application is issued and verified
CN110032545A (en) * 2019-03-27 2019-07-19 远光软件股份有限公司 File memory method, system and electronic equipment based on block chain
CN110061838A (en) * 2019-04-28 2019-07-26 广州大学 A kind of the decentralization storage system and its realization, information retrieval method of DNS resource record
CN110611657A (en) * 2019-08-16 2019-12-24 中国人民银行数字货币研究所 File stream processing method, device and system based on block chain

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107077557A (en) * 2016-12-29 2017-08-18 深圳前海达闼云端智能科技有限公司 The method and device that software application is issued and verified
CN110032545A (en) * 2019-03-27 2019-07-19 远光软件股份有限公司 File memory method, system and electronic equipment based on block chain
CN110061838A (en) * 2019-04-28 2019-07-26 广州大学 A kind of the decentralization storage system and its realization, information retrieval method of DNS resource record
CN110611657A (en) * 2019-08-16 2019-12-24 中国人民银行数字货币研究所 File stream processing method, device and system based on block chain

Also Published As

Publication number Publication date
CN111310238B (en) 2024-05-14

Similar Documents

Publication Publication Date Title
US20190303623A1 (en) Promotion smart contracts for software development processes
US20190303541A1 (en) Auditing smart contracts configured to manage and document software audits
US20190306173A1 (en) Alert smart contracts configured to manage and respond to alerts related to code
CN108900364B (en) Block chain network management method, block chain network management device, block chain network management medium and electronic equipment
CN108390872B (en) Certificate management method, device, medium and electronic equipment
CN109598117A (en) Right management method, device, electronic equipment and storage medium
US20200110905A1 (en) Security hardened software footprint in a computing environment
CN114461262A (en) Data processing method, system, device, equipment and computer storage medium
CN114185808A (en) Automatic testing method and device, electronic equipment and computer readable storage medium
CN115964684A (en) Method, system, device and medium for detecting authenticity of metadata of electronic file
CN114449047A (en) File data processing method and device
US20180069774A1 (en) Monitoring and reporting transmission and completeness of data upload from a source location to a destination location
CN113486358A (en) Vulnerability detection method and device
WO2024040916A1 (en) Sdk repair method and apparatus, terminal, device, system, and medium
CN111310238B (en) File management method and device
CN111050326A (en) Short message verification method, device, equipment and medium based on block chain
CN114338846B (en) Message testing method and device
CN112507014B (en) Data storage method, device and system based on credible account book database
CN114840429A (en) Method, apparatus, device, medium and program product for identifying version conflicts
CN111949738A (en) Block chain-based data storage deduplication method, terminal device and storage medium
CN110690973B (en) Identity verification method, identity verification device, identity verification medium and electronic equipment
US9886472B2 (en) Verification of record based systems
CN112254981B (en) Vehicle testing method and device under simulated driving environment
CN117057974B (en) GPU big data platform, electronic equipment and storage medium
CN118034629B (en) LED display screen splicing optimization method and device, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40024811

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant