CN114090511A - File access method, block chain system, electronic device and computer readable medium - Google Patents

File access method, block chain system, electronic device and computer readable medium Download PDF

Info

Publication number
CN114090511A
CN114090511A CN202111423110.5A CN202111423110A CN114090511A CN 114090511 A CN114090511 A CN 114090511A CN 202111423110 A CN202111423110 A CN 202111423110A CN 114090511 A CN114090511 A CN 114090511A
Authority
CN
China
Prior art keywords
executable code
file
terminal
accessed
server node
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.)
Pending
Application number
CN202111423110.5A
Other languages
Chinese (zh)
Inventor
田新雪
肖征荣
周晶
魏进武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202111423110.5A priority Critical patent/CN114090511A/en
Publication of CN114090511A publication Critical patent/CN114090511A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses a file access method, a block chain system, electronic equipment and a computer readable medium, which aim to solve the problems that in the prior art, the labor cost is too high and files are easy to leak due to manual processing. The method comprises the following steps: the method comprises the steps that a server node receives a file access application, wherein the file access application comprises an identifier of a file to be accessed and an identifier of a terminal sending the file access application; the server node judges whether the terminal has the authority to access the file to be accessed according to the identifier of the file to be accessed and the identifier of the terminal; under the condition that the terminal has the authority of accessing the file to be accessed, the server node generates an executable code according to the storage position of the file to be accessed in the block chain system; the server node encrypts the executable code according to a preset algorithm, and broadcasts the encrypted executable code to the blockchain system, so that the terminal acquires and executes the executable code, wherein the executable code is used for acquiring the file to be accessed in the blockchain system.

Description

