CN117421770A - Resource processing method and device based on block chain, electronic equipment and storage medium - Google Patents

Resource processing method and device based on block chain, electronic equipment and storage medium Download PDF

Info

Publication number
CN117421770A
CN117421770A CN202311420436.1A CN202311420436A CN117421770A CN 117421770 A CN117421770 A CN 117421770A CN 202311420436 A CN202311420436 A CN 202311420436A CN 117421770 A CN117421770 A CN 117421770A
Authority
CN
China
Prior art keywords
blockchain
resource
data
user
resources
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311420436.1A
Other languages
Chinese (zh)
Inventor
王心妍
刘咏
朱莹
宁永杰
贾静丽
赵曜
王军义
李晓庆
陈婉菲
王亚勇
崔磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Hezhong Weiqi Technology Co ltd
State Grid Henan Electric Power Co Information And Communication Branch
State Grid Henan Electric Power Co Ltd
Original Assignee
Beijing Hezhong Weiqi Technology Co ltd
State Grid Henan Electric Power Co Information And Communication Branch
State Grid Henan Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Hezhong Weiqi Technology Co ltd, State Grid Henan Electric Power Co Information And Communication Branch, State Grid Henan Electric Power Co Ltd filed Critical Beijing Hezhong Weiqi Technology Co ltd
Priority to CN202311420436.1A priority Critical patent/CN117421770A/en
Publication of CN117421770A publication Critical patent/CN117421770A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6209Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

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

Abstract

The invention provides a resource processing method, a resource processing device, electronic equipment and a storage medium based on a block chain, and belongs to the technical field of block chain data processing. A blockchain-based resource processing method, comprising: receiving a resource authorization acquisition instruction sent by a user; resolving a user identification ID and a verification key from the authorization instruction; calling corresponding data resources in the blockchain according to the user identification ID and the verification key; displaying the preview of the invoked data resource to the user; if the preview resource correct feedback sent by the user is received, the method comprises the following steps: acquiring currently available blockchain computing resources according to the user identification ID; calculating the called data resources by using the block chain calculation resources; and sending the data resources after calculation processing to a user. The invention is based on the blockchain technology, adopts verification modes such as user identification ID, verification key and the like, ensures data security, improves data credibility, optimizes the utilization rate of blockchain resources, avoids resource waste and has strong practicability.

Description

基于区块链的资源处理方法、装置、电子设备和存储介质Blockchain-based resource processing methods, devices, electronic equipment and storage media

技术领域Technical field

本发明属于区块链数据处理技术领域,具体涉及一种基于区块链的资源处理方法、资源处理装置、电子设备和存储介质。The invention belongs to the field of blockchain data processing technology, and specifically relates to a resource processing method, resource processing device, electronic equipment and storage medium based on blockchain.

背景技术Background technique

随着互联网的迅速发展,共享产品因其存在较大的便利性迅速走进用户的生活,例如:共享单车、共享汽车、共享充电宝等。在用户使用共享产品时,通常需要交付一定的预存资源,以防止某些用户在使用共享产品的过程中存在恶意损坏产品的行为,适量的收取用户在预存资源,对企业(共享产品提供方)来说,也可以一定程度上保证自己的合法利益。With the rapid development of the Internet, shared products have quickly entered users' lives due to their greater convenience, such as shared bicycles, shared cars, shared power banks, etc. When users use shared products, they usually need to deliver certain pre-stored resources to prevent some users from maliciously damaging the products during the use of shared products. An appropriate amount of pre-stored resources from users is charged to the enterprise (shared product provider) In other words, you can also protect your legitimate interests to a certain extent.

基于区块链的不可篡改性与真实性,为提高用户对企业的信任,提高用户对其交付预存资源的安全要求,实现企业对用户预存资源的安全管理,已有现有技术采用区块链的方式对用户交付的预存资源进行管理。Based on the non-tamperability and authenticity of blockchain, in order to improve users' trust in enterprises, improve users' security requirements for the delivery of pre-stored resources, and achieve safe management of users' pre-stored resources by enterprises, existing technologies use blockchain Manage pre-stored resources delivered by users.

因此,针对区块链方式管理的用户资源,设计实用性强且安全性高的资源处理方法就很有必要。Therefore, it is necessary to design a resource processing method with strong practicality and high security for user resources managed by blockchain.

发明内容Contents of the invention

本发明所要解决的技术问题是,针对现有技术的不足,提供一种基于区块链的资源处理方法、资源处理装置、电子设备和存储介质。The technical problem to be solved by the present invention is to provide a resource processing method, resource processing device, electronic equipment and storage medium based on blockchain in view of the shortcomings of the existing technology.

为解决上述技术问题,本发明所采用的技术方案是:In order to solve the above technical problems, the technical solution adopted by the present invention is:

一种基于区块链的资源处理方法,包括:接收用户发送的获取资源授权指令;从授权指令中解析出用户标识ID和验证密钥;根据用户标识ID和验证密钥调用区块链中对应的数据资源;向用户展示所调用数据资源的预览;若接收到用户发送的预览资源正确反馈,则:根据用户标识ID获取当前可用的区块链计算资源;利用区块链计算资源对所调用数据资源进行计算处理;将计算处理后的数据资源发送给用户。A resource processing method based on blockchain, including: receiving resource acquisition authorization instructions sent by users; parsing the user identification ID and verification key from the authorization instructions; calling the corresponding ones in the blockchain based on the user identification ID and verification key data resources; display the preview of the called data resources to the user; if correct feedback of the preview resources sent by the user is received, then: obtain the currently available blockchain computing resources based on the user identification ID; use the blockchain computing resources to The data resources are calculated and processed; the calculated and processed data resources are sent to the user.

