Method, device and electronic device for accessing and generating blockchain transaction data

By carrying access permission information in blockchain transaction data, the access rights of the target user is solved, and the problem that the superior institutions of financial institutions cannot access the transaction data of subordinate institutions is realized, and the data approval and supervision are realized, while ensuring the confidentiality of transaction data is ensured. .

CN112581135BActive Publication Date: 2024-12-20CHINA CONSTRUCTION BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011586985.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-28
Publication Date
2024-12-20
Estimated Expiration
2040-12-28

AI Technical Summary

Technical Problem

The superior institutions of financial institutions are unable to access and approve the blockchain transaction data of subordinate institutions, resulting in the inability to effectively supervise.

Method used

By carrying access permission information in the blockchain transaction data, verifying the access permissions of the target user, and querying and returning transaction data after verification is passed, ensuring that only users with access rights can access and decrypt the transaction details.

Benefits of technology

It realizes access and approval of transaction data by superior institutions, ensures the confidentiality of transaction data, and simplifies user-level data visibility and review permissions through access rights control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112581135B_ABST
    Figure CN112581135B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method, device and electronic device for accessing and generating blockchain transaction data. The method includes: when a target user's access request to a blockchain user's transaction data is detected, the target user's access rights are verified through the access rights information carried in the transaction data; if the verification is successful, the transaction data is queried; and the transaction data is returned to the target user. Based on this solution, the superior organization can access the transaction data, so that the superior organization can approve and supervise the transaction data, and the access rights of the user can be controlled by adding access rights information to the transaction information, which is conducive to ensuring the confidentiality of the transaction data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology. Specifically, the present application relates to a method, device and electronic device for accessing and generating blockchain transaction data. Background Art

[0002] A distributed ledger is a database that is shared, replicated, and synchronized among network members. Blockchain with data signatures has been used in distributed ledgers, making transactions traceable, accurate, and verifiable.

[0003] Currently, after the parties to a transaction conduct a transaction through the blockchain, the transaction data will be encrypted and stored as blockchain data. The parties can use their own user certificates to decrypt the transaction data, making the transaction data visible only to the parties involved, thereby ensuring the confidentiality of the transaction.

[0004] In financial institutions such as banks, the participants in transactions are generally subordinate institutions, and the superior institutions within the financial institutions have the need to approve and supervise the transaction data of the subordinate institutions. However, in the existing method, the transaction data is only visible to the participants, resulting in the superior institutions being unable to approve and supervise the transaction data. Summary of the invention

[0005] The purpose of this application is to solve at least one of the above technical defects. The technical solution adopted by this application is as follows:

[0006] In a first aspect, an embodiment of the present application provides a method for accessing blockchain transaction data, the method comprising:

[0007] When a target user's access request to a blockchain user's transaction data is detected, the target user's access rights are verified through the access rights information carried in the transaction data;

[0008] If the verification is successful, query the transaction data;

[0009] Return transaction data to the target user.

[0010] Optionally, the access permission information includes a designated user who has access permission to the transaction data, and the target user's access permission is verified by the access permission information carried in the transaction data, including:

[0011] Determine whether the target user belongs to the specified user;

[0012] If yes, it is determined that the target user has access rights to the transaction data;

[0013] If not, it is determined that the target user does not have access rights to the transaction data.

[0014] Optionally, query transaction data, including:

[0015] Query transaction data based on the user ID of the target user and / or the user ID of the blockchain user.

[0016] Optionally, querying transaction data from the blockchain based on the user identification of the target user and / or the user identification of the blockchain user includes:

[0017] Based on the user ID of the target user and / or the user ID of the blockchain user, query the transaction data from a MongoDB database used to cache blockchain data.

[0018] Optionally, the transaction data includes encrypted transaction details, and the transaction data returned to the target user includes:

[0019] Decrypt the encrypted transaction details in the transaction data;

[0020] Return the decrypted transaction data to the target user.