File access method, block chain system, electronic device and computer readable medium
Technical Field
The invention relates to the technical field of blockchain, in particular to a file access method, a blockchain system, electronic equipment and a computer readable medium.
Background
With the development of digitization technology, platform digitization has become an important component of digital construction.
The digitalized laboratory platform is used as a test operation service platform for internal support/external energization, and can realize digitalization, test capability and management process platformization and clouding of external services (namely services from entrusted registration to processes such as task review, distribution, process tracking, data audit and test report).
However, in some related technologies, all files (such as test reports) of a laboratory platform are filed in a server, and when the test reports need to be checked, the test reports can only be processed by manpower, for example, the test reports are shared by sharing server addresses, or the test reports are sent by using untrusted third-party mailboxes, social software, and the like, so that not only is the manpower cost too high, but also the shared server addresses and the process of sending the test reports can be maliciously monitored, and the files are easily leaked.
Disclosure of Invention
Therefore, the invention provides a file access method, a block chain system, an electronic device and a computer readable medium, which are used for solving the problems that in the prior art, the labor cost is too high and files are easy to leak due to manual processing.
In order to achieve the above object, a first aspect of the present invention provides a file access method for use in a blockchain system, the blockchain including a server node, the method including:
the server node receives a file access application, wherein the file access application comprises an identifier of a file to be accessed and an identifier of a terminal sending the file access application;
the server node judges whether the terminal has the authority to access the file to be accessed according to the identifier of the file to be accessed and the identifier of the terminal;
under the condition that the terminal has the authority of accessing the file to be accessed, the server node generates an executable code according to the storage position of the file to be accessed in the blockchain system;
and the server node encrypts the executable code according to a preset algorithm, and broadcasts the encrypted executable code to the blockchain system so as to enable the terminal to acquire and execute the executable code, wherein the executable code is used for acquiring the file to be accessed in the blockchain system.
Optionally, the generating, by the server node, an executable code according to the storage location of the file to be accessed in the blockchain system includes: the server node generates an executable code according to the storage position of the file to be accessed in the blockchain system and the identifier of the terminal; the executable code is further configured to embed a watermark for the file to be accessed using the identification of the terminal.
Optionally, the blockchain system further includes a terminal node corresponding to the terminal; before the server node receives the file access application, the method further comprises the following steps: the terminal node broadcasts the file access application to the blockchain system; after the server node broadcasts the encrypted executable code values into the blockchain system, the method further comprises the following steps: and the terminal node receives the encrypted executable code, decrypts the encrypted executable code according to a preset algorithm and acquires the executable code.
Further optionally, the broadcasting, by the terminal node, the file access request to the blockchain system includes: the terminal node signs the file access application by using a private key of the terminal node and broadcasts the signed file access application to the block chain system; the server node receives a file access application, and the file access application comprises the following steps: the server node verifies the signature of the received file access application by using the public key of the terminal node, and acquires the file access application under the condition that the verification is passed; the server node broadcasts the encrypted executable code into the blockchain system, and the method comprises the following steps: the server node signs the encrypted executable code by using a private key of the server node and broadcasts the signed and encrypted executable code to a block chain system; the terminal node receiving the encrypted executable code received by the terminal node, including: and the terminal node verifies the signature of the encrypted executable code by using the public key of the server node, and acquires the encrypted executable code under the condition of passing the verification.
Further optionally, the encrypting the executable code according to a predetermined algorithm by the server node, and broadcasting the encrypted executable code to the blockchain system includes: the server node encrypts the executable code according to a predetermined algorithm by using a key; the server node encrypts the secret key and the encrypted executable code by using a public key of the terminal node to serve as broadcast information, and broadcasts the broadcast information to the block chain system; the terminal node receives the encrypted executable code, decrypts the encrypted executable code according to a predetermined algorithm, and obtains the executable code, including: the terminal node decrypts the received broadcast information by using a private key of the terminal node to obtain the private key and the encrypted executable code; and the terminal node decrypts the encrypted executable code according to a preset algorithm by using the secret key to obtain the executable code.
Further optionally, before the terminal node broadcasts the file access request to the blockchain system, the method further includes: and the terminal is registered in the block chain system and becomes a terminal node of the block chain system.
Optionally, in a case that the file to be accessed is not a free file, the file access application further includes a cost to be paid for accessing the file to be accessed.
A second aspect of the invention provides a blockchain system comprising a server node for:
receiving a file access application, wherein the file access application comprises an identifier of a file to be accessed and an identifier of a terminal sending the file access application;
judging whether the terminal has the authority of accessing the file to be accessed according to the identifier of the file to be accessed and the identifier of the terminal;
under the condition that the terminal has the authority of accessing the file to be accessed, generating an executable code according to the storage position of the file to be accessed in the block chain system;
encrypting the executable code according to a preset algorithm, and broadcasting the encrypted executable code to the blockchain system so as to enable the terminal to acquire and execute the executable code, wherein the executable code is used for acquiring the file to be accessed in the blockchain system.
A third aspect of the present invention provides an electronic apparatus comprising:
one or more processors;
a storage device having one or more programs stored thereon which, when executed by the one or more processors, cause the one or more processors to implement the above-described method;
one or more I/O interfaces connected between the processor and the memory and configured to enable information interaction between the processor and the memory.
A fourth aspect of the invention is a computer-readable medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method described above.
The invention has the following advantages:
according to the file access method, the block chain system, the electronic device and the computer readable medium, whether the terminal has the authority to access the file to be accessed or not is judged through the terminal identification, so that the terminal without the access authority can not acquire the file to be accessed, and the leakage of the file is reduced; the executable code is used for the terminal to obtain the file to be accessed, so that the leakage of the actual storage address of the file is avoided, and the leakage of the file is further reduced. Meanwhile, the whole process is based on the block chain system, the tamper-proof property of the block chain can be utilized, the file to be accessed is prevented from being revealed by a platform side, the participation of manpower can be reduced, the labor cost is reduced, and the waste of manpower resources is avoided.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention.
Fig. 1 is a schematic diagram illustrating a block chain system according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a file access method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a partial step of a file access method according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a partial step of a file access method according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a partial step of a file access method according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating a partial step of a file access method according to an embodiment of the present invention;
FIG. 7 is a block diagram of a block chain system according to an embodiment of the present invention;
fig. 8 is a schematic composition diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the invention refers to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present invention, are given by way of illustration and explanation only, not limitation.
As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
When the terms "comprises" and/or "comprising … …" are used in this specification, the presence of stated features, integers, steps, operations, elements, and/or components are specified, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
The embodiments of the invention may be described with reference to plan and/or cross-sectional views in idealized schematic representations of the invention. Accordingly, the example illustrations can be modified in accordance with manufacturing techniques and/or tolerances.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present invention and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
In a first aspect, embodiments of the present invention provide a file access method, which may be used to access a file, such as a test report, of a laboratory platform, and which is used in a blockchain system.
The block chain is a special distributed database, is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like, is essentially a decentralized database, can be written into and read from any information needing to be stored, can be erected by anyone and added into a block chain network to form a node, does not have a central node in the world of the block chain, and is equal to each node and stores the whole database. You can write/read data to any node because all nodes will be synchronized last, ensuring that the blockchain is consistent.
In a narrow sense, the blockchain is a distributed account book which is a chain data structure formed by combining data blocks in a sequential connection mode according to a time sequence and is guaranteed in a cryptographic mode and cannot be tampered and forged. Broadly speaking, the blockchain technique is a completely new distributed infrastructure and computing paradigm that utilizes blockchain data structures to verify and store data, utilizes distributed node consensus algorithms to generate and update data, cryptographically secure data transmission and access, and utilizes intelligent contracts composed of automated script code to program and manipulate data.
The block chain is a series of data blocks which are generated by using a cryptographic method in a correlation mode, and each data block contains information of one bitcoin network transaction for verifying the validity (anti-counterfeiting) of the information and generating a next block, so that the information of the block chain is not falsifiable and has high safety.
Fig. 1 is a block chain system according to an embodiment of the invention.
Referring to fig. 1, the blockchain system according to the embodiment of the present invention includes a server node, which is specifically a file archive server of a laboratory platform, where files (such as test reports) of the laboratory platform are stored on the file archive server.
Fig. 2 is a flowchart illustrating a file access method according to an embodiment of the present invention.
Referring to fig. 2, the file access method according to the embodiment of the present invention specifically includes:
s201, a server node receives a file access application, wherein the file access application comprises an identifier of a file to be accessed and an identifier of a terminal sending the file access application.
And the server node of the block chain system receives the file access application sent by the terminal.
The file access application sent by the terminal includes an identifier of a file to be accessed (i.e. a file that the terminal wants to access, such as a certain test report) and an identifier of the terminal (specifically, the identifier of the terminal is different from other terminals).
S202, the server node judges whether the terminal has the authority of accessing the file to be accessed according to the identifier of the file to be accessed and the identifier of the terminal.
The server node (i.e. the file archive server) of the blockchain system is preset with an access permission list, the access permission list records the identifier of a terminal which is permitted to access the file of the file archive server, and the server node judges whether the terminal is in the access permission list according to the identifier of the terminal which sends the file access application in the file access application, i.e. whether the terminal has the authority to access the file to be accessed.
S203, under the condition that the terminal has the authority of accessing the file to be accessed, the server node generates an executable code according to the storage position of the file to be accessed in the block chain system.
Under the condition that a terminal sending a file access application has the right of accessing a file to be accessed, a server node of the blockchain system generates an executable code according to the storage position of the file to be accessed in the blockchain system.
The executable code is a code executed by the terminal, and the executable code can be used for automatically accessing the storage position of the file to be accessed in the blockchain system, and finding the file to be accessed on the blockchain system, namely, the file to be accessed can be automatically obtained after the terminal executes the executable code.
S204, the server node encrypts the executable code according to a preset algorithm, and broadcasts the encrypted executable code to the blockchain system, so that the terminal can acquire and execute the executable code, and the executable code is used for acquiring the file to be accessed in the blockchain system.
After generating the executable code, the server node encrypts the executable code according to a predetermined algorithm (specifically, an algorithm agreed with the terminal), and broadcasts the encrypted executable code to the blockchain system.
The terminal can obtain the encrypted executable code through the blockchain system, decrypt the encrypted executable code by using a preset algorithm, namely the algorithm preset with the server node, obtain the executable code, and obtain the file to be accessed by executing the executable code.
Therefore, even if the illegal terminal acquires the broadcast information of the server node, the broadcast information cannot be decrypted to acquire the executable code, and even if the illegal terminal acquires the executable code, the file actual storage address cannot be acquired, so that the leakage of the file actual storage address is avoided.
According to the file access method, whether the terminal has the authority to access the file to be accessed or not is judged through the identifier of the terminal, the fact that the terminal without the access authority cannot acquire the file to be accessed is guaranteed, and leakage of the file is reduced; the executable code is used for the terminal to obtain the file to be accessed, so that the leakage of the actual storage address of the file is avoided, and the leakage of the file is further reduced. Meanwhile, the whole process is based on the block chain system, the tamper-proof property of the block chain can be utilized, the file to be accessed is prevented from being revealed by a platform side, the participation of manpower can be reduced, the labor cost is reduced, and the waste of manpower resources is avoided.
In some embodiments, referring to fig. 3, the server node generates executable code according to the storage location of the file to be accessed in the blockchain system (step S203), including:
s301, the server node generates an executable code according to the storage position of the file to be accessed in the block chain system and the identifier of the terminal.
Wherein the executable code is further configured to embed a watermark for the file to be accessed using the identification of the terminal.
And the server node of the blockchain system generates an executable code according to the storage position of the file to be accessed in the blockchain system and the identification of the terminal, and encrypts the executable code by using a predetermined algorithm.
And in the execution process of the executable code generated by the server node, automatically accessing the storage position of the file to be accessed in the block chain system, finding the file to be accessed on the block chain system, and embedding the watermark into the file to be accessed by using the identifier of the terminal.
The terminal acquires the encrypted executable code through the blockchain system, decrypts the encrypted executable code by using a preset algorithm to acquire the executable code, and acquires the file to be accessed embedded with the identifier of the terminal by executing the executable code.
The terminal can judge the terminal leaking the file by the watermark of the leaked file once the file leaks because the file to be accessed acquired by the terminal uses the file to be accessed with the embedded watermark by the mark of the embedded terminal.
In some embodiments, referring to fig. 1, the block chain system according to the embodiments of the present invention further includes a terminal node corresponding to the terminal, where the terminal node is a block chain node generated by registering the terminal in the block chain system.
Referring to fig. 4, before the server node receives the file access request, the method further includes:
s401, the terminal registers in the blockchain system to become a terminal node of the blockchain system.
For example, all users who wish to obtain files (such as test reports) of the archive server may register an account in a blockchain system where the archive server is located through a terminal to become a terminal node of the blockchain system, and after becoming the terminal node, broadcast their public keys and their blockchain identifiers to the blockchain system after using private key signatures in the blockchain, so that other nodes in the blockchain system obtain their blockchain identifiers of their public keys, and at the same time, they save their private keys.
S402, the terminal node broadcasts a file access application to the block chain system.
When a user wants to view a file of the archive server, namely, a file to be accessed, the user broadcasts a file access application to the block chain system through a terminal node corresponding to the terminal.
The file access application includes an identifier of a file to be accessed and an identifier of the terminal (specifically, the identifier may be a blockchain identifier of a terminal node corresponding to the terminal).
In the case where the file to be accessed is not a free file, the file access application further includes a Token (cost) to be paid for accessing the file.
After the server node broadcasts the encrypted executable code into the blockchain system (step S204), the method further includes:
s403, the terminal node receives the encrypted executable code, decrypts the encrypted executable code according to a preset algorithm, and obtains the executable code.
The server node of the blockchain system encrypts the generated executable code according to a preset algorithm, broadcasts the encrypted executable code to the blockchain system, the terminal receives information broadcast by the server node through the terminal node, obtains the encrypted executable code, decrypts the encrypted executable code by using the preset algorithm to obtain the executable code, and obtains the file to be accessed by executing the executable code.
In some embodiments, referring to fig. 5, the step of broadcasting the file access request to the blockchain system by the terminal node specifically includes:
s501, the terminal node signs the file access application by using a private key of the terminal node, and broadcasts the signed file access application to the block chain system.
That is to say, when the terminal node sends the file access application, the private key of the terminal node is used to sign the file access application, that is, the file access application broadcasted to the block link point by the terminal node is the signed file access application.
The server node receives a file access request, including:
s502, the server node verifies the signature of the received file access application by using the public key of the terminal node, and acquires the file access application under the condition that the verification is passed.
That is to say, after receiving the file access application sent by the terminal node, the server node of the blockchain system first verifies the signature of the received file access application by using the public key of the terminal node, and acquires the file access application if the verification is passed.
The server node broadcasts the encrypted executable code into the value blockchain system, which includes:
s503, the server node signs the encrypted executable code by using the private key of the server node, and broadcasts the signed and encrypted executable code to the block chain system.
After encrypting the executable code, the server node of the blockchain system signs the encrypted executable code by using a private key of the server node, and broadcasts the signed and encrypted executable code into the blockchain system.
That is, the information that the server node of the blockchain system broadcasts into the blockchain system is executable code that is signed using a private key of the server node and encrypted using a predetermined algorithm.
The terminal node receives the executable code after the terminal node receives the encryption, and the method comprises the following steps:
s504, the terminal node verifies the signature of the encrypted executable code by using the public key of the server node, and acquires the encrypted executable code under the condition that the verification is passed.
After receiving the information broadcast by the server node, the terminal node firstly verifies the signature of the received information by using the public key of the server node, and acquires the encrypted executable code under the condition that the verification is passed.
In some embodiments, referring to fig. 6, the server node encrypts the executable code according to a predetermined algorithm, and broadcasts the encrypted executable code into the value blockchain system (step S204), including:
s601, the server node encrypts the executable code according to a preset algorithm by using the key.
And under the condition that the server node of the blockchain system confirms that the terminal sending the file access application has the authority of accessing the file to be accessed, generating an executable code according to the storage position of the file to be accessed in the blockchain system and the identifier of the terminal, and encrypting the executable code by using a key according to a preset algorithm.
S602, the server node encrypts the key and the encrypted executable code by using the public key of the terminal node to serve as broadcast information, and broadcasts the broadcast information to the block chain system.
The server node encrypts the secret key and the encrypted executable code by using a public key of the terminal node, signs by using a private key of the server node, and broadcasts the signature and the encrypted executable code as broadcast information to the blockchain system.
The terminal node receives the encrypted executable code, decrypts the encrypted executable code according to a predetermined algorithm, and acquires the executable code, including:
s603, the terminal node decrypts the received broadcast information by using the private key of the terminal node, and obtains the private key and the encrypted executable code.
And after receiving the broadcast information, the terminal node verifies the signature of the broadcast information by using the public key of the server node, and decrypts the broadcast information by using the private key of the terminal node under the condition that the signature passes the verification, so as to obtain a secret key and an executable code encrypted by using the secret key according to a preset algorithm.
S604, the terminal node decrypts the encrypted executable code according to a preset algorithm by using the key to obtain the executable code.
After the terminal node acquires the key and the executable code encrypted by the key according to the preset algorithm, the encrypted executable code is decrypted by the acquired key according to the preset algorithm to acquire the executable code, and the file to be accessed, in which the identifier of the terminal is embedded as the watermark, is acquired by executing the executable code. .
The key is used for encrypting the executable code, so that the safety of information transmission is enhanced, other terminals are prevented from acquiring the executable code, and the leakage of the file to be accessed is further avoided.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
In a second aspect, referring to fig. 7, an embodiment of the present invention provides a blockchain system, where the blockchain system includes a server node configured to:
receiving a file access application, wherein the file access application comprises an identifier of a file to be accessed and an identifier of a terminal sending the file access application;
judging whether the terminal has the authority of accessing the file to be accessed according to the identifier of the file to be accessed and the identifier of the terminal;
under the condition that the terminal has the authority of accessing the file to be accessed, generating an executable code according to the storage position of the file to be accessed in the block chain system;
and encrypting the executable code according to a preset algorithm, broadcasting the encrypted executable code to the blockchain system so as to enable the terminal to acquire and execute the executable code, wherein the executable code is used for acquiring the file to be accessed in the blockchain system.
It is to be understood that the invention is not limited to the particular arrangements and instrumentality described in the above embodiments and shown in the drawings. For convenience and brevity of description, detailed description of a known method is omitted here, and for the specific working processes of the system, the module and the unit described above, reference may be made to corresponding processes in the foregoing method embodiments, which are not described herein again.
Referring to fig. 8, an embodiment of the present invention provides an electronic device, including:
one or more processors 801;
a memory 802 on which one or more programs are stored, the one or more programs, when executed by the one or more processors, causing the one or more processors to implement the file access method of any of the above;
one or more I/O interfaces 803, coupled between the processor and the memory, are configured to enable information interaction between the processor and the memory.
The processor 801 is a device with data processing capability, and includes, but is not limited to, a Central Processing Unit (CPU), and the like; memory 802 is a device having data storage capabilities including, but not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), FLASH memory (FLASH); an I/O interface (read/write interface) 803 is connected between the processor 801 and the memory 802, and can realize information interaction between the processor 801 and the memory 802, which includes but is not limited to a data Bus (Bus) and the like.
In some embodiments, the processor 801, memory 802, and I/O interface 803 are interconnected via a bus, which in turn connects with other components of the computing device.
The present embodiment further provides a computer readable medium, where a computer program is stored, and when the computer program is executed by a processor, the file access method provided in this embodiment is implemented, and in order to avoid repeated descriptions, specific steps of the file access method are not described herein again.
It will be understood by those of ordinary skill in the art that all or some of the steps of the above inventive method, systems, functional modules/units in the apparatus may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Those skilled in the art will appreciate that although some embodiments described herein include some features included in other embodiments instead of others, combinations of features of different embodiments are meant to be within the scope of the embodiments and form different embodiments.
It will be understood that the above embodiments are merely exemplary embodiments taken to illustrate the principles of the present invention, which is not limited thereto. It will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the spirit and substance of the invention, and these modifications and improvements are also considered to be within the scope of the invention.