进一步的,还包括:生成包含数据资源处理全过程及发送目的地的记录数据;存储该记录数据。Further, the method also includes: generating record data including the entire process of data resource processing and sending destination; and storing the record data.

进一步的,存储该记录数据的方法包括:在区块链节点及区块链服务器中同时存储该记录数据。Further, the method of storing the record data includes: simultaneously storing the record data in the blockchain node and the blockchain server.

进一步的,调用区块链中对应的数据资源的方法包括:根据用户标识ID查找用户存储在区块链中的全部数据资源;根据验证密钥验证并调用区块链中对应的数据资源。Further, the method of calling the corresponding data resources in the blockchain includes: searching all the data resources stored in the blockchain by the user according to the user identification ID; verifying and calling the corresponding data resources in the blockchain according to the verification key.

进一步的,根据用户标识ID查找用户存储在区块链中的全部数据资源的方法包括:通过用户标识ID构建统一的寻址指针;根据寻址指针寻找对应的存储记录;根据存储记录对区块链中对应数据资源进行预调用。Furthermore, the method of searching all the data resources stored in the blockchain by the user based on the user identification ID includes: constructing a unified addressing pointer through the user identification ID; finding the corresponding storage record based on the addressing pointer; and matching the block based on the storage record. The corresponding data resources in the chain are pre-called.

进一步的,根据验证密钥验证并调用区块链中对应的数据资源的方法包括:解密验证密钥后获得密钥明文;利用密钥明文对预调用的数据资源中的加密文进行解密,确定匹配的数据资源;从区块链中调用所匹配的数据资源。Further, the method of verifying and calling the corresponding data resources in the blockchain based on the verification key includes: decrypting the verification key to obtain the key plaintext; using the key plaintext to decrypt the ciphertext in the pre-called data resource to determine Matching data resources; calling the matching data resources from the blockchain.

进一步的,根据用户标识ID获取当前可用的区块链计算资源的方法包括:根据用户标识ID获取对应的资源使用权限;根据对应的资源使用权限在可调用的区块链节点内获取可用的区块链计算资源。Further, the method of obtaining the currently available blockchain computing resources according to the user identification ID includes: obtaining the corresponding resource usage permissions according to the user identification ID; obtaining the available area in the callable blockchain node according to the corresponding resource usage permissions. Blockchain computing resources.

一种基于区块链的资源处理装置,包括处理单元和区块链单元;A resource processing device based on blockchain, including a processing unit and a blockchain unit;

所述处理单元,用于接收用户发送的获取数据资源的授权指令,用于从授权指令中解析出用户标识ID和验证密钥,用于向用户展示所调用数据资源的预览,用于接收用户发送的预览资源正确反馈,用于将最终计算处理后的数据资源发送给用户;The processing unit is used to receive an authorization instruction for obtaining data resources sent by the user, to parse the user identification ID and verification key from the authorization instruction, to display a preview of the called data resource to the user, and to receive the user's authorization instruction. Correct feedback of the sent preview resources is used to send the final calculated and processed data resources to the user;

所述区块链单元,用于根据用户标识ID和验证密钥调用区块链中对应的数据资源,用于根据用户标识ID获取当前可用的区块链计算资源,用于利用区块链计算资源对所调用数据资源进行计算处理。The blockchain unit is used to call corresponding data resources in the blockchain based on the user identification ID and verification key, to obtain currently available blockchain computing resources based on the user identification ID, and to utilize blockchain computing The resource performs calculation processing on the called data resource.

一种电子设备,包括处理器和存储器;所述存储器用于存储可执行指令,所述处理器用于执行所述指令,以实现所述的资源处理方法。An electronic device includes a processor and a memory; the memory is used to store executable instructions, and the processor is used to execute the instructions to implement the resource processing method.

一种计算机可读存储介质,所述可读存储介质中存储有指令,当所述指令被执行时,实现所述的资源处理方法。A computer-readable storage medium. Instructions are stored in the readable storage medium. When the instructions are executed, the resource processing method is implemented.

与现有技术相比,本发明有益效果如下:Compared with the prior art, the beneficial effects of the present invention are as follows:

本发明根据用户发送的获取资源授权指令调用数据资源,授权指令中包含用户标识ID和验证密钥,通过用户标识ID和验证密钥的使用,以及多层次的解密和验证,能够确保数据安全,保证只有授权的用户才能调用自己的数据和计算资源,防止未经授权的访问和数据泄漏。The present invention calls data resources according to the resource acquisition authorization instruction sent by the user. The authorization instruction contains the user identification ID and verification key. Through the use of the user identification ID and verification key, as well as multi-level decryption and verification, data security can be ensured. Ensure that only authorized users can access their own data and computing resources to prevent unauthorized access and data leakage.