[0021] Optionally, the transaction data carries a key for encrypting the transaction details, and decrypting the encrypted transaction details in the transaction data includes:

[0022] The encrypted transaction details in the transaction data are decrypted based on the key.

[0023] Optionally, the key carried in the transaction data is encrypted by the public key of the designated user, and the encrypted transaction details in the transaction data are decrypted, including:

[0024] Decrypt the encrypted key using the target user's private key to obtain the key;

[0025] The encrypted transaction details in the transaction data are decrypted based on the key.

[0026] In a second aspect, an embodiment of the present application provides a method for accessing blockchain transaction data, the method comprising:

[0027] When a blockchain user conducts a transaction through the blockchain, transaction data is generated, wherein the transaction data includes access permission information, and the access permission information is used to verify the user's access permission to the transaction data.

[0028] Optionally, the access permission information includes designated users who have access permissions to the transaction data.

[0029] Optionally, the transaction data also includes a key and transaction details, and the transaction details are encrypted by the key.

[0030] Optionally, the secret key in the transaction data is encrypted by a public key of a designated user who has access rights to the transaction data.

[0031] In a third aspect, an embodiment of the present application provides a device for accessing blockchain transaction data, the device comprising:

[0032] An access rights verification module is used to verify the target user's access rights through the access rights information carried in the transaction data when a target user's access request to the blockchain user's transaction data is detected;

[0033] The transaction data query module is used to query the transaction data when the verification is passed;

[0034] The transaction data return module is used to return transaction data to the target user.

[0035] Optionally, the access permission information includes a designated user who has access permission to the transaction data. When the access permission verification module verifies the target user's access permission through the access permission information carried in the transaction data, it is specifically used to:

[0036] Determine whether the target user belongs to the specified user;

[0037] If yes, it is determined that the target user has access rights to the transaction data;

[0038] If not, it is determined that the target user does not have access rights to the transaction data.

[0039] Optionally, when querying transaction data, the transaction data query module is specifically used to:

[0040] Query transaction data based on the user ID of the target user and / or the user ID of the blockchain user.

[0041] Optionally, when querying transaction data from the blockchain based on the user identifier of the target user and / or the user identifier of the blockchain user, the transaction data query module is specifically used to:

[0042] Based on the user ID of the target user and / or the user ID of the blockchain user, query the transaction data from a MongoDB database used to cache blockchain data.

[0043] Optionally, the transaction data includes encrypted transaction details, and the transaction data return module is specifically used to:

[0044] Decrypt the encrypted transaction details in the transaction data;

[0045] Return the decrypted transaction data to the target user.

[0046] Optionally, the transaction data carries a key for encrypting the transaction details. When the transaction data return module decrypts the encrypted transaction details in the transaction data, it is specifically used to:

[0047] The encrypted transaction details in the transaction data are decrypted based on the key.

[0048] Optionally, the key carried in the transaction data is encrypted by the public key of the designated user, and when the transaction data return module decrypts the encrypted transaction details in the transaction data, it is specifically used to:

[0049] Decrypt the encrypted key using the target user's private key to obtain the key;

[0050] The encrypted transaction details in the transaction data are decrypted based on the key.

[0051] In a fourth aspect, an embodiment of the present application provides a device for generating blockchain transaction data, the device comprising:

[0052] The transaction data generation module is used to generate transaction data when a blockchain user conducts a transaction through the blockchain, wherein the transaction data includes access permission information, and the access permission information is used to verify the user's access permission to the transaction data.

[0053] Optionally, the access permission information includes designated users who have access permissions to the transaction data.

[0054] Optionally, the transaction data also includes a key and transaction details, and the transaction details are encrypted by the key.

[0055] Optionally, the secret key in the transaction data is encrypted by a public key of a designated user who has access rights to the transaction data.

[0056] In a fifth aspect, an embodiment of the present application provides an electronic device, the electronic device comprising: a processor and a memory;

[0057] A memory, used for storing operation instructions;

