A task processing request processing method and device, and a blockchain node device
By configuring the processing permissions of blockchain nodes in configuration data outside of smart contracts, and combining digital certificates and voting mechanisms, the problem of adjusting permissions disrupting the sandbox isolation environment is solved, achieving stable and flexible permission management.
Patent Information
- Application Number
- CN202080003792.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-23
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2040-12-23
AI Technical Summary
In existing technologies, adjusting the processing permissions of blockchain nodes may affect the sandbox isolation environment, causing abnormal node operation.
The processing permissions of blockchain nodes are configured in configuration data outside of smart contracts. Target processing permissions are determined through digital certificates and voting mechanisms, and permissions can be queried and adjusted in the configuration data, independent of smart contracts.
It achieves stable and fine-grained access control for blockchain node devices, avoids damage to the sandbox isolation environment, and improves the flexibility and stability of access management.
Smart Images

Figure CN112789596B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain, specifically to a method, apparatus, and blockchain node device for processing task processing requests. Background Technology
[0002] In recent years, blockchain technology has gradually entered the daily lives of many users. For example, electronic evidence storage systems, information traceability systems, or transaction systems built on blockchain networks have been put into use. These products utilize the unique advantages of blockchain technology, such as openness, transparency, and non-forgeability, to provide secure and fair functional services.
[0003] In a blockchain network, each blockchain node is configured with processing permissions for the corresponding functional services. By controlling these processing permissions, the functional services that different blockchain nodes can implement can be adjusted. These processing permissions can be written into smart contracts and distributed across each blockchain node in the network. When a functional service is triggered, the smart contract is invoked to respond according to the processing permissions carried in the contract.
[0004] In the process of researching existing related technologies, the inventors discovered that smart contracts work in a sandbox (or sandbox) isolated environment, such as the virtual environment provided by a virtual machine. Adjusting the processing permissions of blockchain nodes may have a destructive effect on the sandbox isolated environment, thereby causing the blockchain nodes to malfunction. Summary of the Invention
[0005] This application provides a method, apparatus, and blockchain node device for processing task processing requests, which avoids affecting the sandbox isolation environment for running smart contracts when adjusting the relevant processing permissions of the blockchain node, thereby ensuring the normal operation of the blockchain node device.
[0006] Firstly, this application provides a method for processing task processing requests, the method comprising:
[0007] Obtain a task processing request, wherein the task processing request is used to request the execution of the task corresponding to the blockchain network to which the blockchain node device belongs;
[0008] In the configuration data, query whether there are target processing permissions required to process the task, where processing permissions include permissions to execute different tasks in the blockchain network;
[0009] If so, the smart contract is invoked to process the task based on the target's processing permissions.
[0010] In conjunction with the first aspect of this application, in a first possible implementation of the first aspect of this application, the configuration data is a digital certificate issued by the blockchain network to the blockchain node device. The configuration data includes querying whether the target processing permissions required for processing the task exist, including:
[0011] The system checks if the target processing permissions exist in the preset fields of the digital certificate. These preset fields contain processing permissions for different tasks.
[0012] In conjunction with the first possible implementation of the first aspect of this application, in the second possible implementation of the first aspect of this application, the preset field is the keyUsage field.
[0013] In conjunction with the first possible implementation of the first aspect of this application, the third possible implementation of the first aspect of this application further includes:
[0014] Generate a certificate request based on the target processing permissions required.
[0015] Send a certificate application request to the digital certificate authority of the blockchain network;
[0016] Receive digital certificates issued by digital certificate authorities, wherein the digital certificate is configured by the digital certificate authority based on the certificate application request.
[0017] In conjunction with the first possible implementation of the first aspect of this application, in the fourth possible implementation of the first aspect of this application, the digital certificate is a role certificate of the blockchain node device, a software development kit certificate, or a client certificate.
[0018] In conjunction with the first possible implementation of the first aspect of this application, in the fifth possible implementation of the first aspect of this application, the target processing authority is obtained by multiple blockchain node devices in the blockchain network through voting confirmation.
[0019] In conjunction with the first aspect of this application, in the sixth possible implementation of the first aspect of this application, the method further includes:
[0020] Based on the target processing permissions required by itself, it initiates voting requests to multiple blockchain node devices in the blockchain network;
[0021] When the number of votes received by a voting request reaches a preset voting threshold, the target processing authority is confirmed to be notarized by the blockchain network.
[0022] Write the target processing permissions into the preset fields of the configuration data.
[0023] In conjunction with the sixth possible implementation of the first aspect of this application, in the seventh possible implementation of the first aspect of this application, before writing the target processing permission into the preset field of the configuration data, the method further includes:
[0024] Generate configuration data corresponding to the target processing permissions.
[0025] In conjunction with the first aspect of this application, in the eighth possible implementation of the first aspect of this application, the method further includes:
[0026] The different processing permissions involved are classified into first processing permissions and second processing permissions.
[0027] Write the first processing permission into the configuration data;
[0028] Write the second processing permission into the corresponding smart contract.
[0029] In conjunction with the eighth possible implementation of the first aspect of this application, the ninth possible implementation of the first aspect of this application categorizes the different processing permissions involved to obtain a first processing permission and a second processing permission, including:
[0030] Based on the priority, security level, or classification identifier pre-configured for different processing permissions, different processing permissions are classified to obtain the first processing permission and the second processing permission.
[0031] In conjunction with any possible implementation of the first aspect of this application, in the tenth possible implementation of the first aspect of this application, the blockchain network is a consortium blockchain network.
[0032] In conjunction with the tenth possible implementation of the first aspect of this application, in the eleventh possible implementation of the first aspect of this application, when the configuration data is a digital certificate, the digital certificate is a role certificate, a software development kit certificate, a client certificate, or an organization certificate.
[0033] In conjunction with the first aspect of this application, in the twelfth possible implementation of the first aspect of this application, the method further includes:
[0034] Determine the application functions corresponding to the task;
[0035] Determine the target processing permissions required to handle application functions.
[0036] Secondly, this application provides a processing apparatus for task processing requests, the apparatus comprising:
[0037] The acquisition unit is used to acquire task processing requests, wherein the task processing requests are used to request the execution of tasks corresponding to the blockchain network to which the blockchain node device belongs;
[0038] The query unit is used to query the configuration data to see if there is a target processing permission required for processing the task. The processing permission includes the permission to execute different tasks in the blockchain network. If so, the processing unit is triggered.
[0039] The processing unit is used to invoke the smart contract to process tasks according to the permissions of the target processing authority.
[0040] In conjunction with the second aspect of this application, in the first possible implementation of the second aspect of this application, the configuration data is a digital certificate issued by the blockchain network to the blockchain node device, and the query unit is specifically used for:
[0041] The system checks if the target processing permissions exist in the preset fields of the digital certificate. These preset fields contain processing permissions for different tasks.
[0042] In conjunction with the first possible implementation of the second aspect of this application, in the second possible implementation of the second aspect of this application, the preset field is the keyUsage field.
[0043] In conjunction with the first possible implementation of the second aspect of this application, in the third possible implementation of the second aspect of this application, the apparatus further includes a configuration unit for:
[0044] Generate a certificate request based on the target processing permissions required.
[0045] Send a certificate application request to the digital certificate authority of the blockchain network;
[0046] Receive digital certificates issued by digital certificate authorities, wherein the digital certificate is configured by the digital certificate authority based on the certificate application request.
[0047] In conjunction with the first possible implementation of the second aspect of this application, in the fourth possible implementation of the second aspect of this application, the digital certificate is a role certificate of the blockchain node device, a software development kit certificate, or a client certificate.
[0048] In conjunction with the first possible implementation of the second aspect of this application, in the fifth possible implementation of the second aspect of this application, the target processing authority is obtained by multiple blockchain node devices in the blockchain network through voting confirmation.
[0049] In conjunction with the second aspect of this application, in the sixth possible implementation of the first aspect of this application, the apparatus further includes a configuration unit for:
[0050] Based on the target processing permissions required by itself, it initiates voting requests to multiple blockchain node devices in the blockchain network;
[0051] When the number of votes received by a voting request reaches a preset voting threshold, the target processing authority is confirmed to be notarized by the blockchain network.
[0052] Write the target processing permissions into the preset fields of the configuration data.
[0053] In conjunction with the sixth possible implementation of the second aspect of this application, in the seventh possible implementation of the second aspect of this application, the configuration unit is further used for;
[0054] Generate configuration data corresponding to the target processing permissions.
[0055] In conjunction with the second aspect of this application, in an eighth possible implementation of the second aspect of this application, the apparatus further includes a configuration unit for:
[0056] The different processing permissions involved are classified into first processing permissions and second processing permissions.
[0057] Write the first processing permission into the configuration data;
[0058] Write the second processing permission into the corresponding smart contract.
[0059] In conjunction with the eighth possible implementation of the second aspect of this application, in the ninth possible implementation of the second aspect of this application, the configuration unit is specifically used for:
[0060] Based on the priority, security level, or classification identifier pre-configured for different processing permissions, different processing permissions are classified to obtain the first processing permission and the second processing permission.
[0061] In conjunction with any possible implementation of the second aspect of this application, in the tenth possible implementation of the second aspect of this application, the blockchain network is a consortium blockchain network.
[0062] In conjunction with the tenth possible implementation of the second aspect of this application, in the eleventh possible implementation of the second aspect of this application, when the configuration data is a digital certificate, the digital certificate is a role certificate, a software development kit certificate, a client certificate, or an organization certificate.
[0063] In conjunction with the second aspect of this application, in the twelfth possible implementation of the second aspect of this application, the apparatus further includes a determining unit, configured to:
[0064] Determine the application functions corresponding to the task;
[0065] Determine the target processing permissions required to handle application functions.
[0066] Thirdly, this application also provides a blockchain node device, including a processor and a memory, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, it executes the method provided by the first aspect of this application or any possible implementation of the first aspect of this application.
[0067] Fourthly, this application also provides a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to perform the method provided in the first aspect of this application or any possible implementation thereof.
[0068] From the above, it can be concluded that this application has the following beneficial effects:
[0069] Regarding the processing permissions of blockchain nodes, this application proposes a new permission configuration mechanism. The processing permissions of the blockchain node are carried in the configuration data outside the smart contract. In this way, the processing permissions in the configuration data can be viewed and adjusted independently of the smart contract. This avoids the situation in the prior art where adjusting the processing permissions carried by the smart contract will destroy its sandbox isolation environment. Thus, after the blockchain node device obtains a task processing request, it can query the configuration data to see if there is a target processing permission required to process the current task. If it does, it can call the smart contract to process the task according to the permission content of the target processing permission.
[0070] It can be observed that configuring processing permissions in configuration data outside of smart contracts can achieve higher stability and flexibility in viewing and adjusting processing permissions, thereby enabling stable and fine-grained permission control for blockchain node devices. Attached Figure Description
[0071] Figure 1 This is a flowchart illustrating a method for processing task processing requests in this application.
[0072] Figure 2 A flowchart illustrating the process of issuing a digital certificate for this application;
[0073] Figure 3 A schematic diagram of a processing device for processing task processing requests in this application;
[0074] Figure 4 This is a schematic diagram of a blockchain node device according to this application. Detailed Implementation
[0075] First, before introducing this application, let me first introduce the relevant content regarding the application background.
[0076] The task processing request processing method, apparatus, and computer-readable storage medium provided in this application can be applied to blockchain node devices to avoid affecting the sandbox isolation environment for running smart contracts when adjusting the relevant processing permissions of blockchain nodes, thereby ensuring the normal operation of blockchain node devices.
[0077] The task processing request processing method mentioned in this application can be executed by a task processing request processing device, or by different types of blockchain node devices such as server equipment, physical host, or user equipment (UE) that integrates the task processing request processing device. The task processing request processing device can be implemented in hardware or software. The UE can be a terminal device such as a smartphone, tablet computer, laptop computer, handheld computer, desktop computer, or personal digital assistant (PDA).
[0078] The following section introduces the task processing request processing method provided in this application.
[0079] First, refer to Figure 1 , Figure 1 This paper illustrates a flowchart of a method for processing task processing requests according to this application, such as... Figure 1 The task processing request processing method provided in this application, as shown, is applied to a blockchain node device and may specifically include the following steps:
[0080] Step S101: Obtain a task processing request, wherein the task processing request is used to request the execution of a task corresponding to the blockchain network to which the blockchain node device belongs;
[0081] Step S102: In the configuration data, query whether there is a target processing permission required to process the task. The processing permission includes the permission to execute different tasks in the blockchain network. If so, trigger step S103.
[0082] Step S103: Based on the permissions of the target processing authority, invoke the smart contract to process the task.
[0083] From the above Figure 1As can be seen from the embodiments shown, this application proposes a new permission configuration mechanism for the processing permissions of blockchain nodes. The processing permissions involved in the blockchain node are carried in the configuration data outside the smart contract. In this way, the processing permissions in the configuration data can be viewed and adjusted independently from the smart contract, avoiding the situation in the prior art where adjusting the processing permissions carried by the smart contract would damage its sandbox isolation environment. Thus, after the blockchain node device obtains a task processing request, it can query the configuration data to see if there is a target processing permission required to process the current task. If it does, it can call the smart contract to process the task according to the permission content of the target processing permission.
[0084] It can be observed that configuring processing permissions in configuration data outside of smart contracts can achieve higher stability and flexibility in viewing and adjusting processing permissions, thereby enabling stable and fine-grained permission control for blockchain node devices.
[0085] The following will provide a detailed introduction to the above. Figure 1 The steps in the illustrated embodiments and the specific implementation methods that may be used in practical applications.
[0086] In this application, different types of devices, such as server devices, physical hosts, or UEs, can install blockchain network (or blockchain platform) applications (APPs) and register accounts. After being verified by the blockchain network, they can join the blockchain network, become blockchain node devices, and be configured with smart contracts issued by the blockchain network. Under the execution program of the smart contract specifications, they can process the obtained task processing requests.
[0087] Taking an electronic evidence storage system built on a blockchain network as an example, after evidence collection is performed on a target webpage, the obtained electronic evidence (such as webpage screenshots, webpage resources, webpage code, etc.) can be submitted to the blockchain network through a blockchain node device to request that the electronic evidence be stored in the blockchain network, thereby achieving the purpose of electronic evidence preservation. In this process, the processing permissions of the blockchain node device for processing the electronic evidence submission request may specifically include submission permissions, simplification permissions, storage permissions, and blocking permissions.
[0088] Correspondingly, after the electronic evidence is secured, subsequent queries of the electronic evidence may also be required. At this point, the query request received by the blockchain node device may involve the processing permissions such as the query permissions involved in this query request.
[0089] For example, in a pig data traceability system built on a blockchain network, during the pig breeding, slaughtering, transportation, sales, or supervision processes, relevant pig data can be requested to be stored on the blockchain network through blockchain node devices to provide traceability for the pig data. In this process, the processing permissions of the blockchain node devices for processing the pig data upload request can specifically include upload permissions, simplification permissions, storage permissions, and blocking permissions.
[0090] Correspondingly, after the data is uploaded to the blockchain, subsequent queries of pig data may be required. At this time, the query requests received by the blockchain node device may involve processing permissions such as query permissions required for local query requests.
[0091] Of course, in practical applications, the processing permissions involved in processing different task processing requests will vary depending on the different blockchain networks, different blockchain node devices, and even different functional services on the devices. Therefore, the specific processing permissions can be adjusted according to actual needs, and no specific restrictions are imposed here.
[0092] Regarding the configuration location of the processing permissions required to process task processing requests, unlike the existing technology which writes the processing permissions into the smart contract, this application writes them in the configuration data outside the smart contract. This configuration data can be understood as local data of the blockchain node device, used to describe the relevant configuration content of the blockchain node device itself.
[0093] Since the configuration data is relatively independent of the smart contract, adjusting the relevant processing permissions of the blockchain node device in the configuration data can avoid the situation where adjusting the processing permissions carried by the smart contract would disrupt its sandbox isolation environment, as is the case in existing technologies.
[0094] Furthermore, under this configuration, the configuration data is easier to adjust or update permissions, resulting in significantly improved flexibility. Thus, in practical applications, while ensuring the stable operation of smart contracts, more granular and refined permission control can be achieved.
[0095] Secondly, it is worth adding that in the existing technology, adjusting the processing permissions written in smart contracts involves smart contract calls. From a transaction perspective, the adjustment of processing permissions is carried out in the form of transactions. This makes the process of adjusting processing permissions too complicated, resulting in many boundary conditions in practical applications and making it easy for errors at various levels to occur.
[0096] Therefore, managing and adjusting processing permissions based on configuration data outside of smart contracts can obviously overcome the aforementioned defects in the operating environment and mechanism of smart contracts themselves, achieving the advantages of high stability, flexibility, and fine-grained operation.
[0097] In practical applications, the processing permissions of blockchain node devices are obtained through notarization by the blockchain network. In other words, their processing permissions have been confirmed by the users or companies behind each blockchain node. The determination of the processing permissions of blockchain node devices can be achieved through the voting mechanism in the blockchain network. That is, the processing permissions are obtained by multiple blockchain node devices in the blockchain network through voting confirmation.
[0098] Taking target processing permissions as an example, a blockchain node device can initiate a voting request to multiple blockchain node devices in the blockchain network according to the target processing permissions it needs. When the voting request passes the votes and the result reaches the preset voting threshold, the target processing permissions are confirmed to be notarized by the blockchain network.
[0099] For example, in practical applications, these target processing permissions can be determined by staff. Staff can write corresponding functional nodes, such as application programming interfaces (APIs), based on the application functions currently involved on the blockchain node device or considering future application functions, and configure corresponding processing permissions for these functional nodes. Alternatively, the blockchain node device can determine the corresponding processing permissions for functional nodes, such as APIs, based on the application functions it currently involves or the application functions that will be launched soon.
[0100] Regarding the voting mechanism, or consensus mechanism, for target processing permissions, the acquisition of target processing permissions by blockchain node devices can be determined according to a preset verification pass strategy. Typically, other blockchain node devices can determine the target processing permissions they wish to acquire based on the voting request initiated by the current blockchain node device, and indicate whether to agree that the current blockchain node device can acquire the target processing permissions based on the feedback voting processing results. When the passing votes in these voting processing results reach the voting threshold (quantity threshold), it can be determined that the blockchain network has passed the acquisition of the target processing permissions.
[0101] For example, taking the Practical Byzantine Fault Tolerance (PBFT) mechanism as an example, when (2F+1) votes pass, it can be considered that the entire blockchain network agrees to the acquisition of the target processing authority. Here, F is the Byzantine fault node preset by the blockchain network under the PBFT mechanism, and the entire blockchain network believes that there are (3F+1) nodes.
[0102] Of course, in practical applications, in addition to PBFT, other consensus algorithms such as PAXOS and RAFT can also be used in the voting mechanism (consensus mechanism) of the blockchain network. No specific restrictions are made here.
[0103] Alternatively, in practical applications, the target processing permissions can be determined through negotiation between the user or company behind the blockchain node device and the user or company behind other blockchain node devices.
[0104] In practical applications, the processing permissions that are determined and obtained are carried in the configuration data in this application. This configuration data can be new configuration data added for the processing permissions, or it can be the original configuration data of the blockchain node device.
[0105] The newly added configuration data allows for the configuration of appropriate data formats for the identification and invocation of processing permissions. For example, a data list can concisely identify the different processing permissions obtained by the blockchain node and their permission definitions.
[0106] In the configuration data, preset fields can be reserved for writing processing permissions, such as cells in a table. Subsequently, the corresponding permission content can be updated in these preset fields.
[0107] As a management-friendly application method, compared to configuring only one set of configuration data to identify the processing permissions obtained by the local device, in practical applications, one-to-one configuration data can be configured for different batches, different application functions, and even different processing permissions. This achieves the characteristic of fine-grained management of configuration data.
[0108] In this case, for the target processing permission, the blockchain node device previously generated configuration data corresponding to the target processing permission and wrote the target processing permission into the preset field of the configuration data.
[0109] The original configuration data, in other words, the original data on the blockchain node device, excluding smart contracts. Within this data, the processing permissions acquired by the blockchain node device can be stored in the original data fields, or content items can be expanded in the reserved extended fields to store the processing permissions acquired by the blockchain node device.
[0110] As a practical implementation method, this application can specifically store the processing permission in the original data certificate on the device. In the blockchain network, the digital certificate plays the role of identifying the node's identity and plays an important role in the security authentication and data encryption of the blockchain network. Due to its important role, the digital certificate receives a high degree of data security protection in the operation of the blockchain network. Therefore, it can be used as the best location to carry the processing permission.
[0111] In this way, the functionality of the underlying blockchain node is combined with digital certificates in the traditional asymmetric cryptography field, enabling highly stable, flexible, and nuanced access control for blockchain node devices.
[0112] Among them, preset fields can be selected from the data structure of the digital certificate as content items for writing processing permissions.
[0113] For example, the default field can be the keyUsage field, which is one of the fields reserved in the extension field of the digital certificate. This field facilitates the writing and updating of permissions.
[0114] For details, please refer to the description of a digital certificate given below:
[0115]
[0116]
[0117] The reserved fields in the digital certificate store the processing permissions obtained by the blockchain node device. The storage of these processing permissions can also be implemented in conjunction with the issuance of the digital certificate. In this way, the data security of the processing permissions is further improved by leveraging the notarized and tamper-proof characteristics of the digital certificate.
[0118] See Figure 2 The diagram shown illustrates a process for issuing a digital certificate according to this application. In this application, the issuance of a digital certificate storing relevant processing permissions may include the following steps S201 to S203:
[0119] Step S201: Generate a certificate application request based on the processing permissions required.
[0120] For example, the Certificate Authority (CA) of a blockchain network has a digital certificate application specification. Under this specification, blockchain node devices in the blockchain network (in practical applications, this can be the node device that is currently waiting to be added to the chain) can submit a certificate application request to the Certificate Authority to apply for the corresponding digital certificate.
[0121] At this point, the blockchain node device can include the processing permissions it needs in the certificate application request it is preparing to submit.
[0122] Specifically, processing permissions can be written into preset fields in the completed certificate application request, or processing permissions can also be written into preset fields during the process of writing the certificate application request.
[0123] Correspondingly, in practical applications, it can be configured such that if the preset field of the certificate application request has write processing permission, it can be understood that the processing permission is the processing permission obtained by the blockchain node device that initiates the certificate application request.
[0124] Alternatively, it can be configured to include an authorization identifier in the certificate request to identify the processing permissions obtained by the blockchain node device that initiated the certificate request.
[0125] Step S201: Send a certificate application request to the digital certificate authority of the blockchain network;
[0126] After receiving a certificate request that indicates the processing authority, the blockchain node device can send the certificate request to the digital certificate authority of the blockchain network.
[0127] It is understandable that the digital certificate authority is generally a blockchain node device that provides digital certificate authority functions in the blockchain network, and therefore can also be called a certificate issuing node.
[0128] Of course, in some special cases, the digital certificate authority may also be a third-party node device that provides digital certificate authority functions and services. The specifics will vary depending on the digital certificate issuance architecture of the blockchain network, and will not be limited here.
[0129] Step S202: Receive a digital certificate issued by a digital certificate authority, wherein the digital certificate is configured by the digital certificate authority according to the certificate application request.
[0130] When a digital certificate authority receives a certificate application request from a blockchain node device, it can perform security verification and determine whether the certificate application is approved. If the certificate application is approved, a matching digital certificate can be generated for the blockchain node device, which is the digital certificate that the blockchain node device expects to obtain when it initiates the certificate application request.
[0131] In the generated digital certificate, since the certificate application request identifies the processing permissions, the target processing permissions can also be identified.
[0132] The storage method of this processing permission in the digital certificate can be found in the above-mentioned introduction to processing permissions; specific details are not specified here.
[0133] Step S203: Receive a digital certificate issued by a digital certificate authority, wherein the digital certificate is configured by the digital certificate authority according to the certificate application request.
[0134] Once a blockchain node receives a digital certificate issued by a digital certificate authority that identifies processing permissions, it can store it and load it. Subsequently, it can process the tasks requested by the task processing requests based on the processing permissions identified in the digital certificate.
[0135] In practical applications, the digital certificates mentioned above can specifically be node-level digital certificates. That is, the processing permissions of each blockchain node are configured in a digital certificate that has a one-to-one correspondence with itself.
[0136] For example, a digital certificate can be a role certificate, a software development kit certificate, or a client certificate for a blockchain node device.
[0137] By configuring processing permissions in the unique digital certificates of blockchain node devices, a processing permission control mechanism with precision down to the node level is achieved.
[0138] Of course, in practical applications, some processing permissions may be synchronized across multiple blockchain node devices, or multiple blockchain node devices may share the same processing permissions. In such cases, we can consider the commonalities of these blockchain node devices in their digital certificates. When issuing the same digital certificate, we can identify the shared processing permissions of these blockchain node devices within the certificate. This would further facilitate the issuance of digital certificates that identify the same processing permissions.
[0139] Taking consortium blockchain networks as an example, in practical applications, to facilitate the operation of a blockchain platform among various companies and institutions, a consortium blockchain network can be built with each company or institution as a unit. In this case, the control mechanism for processing permissions can also be set at the institutional level. Thus, for each company or some of the company's blockchain node devices, since some processing permissions are divided at the company level, these blockchain node devices can share the same digital certificate with the same processing permissions.
[0140] For example, the digital certificate in this case can be a role certificate for a blockchain node device, a software development kit certificate, a client certificate, or an organization certificate, where the organization certificate is a unique digital certificate for the company or organization.
[0141] Furthermore, it is worth mentioning that storing the processing permissions obtained by blockchain node devices through digital certificates has significant data security advantages in preventing data tampering, preventing hacker attacks, and data traceability compared to identifying the processing permissions of blockchain node devices in other configuration data outside of smart contracts and digital certificates.
[0142] Secondly, configuration data other than smart contracts and digital certificates may be subject to technical limitations, resulting in inconsistencies between the permission control information (which can be understood as the processing permission information already loaded in operation) running in the memory of blockchain node devices. For example, if processing permissions are adjusted or updated in a short period of time, there may be conflicts between the updated processing permissions in the configuration data and the processing permissions that the blockchain node device has read and loaded in operation. However, storing processing permissions through digital certificates, under the working mechanism of blockchain node devices working in conjunction with digital certificates, has the advantages of significantly stable operation of processing permissions and timely updates.
[0143] Furthermore, to facilitate the application of this application to existing blockchain networks in the initial stage, a layered management system can be introduced for the processing permissions originally configured in smart contracts. In this case, some processing permissions can be retained in the smart contract, while other processing permissions can be separated from the smart contract and configured in configuration data outside the smart contract, such as the aforementioned digital certificate.
[0144] Correspondingly, in this case, the blockchain node device can call the preset permission classification strategy to classify the different processing permissions involved in itself, and obtain the first processing permission and the second processing permission. Subsequently, the first processing permission can be written into the configuration data, and the second processing permission can be written into the corresponding smart contract, so as to achieve hierarchical management of multiple processing permissions on the blockchain node device.
[0145] In practical applications, this permission classification strategy can be divided according to importance, which can be configured according to the needs of staff. Thus, in the early stages of applying this application, processing permissions with lower importance can be stored in configuration data outside the smart contract. After the performance is evaluated to be higher than the original situation where processing permissions are stored in the smart contract, more or even all processing permissions can be stored in configuration data outside the smart contract, achieving a more secure and practical implementation mechanism.
[0146] Specifically, it can be configured to indicate the priority in the hierarchical management of processing permissions, or to indicate the security level of the permission itself, in order to help determine whether the processing permission can be separated from the smart contract and transferred to the configuration data.
[0147] Alternatively, you can directly assign category identifiers to processing permissions to indicate whether they can be separated from the smart contract and into the configuration data.
[0148] Correspondingly, in the specific classification process, the blockchain node device can classify different processing permissions according to the priority, permission security level or classification identifier pre-configured for different processing permissions, and obtain the aforementioned first processing permission and second processing permission.
[0149] Once the processing permissions obtained by the blockchain node are stored in the configuration data outside of the smart contract, they can be put into practical application.
[0150] If the target processing permissions required for the current task processing request are found in the configuration data, the current task processing request can be processed according to the permissions.
[0151] The task processing requests received by a blockchain node device can be sent from other blockchain node devices in the blockchain network or from other devices outside the blockchain network. For example, an electronic evidence storage system built on a blockchain network can provide users with electronic evidence query services. In this case, the user can initiate a query request to the blockchain node device that deploys the query service in the electronic evidence storage system through their UE.
[0152] Of course, the task processing requests obtained by blockchain node devices can be sent from or extracted from outside the device. In practical applications, they can also be task processing requests generated by the device itself. The specifics can vary depending on actual needs.
[0153] Specifically, a task processing request can directly identify the processing permissions required for its own task, such as data query permissions, data storage permissions, data upload permissions, data sharing permissions, and other different rational processing permissions. In this way, the blockchain node device can directly check whether the processing permissions stored in the configuration data include the target processing permissions identified by the request.
[0154] Of course, the processing permissions required for task processing requests can also be identified by the blockchain node device itself.
[0155] For example, a blockchain node device can first determine the application function corresponding to the task requested by the task processing request, and then determine the processing permissions required to process the application function.
[0156] It is understandable that different types of tasks can be pre-classified according to the permissions required for processing. The specific types of these tasks can be divided using the application functions that blockchain node devices can provide, such as data query, data storage, data on-chaining, and data sharing.
[0157] In the specific content of the processing permissions, for a processing permission item, not only can it be identified whether the permission is granted, such as "valid" and "invalid", "true" and "false", "1" and "0", two different identifier codes can be set to distinguish them.
[0158] Furthermore, for a processing permission item, the permission scope can also be identified to allow for more flexible configuration of the permission scope, such as "the effective time of this permission is limited to the time period from 9:00 to 18:00", "the effective application function of this permission is limited to X type application function", "the effective service object of this permission is Y type users", etc.
[0159] Once the target processing permissions required for the current task processing request are found, the task can be processed according to the permissions, such as refusing to process and providing a reason for refusal, ignoring the request, processing within a limited scope, or processing normally.
[0160] The processing requests are processed based on the permissions specified in the smart contract, similar to the previous method of processing requests based on the permissions configured in the smart contract. The details will not be elaborated here.
[0161] Of course, in practical applications, the way task processing requests are processed may be adjusted and changed according to the content of the processing permissions. This can be adjusted as needed, and no specific restrictions are made here.
[0162] During the processing, specifically, a smart contract can be invoked to process the task requested by the current task processing request within the scope of the target processing authority, according to the task processing specifications agreed upon in the smart contract.
[0163] Smart contracts can work in a sandbox (or sandbox-like) isolated environment, such as a virtual environment provided by a virtual machine.
[0164] The above describes the method for processing on-chain requests in this application. To facilitate better implementation of the method for processing on-chain requests provided in this application, this application also provides an apparatus for processing on-chain requests.
[0165] See Figure 3 , Figure 3 This is a schematic diagram of a processing device for task processing requests according to this application. In this application, the processing device 300 for task processing requests may specifically include the following structure:
[0166] The acquisition unit 301 is used to acquire a task processing request, wherein the task processing request is used to request the execution of a task corresponding to the blockchain network to which the blockchain node device belongs;
[0167] The query unit 302 is used to query the configuration data to see if there is a target processing permission required for processing the task. The processing permission includes the permission to execute different tasks in the blockchain network. If so, the processing unit 303 is triggered.
[0168] Processing unit 303 is used to invoke smart contract to process tasks according to the permission content of the target processing permission.
[0169] In one exemplary implementation, the configuration data is a digital certificate issued by the blockchain network to the blockchain node device, and the query unit 302 is specifically used for:
[0170] The system checks if the target processing permissions exist in the preset fields of the digital certificate. These preset fields contain processing permissions for different tasks.
[0171] In yet another exemplary implementation, the default field is the keyUsage field.
[0172] In yet another exemplary implementation, the apparatus further includes a configuration unit 304 for:
[0173] Generate a certificate request based on the target processing permissions required.
[0174] Send a certificate application request to the digital certificate authority of the blockchain network;
[0175] Receive digital certificates issued by digital certificate authorities, wherein the digital certificate is configured by the digital certificate authority based on the certificate application request.
[0176] In yet another exemplary implementation, the digital certificate is a role certificate, software development kit certificate, or client certificate for a blockchain node device.
[0177] In yet another exemplary implementation, the target processing authority is obtained by a vote from multiple blockchain node devices in the blockchain network.
[0178] In yet another exemplary implementation, the apparatus further includes a configuration unit 304 for:
[0179] Based on the target processing permissions required by itself, it initiates voting requests to multiple blockchain node devices in the blockchain network;
[0180] When the number of votes received by a voting request reaches a preset voting threshold, the target processing authority is confirmed to be notarized by the blockchain network.
[0181] Write the target processing permissions into the preset fields of the configuration data.
[0182] In yet another exemplary implementation, configuration unit 304 is further configured to;
[0183] Generate configuration data corresponding to the target processing permissions.
[0184] In yet another exemplary implementation, the apparatus further includes a configuration unit 304 for:
[0185] The different processing permissions involved are classified into first processing permissions and second processing permissions.
[0186] Write the first processing permission into the configuration data;
[0187] Write the second processing permission into the corresponding smart contract.
[0188] In yet another exemplary implementation, configuration unit 304 is specifically used for:
[0189] Based on the priority, security level, or classification identifier pre-configured for different processing permissions, different processing permissions are classified to obtain the first processing permission and the second processing permission.
[0190] In yet another exemplary implementation, the blockchain network is a consortium blockchain network.
[0191] In yet another exemplary implementation, when the configuration data is a digital certificate, the digital certificate may be a role certificate, software development kit certificate, client certificate, or authority certificate.
[0192] In yet another exemplary implementation, the apparatus further includes a determining unit 305, configured to:
[0193] Determine the application functions corresponding to the task;
[0194] Determine the target processing permissions required to handle application functions.
[0195] This application also provides a blockchain node device, see reference. Figure 4 , Figure 4 This diagram illustrates a structural schematic of the blockchain node device of this application. Specifically, the blockchain node device includes a processor 401, a memory 402, and an input / output device 403. The processor 401 executes the computer program stored in the memory 402 to implement, for example... Figure 1 or Figure 2 The steps of the task processing request processing method in the corresponding embodiment; or, when the processor 401 executes the computer program stored in the memory 402, it implements as follows: Figure 3 Corresponding to the functions of each unit in the embodiment, the memory 402 is used to store the functions executed by the processor 401 as described above. Figure 1 or Figure 2 The computer program required for the task processing request processing method in the corresponding embodiment.
[0196] For example, a computer program may be divided into one or more modules / units, one or more of which are stored in memory 402 and executed by processor 401 to complete this application. One or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in a computer device.
[0197] The blockchain node device may include, but is not limited to, processor 401, memory 402, and input / output device 403. Those skilled in the art will understand that the illustrations are merely examples of blockchain node devices and do not constitute a limitation on the blockchain node device. It may include more or fewer components than illustrated, or combine certain components, or different components. For example, the blockchain node device may also include network access devices, buses, etc., with processor 401, memory 402, input / output device 403, and network access devices connected via a bus.
[0198] Processor 401 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the blockchain node device, connecting various parts of the device through various interfaces and lines.
[0199] The memory 402 can be used to store computer programs and / or modules. The processor 401 implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory 402 and by calling the data stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function, etc.; the data storage area may store data created based on the use of the blockchain node device, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0200] When processor 401 executes a computer program stored in memory 402, it can specifically perform the following functions:
[0201] Obtain a task processing request, wherein the task processing request is used to request the execution of the task corresponding to the blockchain network to which the blockchain node device belongs;
[0202] In the configuration data, query whether there are target processing permissions required to process the task, where processing permissions include permissions to execute different tasks in the blockchain network;
[0203] If so, the smart contract is invoked to process the task based on the target's processing permissions.
[0204] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the task processing device, blockchain node device, and its corresponding units described above can be found in, for example... Figure 1 or Figure 2 The description of the task processing request processing method in the corresponding embodiment will not be repeated here.
[0205] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0206] Therefore, this application provides a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute the present application. Figure 1 or Figure 2 The steps in the task processing request processing method in the corresponding embodiment can be referred to as follows for specific operations. Figure 1 or Figure 2 The description of the task processing request processing method in the corresponding embodiment will not be repeated here.
[0207] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0208] Because of the instructions stored in the computer-readable storage medium, the present application can be executed as described above. Figure 1 or Figure 2 The steps in the task processing request processing method in the corresponding embodiment can therefore be implemented as described in this application. Figure 1 or Figure 2 The beneficial effects that the task processing request processing method in the corresponding embodiment can achieve are detailed in the preceding description and will not be repeated here.
[0209] The above provides a detailed description of the task processing request processing method, apparatus, blockchain node device, and computer-readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A processing method of a task processing request, characterized by, The method comprises: obtaining a task processing request, wherein the task processing request is used to request execution of a task corresponding to a blockchain network to which a blockchain node device belongs; in configuration data, querying whether a target processing authority required for processing the task exists, wherein the processing authority comprises an authority for executing different tasks in the blockchain network; if yes, invoking an intelligent contract to process the task according to authority content of the target processing authority, wherein the processing authority involved by the blockchain node is carried in configuration data outside the intelligent contract, and the configuration data is data local to the blockchain node device, and is used to describe configuration content related to the blockchain node device itself; the configuration data is a digital certificate issued by the blockchain network to the blockchain node device, and the querying whether the target processing authority required for processing the task exists in the configuration data comprises: querying whether the target processing authority exists in a preset field of the digital certificate, wherein the preset field carries processing authorities of different tasks; the target processing authority is obtained through voting confirmation of a plurality of blockchain node devices in the blockchain network; the method further comprises: classifying different processing authorities involved by the blockchain node device itself to obtain first processing authorities and second processing authorities; writing the first processing authorities into the configuration data; and writing the second processing authorities into corresponding intelligent contracts.
2. The method of claim 1, wherein, The preset field is a keyUsage field.
3. The method of claim 1, wherein, The method further comprises: generating a certificate application request according to the target processing authority required by the blockchain node device itself; sending the certificate application request to a digital certificate issuing agency of the blockchain network; receiving the digital certificate issued by the digital certificate issuing agency, wherein the digital certificate is configured by the digital certificate issuing agency according to the certificate application request.
4. The method of claim 1, wherein, The digital certificate is a role certificate, a software development kit certificate or a client certificate of the blockchain node device.
5. The method of claim 1, wherein, The method further comprises: initiating a voting request to a plurality of blockchain node devices in the blockchain network according to the target processing authority required by the blockchain node device itself; when a voting result of the voting request reaches a preset voting threshold, confirming that the target processing authority is notarized by the blockchain network; writing the target processing authority into a preset field of the configuration data.
6. The method of claim 5, wherein, Before the target processing authority is written into the preset field of the configuration data, the method further comprises: generating the configuration data corresponding to the target processing authority.
7. The method of claim 1, wherein, The classifying different processing authorities involved by the blockchain node device itself to obtain first processing authorities and second processing authorities comprises: classifying the different processing authorities according to a priority, a security level of an authority or a classification identifier pre-configured for the different processing authorities to obtain the first processing authorities and the second processing authorities.
8. The method according to any one of claims 1 to 7, characterized in that, The blockchain network is a consortium chain network.
9. The method of claim 8, wherein, When the configuration data is the digital certificate, the digital certificate is also an agency certificate.
10. The method of claim 1, wherein, The method further comprises: determining an application function corresponding to the task; determine the target processing permission required by the application function.
11. A processing device for processing a task processing request, characterized by The device comprises: An acquisition unit is configured to acquire a task processing request, wherein the task processing request is used to request execution of a task corresponding to a blockchain network to which a blockchain node device belongs; A query unit is configured to query, in configuration data, whether a target processing permission required for processing the task exists, wherein the processing permission comprises a permission for executing different tasks in the blockchain network, and if so, trigger a processing unit; The processing unit is configured to invoke a smart contract to process the task according to the permission content of the target processing permission, wherein the processing permission involved by the blockchain node is carried in configuration data other than the smart contract, and the configuration data is local data of the blockchain node device, used to describe configuration content related to the blockchain node device itself; The configuration data is a digital certificate issued by the blockchain network to the blockchain node device, and the query unit is specifically configured to: query, in a preset field of the digital certificate, whether the target processing permission exists, wherein the preset field carries the processing permission of different tasks; The target processing permission is obtained through voting by a plurality of blockchain node devices in the blockchain network; The device further comprises a configuration unit configured to classify different processing permissions involved by the blockchain node device itself to obtain first processing permissions and second processing permissions, write the first processing permissions into the configuration data, and write the second processing permissions into corresponding smart contracts.
12. The apparatus of claim 11, wherein, The preset field is a keyUsage field.
13. The apparatus of claim 11, wherein, The device further comprises a configuration unit configured to: generate a certificate application request according to the target processing permission required by itself; send the certificate application request to a digital certificate issuing authority of the blockchain network; receive the digital certificate issued by the digital certificate issuing authority, wherein the digital certificate is configured by the digital certificate issuing authority according to the certificate application request.
14. The apparatus of claim 11, wherein, The digital certificate is a role certificate, a software development kit certificate, or a client certificate of the blockchain node device.
15. The apparatus of claim 11, wherein, The device further comprises a configuration unit configured to: initiate a voting request to a plurality of blockchain node devices in the blockchain network according to the target processing permission required by itself; when the voting result of the voting request reaches a preset voting threshold, confirm that the target processing permission is notarized by the blockchain network; write the target processing permission into a preset field of the configuration data.
16. The apparatus of claim 15, wherein, The configuration unit is further configured to: generate the configuration data corresponding to the target processing permission.
17. The apparatus of claim 11, wherein, The configuration unit is specifically configured to: classify the different processing permissions according to a priority, a permission security level, or a classification identifier pre-configured for the different processing permissions to obtain the first processing permissions and the second processing permissions.
18. The apparatus of any one of claims 11 to 17, wherein, The blockchain network is a consortium chain network.
19. The apparatus of claim 18, wherein, When the configuration data is the digital certificate, the digital certificate is also an institution certificate.
20. The apparatus of claim 11, wherein, The device further comprises a determination unit configured to: determine an application function corresponding to the task; determining the target processing authority required for processing the application function.
21. A blockchain node device, comprising: The application further provides a computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to execute the method according to any one of claims 1 to 10.
22. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a plurality of instructions adapted to be loaded by a processor to execute the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Credible mechanism authority management method and system for big data blockchain
CN112118224A