本发明在调用数据资源后,先向用户发送所调用资源的预览,由用户确认是否为其所请求的数据资源,区块链服务器根据用户的反馈决定中止执行或继续执行,只有在用户确认正确后才调用区块链计算资源对资源数据进行计算处理,通过用户事先确认的方式,避免浪费区块链计算资源,也能够提升用户体验和系统的透明度。After calling the data resource, the present invention first sends a preview of the called resource to the user, and the user confirms whether it is the requested data resource. The blockchain server decides to suspend execution or continue execution based on the user's feedback. Only when the user confirms that it is correct Only then will the blockchain computing resources be called to calculate and process the resource data. Through the user's prior confirmation, this will avoid wasting blockchain computing resources and can also improve the user experience and system transparency.

本发明基于当前用户的标识ID,获取对应的资源使用权限,通过资源使用权限在可调用的区块链节点内获取对应的计算资源,而后对全部的计算资源进行统计,最终获得当前可用的区块链计算资源,最终所获取的区块链计算资源对所调用数据资源进行计算。通过用户标识ID和资源使用权限,区块链服务器可以有效的管理可用的区块链计算资源,避免资源浪费,确保资源的有效利用。通过区块链计算资源的使用,数据资源可以在服务器端进行计算和处理,减轻了用户终端的负担。This invention obtains the corresponding resource usage rights based on the identification ID of the current user, obtains the corresponding computing resources in the callable blockchain node through the resource usage rights, and then performs statistics on all computing resources, and finally obtains the currently available area. Blockchain computing resources, the final obtained blockchain computing resources calculate the called data resources. Through user identification ID and resource usage permissions, the blockchain server can effectively manage the available blockchain computing resources, avoid resource waste, and ensure the effective use of resources. Through the use of blockchain computing resources, data resources can be calculated and processed on the server side, reducing the burden on user terminals.

本发明根据本次对数据资源的处理全过程及数据资源最终的发送目的地,生成记录数据,并将记录数据存储在所调用的区块链接点和区块链服务器内,记录数据中的数据资源处理全过程包括数据资源的请求、调用、验证、计算处理、发送过程。通过对数据资源处理全过程的记录,有助于追踪数据的历史,实施审计,确保数据的完整性,帮助解决潜在的争议。通过在多个区块链节点和服务器上存储记录数据,确保了数据的冗余存储,减少了数据丢失的风险,提高了数据的持久性。将记录数据写入区块链中,可以增加操作的透明度和可追溯性,确保记录数据不可篡改。The present invention generates record data based on the entire process of processing data resources and the final destination of the data resources, and stores the record data in the called block link point and blockchain server, and records the data in the data. The entire resource processing process includes the request, call, verification, calculation processing, and sending process of data resources. By recording the entire process of data resource processing, it helps to track the history of data, conduct audits, ensure data integrity, and help resolve potential disputes. By storing record data on multiple blockchain nodes and servers, redundant storage of data is ensured, reducing the risk of data loss and improving data durability. Writing recorded data into the blockchain can increase the transparency and traceability of operations and ensure that the recorded data cannot be tampered with.

附图说明Description of the drawings

下面结合附图对本发明做进一步的详细说明。The present invention will be described in further detail below in conjunction with the accompanying drawings.

图1:本发明实施例1的流程图;Figure 1: Flow chart of Embodiment 1 of the present invention;

图2:本发明实施例1的执行示意图;Figure 2: Schematic diagram of execution of Embodiment 1 of the present invention;

图3:本发明实施例2的示意图;Figure 3: Schematic diagram of Embodiment 2 of the present invention;

图4:本发明实施例3的示意图。Figure 4: Schematic diagram of Embodiment 3 of the present invention.

具体实施方式Detailed ways

为了更好地理解本发明,下面结合实施例和附图进一步清楚阐述本发明的内容,但本发明的保护内容不仅仅局限于下面的实施例。在下文的描述中,给出了大量具体的细节以便提供对本发明更为彻底的理解。然而,对于本领域技术人员来说显而易见的是,本发明可以无需一个或多个这些细节而得以实施。In order to better understand the present invention, the content of the present invention will be further clearly explained below in conjunction with the embodiments and drawings, but the protection content of the present invention is not limited only to the following embodiments. In the following description, numerous specific details are given in order to provide a more thorough understanding of the invention. However, it will be apparent to one skilled in the art that the present invention may be practiced without one or more of these details.

实施例1:本实施例的目的是提供一种基于区块链的资源处理方法。Embodiment 1: The purpose of this embodiment is to provide a resource processing method based on blockchain.

如图2所示为本实施的执行过程示意图,用户将数据资源存储到区块链中以后,能够执行本实施例的资源处理方法,通过向区块链服务器发送请求,以获取所存储在区块链中的数据资源。Figure 2 is a schematic diagram of the execution process of this implementation. After the user stores the data resources in the blockchain, he can execute the resource processing method of this embodiment and obtain the data stored in the blockchain by sending a request to the blockchain server. Data resources in the blockchain.

用户存储在区块链中的数据资源中还包括有用户标识ID和加密文。用户将数据资源存储到区块链时,还根据数据资源在区块链中的存储地址,以及数据资源中的用户标识ID和加密文构建独立的存储记录,并将存储记录存储在区块链服务器中。User data resources stored in the blockchain also include user identification ID and encrypted text. When users store data resources in the blockchain, they also construct independent storage records based on the storage address of the data resources in the blockchain, as well as the user identification ID and encryption text in the data resources, and store the storage records in the blockchain. in the server.

如图1所示,所述资源处理方法包括:As shown in Figure 1, the resource processing method includes:

S1、区块链服务器根据用户发送的获取资源授权指令,调用区块链中对应的数据资源。S1. The blockchain server calls the corresponding data resources in the blockchain according to the resource acquisition authorization instruction sent by the user.