[0058] The processor is used to execute the method shown in any implementation of the first aspect or any implementation of the second aspect of the present application by calling an operation instruction.

[0059] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method shown in any implementation of the first aspect or any implementation of the second aspect of the present application.

[0060] The beneficial effects of the technical solution provided by the embodiment of the present application are:

[0061] The solution provided by the embodiment of the present application verifies the target user's access rights through the access rights information carried in the transaction data when a target user's access request to the transaction data of a blockchain user is detected, queries the transaction data when the verification is successful, and returns the transaction data to the target user. Based on this solution, the superior organization can access the transaction data, so that the superior organization can approve and supervise the transaction data, and the access rights of the user can be controlled by adding the access rights information to the transaction information, which is conducive to ensuring the confidentiality of the transaction data. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.

[0063] Figure 1 A flowchart of a method for accessing blockchain transaction data provided in an embodiment of the present application;

[0064] Figure 2 A flowchart of a method for generating blockchain transaction data provided in an embodiment of the present application;

[0065] Figure 3 A schematic diagram of the structure of a device for accessing blockchain transaction data provided in an embodiment of the present application;

[0066] Figure 4 A schematic diagram of the structure of a device for generating blockchain transaction data provided in an embodiment of the present application;

[0067] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0068] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present invention.

[0069] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0070] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0071] In a blockchain-based trading platform system, the participants in the transaction can be subordinate institutions such as branches in a bank. The participants can decrypt the transaction data through their own user certificates, making the transaction data visible only to the participants, thereby ensuring the confidentiality of the transaction.

[0072] At present, the superiors of the participants need to access transaction data and audit and supervise the transaction data. If a copy of the blockchain data is stored in a private cloud, although the superiors can access the transaction data, the real-time and accuracy of the blockchain data copy cannot be guaranteed, resulting in the accessed transaction data being unprepared and unable to be audited and supervised.

[0073] The method, device and electronic device for accessing and generating blockchain transaction data provided in the embodiments of the present application are intended to solve at least one of the above technical problems in the prior art.

[0074] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0075] Figure 1 A flowchart of a method for accessing blockchain transaction data provided by an embodiment of the present application is shown, such as Figure 1 As shown, the method may mainly include:

[0076] Step S110: When a target user's access request to the blockchain user's transaction data is detected, the target user's access rights are verified through the access rights information carried in the transaction data;

[0077] Step S120: If the verification is successful, query the transaction data;

[0078] Step S130: Return transaction data to the target user.

[0079] In the embodiment of the present application, the blockchain user may be a participant in the transaction, such as a branch or business outlet of a bank, and the target user may be the superior institution of the transaction participant, who has the need to access the transaction data and to review and supervise the transaction data.

[0080] In an embodiment of the present application, users with access rights to transaction data can be specified according to actual needs, and the users with access rights can be added to the transaction data in the form of access rights information, such as adding a user ID of the user with access rights to the access rights information.

[0081] The transaction data may include a plaintext data part and an encrypted data part, wherein the plaintext data part may include information of the transaction participants (transaction initiator and transaction recipient), etc. In the embodiment of the present application, an extension field may be added to the plaintext data part of the transaction data, and access permission information may be added to the extension field. Access permission information may be provided in a structured nested manner. For example, the blockchain users are user A and user B, and the users with access permissions to the transaction data are user C and user D, wherein user C is the superior organization of user A, and user D is the superior organization of user C. The user identifications of user A and user C, its superior organization, may be encapsulated as a structure, and the user identifications of user C and user D, its superior organization, may be encapsulated as a structure. By nesting multiple structures, users with access permissions to the transaction data may be recorded.

[0082] In the embodiment of the present application, if it is determined that the target user has access rights to the transaction data, the transaction data can be queried, and after the transaction data is queried, the transaction data is returned to the target user.

[0083] In an embodiment of the present application, access rights control for users is achieved by adding access rights information to transaction information, so that only designated superior institutions can access transaction data, thereby ensuring the confidentiality of transaction data while enabling superior institutions to access transaction data.