Claims (10)

1. A method of file access for use in a blockchain system, the blockchain including a server node, the method comprising:
the server node receives a file access application, wherein the file access application comprises an identifier of a file to be accessed and an identifier of a terminal sending the file access application;
the server node judges whether the terminal has the authority to access the file to be accessed according to the identifier of the file to be accessed and the identifier of the terminal;
under the condition that the terminal has the authority of accessing the file to be accessed, the server node generates an executable code according to the storage position of the file to be accessed in the blockchain system;
and the server node encrypts the executable code according to a preset algorithm, and broadcasts the encrypted executable code to the blockchain system so as to enable the terminal to acquire and execute the executable code, wherein the executable code is used for acquiring the file to be accessed in the blockchain system.
2. The method according to claim 1, wherein the server node generates executable code according to the storage location of the file to be accessed in the blockchain system, and comprises:
the server node generates an executable code according to the storage position of the file to be accessed in the blockchain system and the identifier of the terminal; the executable code is further configured to embed a watermark for the file to be accessed using the identification of the terminal.
3. The method of claim 1, wherein the blockchain system further comprises a terminal node corresponding to the terminal;
before the server node receives the file access application, the method further comprises the following steps:
the terminal node broadcasts the file access application to the blockchain system;
after the server node broadcasts the encrypted executable code values into the blockchain system, the method further comprises the following steps:
and the terminal node receives the encrypted executable code, decrypts the encrypted executable code according to a preset algorithm and acquires the executable code.
4. The method of claim 3,
the terminal node broadcasting the file access application to the blockchain system includes:
the terminal node signs the file access application by using a private key of the terminal node and broadcasts the signed file access application to the block chain system;
the server node receives a file access application, and the file access application comprises the following steps:
the server node verifies the signature of the received file access application by using the public key of the terminal node, and acquires the file access application under the condition that the verification is passed;
the server node broadcasts the encrypted executable code into the blockchain system, and the method comprises the following steps:
the server node signs the encrypted executable code by using a private key of the server node and broadcasts the signed and encrypted executable code to a block chain system;
the terminal node receiving the encrypted executable code received by the terminal node, including:
and the terminal node verifies the signature of the encrypted executable code by using the public key of the server node, and acquires the encrypted executable code under the condition of passing the verification.
5. The method of claim 3,
the server node encrypts the executable code according to a predetermined algorithm, and broadcasts the encrypted executable code into the blockchain system, including:
the server node encrypts the executable code according to a predetermined algorithm by using a key;
the server node encrypts the secret key and the encrypted executable code by using a public key of the terminal node to serve as broadcast information, and broadcasts the broadcast information to the block chain system;
the terminal node receives the encrypted executable code, decrypts the encrypted executable code according to a predetermined algorithm, and obtains the executable code, including:
the terminal node decrypts the received broadcast information by using a private key of the terminal node to obtain the private key and the encrypted executable code;
and the terminal node decrypts the encrypted executable code according to a preset algorithm by using the secret key to obtain the executable code.
6. The method of claim 3, further comprising, before the end node broadcasts the file access request to the blockchain system:
and the terminal is registered in the block chain system and becomes a terminal node of the block chain system.
7. The method of claim 1, wherein in the case that the file to be accessed is not a free file, the file access application further comprises a cost to be paid for accessing the file to be accessed.
8. A blockchain system, the blockchain system comprising a server node configured to:
receiving a file access application, wherein the file access application comprises an identifier of a file to be accessed and an identifier of a terminal sending the file access application;
judging whether the terminal has the authority of accessing the file to be accessed according to the identifier of the file to be accessed and the identifier of the terminal;
under the condition that the terminal has the authority of accessing the file to be accessed, generating an executable code according to the storage position of the file to be accessed in the block chain system;
encrypting the executable code according to a preset algorithm, and broadcasting the encrypted executable code to the blockchain system so as to enable the terminal to acquire and execute the executable code, wherein the executable code is used for acquiring the file to be accessed in the blockchain system.
9. An electronic device, comprising:
one or more processors;
storage means on which is stored one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7;
one or more I/O interfaces connected between the processor and the memory and configured to enable information interaction between the processor and the memory.
10. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202111423110.5A 2021-11-26 2021-11-26 File access method, block chain system, electronic device and computer readable medium Pending CN114090511A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111423110.5A CN114090511A (en) 2021-11-26 2021-11-26 File access method, block chain system, electronic device and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111423110.5A CN114090511A (en) 2021-11-26 2021-11-26 File access method, block chain system, electronic device and computer readable medium