用户在需要获取存储在区块链中的数据资源时,在客户端或用户终端中输入或生成获取资源授权指令,授权指令被发送至区块链服务器。授权指令中包含有用户标识ID和验证密钥。When a user needs to obtain data resources stored in the blockchain, he or she inputs or generates a resource authorization instruction in the client or user terminal, and the authorization instruction is sent to the blockchain server. The authorization instruction contains the user identification ID and verification key.

当区块链服务器接收到获取资源授权指令后,从授权指令中解析出用户标识ID和验证密钥。随后根据用户标识ID查找用户存储在区块链中的全部数据资源,根据验证密钥验证并调用区块链中对应的数据资源。When the blockchain server receives the resource authorization instruction, it parses the user identification ID and verification key from the authorization instruction. Then all the data resources stored in the blockchain by the user are searched based on the user identification ID, and the corresponding data resources in the blockchain are verified and called based on the verification key.

具体的,区块链服务器根据用户标识ID构建统一的寻址指针,利用寻址指针在区块链服务器内寻找对应用户标识ID的存储记录,根据存储记录对用户存储在区块链中的全部数据资源进行预调用。随后区块链服务器对验证密钥进行解密,获得密钥明文,基于密钥明文对预调用的数据资源中的加密文进行解密,通过对加密文的验证,从中确定所匹配的数据资源,所匹配的数据资源即为用户本次所请求的数据资源,最终对该数据资源进行调用。Specifically, the blockchain server constructs a unified addressing pointer based on the user identification ID, uses the addressing pointer to find the storage record corresponding to the user identification ID in the blockchain server, and searches all the user's stored data in the blockchain based on the storage record. Data resources are pre-called. Then the blockchain server decrypts the verification key to obtain the key plaintext, decrypts the ciphertext in the pre-called data resource based on the key plaintext, and determines the matching data resource by verifying the ciphertext. The matching data resource is the data resource requested by the user this time, and the data resource is finally called.

进一步的,用户侧的客户端或用户终端在发送授权指令时,一并对授权指令中的验证密钥进行初步脱密,区块链服务器对初步脱密的验证密钥进行二次解密,获得最终的密钥明文。Further, when the client or user terminal on the user side sends the authorization instruction, it initially decrypts the verification key in the authorization instruction, and the blockchain server performs a secondary decryption of the preliminary decryption verification key to obtain The final key plaintext.

S2、区块链服务器向用户展示所调用数据资源的预览信息,由用户确认是否为所请求的数据资源。S2. The blockchain server displays the preview information of the called data resource to the user, and the user confirms whether it is the requested data resource.

区块链服务器在调用对应的数据资源后,获取数据资源的基础信息,基础信息包括数据资源的存储位置、数据资源的内容摘要。随后根据基础信息生成数据资源的预览信息,并将预览信息展示给用户。After calling the corresponding data resource, the blockchain server obtains the basic information of the data resource. The basic information includes the storage location of the data resource and the content summary of the data resource. Then the preview information of the data resource is generated based on the basic information, and the preview information is displayed to the user.

用户根据预览信息确认该数据资源是否为本次所请求的数据资源,若否,用户向区块链服务器反馈“预览资源错误”,区块链服务器中止本次的任务,待用户重新提交获取资源授权指令后再次执行。若是,用户向区块链服务器反馈“预览资源正确”,区块链服务器继续执行后续步骤。The user confirms whether the data resource is the requested data resource based on the preview information. If not, the user feedbacks "Preview Resource Error" to the blockchain server, and the blockchain server aborts this task and waits for the user to resubmit to obtain the resource. Execute again after authorizing the command. If so, the user feedbacks "the preview resource is correct" to the blockchain server, and the blockchain server continues to perform subsequent steps.

进一步的,区块链服务器在向展示预览信息时,还一并展示本次用户所发送的授权指令及授权指令中的验证密钥,用户或用户所使用的客户端或用户终端能够根据授权指令和验证密钥判断其与区块链服务器间的通信内容是否被篡改,确保信息安全。Furthermore, when the blockchain server displays the preview information, it also displays the authorization instruction sent by the user this time and the verification key in the authorization instruction. The user or the client or user terminal used by the user can follow the authorization instruction. and verification key to determine whether the communication content between it and the blockchain server has been tampered with to ensure information security.

S3、区块链服务器根据授权指令中的用户标识ID获取当前可用的区块链计算资源。S3. The blockchain server obtains the currently available blockchain computing resources based on the user identification ID in the authorization instruction.

区块链服务器基于当前用户的标识ID,获取对应的资源使用权限,通过资源使用权限在可调用的区块链节点内获取对应的计算资源,而后对全部的计算资源进行统计,最终获得当前可用的区块链计算资源。The blockchain server obtains the corresponding resource usage rights based on the current user's identification ID, obtains the corresponding computing resources in the callable blockchain node through the resource usage rights, and then counts all computing resources, and finally obtains the currently available of blockchain computing resources.

S4、利用所获取的区块链计算资源对所调用数据资源进行计算,并将计算处理后的数据资源回传给用户。S4. Use the obtained blockchain computing resources to calculate the called data resources, and return the calculated and processed data resources to the user.