[0084] The method provided in the embodiment of the present application verifies the target user's access rights through the access rights information carried in the transaction data when a target user's access request to the transaction data of a blockchain user is detected, queries the transaction data when the verification is successful, and returns the transaction data to the target user. Based on this solution, the superior organization can access the transaction data, so that the superior organization can approve and supervise the transaction data, and the access rights of the user can be controlled by adding the access rights information to the transaction information, which is conducive to ensuring the confidentiality of the transaction data.

[0085] In an optional manner of the embodiment of the present application, the access permission information includes a designated user who has access permission to the transaction data, and the target user's access permission is verified by the access permission information carried in the transaction data, including:

[0086] Determine whether the target user belongs to the specified user;

[0087] If yes, it is determined that the target user has access rights to the transaction data;

[0088] If not, it is determined that the target user does not have access rights to the transaction data.

[0089] In an embodiment of the present application, a designated user who has access rights to the transaction data may be added to the transaction data in the form of access rights information, and when the access rights of the target user are verified, the target user may be verified based on the access rights information.

[0090] In an optional manner of the embodiment of the present application, querying transaction data includes:

[0091] Query transaction data based on the user ID of the target user and / or the user ID of the blockchain user.

[0092] In the embodiment of the present application, the transaction data may include information about the parties involved in the transaction, so all transaction data of the blockchain user can be queried based on the user ID of the blockchain user.

[0093] In actual use, the access permission information includes information of users who have the permission to view the transaction data. Therefore, the transaction data can be queried based on the user ID of the target user and the access permission information.

[0094] In an optional manner of the embodiment of the present application, querying transaction data from the blockchain based on the user identifier of the target user and / or the user identifier of the blockchain user includes:

[0095] Based on the user ID of the target user and / or the user ID of the blockchain user, query the transaction data from a MongoDB database used to cache blockchain data.

[0096] In an embodiment of the present application, blockchain data (including transaction data) can be cached through a MongoDB database. Therefore, transaction data can be queried from the MongoDB database through the user ID of the target user and / or the user ID of the blockchain user.

[0097] In an optional manner of the embodiment of the present application, the transaction data includes encrypted transaction details, and the transaction data is returned to the target user, including:

[0098] Decrypt the encrypted transaction details in the transaction data;

[0099] Return the decrypted transaction data to the target user.

[0100] In the embodiment of the present application, the transaction details may be fields in the transaction data that have confidentiality requirements, such as the transaction amount, etc. In order to ensure the confidentiality of the transaction data, the transaction details may be encrypted, and the transaction participant user (i.e., the target user in this example) and the designated user with access rights to the transaction data may be able to decrypt the transaction data.

[0101] In an optional manner of the embodiment of the present application, the transaction data carries a key for encrypting the transaction details, and decrypting the encrypted transaction details in the transaction data includes:

[0102] The encrypted transaction details in the transaction data are decrypted based on the key.

[0103] In the embodiments of the present application, the transaction details data can be encrypted by a key, and the key can be added to the transaction data, so that when the target user accesses the transaction data, the transaction details can be decrypted by the key.

[0104] In an optional manner of the embodiment of the present application, the key carried in the transaction data is encrypted by the public key of the designated user, and the encrypted transaction details in the transaction data are decrypted, including:

[0105] Decrypt the encrypted key using the target user's private key to obtain the key;

[0106] The encrypted transaction details in the transaction data are decrypted based on the key.

[0107] In an embodiment of the present application, the key carried in the transaction data can be encrypted by the public key of the user who has authority over the transaction data, such as encrypting the key by the public key of the transaction participant user and the public key of the designated user respectively.

[0108] In actual use, the transaction data may carry the secret key encrypted with the public key of each transaction participant and the secret key encrypted with the public key of each designated user, so that each transaction participant and each designated user can decrypt the secret key respectively.