Publications (1)

Publication Number Publication Date
CN114090511A true CN114090511A (en) 2022-02-25

Family

ID=80305015

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111423110.5A Pending CN114090511A (en) 2021-11-26 2021-11-26 File access method, block chain system, electronic device and computer readable medium

Country Status (1)

Country Link
CN (1) CN114090511A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114679264A (en) * 2022-03-16 2022-06-28 亚信科技(成都)有限公司 Password generation method, device and storage medium
CN115396209A (en) * 2022-08-26 2022-11-25 中国联合网络通信集团有限公司 Access authorization method and device, electronic equipment and readable storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114679264A (en) * 2022-03-16 2022-06-28 亚信科技(成都)有限公司 Password generation method, device and storage medium
CN114679264B (en) * 2022-03-16 2023-12-08 亚信科技(成都)有限公司 Password generation method, device and storage medium
CN115396209A (en) * 2022-08-26 2022-11-25 中国联合网络通信集团有限公司 Access authorization method and device, electronic equipment and readable storage medium
CN115396209B (en) * 2022-08-26 2024-03-08 中国联合网络通信集团有限公司 Access authorization method, device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN109067801B (en) Identity authentication method, identity authentication device and computer readable medium
CN108111314B (en) Method and equipment for generating and verifying digital certificate
CN107566116B (en) Method and apparatus for digital asset weight registration
US7290138B2 (en) Credentials and digitally signed objects
CN113012008B (en) Identity management method, device and equipment based on trusted hardware
CN107742212B (en) Asset verification method, device and system based on block chain
US6622247B1 (en) Method for certifying the authenticity of digital objects by an authentication authority and for certifying their compliance by a testing authority
CN109635572B (en) Contract signing method and device based on block chain and terminal equipment
CN110785783A (en) Method and apparatus for testing signature verification for blockchain systems
EP0979455A1 (en) Computationally efficient method for trusted and dynamic digital objects dissemination
CN112016106B (en) Authentication calling method, device and equipment of open interface and readable storage medium
CN112801663B (en) Blockchain certification method, device, system, equipment and medium
CN114090511A (en) File access method, block chain system, electronic device and computer readable medium
CN111314172B (en) Block chain-based data processing method, device, equipment and storage medium
CN109242404B (en) Resume information management method, resume information management device, computer equipment and readable storage medium
CN109861996B (en) Block chain-based relationship proving method, device, equipment and storage medium
CN106549919B (en) Information registration and authentication method and device
CN110826091B (en) File signature method and device, electronic equipment and readable storage medium
WO2016165215A1 (en) Method and apparatus for loading code signing on applications
CN116433425A (en) Case setting method based on alliance chain and related equipment
US8799675B2 (en) System and method for electronic certification and authentication of data
CN114218583A (en) File access method, block chain system, electronic device and computer readable medium
CN114358764A (en) Privacy calculation method based on intelligent contracts in block chain and related equipment
CN111080300A (en) Asset transfer method and device based on block chain and hardware equipment
CN112948894A (en) Block chain-based anti-counterfeiting method, device, equipment and medium for tally inspection report

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