区块链服务器利用所获取的区块链计算资源对所调用数据资源进行计算,并将计算处理后的数据资源回传给发送获取资源授权指令的客户端或用户终端。The blockchain server uses the obtained blockchain computing resources to calculate the called data resources, and returns the calculated and processed data resources to the client or user terminal that sent the resource acquisition authorization instruction.

进一步的,用户所发送的获取资源授权指令中还包含第三方地址,区块链服务器还可以将处理后的数据资源传输至第三方地址。Furthermore, the resource acquisition authorization instruction sent by the user also contains a third-party address, and the blockchain server can also transmit the processed data resources to the third-party address.

S5、存储本次对数据资源的处理全过程。S5: Store the entire process of processing data resources.

区块链服务器根据本次对数据资源的处理全过程及数据资源最终的发送目的地,生成记录数据,并将记录数据存储在所调用的区块链接点和区块链服务器内,形成冗余存储。记录数据中的数据资源处理全过程包括数据资源的请求、调用、验证、计算处理、发送过程。The blockchain server generates record data based on the entire process of processing data resources and the final destination of the data resources, and stores the record data in the called block link point and blockchain server to form redundancy storage. The entire process of data resource processing in recorded data includes the request, call, verification, calculation processing, and sending process of data resources.

进一步的,区块链服务器所生成的使用记录还包括对应数据资源的流动痕迹。Furthermore, the usage records generated by the blockchain server also include flow traces of the corresponding data resources.

实施例2:本实施例的目的是提供一种基于区块链的资源处理装置,用于执行如实施例1的资源处理方法。如图3所示,所述资源处理装置200包括:处理单元201和区块链单元202。Embodiment 2: The purpose of this embodiment is to provide a blockchain-based resource processing device for executing the resource processing method in Embodiment 1. As shown in Figure 3, the resource processing device 200 includes: a processing unit 201 and a blockchain unit 202.

处理单元201,用于接收用户发送的获取数据资源的授权指令,用于从授权指令中解析出用户标识ID和验证密钥,用于向用户展示所调用数据资源的预览,用于接收用户发送的预览资源正确反馈,用于将最终计算处理后的数据资源发送给用户。The processing unit 201 is used to receive authorization instructions for obtaining data resources sent by the user, to parse the user identification ID and verification key from the authorization instructions, to display a preview of the called data resources to the user, and to receive the user's instructions to obtain data resources. Correct feedback of the preview resources is used to send the final calculated and processed data resources to the user.

进一步的,处理单元201还用于生成包含数据资源处理全过程及发送目的地的记录数据,用于在区块链节点及区块链服务器中同时存储该记录数据。Further, the processing unit 201 is also used to generate record data including the entire process of data resource processing and transmission destination, and to simultaneously store the record data in the blockchain node and the blockchain server.

区块链单元202,用于根据用户标识ID和验证密钥调用区块链中对应的数据资源,用于根据用户标识ID获取当前可用的区块链计算资源,用于利用区块链计算资源对所调用数据资源进行计算处理。The blockchain unit 202 is used to call the corresponding data resources in the blockchain based on the user identification ID and verification key, to obtain the currently available blockchain computing resources based on the user identification ID, and to utilize the blockchain computing resources. Perform calculation processing on the called data resources.

进一步的,区块链单元202还用于根据用户标识ID查找用户存储在区块链中的全部数据资源,用于通过用户标识ID构建统一的寻址指针,用于根据寻址指针寻找对应的存储记录,用于根据存储记录对区块链中对应数据资源进行预调用。Further, the blockchain unit 202 is also used to search for all data resources stored in the blockchain by the user according to the user identification ID, to construct a unified addressing pointer through the user identification ID, and to find the corresponding address pointer according to the addressing pointer. Storage records are used to pre-call the corresponding data resources in the blockchain based on the storage records.

进一步的,区块链单元202还用于根据验证密钥验证并调用区块链中对应的数据资源,用于解密验证密钥后获得密钥明文,用于利用密钥明文对预调用的数据资源中的加密文进行解密以确定匹配的数据资源,用于从区块链中调用所匹配的数据资源Further, the blockchain unit 202 is also used to verify and call the corresponding data resources in the blockchain according to the verification key, to obtain the key plaintext after decrypting the verification key, and to use the key plaintext to verify the pre-called data. The encrypted text in the resource is decrypted to determine the matching data resource, which is used to call the matching data resource from the blockchain.

进一步的,区块链单元202还用于根据用户标识ID获取对应的资源使用权限,用于根据对应的资源使用权限在可调用的区块链节点内获取可用的区块链计算资源。Further, the blockchain unit 202 is also used to obtain corresponding resource usage rights according to the user identification ID, and to obtain available blockchain computing resources in the callable blockchain node according to the corresponding resource usage rights.

关于本实施例中的装置,其中各个单元执行操作的具体方式已经在实施例1中进行了详细描述,此处将不做详细阐述说明。Regarding the device in this embodiment, the specific manner in which each unit performs operations has been described in detail in Embodiment 1, and will not be described in detail here.

所属领域的技术人员应明白,本申请为描述的方便和简洁,装置实施例中仅以上述各功能模块或单元的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块或单元完成,即将装置的内部结构划分成不同的功能模块或单元,以完成以上描述的全部或者部分功能。Those skilled in the art should understand that in this application, for the convenience and simplicity of description, the device embodiments only take the division of the above functional modules or units as examples. In actual applications, the above functions can be allocated to different modules according to needs. Functional modules or units are completed, that is, the internal structure of the device is divided into different functional modules or units to complete all or part of the functions described above.