[0109] In the embodiment of the present application, the key encrypted by the public key of the target user can be decrypted by the private key of the target user to obtain the key, and then the transaction details can be decrypted by the key to obtain the decrypted transaction data.

[0110] When this solution is implemented in large institutions such as banking systems, users from multiple branches can access blockchain transactions, and the head office can have unified access and hierarchical application permissions to meet the requirement that blockchain encrypted transaction data is only visible to the participants. It can achieve flexible control of user levels, hierarchical review of databases, cross-institutional review, and simplify the processes of blockchain user application and certificate issuance in branches, allowing employees to access blockchain applications without any sense of communication.

[0111] The solution provided by the implementation of this application can, through the permission control method combining blockchain and application, on the one hand retain the data permission control of the blockchain access party, and on the other hand control the visible control and audit permission control of data by internal institutions at the application layer.

[0112] Figure 2 A flowchart of a method for generating blockchain transaction data provided by an embodiment of the present application is shown, such as Figure 2 As shown, the method may mainly include:

[0113] Step S210: When a blockchain user conducts a transaction through the blockchain, transaction data is generated, wherein the transaction data includes access permission information, and the access permission information is used to verify the user's access permission to the transaction data.

[0114] In an embodiment of the present application, when a blockchain user conducts a transaction based on a blockchain, the transaction data generated may include access permission information so that when a user other than the blockchain user subsequently requests to access the transaction data, the user's permission can be authenticated.

[0115] The method provided in the embodiment of the present application, when a blockchain user conducts a transaction based on the blockchain, adds access permission information to the generated transaction data so as to authenticate the access permission of the user accessing the transaction data based on the access permission information. Based on this scheme, it is possible to provide a basis for access permission control for superior institutions to access transaction data, so that superior institutions with access permission can approve and supervise transaction data, which is conducive to ensuring the confidentiality of transaction data.

[0116] In an optional manner of the embodiment of the present application, the access permission information includes a designated user who has access permission to the transaction data.

[0117] In an embodiment of the present application, users with access rights to transaction data can be specified according to actual needs, and the users with access rights can be added to the transaction data in the form of access rights information, such as adding a user ID of the user with access rights to the access rights information.

[0118] Specifically, an extension field can be added to the plaintext data part of the transaction data, and access permission information can be added to the extension field. The access permission information can be in a structure nested manner. For example, the blockchain users are user A and user B, and the users with access permissions to the transaction data are user C and user D, where user C is the superior organization of user A, and user D is the superior organization of user C. The user identifiers of user A and user C, its superior organization, can be encapsulated as a structure, and the user identifiers of user C and user D, its superior organization, can be encapsulated as a structure. By nesting multiple structures, users with access permissions to the transaction data can be recorded.

[0119] In an optional manner of an embodiment of the present application, the transaction data also includes a key and transaction details, and the transaction details are encrypted by the key.

[0120] In the embodiment of the present application, the transaction details may be fields in the transaction data that have confidentiality requirements, such as the transaction amount, etc. In order to ensure the confidentiality of the transaction data, the transaction details may be encrypted, and only the transaction participant user (i.e., the blockchain user in this example) or the designated user with access rights to the transaction data can decrypt the transaction data.

[0121] In the embodiments of the present application, the transaction details data can be encrypted by a key, and the key can be added to the transaction data, so that when the transaction data is accessed, the transaction details can be decrypted by the key.

[0122] In an optional manner of the embodiment of the present application, the key in the transaction data is encrypted by the public key of a designated user who has access rights to the transaction data.

[0123] In an embodiment of the present application, the key carried in the transaction data can be encrypted by the public key of a user who has authority over the transaction data, such as by the public key of a transaction participant user and the public key of a designated user.

[0124] In actual use, the transaction data can carry the secret key encrypted by the public key of each transaction participant, as well as the secret key encrypted by the public key of each designated user.

[0125] In actual use, the above-mentioned blockchain transaction data access and generation scheme can be encapsulated as an SDK (Software Development Kit) and provided to blockchain applications. Blockchain users can manage blockchain data based on the API (Application Programming Interface) provided by the SDK.

