CN111310238B - File management method and device - Google Patents

File management method and device Download PDF

Info

Publication number
CN111310238B
CN111310238B CN202010089341.6A CN202010089341A CN111310238B CN 111310238 B CN111310238 B CN 111310238B CN 202010089341 A CN202010089341 A CN 202010089341A CN 111310238 B CN111310238 B CN 111310238B
Authority
CN
China
Prior art keywords
file
hash value
directory
storage system
list
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.)
Active
Application number
CN202010089341.6A
Other languages
Chinese (zh)
Other versions
CN111310238A (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

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; the first file is sent to a file storage system, and a first hash value of the first file is obtained; writing the first file catalog and the first hash value into a first file list corresponding to the first file; and writing the first file list into a blockchain network for managing the first file. The technical scheme of the embodiment of the application can effectively improve the quality of managing the files, especially under the condition of multiparty collaboration.

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 of managing a file under the condition of multiparty collaboration, a unified and fixed file management system is generally configured, and each party has authority to transfer the file to the file management system or acquire the file from the file management system, or has authority to directly change the file in the file management system, thereby realizing management of the file. However, how to improve the quality of managing files in the case of multiparty collaboration is a technical problem to be solved.
Disclosure of Invention
The embodiment of the application provides a file management method, a device, a computer readable medium and electronic equipment, which can further improve the quality of file management under the condition of multiparty collaboration at least to a certain extent.
Other features and advantages of the application will be apparent from the following detailed description, or may be learned by the 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; the first file is sent to a file storage system, and a first hash value of the first file is obtained; writing the first file catalog and the first hash value into a first file list corresponding to the first file; and writing the first file list into 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 generation 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 blockchain network for managing the first file.
In some embodiments of the present application, based on the foregoing scheme, the first transmitting unit is configured to: and sending the first file to a file storage system 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 transmitting unit is configured to: generating a public-private key pair, wherein the public-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 to be used 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 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 obtaining unit, configured to obtain the first file from a file storage system; and the verification unit is used for carrying out first verification on the first file according to the first file and the first hash value so as to be used for managing the first file.
In some embodiments of the application, based on the foregoing scheme, the verification unit is configured to: carrying out 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 application, based on the foregoing scheme, the verification unit is configured to: when the first hash value and the second hash value are the same, performing first verification on the first file to be successful; and when the first hash value and the second hash value are different, performing first verification on the first file is unsuccessful.
In some embodiments of the application, based on the foregoing, the verification unit is further configured to: acquiring a public key from a blockchain network before performing first verification on the first file; and carrying out 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, after performing a first verification on the first file, correct 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 contents of the second file; the second file is sent to a file storage system, and a second hash value of the second file is obtained; 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; and a fourth writing unit, configured to write the second file list to a blockchain network for managing the second file.
According to an aspect of the embodiments of the present application, there is provided a computer-readable medium having stored thereon a computer program which, when executed by a processor, implements 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 apparatus including: one or more processors; and a storage means 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, the 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 blockchain 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 tamperable and not falsifiable, so that the security of the first file directory and the first hash value in the first file list can be improved. Further, other file managers 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. Therefore, by the technical scheme, the quality of managing the files, particularly under the condition of multiparty collaboration, can be effectively improved.
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 as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application. It is evident that the drawings in the following description are only some embodiments of the present application and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art. In the drawings:
FIG. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of an embodiment of the 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 application;
FIG. 3 shows a flow chart of a file management method according to one embodiment of the application;
FIG. 4 shows a detailed flow diagram of sending the first file to a file storage system according to one embodiment of the application;
FIG. 5 shows a block diagram of a file management apparatus according to one embodiment of the application;
FIG. 6 shows a flow chart of a file management method according to one embodiment of the application;
FIG. 7 shows a detailed flow diagram of a first verification of the first file according to one embodiment of the application;
FIG. 8 shows a detailed flow diagram of a first verification of the first file according to one embodiment of the application;
FIG. 9 shows a method flow diagram before a first verification of the first file, according to one embodiment of the application;
FIG. 10 shows a method flow diagram after a first verification of the first file, according to one embodiment of the application;
FIG. 11 shows a block diagram of a file management apparatus according to one embodiment of the application;
FIG. 12 illustrates an interactive process diagram for managing defect files in a multiparty collaboration, according to one embodiment of the application;
Fig. 13 shows a schematic diagram of a computer system suitable for use in implementing an embodiment of the application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many 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 the 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 application may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the application.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they 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 order of actual execution may be changed according to actual situations.
Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of an embodiment of the present application may be applied.
As shown in fig. 1, the system architecture may include a terminal device (such as one or more of the smartphone 101, tablet 102, and portable computer 103 shown in fig. 1, but of course, a desktop computer, etc.), a network 104, and a server 105. The network 104 is the medium used to provide communication links between the terminal devices and the server 105. The network 104 may include various connection types, such as wired communication links, wireless communication links, and the like.
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, the server 105 may be a server cluster formed by a plurality of servers.
It should be noted that, the file management method provided in the embodiment of the present application is generally executed by the 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 a similar function to the terminal device, so as to perform the file management scheme provided by the embodiments of the present application.
FIG. 2 illustrates an example diagram of an environment in which a file management method is implemented, according to one embodiment of the application.
Since the file management method proposed by the present application is generally used in a file management scenario under the participation of multiple parties (for example, a scenario where files are managed in multiple management platforms may be mentioned).
Thus, in one embodiment of the present application, as shown in fig. 2, the file management method proposed by the present application may be implemented in the first management platform 201, the second management platform 204, and the nth management platform 205 as shown in fig. 2. Specifically, for example, the first management platform 201 generates a first file and a first file directory of the first file, where the first file directory is used to summarize 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 (i.e., the first file list includes the first file directory and the content of the first hash value), and finally, the first management platform writes the first file list into the blockchain network for managing the file.
It should be noted that the first management platform may generate the first hash value according to the first file, and then send the first file to the file storage system.
In one embodiment of the present application, as shown in fig. 2, another file management method proposed in the present application may 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 obtains a first file list of a first file from the blockchain network, where the first file list includes a first hash value of the first file, then obtains the first file from the file storage system, and finally, the first management platform 201 performs a first verification on the first file according to the first file and the first hash value, so as to be used for managing the file.
In the above embodiment, by storing the first file in the file storage system, writing the first file directory and the first hash value of the first file in the blockchain network, the non-tamper-evident modification 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 volume in the blockchain network does not expand rapidly (if the first file is directly stored in the blockchain network, the rapid expansion of the data volume in the blockchain network will occur, thereby causing the occurrence of a crash of the blockchain network). And further, the efficiency and the quality of managing the files, especially under the condition of multiparty collaboration, can be effectively improved.
The implementation details of the technical solution of the embodiment of the present application will be described in detail from the viewpoint of different management parties:
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and in the above-described figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the objects so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in other sequences than those illustrated or otherwise described.
From the perspective of the first management platform, we state:
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 a server as shown in fig. 3. As shown in fig. 3, the file management method at least includes steps 310 to 370.
The steps 310 to 370 shown in fig. 3 will be described in detail as follows:
In step 310, a first file and a first file directory are generated, the first file directory being used to summarize the content of the first file.
In the present application, the first file may be in various forms, for example, may be a text file, may be a media file, or may be other forms of files. Taking text files as an example, the text files may be code text files surrounding a specific software product in the case of party collaboration, and the first file directory may be a content profile or a bug (question) that records each chapter, section, point in the code text file.
In step 330, the first file is sent to a file storage system, and a first hash value of the first file is obtained.
In one embodiment of the application, the sending of the first file to the file storage system may be performed by the steps shown in fig. 4.
Referring to FIG. 4, a detailed flow chart of the sending of the first file to the file storage system according to one embodiment of the application is shown, which may specifically include steps 331 through 334:
In step 331, a public-private key pair is generated, where the public-private key pair includes a public key and a private key.
Step 332, writing the public key to the blockchain network.
In step 333, the first file is signed by the private key, so as to obtain a signed first file.
Step 334, sending the signed first file to a file storage system.
In one embodiment of the present application, the obtained first hash value of the first file may be an MD5 hash value.
In one embodiment of the present application, the obtained first hash value of the first file may also be a 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 of 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 directory and the first hash value of the first file are included in the first file list.
Furthermore, the first file list may further include a first file number, through which the first file may be accurately and quickly determined in the file storage system.
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 following advantages: since the contents in the blockchain network are not tamperable and not falsifiable, 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, so that the security of the first file directory and the first hash value in the first file list can be improved. Further, other file managers 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 safety of the first file is improved, and the first file is managed.
The present embodiment also provides a file management apparatus, which may be used to execute the file management method in the above embodiment of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the file management method of the present application.
Fig. 5 shows a block diagram of a file management apparatus according to an embodiment of the 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 configured to summarize contents 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 is configured to write the first file list to a blockchain network for managing the first file.
In some embodiments of the present application, based on the foregoing scheme, the first transmitting unit 502 is configured to: and sending the first file to a file storage system 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 transmitting unit 502 is configured to: generating a public-private key pair, wherein the public-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 following is explained:
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 a server as shown in fig. 3. As shown in FIG. 3, the file management method at least comprises steps 620 to 660.
Steps 620 to 660 shown in fig. 6 will be described in detail as follows:
in step 620, a first file list of a first file is obtained from a blockchain network, wherein 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 to 660, the first file is obtained from a file storage system; and according to the first file and the first hash value, performing first verification on the first file to be used for managing the first file.
In one embodiment of the present application, the first verification of the first file according to the first file and the first hash value may be implemented through the steps shown in fig. 7.
Referring to fig. 7, a detailed flow diagram of a first verification of the first document according to one embodiment of the application is shown, which may include, in particular, steps 661 to 662:
step 661, hash processing is performed 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 one embodiment, the first verification of the first file according to the first hash value and the second hash value may be implemented by steps shown in fig. 8.
Referring to fig. 8, a detailed flow chart of the first verification of the first file according to one embodiment of the application is shown, which may specifically include steps 6621 to 6622:
Step 6621, when the first hash value and the second hash value are the same, performing the first verification on the first file successfully.
Step 6622, when the first hash value and the second hash value are different, performing the first verification on the first file is unsuccessful.
In particular, on the one hand, since the files in the blockchain network have non-tamper-ability and non-counterfeitability, the authenticity of the first hash value of the first file list acquired from the blockchain network can be ensured. On the other hand, since the hash values obtained by hashing different files are different and unique, a second hash value is obtained by hashing a first file, and if the first hash value is the same as the second hash value, it is indicated that the first file is authentic, and therefore, the reliability of the verification of the first file in the file storage system by the first hash value can also be ensured.
In one embodiment of the present application, the first file is a signed first file, for example, may be a first file encrypted by a private key, and further, before the first verification is performed on the first file, a method as shown in the step of fig. 9 may be further implemented.
Referring to fig. 9, a flowchart of a method before first verifying the first file according to an embodiment of the present application may specifically include steps 651 to 652:
step 651, obtaining the public key from the blockchain network.
Step 652, based on the public key, performing a second verification on the signed first file.
Specifically, the principle of performing the second verification on the signed first file based on the public key is that: for the management platform for generating the first file, the first file is signed by the private key to obtain a signed first file. For other management platforms, when the first file needs to be managed, whether the first file is truly generated by the real management platform or not can be verified by decrypting the signed first file through a public key, and if the first file cannot be decrypted, the first file is not truly generated by the real management platform. In this way, an illegal person or organization may be prevented from uploading a false first file in the file storage system.
In one embodiment of the present application, after the first verification is performed on the first file, the method of the steps shown in fig. 10 may also be implemented.
Referring to fig. 10, a flowchart of a method after first verifying the first document according to one embodiment of the present application may specifically include steps 671 to 674:
And 671, correcting 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.
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, the management platform can refer to the first file catalog to efficiently and accurately correct the first file and correspondingly generate the second file and the second file catalog because the data content in the first file is summarized in the first file catalog.
Step 672, sending the second file to the 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, the second file list is written to a blockchain network for managing the second file.
The embodiment also provides an embodiment of the device, which can be used for executing the file management method in the embodiment of the application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the file management method of the present application.
Fig. 11 shows a block diagram of a file management apparatus according to an embodiment of the 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.
Wherein the first obtaining unit 1101 is configured to obtain a first file list of a first file from the 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; the verification unit 1103 is configured to perform a 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 scheme, the verification unit 1103 is configured to: carrying out 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 scheme, the verification unit 1103 is configured to: when the first hash value and the second hash value are the same, performing first verification on the first file to be successful; and when the first hash value and the second hash value are different, performing first verification on the first file is unsuccessful.
In some embodiments of the present application, based on the foregoing scheme, the verification unit 1103 is further configured to: acquiring a public key from a blockchain network before performing first verification on the first file; and carrying out 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, after performing a first verification on the first file, correct 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 contents of the second file; the second file is sent to a file storage system, and a second hash value of the second file is obtained; 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; and a fourth writing unit, configured to write the second file list to a blockchain network for managing the second file.
The application also provides a file management system, which comprises: the system comprises a first management platform, a second management platform, a blockchain network and a file storage system. The first management platform is used for generating a first file and a first file catalog, wherein the first file catalog is used for summarizing the content of the first file, sending the first file to the file storage system to obtain a first hash value of the first file, writing the first file catalog and the first hash value into a first file list corresponding to the first file, and writing the first file list into the blockchain 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 the 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 be used for managing 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 the 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, 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 solution, the first management platform is further configured to generate a public-private key pair, where the public-private key pair includes a public key and a private key, write the public key to the blockchain network, sign the first file with the private key to obtain a signed first file, and send the signed first file to a file storage system.
In some embodiments of the present application, based on the foregoing solution, 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 a 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 second management platform is further configured to perform a first verification on the first file if the first hash value and the second hash value are the same, and perform a first verification on the first file if the first hash value and the second hash value are different.
In some embodiments of the present application, based on the foregoing solution, the second management platform is further configured to obtain a public key from the blockchain network before performing the first verification on the first file, and perform a 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 second management platform is further configured to, after performing the first verification on the first file, correct 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 a content of the second file, send the second file to a file storage system, 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, where the second file list is used to manage the second file.
In order to make it easier for the person skilled in the art to understand the present application, the present application will be described below with reference to fig. 12 in a specific application scenario.
Referring to FIG. 12, an interactive process diagram for managing defect files in multi-party collaboration is shown, according to one embodiment of the application.
With the evolution of the internet + business, the whole research and development of projects requires multiparty collaboration, not only inter-company departments, but also inter-companies or inter-organizations. In the process of developing and stacking, multiple parties need to cooperate to perform function verification, capacity performance verification or disaster tolerance test verification and the like of the whole system, for example, after finding that a software product has a defect or a bug in the process of testing and verification in the process of developing a certain software product by multiple departments, the software product with the defect needs to be corrected with other departments, namely, correction management is performed on a code file (for example, a code document) corresponding to the defective software product. If the conventional defect management system is used for management, it may happen that a certain management party deletes or modifies the defect content and state in the code file manually due to misoperation or avoiding responsibility, thereby causing error tracing and greatly reducing the quality and efficiency of managing the defect file under the condition of multiparty collaboration.
By adopting the file management method disclosed by the application, the problem can be effectively solved, and it is noted that the "file" mentioned in the above description can refer to a defect code file (such as a defect code document) corresponding to a defect software product in the application scenario. Referring to fig. 12, the specific implementation of the present application scenario includes the following steps:
step 1201, the test management platform discovers defects 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.
In 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 blockchain network.
In step 1203, the development management platform obtains a first defect file list from the blockchain network.
In 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.
In step 1205, the development management platform discovers that the first defect file has other defects, so that 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 to the blockchain network.
In 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.
In step 1209, the product management platform analyzes the second defect file or the second defect file directory, supplements the defect content to obtain a third defect file, correspondingly obtains the 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.
In 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 blockchain network.
In step 1211, the development management platform obtains a third defect file manifest from the blockchain network.
In step 1212, the development management platform obtains 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.
And 1213, correcting the defect content in the third defect file according to the third defect file directory in the third defect file list by the development management platform to obtain a qualified file, correspondingly obtaining the qualified file directory, and sending the qualified file to the file storage system to obtain the hash value of the qualified file.
In 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 blockchain network.
In step 1215, the test management platform obtains a list of qualified files from the blockchain network.
In step 1216, the test management platform acquires 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 qualified file list, and then retests the qualified file to determine that no defect problem exists.
In step 1217, the project management platform obtains a list of qualified files from the blockchain network.
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 qualified file list, and manages the qualified file in other aspects.
In the technical solutions provided in some embodiments of the present application, on one hand, the 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 blockchain 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 tamperable and not falsifiable, so that the security of the first file directory and the first hash value in the first file list can be improved. Further, other file managers 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. Therefore, by the technical scheme, the quality of managing the files, particularly under the condition of multiparty collaboration, can be effectively improved.
Fig. 13 shows a schematic diagram of a computer system suitable for use in implementing an embodiment of the 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 impose any limitation on the functions and the application scope of the embodiments of the present application.
As shown in fig. 13, the computer system 1300 includes a central processing unit (Central Processing Unit, CPU) 1301, which can perform various appropriate actions and processes 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 (Random Access Memory, RAM) 1303, for example, performing the method described in the above embodiment. In the RAM 1303, various programs and data required for the system operation are also stored. The CPU 1301, ROM 1302, and RAM 1303 are connected to each other through 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 section 1306 including a keyboard, a mouse, and the like; an output portion 1307 including a Cathode Ray Tube (CRT), a Liquid crystal display (Liquid CRYSTAL DISPLAY, LCD), and a speaker, etc.; a storage portion 1308 including a hard disk or 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 a communication process via a network such as the internet. The drive 1310 is also connected to the I/O interface 1305 as needed. Removable media 1311, such as magnetic disks, optical disks, magneto-optical disks, semiconductor memory, and the like, is installed as needed on drive 1310 so that a computer program read therefrom is installed as needed into storage portion 1308.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts 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 shown in the flowcharts. In such embodiments, the computer program may be downloaded and installed from a network via the communication portion 1309 and/or installed from the removable medium 1311. When executed by a Central Processing Unit (CPU) 1301, performs various functions defined in the system of the present application.
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. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 (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 context of this document, 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 the present application, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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 flowcharts 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. Where 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 involved 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 provided in a processor. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
As another aspect, the present application also provides a computer-readable medium that may be contained in the electronic device described in the above embodiment; or may exist alone without being incorporated into the electronic device. The computer-readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to implement the methods described in the above embodiments.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a touch terminal, or a network device, etc.) to perform the method according to the embodiments of the present application.
Other embodiments of the 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 application 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 application pertains.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (9)

1. A method of file management, the method comprising:
Generating a first file and a first file directory, wherein the first file is a code text file, and the first file directory records at least one of the following: content introduction or existing problems of each chapter, node and point in the code text file;
The first file is sent to a file storage system to obtain a first hash value of the first file, the first file sent to the file storage system is obtained by signing the first file by a sender through a private key, and the first hash value is used for carrying out first verification on the first file;
Writing the first file catalogue and the first hash value into a first file list corresponding to the first file, wherein the first file list is used for associating the first hash value with the first file catalogue;
Writing the first file list to a blockchain network for managing the first file, the managing process comprising: correcting 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, and writing the second file list into a block chain network to be used for managing the second file.
2. The method of claim 1, wherein the 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 a SHA-1 hash value of the first file.
3. The method of claim 1, wherein the sending the first file to a file storage system comprises:
Generating a public-private key pair, wherein the public-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:
obtaining 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 and a first file catalogue, the first hash value is used for carrying out first verification on the first file, the first file is a code text file, and the first file catalogue records at least one of the following: content introduction or existing problems of each chapter, node and point in the code text file;
acquiring the first file from a file storage system, wherein the first file carries a signature, and the signature is obtained based on a private key of a sender of the first file;
Performing first verification on the first file according to the first file and the first hash value, so as to be used for managing the first file, wherein the management process comprises the following steps: correcting 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, and writing the second file list into a block chain network to be used for managing the second file.
5. The method of claim 4, wherein said first verifying said first file based on said first file and a first hash value comprises:
carrying out 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 said first verifying the first file based on the first hash value and the second hash value comprises:
When the first hash value and the second hash value are the same, performing first verification on the first file to be successful;
And when the first hash value and the second hash value are different, performing first verification on the first file is unsuccessful.
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:
Obtaining a public key from a blockchain network;
and carrying out second verification on the signed first file based on the public key.
8. A document management apparatus, the apparatus comprising:
A generating unit configured to generate a first file and a first file directory, the first file being a code text file, the first file directory recording at least one of: content introduction or existing problems of each chapter, node and point in the code text 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, wherein the first file sent to the file storage system is obtained by signing the first file by a sender through a private key, and the first hash value is used for carrying out first verification on 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, where the first file list is used to associate the first hash value and the first file directory;
A second writing unit, configured to write the first file list to a blockchain network, for managing the first file, where the management process includes: correcting 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, and writing the second file list into a block chain network to be used for managing the second file.
9. A document management apparatus, the apparatus comprising:
The first obtaining unit is used for obtaining a first file list of a first file from the blockchain network, the first file list comprises a first hash value of the first file and a first file catalogue, the first hash value is used for carrying out first verification on the first file, the first file is a code text file, and at least one of the following is recorded in the first file catalogue: content introduction or existing problems of each chapter, node and point in the code text file;
a second obtaining unit, configured to obtain the first file from a file storage system, where the first file carries a signature, where the signature is obtained based on a private key of a sender of the first file;
A verification unit, configured to perform a first verification on the first file according to the first file and the first hash value, for managing the first file, where the management process includes: correcting 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, and writing the second file list into a block chain network to be used for managing the second 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 CN111310238A (en) 2020-06-19
CN111310238B true 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
CN111310238A (en) 2020-06-19

Similar Documents

Publication Publication Date Title
US20190305959A1 (en) Announcement smart contracts to announce software release
US20190303623A1 (en) Promotion smart contracts for software development processes
CN109410045B (en) Parallel chain consensus method, equipment and storage medium
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
CN109246197B (en) Data processing method and device based on intelligent contract
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
CN109522363B (en) Cloud platform synchronization method, system, equipment and storage medium based on block chain
US11757850B2 (en) Distributed logging for securing non-repudiable multi-party transactions
CN111314172B (en) Block chain-based data processing method, device, equipment and storage medium
US20200110905A1 (en) Security hardened software footprint in a computing environment
US20160048703A1 (en) Securing integrity and consistency of a cloud storage service with efficient client operations
US20230273979A1 (en) Cryptographically managing license compatibility
CN104978336A (en) Unstructured data storage system based on Hadoop distributed computing platform
CN110190963A (en) A kind of monitoring method, device and equipment for the request of time service certificates constructing
US20210149772A1 (en) Systems and methods for generating self-notarized backups
CN114461262A (en) Data processing method, system, device, equipment and computer storage medium
CN114449047A (en) File data processing method and device
CN114266680A (en) Block chain-based electronic contract signing method, device and system
US20180069774A1 (en) Monitoring and reporting transmission and completeness of data upload from a source location to a destination location
US20190123980A1 (en) Method and system for facilitating real-time data availability in enterprises
CN111310238B (en) File management method and device
US20220045866A1 (en) Method and system for authentication seal deployment in networked immutable transactions
CN115934640A (en) Data storage method, system, electronic equipment and storage 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