实施例3:参阅图4,本实施例的目的是用于提供一种电子设备300,包括至少一个处理器301以及用于存储处理器301可执行指令的一个或多个存储器302。其中,处理器301用于执行存储器302中的指令,以实现实施例1所述的资源处理方法。Embodiment 3: Referring to FIG. 4 , the purpose of this embodiment is to provide an electronic device 300 including at least one processor 301 and one or more memories 302 for storing instructions executable by the processor 301 . The processor 301 is used to execute instructions in the memory 302 to implement the resource processing method described in Embodiment 1.

电子设备300还包括总线304,上述处理器301和存储器302通过总线304相互连接,或采用其他方式相互连接。The electronic device 300 also includes a bus 304. The above-mentioned processor 301 and the memory 302 are connected to each other through the bus 304, or are connected to each other in other ways.

其中,处理器301是中央处理器(central processing unit,CPU)、通用处理器网络处理器(network processor,NP)、数字信号处理器(digital signal processing,DSP)、微处理器、微控制器、可编程逻辑器件(programmable logic device,PLD)或它们的任意组合。处理器301还可以是其它具有处理功能的装置,例如电路、器件或软件模块,不予限制。在一种示例中,处理器301可以包括一个或多个CPU,例如图4中的CPU0和CPU1。Among them, the processor 301 is a central processing unit (CPU), a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, Programmable logic device (PLD) or any combination thereof. The processor 301 can also be other devices with processing functions, such as circuits, devices or software modules, without limitation. In one example, the processor 301 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 4 .

其中,存储器302可以是只读存储器(read-only memory,ROM)或可存储静态信息和/或指令的其他类型的静态存储设备,也可以是随机存取存储器(random accessmemory,RAM)或可存储信息和/或指令的其他类型的动态存储设备,还可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或其他磁存储设备等,不予限制。The memory 302 may be a read-only memory (ROM) or other type of static storage device that can store static information and/or instructions, or it may be a random access memory (random access memory, RAM) or a device that can store static information and/or instructions. Other types of dynamic storage devices for information and/or instructions, such as electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) ) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, etc., are not restricted.

需要指出的是,存储器302可以独立于处理器301存在,也可以和处理器301集成在一起。存储器302可以用于存储指令或者程序代码或者一些数据等。存储器302可以位于电子设备300内,也可以位于电子设备300外,不予限制。It should be noted that the memory 302 may exist independently of the processor 301 or may be integrated with the processor 301 . The memory 302 can be used to store instructions or program codes or some data. The memory 302 may be located within the electronic device 300 or may be located outside the electronic device 300, without limitation.

作为一种可选的实现方式,电子设备300还包括通信接口303。通信接口303是有线接口(或端口),例如光纤分布式数据接口(fiber distributed data interface,FDDI)、千兆以太网接口(gigabit ethernet,GE)等。或者,通信接口303是无线接口。通信接口303可以是模块、电路、通信接口或者任何能够实现通信的装置。通信接口303用于与其他设备或其它通信网络进行通信,该其它通信网络可以为以太网,无线接入网(radio accessnetwork,RAN),无线局域网(wireless local area networks,WLAN)等。As an optional implementation manner, the electronic device 300 also includes a communication interface 303. The communication interface 303 is a wired interface (or port), such as fiber distributed data interface (FDDI), gigabit ethernet (GE), etc. Alternatively, communication interface 303 is a wireless interface. The communication interface 303 may be a module, a circuit, a communication interface, or any device capable of realizing communication. The communication interface 303 is used to communicate with other devices or other communication networks. The other communication networks may be Ethernet, wireless access network (radio access network, RAN), wireless local area networks (WLAN), etc.

作为一种可选的实现方式,电子设备300还包括输入设备305和输出设备306。示例性地,输入设备305是键盘、鼠标、麦克风或操作杆等设备,输出设备306是显示屏、扬声器(speaker)等设备。As an optional implementation manner, the electronic device 300 also includes an input device 305 and an output device 306. For example, the input device 305 is a device such as a keyboard, a mouse, a microphone, or a joystick, and the output device 306 is a device such as a display screen, a speaker, or the like.

需要指出的是,电子设备300可以是台式机、便携式电脑、网络服务器、移动手机、平板电脑、无线终端、嵌入式设备、芯片系统或有图4中类似结构的设备。此外,图4中示出的组成结构并不构成对该终端设备的限定,除图4所示部件之外,该电子设备300可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。It should be noted that the electronic device 300 may be a desktop computer, a portable computer, a network server, a mobile phone, a tablet computer, a wireless terminal, an embedded device, a chip system, or a device with a similar structure as shown in FIG. 4 . In addition, the composition structure shown in FIG. 4 does not constitute a limitation of the terminal device. In addition to the components shown in FIG. 4 , the electronic device 300 may include more or less components than shown in the figure, or a combination of certain components. components, or different arrangements of components.

实施例4:本实施例的目的是提供一种计算机可读存储介质。Embodiment 4: The purpose of this embodiment is to provide a computer-readable storage medium.

上述方法实施例中的全部或者部分流程可以由计算机指令来指示相关的硬件完成,该程序可存储于所述计算机可读存储介质中,该程序在执行时,可以实现实施例1所述的资源处理方法。All or part of the processes in the above method embodiments can be completed by computer instructions to instruct relevant hardware. The program can be stored in the computer-readable storage medium. When the program is executed, the resources described in Embodiment 1 can be realized. Approach.