[0126] Based on Figure 1 The same principle as shown in the method, Figure 3 A schematic diagram of a block chain transaction data access device provided in an embodiment of the present application is shown, Figure 3 As shown, the blockchain transaction data access device 30 includes:

[0127] The access rights verification module 310 is used to verify the access rights of the target user through the access rights information carried in the transaction data when detecting the access request of the target user to the transaction data of the blockchain user;

[0128] The transaction data query module 320 is used to query the transaction data when the verification is passed;

[0129] The transaction data returning module 330 is used to return the transaction data to the target user.

[0130] The device provided in the embodiment of the present application verifies the target user's access rights through the access rights information carried in the transaction data when the target user's access request to the transaction data of the blockchain user is detected, queries the transaction data when the verification is passed, and returns the transaction data to the target user. Based on this solution, the superior organization can access the transaction data, so that the superior organization can approve and supervise the transaction data, and the access rights of the user can be controlled by adding the access rights information to the transaction information, which is conducive to ensuring the confidentiality of the transaction data.

[0131] Optionally, the access permission information includes a designated user who has access permission to the transaction data. When the access permission verification module verifies the target user's access permission through the access permission information carried in the transaction data, it is specifically used to:

[0132] Determine whether the target user belongs to the specified user;

[0133] If yes, it is determined that the target user has access rights to the transaction data;

[0134] If not, it is determined that the target user does not have access rights to the transaction data.

[0135] Optionally, when querying transaction data, the transaction data query module is specifically used to:

[0136] Query transaction data based on the user ID of the target user and / or the user ID of the blockchain user.

[0137] Optionally, when querying transaction data from the blockchain based on the user identifier of the target user and / or the user identifier of the blockchain user, the transaction data query module is specifically used to:

[0138] Based on the user ID of the target user and / or the user ID of the blockchain user, query the transaction data from a MongoDB database used to cache blockchain data.

[0139] Optionally, the transaction data includes encrypted transaction details, and the transaction data return module is specifically used to:

[0140] Decrypt the encrypted transaction details in the transaction data;

[0141] Return the decrypted transaction data to the target user.

[0142] Optionally, the transaction data carries a key for encrypting the transaction details. When the transaction data return module decrypts the encrypted transaction details in the transaction data, it is specifically used to:

[0143] The encrypted transaction details in the transaction data are decrypted based on the key.

[0144] Optionally, the key carried in the transaction data is encrypted by the public key of the designated user, and when the transaction data return module decrypts the encrypted transaction details in the transaction data, it is specifically used to:

[0145] Decrypt the encrypted key using the target user's private key to obtain the key;

[0146] The encrypted transaction details in the transaction data are decrypted based on the key.

[0147] It can be understood that the above modules of the blockchain transaction data access device in this embodiment have the function of implementing Figure 1 The functions of the corresponding steps of the method for accessing blockchain transaction data in the embodiment shown in . This function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. The above modules can be software and / or hardware, and the above modules can be implemented separately or integrated with multiple modules. For the functional description of each module of the above blockchain transaction data access device, please refer to Figure 1 The corresponding description of the method for accessing blockchain transaction data in the embodiment shown in will not be repeated here.

[0148] Based on Figure 2 The same principle as shown in the method, Figure 4 A schematic diagram of a block chain transaction data generation device provided in an embodiment of the present application is shown, Figure 4 As shown, the blockchain transaction data generation device 40 includes:

[0149] The transaction data generation module 410 is used to generate transaction data when a blockchain user conducts a transaction through the blockchain, wherein the transaction data includes access permission information, and the access permission information is used to verify the user's access permission to the transaction data.

[0150] The device provided in the embodiment of the present application, when a blockchain user conducts a transaction based on the blockchain, adds access permission information to the generated transaction data so as to authenticate the access permission of the user accessing the transaction data based on the access permission information. Based on this scheme, it is possible to provide a basis for access permission control for superior institutions to access transaction data, so that superior institutions with access permission can approve and supervise transaction data, which is conducive to ensuring the confidentiality of transaction data.

