[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN110597818A - Block chain based volume query method, device, equipment and storage medium - Google Patents

Block chain based volume query method, device, equipment and storage medium Download PDF

Info

Publication number
CN110597818A
CN110597818A CN201910887516.5A CN201910887516A CN110597818A CN 110597818 A CN110597818 A CN 110597818A CN 201910887516 A CN201910887516 A CN 201910887516A CN 110597818 A CN110597818 A CN 110597818A
Authority
CN
China
Prior art keywords
file
block chain
stored
queried
query
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
CN201910887516.5A
Other languages
Chinese (zh)
Other versions
CN110597818B (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 CN201910887516.5A priority Critical patent/CN110597818B/en
Publication of CN110597818A publication Critical patent/CN110597818A/en
Application granted granted Critical
Publication of CN110597818B publication Critical patent/CN110597818B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

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

Abstract

The invention relates to a block chain-based file query method, a block chain-based file query device, block chain-based file query equipment and a block chain-based storage medium, and belongs to the technical field of block chains. The method comprises the following steps: receiving a file inquiry command; determining the file to be queried corresponding to the file query instruction; sending the characteristic information of the file to be inquired to a block chain platform so that the block chain platform inquires whether a stored file matched with the file to be inquired exists in a block chain according to the characteristic information; wherein the stored volume is an original volume stored by the blockchain platform through a blockchain technology; receiving a query result returned by the block chain platform for the file query instruction; and obtaining a file query result of the file to be queried according to the query result. By the technical scheme, the problem of inaccurate file query is solved. The file information is stored through the block chain technology, and the accuracy of the inquired file information can be ensured.

Description

Block chain based volume query method, device, equipment and storage medium
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a method and an apparatus for querying a volume based on a blockchain, a computer device, and a storage medium.
Background
Various types of documents contain various types of material that are involved in the context of litigation cases, etc. At present, a file is mainly stored in a paper file or converted into an electronic document and then stored in an electronic device such as a server. When a staff member needs to obtain a file, a paper file can be obtained from an archive or an electronic document can be obtained from a server. In implementing the present invention, the inventors found the following problems: some people may tamper with the custody file through some unjustified means, resulting in incomplete file or false information, which makes the queried file inaccurate when querying the file.
Disclosure of Invention
Based on this, the embodiment of the invention provides a block chain-based file query method, a block chain-based file query device, a computer device and a storage medium, wherein the file information is stored by using a block chain technology, so that the accuracy of the queried file information can be ensured.
The content of the embodiment of the invention is as follows:
the embodiment of the invention provides a block chain-based file query method, which comprises the following steps: receiving a file inquiry command; determining the file to be queried corresponding to the file query instruction; sending the characteristic information of the file to be inquired to a block chain platform so that the block chain platform inquires whether a stored file matched with the file to be inquired exists in a block chain according to the characteristic information; wherein the stored volume is an original volume stored by the blockchain platform through a blockchain technology; receiving a query result returned by the block chain platform for the file query instruction; and obtaining a file query result of the file to be queried according to the query result.
The embodiment of the invention provides a block chain-based file query method, which comprises the following steps: storing the original file through a block chain technology to obtain a stored file; receiving characteristic information of a file to be inquired sent by terminal equipment, and inquiring whether a stored file matched with the file to be inquired exists in a block chain according to the characteristic information; the file to be inquired is determined by the terminal equipment according to a file inquiry instruction; and returning a query result aiming at the file query instruction to the terminal equipment so that the terminal equipment obtains a file query result of the file to be queried according to the query result.
The embodiment of the invention provides a block chain-based file inquiry device, which comprises: the instruction receiving module is used for receiving a file inquiry instruction; the file determining module is used for determining the file to be queried corresponding to the file query instruction; the first query module is used for sending the characteristic information of the file to be queried to a block chain platform so that the block chain platform queries whether a stored file matched with the file to be queried exists in a block chain according to the characteristic information; wherein the stored volume is an original volume stored by the blockchain platform through a blockchain technology; the result receiving module is used for receiving a query result returned by the block chain platform aiming at the file query instruction; and the result determining module is used for obtaining the file query result of the file to be queried according to the query result.
The embodiment of the invention provides a block chain-based file inquiry device, which comprises: the file storage module is used for storing the original file through a block chain technology to obtain a stored file; the second query module is used for receiving the characteristic information of the file to be queried, which is sent by the terminal equipment, and querying whether a stored file matched with the file to be queried exists in the block chain according to the characteristic information; the file to be inquired is determined by the terminal equipment according to a file inquiry instruction; and the result returning module is used for returning the query result aiming at the file query instruction to the terminal equipment so that the terminal equipment can obtain the file query result of the file to be queried according to the query result.
The embodiment of the invention provides computer equipment, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to realize the following steps: receiving a file inquiry command; determining the file to be queried corresponding to the file query instruction; sending the characteristic information of the file to be inquired to a block chain platform so that the block chain platform inquires whether a stored file matched with the file to be inquired exists in a block chain according to the characteristic information; wherein the stored volume is an original volume stored by the blockchain platform through a blockchain technology; receiving a query result returned by the block chain platform for the file query instruction; and obtaining a file query result of the file to be queried according to the query result.
The embodiment of the invention provides computer equipment, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to realize the following steps: storing the original file through a block chain technology to obtain a stored file; receiving characteristic information of a file to be inquired sent by terminal equipment, and inquiring whether a stored file matched with the file to be inquired exists in a block chain according to the characteristic information; the file to be inquired is determined by the terminal equipment according to a file inquiry instruction; and returning a query result aiming at the file query instruction to the terminal equipment so that the terminal equipment obtains a file query result of the file to be queried according to the query result.
An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the following steps: receiving a file inquiry command; determining the file to be queried corresponding to the file query instruction; sending the characteristic information of the file to be inquired to a block chain platform so that the block chain platform inquires whether a stored file matched with the file to be inquired exists in a block chain according to the characteristic information; wherein the stored volume is an original volume stored by the blockchain platform through a blockchain technology; receiving a query result returned by the block chain platform for the file query instruction; and obtaining a file query result of the file to be queried according to the query result.
An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the following steps: storing the original file through a block chain technology to obtain a stored file; receiving characteristic information of a file to be inquired sent by terminal equipment, and inquiring whether a stored file matched with the file to be inquired exists in a block chain according to the characteristic information; the file to be inquired is determined by the terminal equipment according to a file inquiry instruction; and returning a query result aiming at the file query instruction to the terminal equipment so that the terminal equipment obtains a file query result of the file to be queried according to the query result.
One of the above technical solutions has the following advantages or beneficial effects: the file is stored through the block chain platform, the stored file information can be guaranteed not to be tampered, when a file query instruction is received, the characteristic information of the file to be queried is sent to the block chain platform to be queried for querying the file, and the accuracy of the obtained file query result is high.
Drawings
FIG. 1 is a diagram of an embodiment of an application environment for a block chain-based portfolio query method;
FIG. 2 is a flow diagram illustrating a block chain-based portfolio query methodology in one embodiment;
FIG. 3 is a diagram of a stored volume upload blockchain platform, according to one embodiment;
FIG. 4 is a block diagram of a stored volume upload blockchain platform in accordance with another embodiment;
FIG. 5 is a block diagram illustrating a stored volume upload blockchain platform according to yet another embodiment;
FIG. 6 is a schematic illustration of the display of tamper information in one embodiment;
FIG. 7 is a flowchart illustrating a block chain-based portfolio query method according to another embodiment;
FIG. 8 is a flowchart illustrating a block chain-based portfolio query method in accordance with yet another embodiment;
FIG. 9 is a flowchart illustrating a block chain-based portfolio query method in accordance with yet another embodiment;
FIG. 10 is a flowchart illustrating a block chain-based portfolio query method in accordance with yet another embodiment;
FIG. 11 is a block diagram of a block chain-based volume query device in one embodiment;
FIG. 12 is a block diagram of a block chain-based volume query device in another embodiment;
FIG. 13 shows an internal structure of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The block chain-based volume query method provided by the application can be applied to the application environment shown in fig. 1. The application environment includes a terminal device 101 and a blockchain platform 102, which can communicate via a network. The terminal device 101 receives an original file, and sends the original file to the block chain platform 102 for storage to obtain a stored file; when receiving a file query instruction, the terminal device 101 sends the feature information of the file to be queried to the block chain platform 102, and obtains a file query result of the file to be queried according to a query result of the block chain platform 102. Further, the terminal device may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The blockchain platform may refer to a platform constructed according to a blockchain technology, and the platform may include a plurality of blockchain nodes 103, and this blockchain node may be implemented by a terminal device or a server, where the server may be implemented by an independent server or a server cluster composed of a plurality of servers.
The block chain technique is first explained as follows: the blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
The blockchain underlying platform (i.e., the blockchain platform in the embodiment of the present invention) may include processing modules such as user management, basic services, intelligent contracts, and operation monitoring. The user management module is responsible for identity information management of all blockchain participants, and comprises public and private key generation maintenance (account management), key management, user real identity and blockchain address corresponding relation maintenance (authority management) and the like, and under the authorization condition, the user management module supervises and audits the transaction condition of certain real identities and provides rule configuration (wind control audit) of risk control; the basic service module is deployed on all block chain node equipment and used for verifying the validity of the service request, recording the service request to storage after consensus on the valid request is completed, for a new service request, the basic service firstly performs interface adaptation analysis and authentication processing (interface adaptation), then encrypts service information (consensus management) through a consensus algorithm, transmits the service information to a shared account (network communication) completely and consistently after encryption, and performs recording and storage; the intelligent contract module is responsible for registering and issuing contracts, triggering the contracts and executing the contracts, developers can define contract logics through a certain programming language, issue the contract logics to a block chain (contract registration), call keys or other event triggering and executing according to the logics of contract clauses, complete the contract logics and simultaneously provide the function of upgrading and canceling the contracts; the operation monitoring module is mainly responsible for deployment, configuration modification, contract setting, cloud adaptation in the product release process and visual output of real-time states in product operation, such as: alarm, monitoring network conditions, monitoring node equipment health status, and the like.
The platform product service layer provides basic capability and an implementation framework of typical application, and developers can complete block chain implementation of business logic based on the basic capability and the characteristics of the superposed business. The application service layer provides the application service based on the block chain scheme for the business participants to use.
Further, the blockchain platform in the embodiment of the present invention may refer to a platform composed of a private blockchain, a public blockchain, or a federated blockchain.
The embodiment of the invention provides a block chain-based file query method and device, computer equipment and a storage medium. The following are detailed below.
In one embodiment, as shown in FIG. 2, a block chain based volume query method is provided. Taking the application of the method to the terminal device in fig. 1 as an example for explanation, the method includes the following steps:
s201, receiving a file inquiry command.
The file may refer to an electronic text material having a plurality of chapters, pages, and paragraphs, and may be various materials related to a legal litigation case, and these materials may be litigation documents, for example: lines, citations, evidential materials, appeals, administrative repolling materials, and the like. In addition, the files in the embodiment of the present invention are not limited to the materials in litigation cases, and may be files in other scenarios, for example: teaching materials, graduation papers, bill of materials, and the like.
In addition, the file inquiry command may be sent by another terminal device, or may be sent by an application terminal configured in the local terminal (terminal device terminal).
S202, determining the file to be queried corresponding to the file query instruction.
The file inquiry command can include an identifier of the file to be inquired, and the terminal device can know that the file to be inquired is inquired according to the identifier.
After determining the file to be queried, the terminal device may generate feature information for the file to be queried, where the feature information may be determined according to an identifier carried in a file query instruction, may also be obtained after performing certain processing (for example, performing operation according to a certain algorithm) on the file to be queried, and may also refer to the file to be queried itself.
S203, sending the characteristic information of the file to be inquired to a block chain platform so that the block chain platform inquires whether a stored file matched with the file to be inquired exists in a block chain according to the characteristic information; wherein the stored volume is an original volume stored by the blockchain platform through a blockchain technology.
The original file (which may also be referred to as a file to be stored) refers to a file that needs to be stored in the blockchain platform, and may be one of the documents for first review, second review and second review of a litigation case, or all the documents in the whole litigation process. Of course, the original file can also refer to files of multiple litigation cases, and in this case, batch storage of multiple files can be realized at one time, so that the file storage efficiency is improved. The block chain platform may store the entire original volume, may store a part of the original volume, and may store feature information of the original volume (the generation manner of the feature information may be the same as that of the volume to be queried, and is not described herein again). Further, storing this information in the blockchain platform may refer to the original volume as a stored volume.
The block chain platform queries whether a stored volume matched with the volume to be queried exists according to the feature information, which may refer to whether a corresponding original volume exists in a query block chain or whether feature information corresponding to the original volume exists in the query block chain. Further, when existing, determining the query result as that the matched stored file exists; if not, determining the query result as that no matched stored volume exists; the blockchain platform may then return the query results to the terminal device.
S204, receiving a query result returned by the block chain platform for the file query instruction.
When the block chain platform obtains the query result, the query result can be returned to the terminal device through a certain block chain link point, and the terminal device receives the query result returned by the block chain link point.
S205, obtaining a file query result of the file to be queried according to the query result.
In the step, the terminal equipment determines a file inquiry result according to the inquiry result; when the query result of the blockchain platform is that the matched stored file exists, the file query result can be determined as a successful query, and when the query result of the blockchain platform is that the matched stored file does not exist, the file query result can be determined as a failed query.
Further, the terminal device can output the file query result so that a user who performs file query can obtain the query result; furthermore, when the query is successful, the corresponding stored file can be output as the file to be queried, and when the query is failed, prompt information of the query failure can be output.
The block chain-based file query method provided by the embodiment stores the file through the block chain platform, can ensure that the stored file information is not tampered, determines the file to be queried when receiving the file query instruction, and sends the characteristic information of the file to be queried to the block chain platform for querying, so that the obtained file query result is high in accuracy.
In one embodiment, before the step of performing a file query, a process of storing the original file by the blockchain platform is further included. The method specifically comprises the following steps: splitting according to the category of each document in the original file to obtain at least one unit to be stored; sending the at least one unit to be stored to a block chain platform; the block chain platform stores the at least one unit to be stored through a block chain technology to obtain at least one stored unit; the stored volume includes the at least one stored unit.
The method for splitting the original file by the terminal device may be that one document type is used as a unit to be stored, two or more document types are used as a unit to be stored, or one part of a certain document type is used as a unit to be stored. Furthermore, according to the litigation program, the first and second review documents can be respectively used as the first and second units, the first and second units can be further divided according to the materials involved in the first and second review programs, and the documents obtained through further division can be respectively used as the units to be stored. The method for splitting the file to be queried is the same as the method for splitting the file to be queried, and in addition, the method for splitting the original file and the file to be queried can be correspondingly consistent so as to obtain correspondingly consistent units through splitting, so that whether each unit is tampered or not can be determined.
After the units to be stored are obtained through splitting, determining the association relationship between each unit to be stored and the original file, and configuring corresponding association identification for each unit to be stored according to the association relationship. For example: the number of the original volume is set to 00, and the original volume is divided into three to-be-stored units, namely, a to-be-stored unit a, a to-be-stored unit B, and a to-be-stored unit C, then the association identifiers of the three to-be-stored units may be 0001/0002/0003, for example, "0001" represents the original volume to which the original volume belongs, "01" represents the to-be-stored unit a.
After the terminal equipment obtains the units to be stored, each unit to be stored is sent to the block chain platform so as to trigger the block chain platform to store the at least one unit to be stored through a block chain technology. The document contents (which may refer to characters, pictures, and the like) corresponding to the units to be stored may be stored in the blockchain platform, or the document contents corresponding to each unit to be stored may be calculated to obtain results.
Specifically, as shown in fig. 3, the original volume is split into a first volume unit and a second volume unit, and the terminal device sends the first volume unit and the second volume unit to the blockchain platform for storage. Further, as shown in fig. 4, according to the litigation procedure, the document to be reviewed and the document to be reviewed are respectively used as the first unit and the second unit, before the chaining, the first unit and the second unit may be further divided, the documents obtained through the further division are respectively used as the units to be stored, and the chaining of the units to be stored is controlled.
Further, the terminal device may send each unit to be stored to a certain block chain node in the block chain platform, and the block chain node starts a storage operation on the units to be stored (the block chain node may store the units to be stored in a unified manner, or may store the units to be stored separately). As shown in fig. 5, the terminal device sends each unit to be stored to the block chain node 1, and the block chain node 1 communicates with other block chain nodes, so that the block chain node 1 can trigger a storage operation on the unit to be stored to complete the storage of the unit to be stored through these connected block chain nodes 2/3/4 and so on. In some embodiments, the terminal device may further send each unit to be stored to different blockchain nodes in the blockchain platform, and the blockchain nodes may start the storage operation on each unit to be stored in a time-sharing or simultaneous manner.
In some embodiments, the unit to be queried carries the association identifier of the file to be queried, and after the unit to be stored is sent to the block chain platform, the block chain platform can determine which part of the file to be queried the corresponding unit to be stored is located according to the association identifier carried in the unit to be queried, and accordingly store each unit to be stored to obtain the corresponding stored unit. By the mode, when the file is inquired through the block chain platform, if a certain file unit is inquired, other file units can be inquired according to the associated identification, and then the information of the whole file is inquired.
In the embodiment, the original file is stored in the block chain platform through the block chain technology, so that the non-tamper property of the stored file information can be ensured, and the reliability of the inquired information can be ensured when the file inspection is required subsequently. However, the volume is directly stored in the blockchain platform, although the non-tamper-proof property of the information of the volume stored in the blockchain platform can be ensured, after the entity volume (for example, a paper document is stolen by a person, or a part of information in an electronic document stored in a server is damaged, etc.) is tampered, only the volume can be determined to be tampered according to the information recorded in the blockchain platform, and a specific tamper position cannot be determined, so that the storage management of the volume is not convenient enough. Therefore, the block chain-based volume query method provided by the embodiment stores the original volume in units, and can accurately determine which unit to be stored is tampered after the entity volume is tampered, so that the convenience of volume storage management can be effectively improved.
In one embodiment, the feature information includes at least one first hash value, the at least one first hash value is obtained by performing hash operation on at least one unit to be queried, and the at least one unit to be queried splits the file to be queried according to the category of each document in the file to be queried; the step of sending the characteristic information of the file to be queried to the block chain platform includes: sending the characteristic information to the block chain platform so that the block chain platform inquires whether second hash values matched with the first hash values exist or not according to the characteristic information; the second hash value is a result generated by performing hash operation on at least one unit to be stored when the block chain platform stores the at least one unit to be stored; the at least one unit to be stored is obtained by splitting according to the category of each document in the original file; the block chain platform stores the at least one unit to be stored through a block chain technology to obtain at least one stored unit; the stored volume includes the at least one stored unit.
In another embodiment, the step of obtaining the query result of the file to be queried according to the query result includes: for any one first hash value, if a matched second hash value is determined to exist according to the query result of the block chain platform, judging that the unit to be queried corresponding to the any one first hash value is not tampered; if the matched second hash value does not exist according to the query result of the block chain platform, judging that the unit to be queried corresponding to any one first hash value is tampered; and obtaining a file query result of the file to be queried according to the tampering judgment result of each unit to be queried.
The Hash operation is a calculation method for converting an input with any length into an output with a certain length through a Hash Algorithm, and the Hash Algorithm may be an MD5(Message-digest Algorithm5, information digest Algorithm 5) Algorithm, an SHA (Secure Hash Standard ) Algorithm, and the like.
Specifically, the implementation manner of determining whether the volume unit is tampered according to the second hash value may be: 1. after determining the to-be-queried file corresponding to the file query instruction, splitting the to-be-queried file into a plurality of file units according to a certain rule, performing hash operation on the file units to obtain corresponding first hash values c, comparing the obtained first hash values c with second hash values a in a block chain platform, if a certain first hash value c 'does not have a matched second hash value a', determining that the file unit corresponding to the first hash value c 'is tampered, and if a certain first hash value c' has a matched second hash value a ', determining that the file unit corresponding to the first hash value c' is not tampered; 2. after the block chain platform stores the file units, periodically (or aperiodically) accessing a server of a custody mechanism (the custody mechanism refers to a mechanism for custody of the file, and may be a court, a special file management mechanism, and the like), comparing the file units in the server with file unit information recorded in the block chain platform, determining whether the corresponding file units are tampered according to a comparison result, if the file units are tampered, adding a tampering identifier to the second hash value of the tampered file units in the block chain platform and recording the tampering identifier.
In another embodiment, after the step of sending each unit to be stored to the blockchain platform, the method further includes: if a file query instruction is received, determining a unit to be queried corresponding to the file query instruction; performing hash operation on the unit to be queried to obtain a first hash value; sending the first hash value to the blockchain platform, so that the blockchain platform inquires whether a second hash value matched with the first hash value exists; if the matched second hash value does not exist, the unit to be inquired is judged to be tampered, and a file unit inquiry failure result is output; and if the matched second hash value exists, judging that the unit to be inquired is not tampered, determining the unit to be stored corresponding to the second hash value as the unit to be inquired, and outputting the unit to be inquired. The embodiment can determine whether a specific volume unit is tampered.
Further, the block chain platform (or the terminal device) may establish an association relationship between the second hash values a of the units to be stored, and may further perform a hash operation on the original file to obtain a total hash value a (or integrate the sub-hash values a to obtain the total hash value a), establish an association relationship between the total hash value a and the second hash values a, and store the association relationship. When a query instruction for a certain volume is received, determining a volume to be queried corresponding to the query instruction, and performing hash operation on the volume to be queried to obtain a total hash value B; if the total hash value A matched with the total hash value B is determined to exist, querying a second hash value corresponding to the total hash value A, and if a file unit corresponding to a certain second hash value is found to be tampered, outputting the tampered information of the original file, and outputting the tampered specific position of the file, where the specific output content can be as shown in FIG. 6.
Further, in one embodiment, to reduce the amount of data in the blockchain and to improve the security of the electronic volume. The hash value may be obtained by calculating the electronic file. The hash value is saved into the blockchain. The electronic file can be stored in a server inside the storage mechanism, and after the electronic file is acquired from the server inside the storage mechanism, the electronic file can be input to a corresponding terminal device, and the terminal device performs hash calculation through the same hash calculation algorithm to obtain a hash value. And then inputting the calculated hash value into a search box of a webpage (the webpage can be a webpage specially used for inquiring the hash value in the block chain) through the terminal equipment, clicking for searching, receiving a search result, and if the search result shows that the inquired corresponding hash value exists in the block chain, indicating that the electronic file in the server inside the custody institution is not modified. If the electronic file is not inquired, the electronic file of the custody institution is falsified. In this manner, the amount of data stored in the blockchain may be reduced while ensuring the security of the stored electronic volume.
In one embodiment, the document may be further divided. Because the formats and contents of different document categories (for example, the original documents comprise basic conditions of parties, litigation requests, facts and reasons, evidences, evidence sources and the like, and the judgment documents comprise litigation participants, case bases, judgment results, judge personnel and the like) are different, each part of the document can be further divided into subunits, the subunits are arranged into data chains according to a certain sequence, and the data chains are uploaded into the block chains for storage. When the file is inquired, gradually dividing the file to be inquired into at least one subunit, arranging the subunits into data chains and then sending the data chains to a block chain platform for inquiry, if the corresponding stored data chains exist in the block chain platform, judging that the file to be inquired is inquired, and outputting corresponding file information; if the corresponding stored data chain does not exist in the blockchain platform, whether the corresponding stored subunit exists in the blockchain platform can be inquired, and if the corresponding stored subunit does not exist in a certain subunit, the information of the subunit is judged to be tampered. By the method, the file can be split into small parts, an accurate file query result can be queried when the file is queried, a tampering position can be positioned as detailed as possible when the file is determined to be tampered, and the file storage efficiency is effectively improved.
Further, in an embodiment, after the step of obtaining the file query result of the file to be queried according to the tampering determination result of each unit to be queried, the method further includes: if the file inquiring result is that the file to be inquired is tampered, determining the tampered unit to be inquired according to the tampering judgment result to obtain a file tampering position; outputting the tampered prompt information of the file and the tampered position of the file; and if the file inquiry result indicates that the file to be inquired is not tampered, determining the stored file as the file to be inquired and outputting the stored file.
In some embodiments, upon determining that the volume to be queried has been tampered with, the volume information stored in the blockchain platform may also be output.
The tampering judgment result comprises a result of whether each unit to be inquired is tampered, and the terminal equipment can obtain the tampering position of the file by using the result and the position of the unit to be inquired in the file to be inquired.
The embodiment can output the file query result, so that the user can obtain the specific condition of the file query.
In an embodiment, before the step of sending the characteristic information of the to-be-queried volume to the blockchain platform, the method further includes: receiving an original file sent by a terminal application; the terminal application acquires the original file by accessing a server of a first custody agency; the first storage mechanism is a mechanism for storing the files to be stored and uploading the files to be stored to a corresponding server; and sending the original volume to a block chain platform, so that the block chain platform stores the original volume through a block chain technology to obtain the stored volume.
In one embodiment, the block chain-based file query method further includes the following steps: if it is determined that the stored volume is streamed from the first retention mechanism to a second retention mechanism; generating file circulation information; the file transfer information is used for representing that the stored files are transferred from the first custody mechanism to the second custody mechanism; and sending the file transfer information to a block chain platform so as to trigger the block chain platform to store the file transfer information through a block chain technology.
The terminal application may refer to various application programs installed on the terminal device, and may be various applets, APPs, and the like capable of accessing the block chain platform.
The server of the first storage means may be understood as one blockchain node in the blockchain platform, or may be a server capable of communicating with the blockchain node. Under the scene that the server of the court is directly used as the block chain node, the mechanism servers of all the regions are used as one node in the block chain platform, and the nodes form the block chain platform in the court system. Meanwhile, the nodes can upload and store a certain file, the sharing of the file information can be realized through the block chain platform, the servers of all courts are connected through the block chain technology, the file is stored according to the block chain technology, the management efficiency of the courts can be effectively improved, and the safety of the stored file is ensured.
The terminal equipment can carry out network communication with each server of the court, access the files stored in the servers in real time, and if a certain file A originally stored in the server of the first custody agency is determined to be stored in the server of the second custody agency, the file is considered to be circulated. At this time, the terminal device may generate the file transfer information and store the file transfer information through the blockchain platform. Thus, if a user needs to query for the volume A, the user can know that the volume A is currently being escrowed by the second escrow mechanism by accessing the blockchain platform.
Specifically, for the situation that the electronic file is easy to lose on line but does not know which link the electronic file is lost, the embodiment of the invention adopts the following solution: if the electronic file is transferred in the blockchain, for example, from the C1 court to the C2 court, the file transfer information is recorded through the blockchain platform, and the file transfer information may include the transferor C1, the transferor C2, and a file identifier (specifically, a to-be-stored unit, which may be an associated identifier), so that it can be known explicitly to which court the electronic file is transferred at present, and effective management of the file can be achieved.
In one embodiment, as shown in fig. 7, a block chain-based volume query method is provided, which includes the following steps:
s701, receiving an original file sent by a terminal application; the terminal application acquires the original file by accessing a server of a first custody agency; the first storage means is a means for storing the original file.
S702, according to the type of each document in the original file, splitting the original file into at least one unit to be stored.
And S703, sending each unit to be stored to a block chain platform to trigger the block chain platform to perform Hash consensus operation on the at least one unit to be stored to obtain at least one second Hash value, recording the at least one second Hash value after the consensus operation is finished, enabling each stored unit to be a stored unit, and obtaining a stored volume according to each stored unit.
S704, if the stored volume is determined to flow from the first custody mechanism to a second custody mechanism; generating file circulation information; the volume transfer information is used to characterize a transfer of the stored volume from the first retention authority to the second retention authority.
S705, sending the file circulation information to a block chain platform to trigger the block chain platform to store the file circulation information through a block chain technology.
S706, if a file query instruction is received, determining the file to be queried corresponding to the file query instruction.
S707, according to the category of each document in the file to be queried, splitting the file to be queried into at least one unit to be queried, performing hash operation on the at least one unit to be queried to obtain at least one corresponding first hash value, and obtaining the feature information of the file to be queried according to the at least one first hash value.
S708, sending the feature information to the blockchain platform, so that the blockchain platform queries whether there is a second hash value matching each first hash value according to the feature information.
S709, for any one first hash value, if a matched second hash value exists, judging that the unit to be inquired corresponding to the any one first hash value is not tampered; and if the matched second hash value does not exist, judging that the unit to be inquired corresponding to any one first hash value is tampered.
S710, obtaining a file query result of the file to be queried according to the tampering judgment result of each unit to be queried.
S711, if the file inquiring result is that the file to be inquired is tampered, determining a tampered unit to be inquired according to the tampering judgment result to obtain a file tampering position; and outputting the tampered prompt information of the file and the tampered position of the file.
S712, if the file query result is that the file to be queried is not tampered, determining the stored file as the file to be queried and outputting the stored file.
According to the block chain-based file query method provided by the embodiment, the file is stored through the block chain platform, so that the file information stored in the block chain can be guaranteed against being tampered, meanwhile, the original file is stored in units, and the specific unit to be stored is accurately determined after the entity file is tampered, so that the convenience of file storage management can be effectively improved.
In one embodiment, as shown in FIG. 8, a block chain based volume query method is provided. Taking the application of the method to a certain blockchain node on the blockchain platform in fig. 1 as an example for explanation, the method comprises the following steps:
s801, storing the original file through a block chain technology to obtain a stored file.
For the related explanation of this step, reference may be made to S203, which is not described herein again.
S802, receiving characteristic information of the file to be inquired sent by the terminal equipment, and inquiring whether a stored file matched with the file to be inquired exists in the block chain according to the characteristic information; and the file to be inquired is determined by the terminal equipment according to the file inquiry instruction.
The terminal device may be the terminal device in the foregoing embodiment.
For the explanation of this step, reference may be made to S201 and S202, which are not described herein again.
And S803, returning a query result aiming at the file query instruction to the terminal equipment so that the terminal equipment can obtain a file query result of the file to be queried according to the query result.
In this step, after acquiring the query result of the to-be-queried file by the block chain platform, the server returns the query result to the terminal device.
Other related explanations of this step can be found in S204 and S205, which are not described herein.
The block chain-based file query method provided by the embodiment stores the file through the block chain platform, can ensure that the stored file information is not tampered, and sends the characteristic information of the file to be queried to the block chain platform for querying when receiving the file query instruction, so that the obtained file query result has high accuracy.
In an embodiment, the step of obtaining the stored volume by storing the original volume through the blockchain technique includes: generating a private key and a public key according to a predetermined algorithm; encrypting the original file through the private key to obtain a corresponding digital signature; broadcasting the public key, the original file and the corresponding digital signature as a file block to a target block chain node in a block chain platform; and triggering the target block chain node to verify the digital signature through the public key, if the verification is passed, performing consensus operation on the original file, and recording the original file after the consensus operation is finished to obtain the stored file. After the target block chain link points record the original files, the storage of the original files is realized.
The consensus operation may refer to a process of performing a hash operation on the to-be-stored unit, and when a certain block chain node first obtains a corresponding hash value, the obtained hash value is broadcasted from the block chain node to other block chain nodes to control each block chain node to store the corresponding to-be-stored unit and hash value.
The target block link point may be other block link nodes except for the block link point for uploading the to-be-stored unit in the block link platform, may be all of the block link nodes, or may be a part of the block link nodes. In some embodiments, uploading block link points of a stored volume may also participate in the consensus operation process.
The specific process implemented by this embodiment may be (without considering the case of splitting the volume): when obtaining the original file, court personnel can upload the original file to a user terminal, the court personnel can send the original file to a block chain node 1 through the user terminal, the block chain node 1 can encrypt the original file by using a private key to obtain a digital signature, the original file is broadcasted to other block chain nodes, and the other block chain nodes can also continue to broadcast the original file, so that the nodes in the block chain all receive the original file. After receiving the original file containing the digital signature, the other block link nodes may perform signature verification by using the public key of the block link node 1, so as to perform consensus operation on the original file. And when the consensus is successful, storing the electronic volume so as to complete the chaining of the electronic volume and obtain the stored volume.
And for the case of splitting the file, the corresponding adjustment implementation steps are carried out according to the implementation process. That is, the above block chain-based portfolio query method further includes: receiving at least one unit to be stored sent by terminal equipment; the at least one unit to be stored is obtained by splitting an original file by an application terminal; generating a private key and a public key according to a predetermined algorithm; encrypting each unit to be stored by the private key to obtain at least one corresponding digital signature; broadcasting the public key, the at least one unit to be stored and the corresponding digital signature as at least one file block to a target block chain node in a block chain platform; and triggering the target block chain node to verify any digital signature through the public key, if the verification is passed, performing consensus operation on the corresponding to-be-stored unit, and recording the corresponding to-be-stored unit after the consensus operation is finished. After the target block chain link point records the unit to be stored, the storage of the unit to be stored is realized.
The above embodiment performs encryption, decryption, and consensus operation on the original file according to the procedure of recording information in the blockchain technology, so as to ensure the security of the information recorded by the blockchain platform.
In one embodiment, as shown in fig. 9, a block chain-based volume query method is provided, which includes the following steps:
s901, receiving the original file sent by the terminal equipment.
S902, generating a private key and a public key according to a predetermined algorithm.
S903, encrypting the original file through the private key to obtain a corresponding digital signature.
S904, the public key, the original file and the corresponding digital signature are used as file blocks and broadcast to target block chain nodes in a block chain platform; and triggering the target block chain node to verify the digital signature through the public key, if the verification is passed, performing consensus operation on the original file, and recording the original file after the consensus operation is finished to obtain the stored file.
S905, receiving characteristic information of a file to be inquired, sent by a terminal device, and inquiring whether a stored file matched with the file to be inquired exists in a block chain according to the characteristic information; and the file to be inquired is determined by the terminal equipment according to the file inquiry instruction.
S906, returning a query result aiming at the file query instruction to the terminal equipment so that the terminal equipment can obtain a file query result of the file to be queried according to the query result.
According to the volume inquiry method based on the block chain, the volume information stored in the block chain can be guaranteed not to be tampered by storing the volume through the block chain platform, meanwhile, the stored volume is stored in units, and the specific unit to be stored is accurately determined to be tampered after the entity volume is tampered, so that the convenience of storage management of the volume can be effectively improved, and meanwhile, the accuracy of the inquired volume information is guaranteed.
In order to better understand the above method, as shown in fig. 10, an application example of the block chain-based volume query method according to the present invention is described in detail below.
S1001, receiving an original file sent by a terminal application by a terminal device; according to the category of each document in the original file, splitting the original file into at least one unit to be stored; and sending each unit to be stored to a transfer blockchain node in the blockchain platform (namely, a certain blockchain node in the blockchain platform).
S1002, generating a private key and a public key by a transfer block chain node according to a predetermined algorithm, and encrypting each unit to be stored through the private key to obtain at least one corresponding digital signature; and broadcasting the public key, the at least one unit to be stored and the corresponding digital signature as at least one volume block to a target block chain node in a block chain platform.
S1003, the target block chain node verifies any one digital signature through the public key, if the verification is passed, common identification operation is carried out on the corresponding unit to be stored, and at least one second hash value is obtained; recording the at least one second hash value after the consensus operation is finished, and finishing the storage of each unit to be stored, wherein each stored unit to be stored becomes a stored unit; and obtaining the stored volume according to each stored unit.
S1004, if the fact that the stored files are stored in a server of a second court is determined, the terminal equipment judges that the stored files are transferred from the first court to the second court; and generating file circulation information, and sending the file circulation information to the block chain platform.
S1005, the blockchain platform stores the file circulation information through the blockchain technique.
S1006, if a file query instruction is received, the terminal equipment determines a file to be queried corresponding to the file query instruction; splitting the file to be inquired into at least one unit to be inquired according to the category of each document in the file to be inquired; performing hash operation on the at least one unit to be queried to obtain at least one corresponding first hash value serving as the characteristic information of the file to be queried; and sending the characteristic information to the block chain platform.
S1007, the block chain platform queries whether there is a second hash value matching each first hash value according to the feature information.
S1008, for any one first hash value, if a matched second hash value is determined to exist according to the query result of the block chain platform, judging that the unit to be queried corresponding to the any one first hash value is not tampered; and if the matched second hash value does not exist according to the query result of the block chain platform, judging that the unit to be queried corresponding to any one first hash value is tampered.
S1009, obtaining the file query result of the file to be queried according to the tampering judgment result of each unit to be queried.
S1010, if the file inquiring result is that the file to be inquired is tampered, determining a tampered unit to be inquired according to the tampering judgment result to obtain a file tampering position; and outputting the tampered prompt information of the file and the tampered position of the file.
S1011, if the file query result is that the file to be queried is not tampered, determining the stored file as the file to be queried and outputting the stored file.
According to the embodiment, the block chain platform is used for storing the volume, so that the information of the volume stored in the block chain can be prevented from being tampered, meanwhile, the stored volume is stored in units, the tampered position can be accurately determined after the entity volume is tampered, and the convenience of storage management of the volume is effectively improved.
It should be noted that, for the sake of simplicity, the foregoing method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present invention is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present invention.
Based on the same idea as the block chain based file query method in the above embodiment, the present invention further provides a block chain based file query device, which can be used to execute the block chain based file query method. For convenience of illustration, only the parts related to the embodiments of the present invention are shown in the schematic structural diagram of the block chain based portfolio query device embodiment, and those skilled in the art will understand that the illustrated structure does not constitute a limitation of the device, and may include more or less components than those illustrated, or combine some components, or arrange different components.
As shown in fig. 11, in one embodiment, the block chain based volume query device includes an instruction receiving module 1101, a volume determining module 1102, a first query module 1103, a result receiving module 1104 and a result determining module 1105, which are described in detail as follows:
the instruction receiving module 1101 is configured to receive a file query instruction.
The file determining module 1102 is configured to determine a file to be queried corresponding to the file querying instruction.
A first query module 1103, configured to send feature information of the to-be-queried file to a block chain platform, so that the block chain platform queries, according to the feature information, whether a stored file matching the to-be-queried file exists in a block chain; wherein the stored volume is an original volume stored by the blockchain platform through a blockchain technology.
A result receiving module 1104, configured to receive a query result returned by the blockchain platform for the volume query instruction.
And the result determining module 1105 is configured to obtain a file query result of the file to be queried according to the query result.
The block chain-based file query device provided by the embodiment stores the file through the block chain platform, so that the stored file information can be prevented from being tampered, when a file query instruction is received, the characteristic information of the file to be queried is sent to the block chain platform for querying, and the obtained file query result is high in accuracy.
In one embodiment, the feature information includes at least one first hash value, the at least one first hash value is obtained by performing hash operation on at least one unit to be queried, and the at least one unit to be queried splits the file to be queried according to the category of each document in the file to be queried; the first query module 1103 includes: the information sending submodule is used for sending the characteristic information to the block chain platform so that the block chain platform can inquire whether second hash values matched with the first hash values exist or not according to the characteristic information; the second hash value is a result generated by performing hash operation on at least one unit to be stored when the block chain platform stores the at least one unit to be stored; the at least one unit to be stored is obtained by splitting according to the category of each document in the original file; the block chain platform stores the at least one unit to be stored through a block chain technology to obtain at least one stored unit; the stored volume includes the at least one stored unit.
In one embodiment, the result determination module 1104 includes: the tampering judgment submodule is used for judging that the unit to be queried corresponding to any first hash value is not tampered if the second hash value matched with the first hash value is determined to exist according to the query result of the block chain platform; if the matched second hash value does not exist according to the query result of the block chain platform, judging that the unit to be queried corresponding to any one first hash value is tampered; and the query result determining submodule is used for obtaining the file query result of the file to be queried according to the tampering judgment result of each unit to be queried.
In one embodiment, the block chain-based volume query device further includes: the tampering output module is used for determining a tampered unit to be queried according to the tampering judgment result to obtain a tampering position of the file if the file querying result is that the file to be queried is tampered; outputting the tampered prompt information of the file and the tampered position of the file; and the non-tampering output module is used for determining the stored volume as the to-be-queried volume and outputting the stored volume if the query result of the volume is that the to-be-queried volume is not tampered.
In one embodiment, the block chain-based volume query device further includes: the file receiving module is used for receiving the original file sent by the terminal application; the terminal application acquires the original file by accessing a server of a first custody agency; the first keeping mechanism is a mechanism for keeping the original files; the volume sending module is used for sending the original volume to a block chain platform so that the block chain platform stores the original volume through a block chain technology to obtain the stored volume; the block chain-based file inquiry device further comprises: a flow judgment module, configured to, if it is determined that the stored volume flows from the first retention mechanism to a second retention mechanism; the circulation information generating module is used for generating the file circulation information; the file transfer information is used for representing that the stored files are transferred from the first custody mechanism to the second custody mechanism; and the transfer information sending module is used for sending the file transfer information to a block chain platform so as to trigger the block chain platform to store the file transfer information through a block chain technology.
As shown in FIG. 12, in one embodiment, the block chain based volume query device includes a volume storage module 1201, a second query module 1202 and a result return module 1203, which are described in detail as follows:
the volume storage module 1201 is configured to store the original volume by using a block chain technique, so as to obtain a stored volume.
The second query module 1202 is configured to receive feature information of a to-be-queried file sent by a terminal device, and query whether a stored file matching the to-be-queried file exists in a block chain according to the feature information; and the file to be inquired is determined by the terminal equipment according to the file inquiry instruction.
A result returning module 1203, configured to return a query result for the file query instruction to the terminal device, so that the terminal device obtains a file query result of the file to be queried according to the query result.
The block chain-based file query device provided by the embodiment stores the file through the block chain platform, so that the stored file information can be prevented from being tampered, when a file query instruction is received, the characteristic information of the file to be queried is sent to the block chain platform for querying, and the obtained file query result is high in accuracy.
In one embodiment, the volume storage module 1201 includes: the secret key generating module is used for generating a private key and a public key according to a predetermined algorithm; the encryption module is used for encrypting the original file through the private key to obtain a corresponding digital signature; the block sending module is used for broadcasting the public key, the original file and the corresponding digital signature as a file block to a target block chain node in a block chain platform; and triggering the target block chain node to verify the digital signature through the public key, if the verification is passed, performing consensus operation on the original file, and recording the original file after the consensus operation is finished to obtain the stored file.
It should be noted that, the block chain based file query apparatus of the present invention corresponds to the block chain based file query method of the present invention one to one, and the technical features and the beneficial effects thereof described in the embodiments of the block chain based file query method are all applicable to the embodiments of the block chain based file query apparatus, and specific contents may refer to the descriptions in the embodiments of the block chain based file query method, and are not described herein again, and thus it is stated that.
In addition, in the above-mentioned embodiment of the block chain based volume query device, the logical division of each program module is only an example, and in practical applications, the above-mentioned function allocation may be performed by different program modules according to needs, for example, due to configuration requirements of corresponding hardware or due to convenience of implementation of software, that is, the internal structure of the block chain based volume query device is divided into different program modules to perform all or part of the above-described functions.
The block chain-based file query method provided by the application can be applied to a computer device as shown in fig. 13. The computer device may be a server or a terminal device, and its internal structure diagram may be as shown in fig. 13. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor is configured to provide computing and control capabilities; the memory includes a non-volatile storage medium storing an operating system, a computer program (which when executed by the processor implements a block chain-based volume querying method), and a database, an internal memory providing an environment for the operating system and the computer program in the non-volatile storage medium to run; the database is used for storing various data related to the block chain-based file query method in the execution process; the network interface is used for communicating with an external terminal through network connection.
Those skilled in the art will appreciate that the architecture shown in fig. 13 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the above block chain based volume querying method. The steps of the block chain based volume query method herein may be the steps in the block chain based volume query method of the various embodiments described above.
In one embodiment, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, causes the processor to perform the steps of the above block chain based volume querying method. The steps of the block chain based volume query method herein may be the steps in the block chain based volume query method of the various embodiments described above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by a computer program, which is stored in a computer readable storage medium and sold or used as a stand-alone product. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
The terms "comprises" and "comprising," and any variations thereof, of embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or (module) elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-described examples merely represent several embodiments of the present invention and should not be construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (11)

1. A block chain-based file query method is characterized by comprising the following steps:
receiving a file inquiry command;
determining the file to be queried corresponding to the file query instruction;
sending the characteristic information of the file to be inquired to a block chain platform so that the block chain platform inquires whether a stored file matched with the file to be inquired exists in a block chain according to the characteristic information; wherein the stored volume is an original volume stored by the blockchain platform through a blockchain technology;
receiving a query result returned by the block chain platform for the file query instruction;
and obtaining a file query result of the file to be queried according to the query result.
2. The method according to claim 1, wherein the characteristic information includes at least one first hash value, the at least one first hash value is obtained by performing a hash operation on at least one unit to be queried, and the at least one unit to be queried is obtained by splitting the file to be queried according to a category of each document in the file to be queried;
the step of sending the characteristic information of the file to be queried to the block chain platform includes:
sending the characteristic information to the block chain platform so that the block chain platform inquires whether second hash values matched with the first hash values exist or not according to the characteristic information;
the second hash value is a result generated by performing hash operation on at least one unit to be stored when the block chain platform stores the at least one unit to be stored; the at least one unit to be stored is obtained by splitting according to the category of each document in the original file; the block chain platform stores the at least one unit to be stored through a block chain technology to obtain at least one stored unit; the stored volume includes the at least one stored unit.
3. The method according to claim 2, wherein the step of obtaining the query result of the file to be queried according to the query result comprises:
for any one of the first hash values, the hash value,
if the matched second hash value is determined to exist according to the query result of the block chain platform, judging that the unit to be queried corresponding to any one first hash value is not tampered;
if the matched second hash value does not exist according to the query result of the block chain platform, judging that the unit to be queried corresponding to any one first hash value is tampered;
and obtaining a file query result of the file to be queried according to the tampering judgment result of each unit to be queried.
4. The method according to claim 3, wherein after the step of obtaining the file query result of the file to be queried according to the tampering determination result of each unit to be queried, the method further comprises:
if the file inquiring result is that the file to be inquired is tampered, determining the tampered unit to be inquired according to the tampering judgment result to obtain a file tampering position; outputting the tampered prompt information of the file and the tampered position of the file;
and if the file inquiry result indicates that the file to be inquired is not tampered, determining the stored file as the file to be inquired and outputting the stored file.
5. The method of claim 1,
before the step of sending the characteristic information of the file to be queried to the block chain platform, the method further includes:
receiving an original file sent by a terminal application; the terminal application acquires the original file by accessing a server of a first custody agency; the first keeping mechanism is a mechanism for keeping the original files;
sending the original volume to a block chain platform, so that the block chain platform stores the original volume through a block chain technology to obtain the stored volume;
the method further comprises the following steps:
if it is determined that the stored volume is streamed from the first retention mechanism to a second retention mechanism;
generating file circulation information; the file transfer information is used for representing that the stored files are transferred from the first custody mechanism to the second custody mechanism;
and sending the file transfer information to a block chain platform so as to trigger the block chain platform to store the file transfer information through a block chain technology.
6. A block chain-based file query method is characterized by comprising the following steps:
storing the original file through a block chain technology to obtain a stored file;
receiving characteristic information of a file to be inquired sent by terminal equipment, and inquiring whether a stored file matched with the file to be inquired exists in a block chain according to the characteristic information; the file to be inquired is determined by the terminal equipment according to a file inquiry instruction;
and returning a query result aiming at the file query instruction to the terminal equipment so that the terminal equipment obtains a file query result of the file to be queried according to the query result.
7. The method of claim 6, wherein the step of storing the original volume by using a blockchain technique to obtain the stored volume comprises:
generating a private key and a public key according to a predetermined algorithm;
encrypting the original file through the private key to obtain a corresponding digital signature;
broadcasting the public key, the original file and the corresponding digital signature as a file block to a target block chain node in a block chain platform; and triggering the target block chain node to verify the digital signature through the public key, if the verification is passed, performing consensus operation on the original file, and recording the original file after the consensus operation is finished to obtain the stored file.
8. A block chain-based file query device, comprising:
the instruction receiving module is used for receiving a file inquiry instruction;
the file determining module is used for determining the file to be queried corresponding to the file query instruction;
the first query module is used for sending the characteristic information of the file to be queried to a block chain platform so that the block chain platform queries whether a stored file matched with the file to be queried exists in a block chain according to the characteristic information; wherein the stored volume is an original volume stored by the blockchain platform through a blockchain technology;
the result receiving module is used for receiving a query result returned by the block chain platform aiming at the file query instruction;
and the result determining module is used for obtaining the file query result of the file to be queried according to the query result.
9. A block chain-based file query device, comprising:
the file storage module is used for storing the original file through a block chain technology to obtain a stored file;
the second query module is used for receiving the characteristic information of the file to be queried, which is sent by the terminal equipment, and querying whether a stored file matched with the file to be queried exists in the block chain according to the characteristic information; the file to be inquired is determined by the terminal equipment according to a file inquiry instruction;
and the result returning module is used for returning the query result aiming at the file query instruction to the terminal equipment so that the terminal equipment can obtain the file query result of the file to be queried according to the query result.
10. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN201910887516.5A 2019-09-19 2019-09-19 File inquiry method, device, equipment and storage medium based on block chain Active CN110597818B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910887516.5A CN110597818B (en) 2019-09-19 2019-09-19 File inquiry method, device, equipment and storage medium based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910887516.5A CN110597818B (en) 2019-09-19 2019-09-19 File inquiry method, device, equipment and storage medium based on block chain

Publications (2)

Publication Number Publication Date
CN110597818A true CN110597818A (en) 2019-12-20
CN110597818B CN110597818B (en) 2023-11-14

Family

ID=68861232

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910887516.5A Active CN110597818B (en) 2019-09-19 2019-09-19 File inquiry method, device, equipment and storage medium based on block chain

Country Status (1)

Country Link
CN (1) CN110597818B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112069529A (en) * 2020-11-11 2020-12-11 腾讯科技(深圳)有限公司 Block chain-based volume management method and device, computer and storage medium
CN112115193A (en) * 2020-11-23 2020-12-22 腾讯科技(深圳)有限公司 Case ratio query method, device, equipment and storage medium based on block chain
CN112287403A (en) * 2020-12-25 2021-01-29 腾讯科技(深圳)有限公司 Block chain-based electronic volume management method and device, electronic equipment and medium
CN112365373A (en) * 2020-11-10 2021-02-12 四川大学 Method for preserving and mutually recognizing electronic file on case
CN112597192A (en) * 2020-12-09 2021-04-02 杭州趣链科技有限公司 Data query method, device, server and medium
CN113051418A (en) * 2019-12-27 2021-06-29 宇龙计算机通信科技(深圳)有限公司 Image source tracking method and device, storage medium and electronic equipment
CN113407552A (en) * 2021-05-13 2021-09-17 太极计算机股份有限公司 Block chain-based electronic file full-chain supervision method and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108763463A (en) * 2018-05-22 2018-11-06 山大地纬软件股份有限公司 A kind of Digital Archives System based on block chain
CN108769133A (en) * 2018-05-04 2018-11-06 珠海市筑巢科技有限公司 A kind of flying quality sharing method, computer installation and computer readable storage medium based on block chain
CN109040227A (en) * 2018-07-27 2018-12-18 江西贪玩信息技术有限公司 Service request response method, device and computer equipment based on block chain
CN109086415A (en) * 2018-08-03 2018-12-25 四川民工加网络科技有限公司 Rural migrant worker's archive management method, block chain and storage medium based on block chain
CN109242481A (en) * 2018-06-28 2019-01-18 平安科技(深圳)有限公司 Information approach, device and computer equipment are pledged based on block chain query
US20190147106A1 (en) * 2017-11-14 2019-05-16 International Business Machines Corporation Providing accountability of blockchain queries
CN110209632A (en) * 2019-05-27 2019-09-06 武汉市润普网络科技有限公司 A kind of electronics folder with case production, turn shelves system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190147106A1 (en) * 2017-11-14 2019-05-16 International Business Machines Corporation Providing accountability of blockchain queries
CN108769133A (en) * 2018-05-04 2018-11-06 珠海市筑巢科技有限公司 A kind of flying quality sharing method, computer installation and computer readable storage medium based on block chain
CN108763463A (en) * 2018-05-22 2018-11-06 山大地纬软件股份有限公司 A kind of Digital Archives System based on block chain
CN109242481A (en) * 2018-06-28 2019-01-18 平安科技(深圳)有限公司 Information approach, device and computer equipment are pledged based on block chain query
CN109040227A (en) * 2018-07-27 2018-12-18 江西贪玩信息技术有限公司 Service request response method, device and computer equipment based on block chain
CN109086415A (en) * 2018-08-03 2018-12-25 四川民工加网络科技有限公司 Rural migrant worker's archive management method, block chain and storage medium based on block chain
CN110209632A (en) * 2019-05-27 2019-09-06 武汉市润普网络科技有限公司 A kind of electronics folder with case production, turn shelves system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113051418A (en) * 2019-12-27 2021-06-29 宇龙计算机通信科技(深圳)有限公司 Image source tracking method and device, storage medium and electronic equipment
CN112365373A (en) * 2020-11-10 2021-02-12 四川大学 Method for preserving and mutually recognizing electronic file on case
CN112365373B (en) * 2020-11-10 2022-07-12 四川大学 Method for preserving and mutually recognizing electronic file on case
CN112069529A (en) * 2020-11-11 2020-12-11 腾讯科技(深圳)有限公司 Block chain-based volume management method and device, computer and storage medium
CN112115193A (en) * 2020-11-23 2020-12-22 腾讯科技(深圳)有限公司 Case ratio query method, device, equipment and storage medium based on block chain
CN112597192A (en) * 2020-12-09 2021-04-02 杭州趣链科技有限公司 Data query method, device, server and medium
CN112287403A (en) * 2020-12-25 2021-01-29 腾讯科技(深圳)有限公司 Block chain-based electronic volume management method and device, electronic equipment and medium
CN113407552A (en) * 2021-05-13 2021-09-17 太极计算机股份有限公司 Block chain-based electronic file full-chain supervision method and system

Also Published As

Publication number Publication date
CN110597818B (en) 2023-11-14

Similar Documents

Publication Publication Date Title
CN110597818B (en) File inquiry method, device, equipment and storage medium based on block chain
CN109409122B (en) File storage method, electronic device and storage medium
US10637669B2 (en) Data and data lineage control, tracking, and verification
US10447480B2 (en) Event verification receipt system and methods
CN111475836B (en) File management method and device based on alliance block chain
CN109472164A (en) The verification method and its network and electronic equipment of contract dataset
CN111709860B (en) Method, device, equipment and storage medium for processing heritage
CN111177172A (en) Electronic deposit certificate system based on block chain
CN109491965A (en) The storage method and its network and electronic equipment of purchase sale of electricity contract
CN112804218A (en) Data processing method, device and equipment based on block chain and storage medium
JP2019153181A (en) Management program
CN110598478A (en) Block chain based evidence verification method, device, equipment and storage medium
TWM589302U (en) Allocation document transmission system
CN114884674A (en) Block chain-based user data transfer method, device and equipment
US20230075539A1 (en) Method and system for providing an electronic credential associated with electronic identification information
CN110826091B (en) File signature method and device, electronic equipment and readable storage medium
CN116777397A (en) Electronic bill management method, device, terminal and storage medium based on block chain
CN110493011B (en) Block chain-based certificate issuing management method and device
CN110598374B (en) Block chain-based work registration method, apparatus and computer-readable storage medium
CN112163036A (en) Block chain information construction and query method and related device
CN112115101B (en) Method and system for determinacy deletion of data in cloud storage
CN115481426A (en) Block chain-based electronic archive management method, system, terminal device and medium
CN112115423A (en) Electronic notarization information processing method, device, system, equipment and storage medium
US20240140249A1 (en) Method for authorizing a first participant in a communication network, processing device, motor vehicle and infrastructure device
CN116684160A (en) Public service litigation data security sharing and privacy protecting method and system

Legal Events

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