所述计算机可读存储介质可以是实施例3电子设备的内部存储单元,例如硬盘或内存。所述计算机可读存储介质也可以是电子设备的外部存储设备,例如所配备的插接式硬盘,智能存储卡(smart media card,SMC),安全数字(secure digital,SD)卡,闪存卡(flash card)等。进一步地,所述计算机可读存储介质还可以既包括上述电子设备的内部存储单元也包括外部存储设备。所述计算机可读存储介质用于存储计算机程序以及电子设备所需的其他程序和数据。所述计算机可读存储介质还可以用于暂时地存储已经输出或者将要输出的数据。The computer-readable storage medium may be an internal storage unit of the electronic device of Embodiment 3, such as a hard disk or a memory. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard drive, a smart media card (SMC), a secure digital (SD) card, a flash memory card ( flash card), etc. Further, the computer-readable storage medium may also include both an internal storage unit of the above-mentioned electronic device and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by electronic devices. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

结合本申请所提供的几个实施例,应该理解到,所提供的装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。Combining several embodiments provided in this application, it should be understood that the provided devices and methods can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, for example, multiple modules or units or components may be The combination can either be integrated into another device, or some features can be omitted, or not implemented.

另外,在本申请装置实施例中各功能模块或单元可以集成在一个单元中,也可以是各个模块或单元单独物理存在,也可以两个或两个以上模块或单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, in the device embodiment of the present application, each functional module or unit can be integrated into one unit, or each module or unit can exist physically alone, or two or more modules or units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or software function modules.

上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the above-mentioned integrated unit is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application are essentially or contribute to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium , including several instructions to cause a device (which can be a microcontroller, a chip, etc.) or a processor to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage media include: U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk and other media that can store program codes.

最后说明的是,以上实施例仅用以说明本发明的技术方案而非限制,本领域普通技术人员对本发明的技术方案所做的其他修改或者等同替换,只要不脱离本发明技术方案的精神和范围,均应涵盖在本发明的权利要求范围当中。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit them. Those of ordinary skill in the art may make other modifications or equivalent substitutions to the technical solutions of the present invention, as long as they do not deviate from the spirit and scope of the technical solutions of the present invention. The scope should be covered by the claims of the present invention.

Claims (10)