[0151] Optionally, the access permission information includes designated users who have access permissions to the transaction data.

[0152] Optionally, the transaction data also includes a key and transaction details, and the transaction details are encrypted by the key.

[0153] Optionally, the secret key in the transaction data is encrypted by a public key of a designated user who has access rights to the transaction data.

[0154] It can be understood that the above modules of the blockchain transaction data generation device in this embodiment have the function of realizing Figure 2 The functions of the corresponding steps of the method for generating blockchain transaction data in the embodiment shown in . This function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. The above modules can be software and / or hardware, and the above modules can be implemented separately or integrated with multiple modules. For the functional description of each module of the above blockchain transaction data generation device, please refer to Figure 2 The corresponding description of the method for generating blockchain transaction data in the embodiment shown in will not be repeated here.

[0155] An embodiment of the present application provides an electronic device, including a processor and a memory;

[0156] A memory, used for storing operation instructions;

[0157] The processor is used to execute the method provided in any embodiment of the present application by calling an operation instruction.

[0158] As an example, Figure 5 A schematic diagram of the structure of an electronic device applicable to an embodiment of the present application is shown. Figure 5 As shown, the electronic device 2000 includes: a processor 2001 and a memory 2003. The processor 2001 and the memory 2003 are connected, such as through a bus 2002. Optionally, the electronic device 2000 may also include a transceiver 2004. It should be noted that in actual applications, the transceiver 2004 is not limited to one, and the structure of the electronic device 2000 does not constitute a limitation on the embodiments of the present application.

[0159] The processor 2001 is applied in the embodiment of the present application to implement the method shown in the above method embodiment. The transceiver 2004 may include a receiver and a transmitter. The transceiver 2004 is applied in the embodiment of the present application to implement the function of the electronic device of the embodiment of the present application communicating with other devices when executed.

[0160] Processor 2001 may be a CPU (Central Processing Unit), a general purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 2001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0161] The bus 2002 may include a path to transmit information between the above components. The bus 2002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 2002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0162] The memory 2003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.

[0163] Optionally, the memory 2003 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 2001. The processor 2001 is used to execute the application code stored in the memory 2003 to implement the method provided in any embodiment of the present application.

[0164] The electronic device provided in the embodiment of the present application is applicable to any embodiment of the above method and will not be described in detail here.

[0165] The embodiment of the present application provides an electronic device. Compared with the prior art, when a target user's access request to a blockchain user's transaction data is detected, the target user's access rights are verified through the access rights information carried in the transaction data, and the transaction data is queried when the verification is passed, and the transaction data is returned to the target user. Based on this solution, the superior organization can access the transaction data, so that the superior organization can approve and supervise the transaction data, and the access rights of the user are controlled by adding the access rights information in the transaction information, which is conducive to ensuring the confidentiality of the transaction data.

[0166] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method shown in the above method embodiment is implemented.

[0167] The computer-readable storage medium provided in the embodiments of the present application is applicable to any embodiment of the above method and will not be described in detail here.

[0168] The embodiment of the present application provides a computer-readable storage medium. Compared with the prior art, when a target user's access request to a blockchain user's transaction data is detected, the target user's access rights are verified through the access rights information carried in the transaction data, and the transaction data is queried when the verification is passed, and the transaction data is returned to the target user. Based on this solution, the superior organization can access the transaction data, so that the superior organization can approve and supervise the transaction data, and the access rights of the user are controlled by adding the access rights information to the transaction information, which is conducive to ensuring the confidentiality of the transaction data.

[0169] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0170] The above are only some embodiments of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for accessing blockchain transaction data, characterized in that: include: When a target user's access request to the blockchain user's transaction data is detected, the target user's access rights are verified through the access rights information carried in the transaction data; If the verification is successful, the transaction data is queried; returning the transaction data to the target user, The transaction data includes a plaintext data part and an encrypted data part, an extension field is added to the plaintext data part of the transaction data, and the access permission information is added to the extension field; The user identifications of the target user and the transaction participants are encapsulated into a structure, and the target user with access rights is recorded by nesting multiple structures.

