Data access method and device, equipment and storage medium
By interacting between the access terminal and the blockchain for signature verification and storage location information exchange, the problem of low data access security in the existing technology is solved, achieving safe access to data and preventing leakage and theft.
Patent Information
- Application Number
- CN202311590672.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-27
- Publication Date
- 2024-10-18
AI Technical Summary
Existing data security management and control solutions have the risk of permission hijacking during user access, resulting in low data access security and inability to effectively prevent data leakage and theft.
By interacting between the access terminal and the blockchain, user identification and data files are signed, and the blockchain verifies the signature data to determine the validity of the access behavior and achieves secure access to the target data based on the storage location information.
It improves the security of data access, prevents data leakage and theft caused by permission hijacking, and ensures the security and integrity of data during the access process.
Smart Images

Figure CN118797736A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication technology, and in particular, relates to a data access method, device, equipment and storage medium. Background Art
[0002] In the context of the transition from the information technology era to the data technology era, data, due to its own unique value, has the risk of "internal leakage and external theft", and is in a high-risk state of easy leakage and abuse, and data security protection faces severe challenges. At present, data security management is to assign access rights to users when users register, and assign access levels to data when data is generated. When the user's access rights meet the access level requirements of the data, the data can be accessed, otherwise the data cannot be accessed. However, in this solution where data can be accessed at will as long as the permissions are met, if the user who meets the permissions is hijacked during the access process, the data will be stolen, resulting in low data access security. Summary of the invention
[0003] The embodiments of the present application provide a data access method, apparatus, device and storage medium, which can realize secure access to data.
[0004] In a first aspect, an embodiment of the present application provides a data access method, which is applied to an access terminal, and the method includes:
[0005] Obtaining a user ID of a target user and a data file of target data, where the target data is data to be accessed by the target user;
[0006] Performing signature processing on the user identification and the data file to obtain signature data;
[0007] Sending the signature data to the blockchain so that the blockchain verifies the signature data and obtains a verification result, wherein the verification result is used to indicate whether the target user's access behavior is valid; if the verification result indicates that the target user's access behavior is valid, determining the storage location information of the target data according to the signature data; and sending the storage location information to the access terminal;
[0008] Receive the storage location information sent by the blockchain, and access the target data according to the storage location information.
[0009] In a second aspect, an embodiment of the present application provides a data access method, which is applied to a blockchain, and the method includes:
[0010] Receiving signature data sent by an access terminal, wherein the signature data is data obtained by the access terminal performing signature processing on a user identification and a data file, and the target data is data to be accessed by the target user;
[0011] Verifying the signature data to obtain a verification result, wherein the verification result is used to indicate whether the access behavior of the target user is valid;
[0012] When the verification result indicates that the access behavior of the target user is valid, determining the storage location information of the target data according to the signature data;
[0013] The storage location information is sent to the access terminal, so that the access terminal accesses the target data according to the storage location information.
[0014] In a third aspect, an embodiment of the present application provides a data access device, which is applied to an access terminal, and the device includes:
[0015] A first acquisition module is used to acquire a user ID of a target user and a data file of target data, where the target data is data to be accessed by the target user;
[0016] A signature module, used to perform signature processing on the user identification and the data file to obtain signature data;
[0017] A first sending module is used to send the signature data to the blockchain so that the blockchain verifies the signature data to obtain a verification result, wherein the verification result is used to indicate whether the access behavior of the target user is valid; if the verification result indicates that the access behavior of the target user is valid, determine the storage location information of the target data according to the signature data; and send the storage location information to the access terminal;
[0018] An access module is used to receive the storage location information sent by the blockchain and access the target data according to the storage location information.
[0019] In a fourth aspect, an embodiment of the present application provides a data access device, which is applied to a blockchain, and the device includes:
[0020] A receiving module, used to receive signature data sent by an access terminal, wherein the signature data is data obtained by the access terminal performing signature processing on a user identification and a data file, and the target data is data to be accessed by the target user;
[0021] A verification module, used to verify the signature data to obtain a verification result, wherein the verification result is used to indicate whether the access behavior of the target user is valid;
[0022] A first determination module, configured to determine storage location information of the target data according to the signature data when the verification result indicates that the access behavior of the target user is valid;
[0023] The second sending module is used to send the storage location information to the access terminal, so that the access terminal accesses the target data according to the storage location information.
[0024] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the data access method as described in any one of the above is implemented.
[0025] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the data access method as described in any one of the above is implemented.
[0026] The data access method, device, equipment and storage medium of the embodiment of the present application can sign the user identification of the target user and the data file of the target data through the access terminal to obtain the signature data; the blockchain then verifies the signature data sent by the access terminal to obtain the verification result; the blockchain sends the storage location information of the target data to the access terminal only when the verification result indicates that the access behavior is valid; the access terminal accesses the target data based on the storage location information. In this way, the embodiment of the present application verifies the signature data through the interaction between the access terminal and the blockchain to determine the validity of the access behavior, and accesses the target data according to the storage location information of the target data, thereby achieving secure access to the data. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0028] Figure 1 It is a flowchart of a data access system provided by an embodiment of the present application;
[0029] Figure 2 It is a flowchart of a data access method provided in an embodiment of the present application;
[0030] Figure 3 It is a schematic diagram of the structure of the blockchain provided in the embodiment of the present application;
[0031] Figure 4 is a structural diagram of a data access device provided in an embodiment of the present application;
[0032] Figure 5is a structural diagram of another data access device provided in an embodiment of the present application;
[0033] Figure 6 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0035] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0036] In the context of the transition from the information technology era to the data technology era, data, due to its own unique value, has the risk of "internal leakage and external theft", and is in a high-risk state of easy leakage and abuse, and data security protection faces severe challenges. At present, data security management is to assign access rights to users when users register, and assign access levels to data when data is generated. When the user's access rights meet the access level requirements of the data, the data can be accessed, otherwise the data cannot be accessed. However, in this solution where data can be accessed at will as long as the permissions are met, if the user who meets the permissions is hijacked during the access process, the data will be stolen, resulting in low data access security.
[0037] In order to solve the problems of the prior art, the embodiments of the present application provide a data access method, device, equipment and storage medium. The following first introduces a data access system to which the data access method provided by the embodiments of the present application is applicable.
[0038] Figure 1 FIG. 1 shows an architecture diagram of a data access system applicable to an embodiment of the present application. Figure 1 As shown, the data access system 100 may include: an access terminal 101 and a blockchain 102.
[0039] The access terminal 101 may refer to a device used by a user to operate a computer system for access, such as a personal computer, a mobile phone, and a tablet. The access terminal usually runs a user operating system, and the user can access and use resources on the server, such as files, applications, etc., through the access terminal. The access terminal is generally distributed at the edge of the network and is used to receive and send data.
[0040] The blockchain 102 is a distributed ledger technology that records and verifies transactions in a decentralized manner, achieving secure, transparent and tamper-proof data storage. Its core concept is to link transaction records together in chronological order to form a growing chain of data blocks. The main function of the blockchain is to provide a decentralized trust mechanism that allows participants to trade and cooperate without intermediaries. By using cryptographic technology, the blockchain ensures the security and privacy of transactions, while ensuring data consistency through a consensus algorithm.
[0041] Blockchain 102 may specifically include a management block and multiple data source blocks. The management block is connected to the data source block. The management block is mainly responsible for task management, while the data source block is mainly responsible for storage management of the data source. That is to say, the management block and multiple data source blocks are located on the same chain, but the functions of each block are different.
[0042] The access terminal 101 is connected to the blockchain 102. Specifically, the communication can be carried out using Ethernet or wireless network connection. Of course, the communication method is not limited to this, and can also be other network connection communication methods, which are not specifically limited here.
[0043] The data access method provided in the embodiment of the present application is introduced below.
[0044] Figure 2 The flowchart of the data access method provided by an embodiment of the present application is shown. Optionally, the method of the embodiment of the present application can be applied to the above Figure 1 The access terminal 101 and the blockchain 102 are shown. Figure 2 As shown, a data access method may include the following steps S201 to S208:
[0045] S201, the access terminal obtains the user ID of the target user and the data file of the target data, where the target data is the data to be accessed by the target user;
[0046] S202, the access terminal performs signature processing on the user identification and the data file to obtain signature data;
[0047] S203, the access terminal sends the signature data to the blockchain;
[0048] S204, the blockchain receives the signature data sent by the access terminal;
[0049] S205. The blockchain verifies the signature data to obtain a verification result, which is used to indicate whether the target user's access behavior is valid;
[0050] S206. When the verification result indicates that the target user's access behavior is valid, the blockchain determines the storage location information of the target data according to the signature data;
[0051] S207, the blockchain sends the storage location information to the access terminal;
[0052] S208. The access terminal receives the storage location information sent by the blockchain, and accesses the target data according to the storage location information.
[0053] The data access method of the embodiment of the present application can sign the user identification of the target user and the data file of the target data through the access terminal to obtain the signature data; the blockchain then verifies the signature data sent by the access terminal to obtain the verification result; the blockchain sends the storage location information of the target data to the access terminal only when the verification result indicates that the access behavior is valid; the access terminal accesses the target data based on the storage location information. In this way, the embodiment of the present application verifies the signature data through the interaction between the access terminal and the blockchain to determine the validity of the access behavior, and accesses the target data according to the storage location information of the target data, thereby achieving secure access to the data.
[0054] In S201, the target user is a user who accesses data through an access terminal. The user identifier of the target user may be, for example, a user name of the target user when registering.
[0055] The target data is the data to be accessed by the target user. The data file of the target data may be a data file composed of information for searching and finding the target data, and may include a target data identifier and a target data structure. The target data identifier may be a data identifier of the target data. The target data structure may be a data structure of the target data.
[0056] In S202, the user identification and data file are signed to obtain signature data. For example, the first key, the first hash value and the second hash value are obtained, the first key is the key assigned when the target user is registered, the first hash value is the hash value of the user identification, and the second hash value is the hash value of the Internet Protocol address of the access terminal; the calculation result is calculated according to the data file, the first key, the first hash value and the second hash value; the signature data may include the calculation result, the first hash value and the data file. Alternatively, the first key, the second key, the first hash value, the second hash value and the third hash value may be obtained, the first key is the key assigned when the target user is registered, the second key is a randomly generated key, the first hash value is the hash value of the user identification, the second hash value is the hash value of the Internet Protocol address of the access terminal, and the third hash value is the hash value of the Internet Protocol address of the blockchain; the data file is encrypted according to the second hash value, the third hash value and the second key to obtain the encrypted data file of the target data; the calculation result is calculated according to the encrypted data file, the first key, the first hash value and the second hash value; the signature data may include the calculation result, the first hash value, the encrypted data file and the second key.
[0057] In S203, the access terminal sends the signature data to the blockchain. For example, the access terminal may send the signature data to the management block of the blockchain via wireless communication. Of course, the communication method between the access terminal and the blockchain in this application is not limited to wireless communication, but may also be other communication methods, which are not specifically limited here.
[0058] In S204, the blockchain receives the signature data sent by the access terminal. Exemplarily, the management block of the blockchain receives the signature data sent by the access terminal. The signature data may include a calculation result, a first hash value, an encrypted data file, and a second key.
[0059] In S205, the above verification result can be used to indicate whether the access behavior of the target user is valid.
[0060] The above-mentioned blockchain verifies the signature data to obtain a verification result. Exemplarily, the blockchain management module may obtain a second hash value, where the second hash value is a hash value of the Internet Protocol address of the access terminal; obtain a first key of the target user according to the first hash value; calculate a first numerical value according to the calculation result and the encrypted data file; calculate a second numerical value according to the first hash value, the encrypted data file, the first key, and the second hash value; verify whether the first numerical value is equal to the second numerical value to obtain a verification result, wherein the verification result is used to indicate that the access behavior of the target user is valid when the first numerical value is equal to the second numerical value; and indicate that the access behavior of the target user is invalid when the first numerical value is not equal to the second numerical value.
[0061] In S206, the storage location information may be information about the location where the data is stored in other storage devices; or information about the location where the data is stored in the blockchain. The storage location information may be the address of the storage location of the target data. In actual applications, data services have the characteristics of complex data sources and huge amounts of data. If all data are stored on the blockchain, it will bring great pressure to the storage of the blockchain. Therefore, in some embodiments, the storage location of the data is stored on the blockchain, which not only ensures the effective storage of the data, but also ensures the efficient processing performance of the blockchain.
[0062] The above-mentioned method of determining the storage location information of the target data based on the signature data may, exemplarily, be that the blockchain management module obtains a third hash value, where the third hash value is a hash value of the Internet Protocol address of the blockchain; decrypts the encrypted data file based on the third hash value, the second hash value, and the second key to obtain a data file of the target data, where the data file includes a target data identifier and a target data structure; in the blockchain, determining the storage location information corresponding to the target data identifier and the target data structure, where the blockchain includes storage location information of multiple data, and different data corresponds to different data structures and different data identifiers.
[0063] In S207, the above-mentioned blockchain sends the storage location information to the access terminal. Exemplarily, the management block of the blockchain may send the storage location information to the access terminal via wireless communication.
[0064] In S208, the access terminal receives the storage location information sent by the blockchain, and accesses the target data according to the storage location information. For example, the access terminal may receive the storage location information sent by the blockchain through wireless communication, and access the target data in other storage devices according to the storage location address in the storage location information. Alternatively, the access terminal receives the encrypted storage location information sent by the blockchain, the encrypted storage location information is the information obtained by the blockchain after encrypting the storage location information; decrypts the encrypted storage location information to obtain the storage location information; and accesses the target data according to the storage location information.
[0065] In some embodiments, the above S202 may specifically include:
[0066] Obtain a first key, a second key, a first hash value, a second hash value, and a third hash value, wherein the first key is a key assigned when the target user registers, the second key is a randomly generated key, the first hash value is a hash value of the user identifier, the second hash value is a hash value of the Internet Protocol address of the access terminal, and the third hash value is a hash value of the Internet Protocol address of the blockchain;
[0067] Encrypt the data file according to the second hash value, the third hash value, and the second key to obtain an encrypted data file of the target data;
[0068] Calculate a calculation result according to the encrypted data file, the first key, the first hash value, and the second hash value;
[0069] The signature data includes the calculation result, the first hash value, the encrypted data file, and the second key.
[0070] The above-mentioned encrypting the data file according to the second hash value, the third hash value, and the second key to obtain an encrypted data file of the target data. Exemplarily, the value of H2⊕H3<<K2 can be used as the key to encrypt the data file D to obtain an encrypted data file D', where H2 is the second hash value, H3 is the third hash value, K2 is the second key, ⊕ is the exclusive OR operator, and << is the left shift operator.
[0071] The above-mentioned calculating the calculation result according to the encrypted data file, the first key, the first hash value, and the second hash value. Exemplarily, it can be x = D’ - K1H1 H2 , where K1 is the first key, H1 is the first hash value, and x is the calculation result.
[0072] In this embodiment, the data file is encrypted according to the second hash value, the third hash value, and the second key to obtain an encrypted data file of the target data, and a calculation result is calculated according to the encrypted data file, the first key, the first hash value, and the second hash value. The signature data includes the calculation result, the first hash value, the encrypted data file, and the second key, further improving the effectiveness of the target user's access behavior.
[0073] In some embodiments, the above-mentioned signature data may include the calculation result, the first hash value, and the encrypted data file;
[0074] The above S205 may specifically include:
[0075] Obtain a second hash value, which is the hash value of the Internet protocol address of the access terminal;
[0076] Obtain the first key of the target user according to the first hash value;
[0077] Calculate a first value according to the calculation result and the encrypted data file;
[0078] Calculate a second value according to the first hash value, the encrypted data file, the first key, and the second hash value;
[0079] Verify whether the first value is equal to the second value to obtain a verification result, wherein the verification result is used to indicate that the target user's access behavior is valid when the first value is equal to the second value; and to indicate that the target user's access behavior is invalid when the first value is not equal to the second value.
[0080] According to the calculation result and the encrypted data file, the first value is calculated. For example, the first value = x D’ , D' is the encrypted data file, and x is the calculation result.
[0081] The second value is calculated based on the first hash value, the encrypted data file, the first key, and the second hash value. For example, it can be H1*exp(D'-K1H1 H2 ), H1 is the first hash value, D' is the encrypted data file, K1 is the first key, and H2 is the second hash value.
[0082] In this embodiment, a first value is calculated by calculating the result and the encrypted data file, and a second value is calculated by using the first hash value, the encrypted data file, the first key, and the second hash value. By verifying whether the first value is equal to the second value, it can be further determined whether the target user's access behavior is valid.
[0083] In some embodiments, the signature data may further include a second key; S206 may specifically include:
[0084] Obtaining a third hash value, where the third hash value is a hash value of an Internet Protocol address of the blockchain;
[0085] Decrypting the encrypted data file according to the third Hash value, the second Hash value and the second key to obtain a data file of the target data, the data file including a target data identifier and a target data structure;
[0086] In the blockchain, storage location information corresponding to the target data identifier and the target data structure is determined. The blockchain includes storage location information of multiple data, and different data corresponds to different data structures and different data identifiers.
[0087] The above-mentioned process of decrypting the encrypted data file according to the third hash value, the second hash value and the second key to obtain the data file of the target data is the reverse process of encrypting the data file according to the second hash value, the third hash value and the second key to obtain the encrypted data file of the target data. The encryption process has been described in detail, and you can refer to the above content, so it will not be repeated here.
[0088] The above-mentioned blockchain includes storage location information of multiple data, and different data corresponds to different data structures and different data identifiers.
[0089] In this embodiment, the encrypted data file is decrypted by the third hash value, the second hash value and the second key to obtain a data file of the target data. The data file includes a target data identifier and a target data structure, which can ensure the security of the data file. Therefore, in the blockchain, the storage location information corresponding to the target data identifier and the target data structure can be accurately found to prevent the information from being tampered with.
[0090] In some embodiments, the blockchain may include a management block and multiple data source blocks, the data source block includes multiple data nodes, different data nodes correspond to different data structures, the data nodes include multiple storage nodes, and the storage nodes include storage location information and data identifiers;
[0091] In the above-mentioned blockchain, determining the storage location information corresponding to the target data identifier and the target data structure may specifically include:
[0092] The management block searches among the multiple data source blocks and determines the data source block with the target data identifier as the target data source block;
[0093] Determine a target data node among multiple data nodes of a target data source block, wherein a data structure of the target data node is the same as a target data structure;
[0094] Determine a target storage node among multiple storage nodes of the target data node, wherein the data identifier in the target storage node is the same as the target data identifier;
[0095] The storage location information in the target storage node is determined as the storage location information of the target data.
[0096] The above-mentioned management block is mainly responsible for task management. On the one hand, it interacts with other systems that access the blockchain to obtain access behaviors. On the other hand, it determines the data storage nodes and data reading based on the access behaviors.
[0097] Each of the above data source blocks corresponds to a data source, that is, there are as many data source blocks on the blockchain as there are data sources. All nodes connected to the data source block are data produced by the corresponding data source.
[0098] For the above data nodes, each data source will store multiple data, and each storage location corresponds to a data node. The data node is connected to a storage node chain, and each storage node corresponds to a storage location.
[0099] The storage node stores the address of the storage location and the data identifier.
[0100] In this embodiment, since the blockchain includes a management block and multiple data source blocks, the data source blocks include multiple data nodes, different data nodes correspond to different data structures, the data nodes include multiple storage nodes, the storage nodes include storage location information and data identifiers, and then through the target data identifier and the target data structure, the storage location information can be accurately and efficiently found.
[0101] In some embodiments, the above S207 may specifically include:
[0102] The blockchain encrypts the storage location information to obtain encrypted storage location information;
[0103] The blockchain sends the encrypted storage location information to the access terminal.
[0104] The above S208 may specifically include:
[0105] The access terminal receives the encrypted storage location information sent by the blockchain;
[0106] The access terminal decrypts the encrypted storage location information to obtain the storage location information;
[0107] The access terminal accesses the target data according to the storage location information.
[0108] The above encryption processing of the storage location information to obtain the encrypted storage location information is the same as the above process of encrypting the data file. Exemplarily, the value of H2⊕H3<<K2 can be used as the key to encrypt the address A of the storage location to obtain the encrypted storage location information A', and feedback it to the access terminal.
[0109] The above decryption of the encrypted storage location information to obtain the storage location information is the same as the decryption process of the encrypted data file, and the description of the above part can be referred to, and will not be repeated here.
[0110] In some embodiments, after the blockchain obtains the encrypted storage location information A', it can also calculate y = A' - K1H1 H2 , and package y, H1, D', and K2 together into signature data and feedback it to the access terminal.
[0111] The access terminal can also verify the signature data packaged by y, H1, D', and K2 together by the above method of verifying the signature data, and after successful verification, decrypt it to obtain the storage location information.
[0112] In this embodiment, by encrypting the storage location information through the blockchain to obtain the encrypted storage location information and decrypting the encrypted storage location information by the access terminal, the security of the storage location information during transmission can be guaranteed.
[0113] As an implementation of the present application, in order to further ensure secure access to data, before the above S202, the following may also be included:
[0114] Obtain the user level of the target user and the security level of the target data;
[0115] Determine whether the target user has access rights to the target data based on the user level and security rating;
[0116] The above S202 may specifically include:
[0117] When the target user has the access authority to access the target data, the user identification and the data file are signed to obtain signature data.
[0118] The above user levels are determined when the user registers based on the user's position, such as a salesperson's user level is low and a general manager's business level is high.
[0119] The above security levels are set by the administrator when the data is generated. For example, the security level of business data is medium, and the security level of sensitive data is high.
[0120] The above-mentioned determination of whether the target user has the access right to access the target data based on the user level and the security level may be, for example, that the target user has the access right to access the target data when the user level of the target user is not lower than the security level.
[0121] In this embodiment, by comparing the user level of the target user and the security level of the target data, it is determined whether the target user has the access rights to access the target data. Only when the target user has the access rights to access the target data, the user identification and data file are signed to obtain the signature data, thereby further ensuring secure access to the data.
[0122] In order to facilitate the understanding of the data access method in the embodiment of the present application, the actual application process of this data access method is described as follows:
[0123] The embodiment of the present application provides a data access method. On the one hand, the method relies on the tamper-proof characteristics of the blockchain to store data from various data sources to ensure data storage security. On the other hand, it relies on the self-developed access behavior signature technology to perform security control on access behavior to ensure data access security. Through joint control of the two aspects, data security access is achieved.
[0124] The data access method of the embodiment of the present application includes two parts, one part is data storage based on blockchain, and the other part is data access based on self-developed access behavior signatures. They are introduced below.
[0125] 1. Data storage
[0126] This part adopts blockchain for data storage. However, in actual application, data services have the characteristics of complex data sources and huge data volume. If all data are stored on the blockchain, it will bring great pressure to the storage of the blockchain. Therefore, the embodiment of the present application does not directly store the data on the blockchain, but stores the storage location of the data on the blockchain, which not only ensures the effective storage of data, but also ensures the efficient processing performance of the blockchain.
[0127] The blockchain constructed in this section is as follows Figure 3 As shown:
[0128] The blockchain includes a management block and multiple data source blocks.
[0129] The management block is connected to the data source block. The management block is mainly responsible for task management, while the data source block is mainly responsible for storage management of the data source. In other words, the management block and multiple data source blocks are located on the same chain, but the functions of each block are different.
[0130] 1. Management Block
[0131] The management block is mainly responsible for task management. On the one hand, it interacts with other systems of the blockchain to be accessed to obtain access behavior; on the other hand, it determines the data storage node and data reading based on the access behavior.
[0132] The management block is used to obtain data access behavior, determine the corresponding storage node based on the data access behavior, and read the storage location on the storage node.
[0133] In addition, a behavior verification smart contract is also run in the management block to verify the acquired data access behavior to ensure the security of data access behavior.
[0134] The management block also runs a data encryption smart contract to encrypt the storage location stored in the storage node and transmit the encrypted data, ensuring the security of data transmission.
[0135] In addition, the management block and all data source blocks each maintain a ledger, which records the correspondence between each data source block and the data source, as well as the number of data nodes in each data source area.
[0136] The ledger contents recorded in the management block and all data source blocks should be the same. If they are different, it means that there is a security risk in the blockchain and all access behaviors are prohibited. By maintaining the same data ledger in the management block and all data source blocks, the tamper-proof and security of the blockchain is guaranteed.
[0137] 2. Data source block
[0138] Each data source block corresponds to a data source, that is, there are as many data source blocks on the blockchain as there are data sources. All nodes connected to the data source block are data produced by the corresponding data source.
[0139] Each data source block will be connected to a data chain, which consists of a head node and multiple data nodes.
[0140] 1) Head node
[0141] One end of the head node is connected to the data source block, and the other end is connected to the data node.
[0142] The head node stores the correspondence between data nodes and data structures.
[0143] The head node also runs a data structure comparison smart contract to compare whether the data structure to be accessed by the access behavior matches the data structure corresponding to the data node. If it does not match, the accessed data is not the data of the data source. If it matches, the corresponding data can be further found.
[0144] 2) Data Node
[0145] Each data source stores multiple data, and each storage location corresponds to a data node. The data structure stored in each storage location is recorded in the head node, and the corresponding relationship between the data structure and the data node is recorded.
[0146] Data nodes are connected to a chain of storage nodes, and each storage node corresponds to a storage location.
[0147] The storage node stores the address of the storage location and the data identifier.
[0148] (II) Data Access
[0149] Step 1: Obtain the user level and user identification of the user (ie, the target user mentioned above), as well as the security level, data identification, and data structure of the data to be accessed by the user (ie, the target data mentioned above).
[0150] The user level is determined when the user registers based on the user's position. For example, the user level of a salesperson is low, while the user level of a general manager is high.
[0151] The user ID is the user name when the user registers.
[0152] The security level of data is set by the administrator when the data is generated. For example, the security level of business data is medium, and the security level of sensitive data is high.
[0153] The data identifier can be information with identification such as the name or model of the data to be accessed.
[0154] The data structure can be a data structure in the form of a link, or it can also be a data structure in other forms, which is not specifically limited here.
[0155] The setting solutions in Step 1 all adopt existing solutions, which are not the focus of the embodiments of this application and will not be described in detail.
[0156] Step 2: Determine whether the user has the permission to access the data to be accessed according to the user level.
[0157] Only when the user level is not lower than the data security level is it considered that the user has the permission to access the data. The implementation process of Step 2 also adopts an existing process, which is not the focus of the embodiments of this application and will not be described in detail.
[0158] Step 3: If there is no access permission, a prompt of no access permission will be fed back to the user. If there is access permission, proceed to Step 4.
[0159] Step 4: Sign the data identifier and data structure of the data to be accessed according to the user identifier to form signature data:
[0160] 1. Generate a random positive number K2 between 0 and 1;
[0161] 2. Generate the hash value H1 of the user identifier, the hash value H2 of the access device IP address, and the hash value H3 of the blockchain address;
[0162] 3. Form a document D with the data identifier and data structure of the data to be accessed;
[0163] 4. Use the value of H2⊕H3<<K2 as the key to encrypt D to obtain the encrypted file D’, where ⊕ is the exclusive OR operator and << is the left shift operator;
[0164] 5. Obtain the symmetric key K1 assigned to the user during registration. Here, the symmetric key K1 is assigned to the user by the CA during registration, and this key is used for encryption during data transmission;
[0165] 6. Calculate x = D’ - K1H1 H2 , and pack x, H1, D’ and K2 together into signature data.
[0166] Step 5: After sending the signature data to the management block of the blockchain, the management block verifies the signature data. If the verification is successful, the access behavior is considered valid, the corresponding data is searched for and returned. If the verification is unsuccessful, the access behavior is considered invalid, and a feedback of access failure is fed back.
[0167] The signature verification process is that the management module performs the following steps based on the behavior-verified smart contract:
[0168] 1. Determine the sending address of the signature data, which is the IP address of the access device, and determine the hash value of the sending address, which is H2;
[0169] 2. Determine the user's symmetric key K1 based on the sent H1;
[0170] 3. Determine x based on H2, K1 and the sent x, H1, and D' D’ =H1*exp(D'-K1H1 H2 ) is true, if not, the signature verification fails, if so, the signature verification succeeds.
[0171] Step 6: The management block obtains the storage location of the data to be accessed according to D' and provides feedback:
[0172] 1. The management block obtains the hash value of the blockchain address, i.e. H3, and decrypts D' according to H3 and H2 and K2 obtained in step 5 to obtain the data identifier and data structure of the data to be accessed; the decryption process is the reverse process of encryption, which is described in detail in the encryption process and will not be repeated here;
[0173] 2. The management block broadcasts the data identifier of the data to be accessed to the entire blockchain;
[0174] 3. After receiving the broadcast, each data source block determines whether the data identifier exists according to the account book it maintains. If so, it feedbacks the corresponding data source block identifier to the management block. If not, it feedbacks that it does not exist;
[0175] 4. If the data source block identifiers fed back by all data source blocks are the same and are the same as the data source block identifier recorded in the management block ledger, the management block sends the data structure to the data source block corresponding to the same data source block identifier; otherwise, the feedback data reading fails;
[0176] 5. After receiving the data structure, the data source block corresponding to the same data source source block identifier determines the data node corresponding to the data to be accessed through the head node's smart contract. If the data structure of the corresponding data node matches (i.e. is the same as) the received data structure, the storage node storing the data identifier determines the storage location address of the data to be accessed and feeds back the address. Otherwise, the feedback data reading fails;
[0177] 6. The management block encrypts the address of the storage location through a data encryption smart contract. The encryption process is the same as the encryption process of the access device, namely:
[0178] 1) Use the value of H2⊕H3<<K2 as the key to encrypt the address A of the storage location, obtaining the encrypted data A';
[0179] 2) Calculate y = A' - K1H1 H2 , and pack y, H1, D', and K2 together into signature data and feedback it to the access device.
[0180] Step 7: The access device performs signature verification using the same process as the management block in Step 5, and decrypts after successful signature verification to obtain the address A of the storage location, and then accesses the data at the address A of the storage location.
[0181] The embodiment of the present application provides a data access method. On the one hand, relying on the tamper-proof feature of the blockchain, it stores the data of each data source, ensuring data storage security. On the other hand, relying on the self-developed access behavior signature technology, it conducts security prevention and control on access behaviors, ensuring data access security. Through the joint prevention and control of both aspects, secure data access is achieved.
[0182] Based on the data access method provided in the above embodiment, correspondingly, the present application also provides a specific implementation manner of a data access device. It can be understood that the relevant descriptions in the following device embodiments can refer to the foregoing method embodiments. For the sake of brevity, they will not be repeated. Please refer to the following embodiments.
[0183] Please refer to Figure 4 , which is a schematic structural diagram of a data access device 400 provided by the embodiment of the present application, applied to an access terminal. The device 400 may include: a first acquisition module 401, a signature module 402, a first sending module 403, and an access module 404.
[0184] The first acquisition module 401 is used to acquire the user identifier of the target user and the data file of the target data, where the target data is the data to be accessed by the target user;
[0185] The signature module 402 is used to perform signature processing on the user identifier and the data file to obtain signature data;
[0186] The first sending module 403 is used to send the signature data to the blockchain, so that the blockchain verifies the signature data to obtain a verification result, and the verification result is used to indicate whether the access behavior of the target user is valid; when the verification result indicates that the access behavior of the target user is valid, determine the storage location information of the target data according to the signature data; send the storage location information to the access terminal;
[0187] The access module 404 is used to receive the storage location information sent by the blockchain and access the target data according to the storage location information.
[0188] The data access device of the embodiment of the present application can sign the user identification of the target user and the data file of the target data through the access terminal to obtain the signature data; the blockchain then verifies the signature data sent by the access terminal to obtain the verification result; the blockchain sends the storage location information of the target data to the access terminal only when the verification result indicates that the access behavior is valid; the access terminal accesses the target data based on the storage location information. In this way, the embodiment of the present application verifies the signature data through the interaction between the access terminal and the blockchain to determine the validity of the access behavior, and accesses the target data according to the storage location information of the target data, thereby achieving secure access to the data.
[0189] In some embodiments, the signature module 402 may specifically include:
[0190] A first acquisition unit is used to acquire a first key, a second key, a first hash value, a second hash value, and a third hash value, wherein the first key is a key assigned when the target user registers, the second key is a randomly generated key, the first hash value is a hash value of the user identifier, the second hash value is a hash value of the Internet Protocol address of the access terminal, and the third hash value is a hash value of the Internet Protocol address of the blockchain;
[0191] A first encryption unit is used to encrypt the data file according to the second Hash value, the third Hash value, and the second key to obtain an encrypted data file of the target data;
[0192] A first calculation unit, configured to calculate a calculation result according to the encrypted data file, the first key, the first Hash value and the second Hash value;
[0193] The signature data includes a calculation result, a first hash value, an encrypted data file, and a second key.
[0194] In some embodiments, the access module 404 may specifically include:
[0195] A receiving unit, used to receive the encrypted storage location information sent by the blockchain, where the encrypted storage location information is information obtained by encrypting the storage location information by the blockchain;
[0196] A second decryption unit, used to decrypt the encrypted storage location information to obtain the storage location information;
[0197] The access unit is used to access the target data according to the storage location information.
[0198] As an implementation of the present application, in order to further ensure secure access to data, the above-mentioned device 400 may further include:
[0199] The second acquisition module is used to acquire the user level of the target user and the security level of the target data;
[0200] The second determination module is used to determine whether the target user has access rights to access the target data according to the user level and security level;
[0201] The signature module 402 is also used to sign the user identification and the data file to obtain signature data when the target user has access rights to the target data.
[0202] See also Figure 5 , is a structural diagram of a data access device 500 provided in an embodiment of the present application, which is applied to blockchain. The device 500 may include: a receiving module 501, a verification module 502, a first determination module 503 and a second sending module 504.
[0203] The receiving module 501 is used to receive the signature data sent by the access terminal, where the signature data is the data obtained by the access terminal after signing the user identification and the data file, and the target data is the data to be accessed by the target user;
[0204] Verification module 502, used to verify the signature data and obtain a verification result, which is used to indicate whether the target user's access behavior is valid;
[0205] A first determination module 503 is used to determine the storage location information of the target data according to the signature data when the verification result indicates that the access behavior of the target user is valid;
[0206] The second sending module 504 is used to send the storage location information to the access terminal, so that the access terminal can access the target data according to the storage location information.
[0207] The data access device of the embodiment of the present application can sign the user identification of the target user and the data file of the target data through the access terminal to obtain the signature data; the blockchain then verifies the signature data sent by the access terminal to obtain the verification result; the blockchain sends the storage location information of the target data to the access terminal only when the verification result indicates that the access behavior is valid; the access terminal accesses the target data based on the storage location information. In this way, the embodiment of the present application verifies the signature data through the interaction between the access terminal and the blockchain to determine the validity of the access behavior, and accesses the target data according to the storage location information of the target data, thereby achieving secure access to the data.
[0208] In some embodiments, the signature data may include a calculation result, a first hash value, and an encrypted data file;
[0209] The verification module 502 may specifically include:
[0210] A second acquisition unit, configured to acquire a second hash value, where the second hash value is a hash value of an Internet Protocol address of an access terminal;
[0211] A generating unit, configured to obtain a first key of a target user according to the first hash value;
[0212] A second calculation unit, used to calculate a first value according to the calculation result and the encrypted data file;
[0213] A third calculation unit, configured to calculate a second value according to the first Hash value, the encrypted data file, the first key, and the second Hash value;
[0214] A verification unit is used to verify whether a first numerical value is equal to a second numerical value, and obtain a verification result, wherein the verification result is used to indicate that the access behavior of the target user is valid when the first numerical value is equal to the second numerical value; and to indicate that the access behavior of the target user is invalid when the first numerical value is not equal to the second numerical value.
[0215] In some embodiments, the signature data may further include a second key;
[0216] The first determining module 503 may specifically include:
[0217] A third acquisition unit is used to acquire a third hash value, where the third hash value is a hash value of the Internet Protocol address of the blockchain;
[0218] A first decryption unit is used to decrypt the encrypted data file according to the third Hash value, the second Hash value, and the second key to obtain a data file of target data, wherein the data file includes a target data identifier and a target data structure;
[0219] The determination unit is used to determine storage location information corresponding to a target data identifier and a target data structure in a blockchain, wherein the blockchain includes storage location information of multiple data, and different data corresponds to different data structures and different data identifiers.
[0220] In some embodiments, the blockchain may include a management block and multiple data source blocks, the data source block includes multiple data nodes, different data nodes correspond to different data structures, the data nodes include multiple storage nodes, and the storage nodes include storage location information and data identifiers;
[0221] The above-mentioned determination unit may specifically include:
[0222] A search subunit, used for managing a block to search among multiple data source blocks, and determining a data source block with a target data identifier as a target data source block;
[0223] A first determining subunit is used to determine a target data node among a plurality of data nodes of a target data source block, wherein a data structure of the target data node is the same as a target data structure;
[0224] A second determination subunit is used to determine a target storage node among multiple storage nodes of the target data node, wherein the data identifier in the target storage node is the same as the target data identifier;
[0225] The third determining subunit is used to determine the storage location information in the target storage node as the storage location information of the target data.
[0226] In some embodiments, the second sending module 504 may specifically include:
[0227] A second encryption unit is used to encrypt the storage location information to obtain encrypted storage location information;
[0228] The sending unit is used to send the encrypted storage location information to the access terminal, so that the access terminal decrypts the encrypted storage location information, obtains the storage location information, and accesses the target data according to the storage location information.
[0229] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0230] The electronic device may include a processor 601 and a memory 602 storing computer program instructions.
[0231] Specifically, the processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0232] The memory 602 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 602 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 602 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 602 is a non-volatile solid-state memory.
[0233] In certain embodiments, the memory 602 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0234] The processor 601 implements any one of the data access methods in the above embodiments by reading and executing computer program instructions stored in the memory 602 .
[0235] In one example, the electronic device may further include a communication interface 603 and a bus 610. Figure 6 As shown, the processor 601, the memory 602, and the communication interface 603 are connected via a bus 610 and communicate with each other.
[0236] The communication interface 603 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0237] Bus 610 includes hardware, software or both, and the parts of electronic equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 610 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0238] The electronic device can execute the data access method in the embodiment of the present application, thereby realizing the combination Figure 2 , Figure 4 and Figure 5 Described is a data access method and apparatus.
[0239] In addition, in combination with the data access method in the above embodiments, the present application embodiment can provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the data access methods in the above embodiments is implemented.
[0240] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0241] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0242] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0243] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0244] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A data access method, characterized in that: Applied to an access terminal, the method comprises: Obtaining a user ID of a target user and a data file of target data, wherein the target data is data to be accessed by the target user; Performing signature processing on the user identification and the data file to obtain signature data; Sending the signature data to the blockchain so that the blockchain verifies the signature data and obtains a verification result, wherein the verification result is used to indicate whether the target user's access behavior is valid; if the verification result indicates that the target user's access behavior is valid, determining the storage location information of the target data according to the signature data; and sending the storage location information to the access terminal; Receive the storage location information sent by the blockchain, and access the target data according to the storage location information.
2. The method according to claim 1, characterized in that The step of performing signature processing on the user identification and the data file to obtain signature data includes: Obtain a first key, a second key, a first hash value, a second hash value, and a third hash value, wherein the first key is a key assigned when the target user is registered, the second key is a randomly generated key, the first hash value is a hash value of the user identifier, the second hash value is a hash value of the Internet Protocol address of the access terminal, and the third hash value is a hash value of the Internet Protocol address of the blockchain; Encrypting the data file according to the second Hash value, the third Hash value and the second key to obtain an encrypted data file of the target data; Calculate a calculation result according to the encrypted data file, the first key, the first Hash value and the second Hash value; The signature data includes the calculation result, the first hash value, the encrypted data file and the second key.
3. The method according to claim 1, characterized in that The receiving the storage location information sent by the blockchain, and accessing the target data according to the storage location information, includes: Receiving the encrypted storage location information sent by the blockchain, where the encrypted storage location information is information obtained by encrypting the storage location information by the blockchain; decrypting the encrypted storage location information to obtain the storage location information; The target data is accessed according to the storage location information.
4. The method according to claim 1, characterized in that: Before the user identification and the data file are signed to obtain the signature data, the method further includes: Acquire the user level of the target user and the security level of the target data; Determining whether the target user has access rights to access the target data according to the user level and the security level; The step of performing signature processing on the user identification and the data file to obtain signature data includes: In the case where the target user has access rights to access the target data, the user identification and the data file are signed to obtain signature data.
5. A data access method, characterized in that: Applied to blockchain, the method includes: Receiving signature data sent by an access terminal, wherein the signature data is data obtained by the access terminal performing signature processing on a user identification and a data file, and the target data is data to be accessed by the target user; Verifying the signature data to obtain a verification result, wherein the verification result is used to indicate whether the access behavior of the target user is valid; When the verification result indicates that the access behavior of the target user is valid, determining the storage location information of the target data according to the signature data; The storage location information is sent to the access terminal, so that the access terminal accesses the target data according to the storage location information.
6. The method according to claim 5, characterized in that The signature data includes a calculation result, a first hash value and an encrypted data file; The verifying the signature data to obtain a verification result includes: Obtaining a second hash value, where the second hash value is a hash value of the Internet Protocol address of the access terminal; Obtaining a first key of the target user according to the first hash value; Calculate a first value according to the calculation result and the encrypted data file; Calculate a second value according to the first Hash value, the encrypted data file, the first key, and the second Hash value; Verify whether the first value is equal to the second value, and obtain a verification result, wherein the verification result is used to indicate that the access behavior of the target user is valid when the first value is equal to the second value; and to indicate that the access behavior of the target user is invalid when the first value is not equal to the second value.
7. The method according to claim 6, characterized in that The signature data also includes a second key; Determining storage location information of the target data according to the signature data includes: Obtaining a third hash value, where the third hash value is a hash value of the Internet Protocol address of the blockchain; Decrypting the encrypted data file according to the third Hash value, the second Hash value and the second key to obtain a data file of the target data, wherein the data file includes a target data identifier and a target data structure; In the blockchain, storage location information corresponding to the target data identifier and the target data structure is determined, and the blockchain includes storage location information of multiple data, and different data corresponds to different data structures and different data identifiers.
8. The method according to claim 7, characterized in that The blockchain includes a management block and multiple data source blocks, the data source block includes multiple data nodes, different data nodes correspond to different data structures, the data nodes include multiple storage nodes, and the storage nodes include storage location information and data identifiers; Determining, in the blockchain, storage location information corresponding to the target data identifier and the target data structure includes: The management block searches among the multiple data source blocks and determines the data source block having the target data identifier as the target data source block; Determine a target data node among a plurality of data nodes of the target data source block, wherein the data structure of the target data node is the same as the target data structure; Determine a target storage node among multiple storage nodes of the target data node, wherein the data identifier in the target storage node is the same as the target data identifier; The storage location information in the target storage node is determined as the storage location information of the target data.
9. The method according to claim 5, characterized in that The sending the storage location information to the access terminal includes: Encrypting the storage location information to obtain encrypted storage location information; The encrypted storage location information is sent to the access terminal, so that the access terminal decrypts the encrypted storage location information to obtain the storage location information, and accesses the target data according to the storage location information.
10. A data access device, characterized in that: Applied to an access terminal, the device comprises: A first acquisition module is used to acquire a user ID of a target user and a data file of target data, where the target data is data to be accessed by the target user; A signature module, used to perform signature processing on the user identification and the data file to obtain signature data; A first sending module is used to send the signature data to the blockchain so that the blockchain verifies the signature data to obtain a verification result, wherein the verification result is used to indicate whether the access behavior of the target user is valid; if the verification result indicates that the access behavior of the target user is valid, determine the storage location information of the target data according to the signature data; and send the storage location information to the access terminal; An access module is used to receive the storage location information sent by the blockchain and access the target data according to the storage location information.
11. A data access device, characterized in that: Applied to blockchain, the device comprises: A receiving module, used to receive signature data sent by an access terminal, wherein the signature data is data obtained by the access terminal performing signature processing on a user identification and a data file, and the target data is data to be accessed by the target user; A verification module, used to verify the signature data to obtain a verification result, wherein the verification result is used to indicate whether the access behavior of the target user is valid; A first determination module, configured to determine storage location information of the target data according to the signature data when the verification result indicates that the access behavior of the target user is valid; The second sending module is used to send the storage location information to the access terminal, so that the access terminal accesses the target data according to the storage location information.
12. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the data access method according to any one of claims 1 to 9 is implemented.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the data access method according to any one of claims 1 to 9 is implemented.