1.一种基于区块链的资源处理方法,其特征在于:包括:1. A resource processing method based on blockchain, characterized by: including: 接收用户发送的获取资源授权指令;Receive resource acquisition authorization instructions sent by users; 从授权指令中解析出用户标识ID和验证密钥;Parse the user identification ID and verification key from the authorization instruction; 根据用户标识ID和验证密钥调用区块链中对应的数据资源;Call the corresponding data resources in the blockchain based on the user identification ID and verification key; 向用户展示所调用数据资源的预览;Show users a preview of the called data resources; 若接收到用户发送的预览资源正确反馈,则:If correct feedback about the preview resource sent by the user is received, then: 根据用户标识ID获取当前可用的区块链计算资源;Obtain currently available blockchain computing resources based on user identification ID; 利用区块链计算资源对所调用数据资源进行计算处理;Use blockchain computing resources to calculate and process the called data resources; 将计算处理后的数据资源发送给用户。Send the calculated and processed data resources to the user. 2.根据权利要求1所述的基于区块链的资源处理方法,其特征在于:还包括:2. The resource processing method based on blockchain according to claim 1, characterized in that: it further includes: 生成包含数据资源处理全过程及发送目的地的记录数据;Generate record data containing the entire process of data resource processing and sending destination; 存储该记录数据。Store this record data. 3.根据权利要求2所述的基于区块链的资源处理方法,其特征在于:存储该记录数据的方法包括:在区块链节点及区块链服务器中同时存储该记录数据。3. The resource processing method based on blockchain according to claim 2, characterized in that: the method of storing the recorded data includes: simultaneously storing the recorded data in a blockchain node and a blockchain server. 4.根据权利要求1所述的基于区块链的资源处理方法,其特征在于:调用区块链中对应的数据资源的方法包括:4. The resource processing method based on blockchain according to claim 1, characterized in that: the method of calling corresponding data resources in the blockchain includes: 根据用户标识ID查找用户存储在区块链中的全部数据资源;Search all data resources stored in the blockchain by the user based on the user identification ID; 根据验证密钥验证并调用区块链中对应的数据资源。Verify and call the corresponding data resources in the blockchain based on the verification key. 5.根据权利要求4所述的基于区块链的资源处理方法,其特征在于:根据用户标识ID查找用户存储在区块链中的全部数据资源的方法包括:5. The resource processing method based on blockchain according to claim 4, characterized in that: the method of searching all data resources stored in the blockchain by the user according to the user identification ID includes: 通过用户标识ID构建统一的寻址指针;Construct a unified addressing pointer through the user identification ID; 根据寻址指针寻找对应的存储记录;Find the corresponding storage record according to the addressing pointer; 根据存储记录对区块链中对应数据资源进行预调用。Pre-call the corresponding data resources in the blockchain based on the storage records. 6.根据权利要求5所述的基于区块链的资源处理方法,其特征在于:根据验证密钥验证并调用区块链中对应的数据资源的方法包括:6. The resource processing method based on blockchain according to claim 5, characterized in that: the method of verifying and calling the corresponding data resources in the blockchain according to the verification key includes: 解密验证密钥后获得密钥明文;Obtain the key plaintext after decrypting the verification key; 利用密钥明文对预调用的数据资源中的加密文进行解密,确定匹配的数据资源;Use the plaintext of the key to decrypt the encrypted text in the pre-called data resource and determine the matching data resource; 从区块链中调用所匹配的数据资源。Call the matching data resource from the blockchain. 7.根据权利要求1所述的基于区块链的资源处理方法,其特征在于:根据用户标识ID获取当前可用的区块链计算资源的方法包括:7. The resource processing method based on blockchain according to claim 1, characterized in that: the method of obtaining currently available blockchain computing resources according to user identification ID includes: 根据用户标识ID获取对应的资源使用权限;Obtain the corresponding resource usage permissions based on the user identification ID; 根据对应的资源使用权限在可调用的区块链节点内获取可用的区块链计算资源。Obtain available blockchain computing resources within the callable blockchain node according to the corresponding resource usage rights. 8.一种基于区块链的资源处理装置,其特征在于:包括处理单元和区块链单元;8. A resource processing device based on blockchain, characterized by: including a processing unit and a blockchain unit; 所述处理单元,用于接收用户发送的获取数据资源的授权指令,用于从授权指令中解析出用户标识ID和验证密钥,用于向用户展示所调用数据资源的预览,用于接收用户发送的预览资源正确反馈,用于将最终计算处理后的数据资源发送给用户;The processing unit is used to receive an authorization instruction for obtaining data resources sent by the user, to parse the user identification ID and verification key from the authorization instruction, to display a preview of the called data resource to the user, and to receive the user's authorization instruction. Correct feedback of the sent preview resources is used to send the final calculated and processed data resources to the user; 所述区块链单元,用于根据用户标识ID和验证密钥调用区块链中对应的数据资源,用于根据用户标识ID获取当前可用的区块链计算资源,用于利用区块链计算资源对所调用数据资源进行计算处理。The blockchain unit is used to call corresponding data resources in the blockchain based on the user identification ID and verification key, to obtain currently available blockchain computing resources based on the user identification ID, and to utilize blockchain computing The resource performs calculation processing on the called data resource. 9.一种电子设备,其特征在于:包括处理器和存储器;所述存储器用于存储可执行指令,所述处理器用于执行所述指令,以实现权利要求1-7任一项所述的资源处理方法。9. An electronic device, characterized in that: it includes a processor and a memory; the memory is used to store executable instructions, and the processor is used to execute the instructions to implement the method described in any one of claims 1-7 Resource handling methods. 10.一种计算机可读存储介质,其特征在于:所述可读存储介质中存储有指令,当所述指令被执行时,实现权利要求1-7任一项所述的资源处理方法。10. A computer-readable storage medium, characterized in that: instructions are stored in the readable storage medium, and when the instructions are executed, the resource processing method according to any one of claims 1-7 is implemented.
CN202311420436.1A 2023-10-30 2023-10-30 Resource processing method and device based on block chain, electronic equipment and storage medium Pending CN117421770A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311420436.1A CN117421770A (en) 2023-10-30 2023-10-30 Resource processing method and device based on block chain, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311420436.1A CN117421770A (en) 2023-10-30 2023-10-30 Resource processing method and device based on block chain, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117421770A true CN117421770A (en) 2024-01-19

Family

ID=89530929

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311420436.1A Pending CN117421770A (en) 2023-10-30 2023-10-30 Resource processing method and device based on block chain, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117421770A (en)

Similar Documents

Publication Publication Date Title
US12041037B2 (en) Techniques for shared private data objects in a trusted execution environment
CN108810006B (en) Resource access method, device, equipment and storage medium
US11239994B2 (en) Techniques for key provisioning in a trusted execution environment
JP6991431B2 (en) Methods and systems to secure communication between the host system and the data processing accelerator
US9209973B2 (en) Delegate authorization in cloud-based storage system
US8924674B2 (en) Permissions of objects in hosted storage
US20230014599A1 (en) Data processing method and apparatus for blockchain system
US10911538B2 (en) Management of and persistent storage for nodes in a secure cluster
US20230080528A1 (en) Smart data protection
KR102329221B1 (en) Blockchain-based user authentication model
CN112511316A (en) Single sign-on access method and device, computer equipment and readable storage medium
CN102882933B (en) A kind of encryption cloud storage system
CN111245811A (en) Information encryption method and device and electronic equipment
CN110830428A (en) Block chain financial big data processing method and system
CN110851851B (en) Authority management method, device and equipment in block chain type account book
CN117421770A (en) Resource processing method and device based on block chain, electronic equipment and storage medium
US20240193255A1 (en) Systems and methods of protecting secrets in use with containerized applications
CN111682934B (en) Method and system for storing, accessing and sharing comprehensive energy metering data
CN111292082B (en) Public key management method, device and equipment in block chain type account book
Mudgal et al. ‘International journal of engineering sciences & research technology enhancing data security using encryption and splitting technique over multi-cloud environment
US20230403138A1 (en) Agentless single sign-on techniques
Srikanth et al. Proxy-Based Re-Encryption Design for the IoT Ecosystem
CN116055042A (en) A quantum key encryption method, device, equipment and storage medium
CN114629945A (en) Micro-service architecture based interface calling method and device and computer equipment
CN118590306A (en) Service request verification method, device, equipment, storage medium and program product

Legal Events

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