2. The method according to claim 1, characterized in that: The access permission information includes a designated user who has access permission to the transaction data, and the verifying the target user's access permission through the access permission information carried in the transaction data includes: Determining whether the target user belongs to the designated user; If yes, it is determined that the target user has access rights to the transaction data; If not, it is determined that the target user does not have access rights to the transaction data.

3. The method according to claim 1, characterized in that: The querying of the transaction data includes: The transaction data is queried based on the user identification of the target user and / or the user identification of the blockchain user.

4. The method according to claim 3, characterized in that Based on the user identification of the target user and / or the user identification of the blockchain user, querying the transaction data from the blockchain includes: Based on the user identifier of the target user and / or the user identifier of the blockchain user, query the transaction data from a MongoDB database used to cache blockchain data.

5. The method according to claim 2, characterized in that: The transaction data includes encrypted transaction details, and returning the transaction data to the target user includes: Decrypting the encrypted transaction details in the transaction data; The decrypted transaction data is returned to the target user.

6. The method according to claim 5, characterized in that The transaction data carries a key for encrypting the transaction details, and the decrypting of the encrypted transaction details in the transaction data includes: The encrypted transaction details in the transaction data are decrypted based on the key.

7. The method according to claim 6, characterized in that The key carried in the transaction data is encrypted by the public key of the designated user, and the decrypting of the encrypted transaction details in the transaction data includes: Decrypting the encrypted key using the private key of the target user to obtain the key; The encrypted transaction details in the transaction data are decrypted based on the key.

8. A method for generating blockchain transaction data, characterized in that: include: When a blockchain user conducts a transaction through a blockchain, transaction data is generated, wherein the transaction data includes access permission information, and the access permission information is used to verify the user's access permission to the transaction data. The transaction data includes a plaintext data part and an encrypted data part, an extension field is added to the plaintext data part of the transaction data, and the access permission information is added to the extension field; The user identifications of the user and the transaction participants are encapsulated as a structure, and the user with access rights is recorded by nesting multiple structures.

9. The method according to claim 8, characterized in that The access permission information includes designated users who have access permission to the transaction data.

10. The method according to claim 8 or 9, characterized in that: The transaction data also includes a key and transaction details, and the transaction details are encrypted by the key.

11. The method according to claim 10, characterized in that The secret key in the transaction data is encrypted by a public key of a designated user who has access rights to the transaction data.

12. A device for accessing blockchain transaction data, characterized in that: include: An access rights verification module, configured to verify the target user's access rights through access rights information carried in the transaction data when a target user's access request to the transaction data of a blockchain user is detected; A transaction data query module, used to query the transaction data when the verification is passed; A transaction data return module, used to return the transaction data to the target user, The transaction data includes a plaintext data part and an encrypted data part, an extension field is added to the plaintext data part of the transaction data, and the access permission information is added to the extension field; The user identifications of the target user and the transaction participants are encapsulated into a structure, and the target user with access rights is recorded by nesting multiple structures.

13. A device for generating blockchain transaction data, characterized in that: include: A transaction data generation module is used to generate transaction data when a blockchain user conducts a transaction through the blockchain, wherein the transaction data includes access permission information, and the access permission information is used to verify the user's access permission to the transaction data. The transaction data includes a plaintext data part and an encrypted data part, an extension field is added to the plaintext data part of the transaction data, and the access permission information is added to the extension field; The user identifications of the user and the transaction participants are encapsulated as a structure, and the user with access rights is recorded by nesting multiple structures.

14. An electronic device, characterized in that: including a processor and a memory; The memory is used to store operation instructions; The processor is used to execute the method according to any one of claims 1 to 11 by calling the operation instruction.

15. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.