Block chain information processing method and device, computer equipment and storage medium

By using the target device to generate and sign information in the target smart contract, the problem of information generation in the blockchain consumes a lot of computing resources, and the stable operation of the blockchain and the security of information generation are achieved.

CN118916420APending Publication Date: 2024-11-08TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310512263.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-08
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

When information generation is generated through smart contracts in blockchain, a large amount of computing resources is consumed, resulting in unstable operation of the blockchain.

Method used

By detecting the target device service information in the target smart contract, generating and sending information generation requests to the target device, and using the target device to generate and sign information, the information generation parameters and signed information are written to the blockchain, avoiding the block Information generation and processing are carried out in the chain node to save computing resources.

Benefits of technology

It effectively saves the computing power resources of blockchain nodes, ensures the stable operation of blockchain, and improves the security of information generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916420A_ABST
    Figure CN118916420A_ABST
Patent Text Reader

Abstract

The invention relates to a block chain information processing method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: receiving a block chain transaction request, and analyzing the block chain transaction request to obtain an information generation parameter and a target smart contract identifier; in response to target device service information detected by the target smart contract, generating an information generation request based on the information generation parameters, and sending the information generation request to the target device according to the target device service information; obtaining signed target information returned by the target equipment, wherein the signed target information is obtained by generating a dialogue statement by the target equipment according to an information generation parameter in the information generation request, performing information reply on the dialogue statement to obtain initial target information, and performing digital signature on the initial target information; and writing the information generation parameter and the signed target information into the block chain. By adopting the method, information generation in the block chain node can be avoided, and the computing power resource of the block chain node is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to a blockchain information processing method, apparatus, computer equipment, storage medium and computer program product. Background Art

[0002] With the development of blockchain technology, smart contract technology has emerged. Smart contracts are computer protocols designed to disseminate, verify or execute contracts in an information-based manner. Smart contracts allow trusted transactions without a third party, which are monitorable and irreversible. At present, information can be generated in the blockchain through smart contracts, and then the generated information is stored, which can improve the security of the generated information and prevent tampering. However, the use of smart contracts to generate information in the blockchain usually consumes a lot of computing resources, which can easily lead to unstable operation of the blockchain. Summary of the invention

[0003] Based on this, it is necessary to provide a blockchain information processing method, device, computer equipment, computer-readable storage medium and computer program product that can save blockchain node computing resources in response to the above-mentioned technical problems.

[0004] In a first aspect, the present application provides a blockchain information processing method. The method comprises:

[0005] Receive a blockchain transaction request, parse the blockchain transaction request, obtain information generation parameters and a target smart contract identifier, and the target smart contract identifier is used to identify the corresponding target smart contract;

[0006] In response to the target smart contract detecting the target device service information, generating an information generation request based on the information generation parameters, and sending the information generation request to the target device according to the target device service information;

[0007] Obtain the signed target information returned by the target device, where the signed target information is obtained by the target device generating a dialogue statement according to the information generation parameters in the information generation request, responding to the dialogue statement, obtaining the initial target information, and digitally signing the initial target information;

[0008] Write the message generation parameters and the signed target message to the blockchain.

[0009] In a second aspect, the present application also provides a blockchain information processing device. The device includes:

[0010] A request receiving module is used to receive and parse a blockchain transaction request to obtain information generation parameters and a target smart contract identifier, where the target smart contract identifier is used to identify the corresponding target smart contract;

[0011] A request sending module, configured to generate an information generation request based on information generation parameters in response to the target smart contract detecting the target device service information, and send the information generation request to the target device according to the target device service information;

[0012] The information acquisition module is used to obtain the signed target information returned by the target device. The signed target information is obtained by the target device generating a dialogue statement according to the information generation parameters in the information generation request, responding to the dialogue statement, obtaining the initial target information, and digitally signing the initial target information.

[0013] The information writing module is used to write information generation parameters and signed target information into the blockchain.

[0014] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0015] Receive a blockchain transaction request, parse the blockchain transaction request, obtain information generation parameters and a target smart contract identifier, and the target smart contract identifier is used to identify the corresponding target smart contract;

[0016] In response to the target smart contract detecting the target device service information, generating an information generation request based on the information generation parameters, and sending the information generation request to the target device according to the target device service information;

[0017] Obtain the signed target information returned by the target device, where the signed target information is obtained by the target device generating a dialogue statement according to the information generation parameters in the information generation request, responding to the dialogue statement, obtaining the initial target information, and digitally signing the initial target information;

[0018] Write the message generation parameters and the signed target message to the blockchain.

[0019] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0020] Receive a blockchain transaction request, parse the blockchain transaction request, obtain information generation parameters and a target smart contract identifier, and the target smart contract identifier is used to identify the corresponding target smart contract;

[0021] In response to the target smart contract detecting the target device service information, generating an information generation request based on the information generation parameters, and sending the information generation request to the target device according to the target device service information;

[0022] Obtain the signed target information returned by the target device, where the signed target information is obtained by the target device generating a dialogue statement according to the information generation parameters in the information generation request, responding to the dialogue statement, obtaining the initial target information, and digitally signing the initial target information;

[0023] Write the message generation parameters and the signed target message to the blockchain.

[0024] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0025] Receive a blockchain transaction request, parse the blockchain transaction request, obtain information generation parameters and a target smart contract identifier, and the target smart contract identifier is used to identify the corresponding target smart contract;

[0026] In response to the target smart contract detecting the target device service information, generating an information generation request based on the information generation parameters, and sending the information generation request to the target device according to the target device service information;

[0027] Obtain the signed target information returned by the target device, where the signed target information is obtained by the target device generating a dialogue statement according to the information generation parameters in the information generation request, responding to the dialogue statement, obtaining the initial target information, and digitally signing the initial target information;

[0028] Write the message generation parameters and the signed target message to the blockchain.

[0029] The above-mentioned blockchain information processing method, device, computer device, storage medium and computer program product receive a blockchain transaction request and parse the blockchain transaction request to obtain information generation parameters and a target smart contract identifier, wherein the target smart contract identifier is used to identify the corresponding target smart contract; in response to the target smart contract detecting the target device service information, an information generation request is generated based on the information generation parameters, and the information generation request is sent to the target device according to the target device service information; the signed target information returned by the target device is obtained, and the signed target information is obtained by the target device generating a dialogue statement according to the information generation parameters in the information generation request, replying to the dialogue statement, obtaining the initial target information, and digitally signing the initial target information; the information generation parameters and the signed target information are written into the blockchain. That is, by detecting the target device service information in the target smart contract, and then sending the information generation request to the target device according to the target device service information, generating a dialogue statement using the information generation parameters in the target device, replying to the dialogue statement, and obtaining the initial target information, it is possible to avoid information generation processing in the blockchain node, thereby saving the computing power resources of the blockchain node, and thus ensuring the stable operation of the blockchain. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 An application environment diagram of a blockchain information processing method in one embodiment;

[0031] Figure 2 A flowchart of a blockchain information processing method in one embodiment;

[0032] Figure 3 A schematic diagram of a process of target device service registration in one embodiment;

[0033] Figure 4 A schematic diagram of a process of target device service registration in a specific embodiment;

[0034] Figure 5 A schematic diagram of a process for generating blockchain information in a specific embodiment;

[0035] Figure 6 A schematic diagram of a process of verifying a transaction request in one embodiment;

[0036] Figure 7 A schematic diagram of a process flow of transaction request verification in a specific embodiment;

[0037] Figure 8 It is a flowchart of a blockchain information processing method in a specific embodiment;

[0038] Fig. 9 A schematic diagram of the architecture for generating blockchain information in a specific embodiment;

[0039] Fig.10 It is a structural block diagram of a blockchain information processing device in one embodiment;

[0040] Fig.11 is an internal structure diagram of a computer device in one embodiment;

[0041] Fig.12 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0043] Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0044] The underlying blockchain platform can include processing modules such as user management, basic services, smart contracts, and operation monitoring. Among them, the user management module is responsible for the identity information management of all blockchain participants, including maintaining public and private key generation (account management), key management, and the maintenance of the correspondence between the user's real identity and the blockchain address (authority management), etc., and, under authorization, supervises and audits the transactions of certain real identities and provides risk control rule configuration (risk control audit); the basic service module is deployed on all blockchain node devices to verify the validity of business requests, and records valid requests to storage after consensus is reached. For a new business request, the basic service first adapts the interface for parsing and authentication (interface adaptation), and then encrypts the business information through the consensus algorithm (consensus management). The smart contract module is responsible for the registration and issuance of contracts, as well as contract triggering and contract execution. Developers can define the contract logic in a programming language and publish it to the blockchain (contract registration). According to the logic of the contract terms, the key or other events are called to trigger the execution and complete the contract logic. It also provides the function of contract upgrade and cancellation. The operation monitoring module is mainly responsible for the deployment, configuration modification, contract setting, cloud adaptation and real-time status visualization output of the product during the product release process, such as alarm, network status monitoring, node equipment health status monitoring, etc.

[0045] The platform product service layer provides the basic capabilities and implementation framework of typical applications. Developers can superimpose business features based on these basic capabilities to complete the blockchain implementation of business logic. The application service layer provides application services based on blockchain solutions for business participants to use.

[0046] The blockchain information processing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the blockchain node 104 communicates with the terminal 102 through the network, and the blockchain node 104 communicates with the target device 106 through the network. The blockchain node 104 is a node in the blockchain, and the blockchain node 104 can be a verification node or a master node. The blockchain node 104 can receive the blockchain transaction request sent by the terminal 102, and then parse the blockchain transaction request to obtain the information generation parameter and the target smart contract identifier carried by the blockchain transaction request, and the target smart contract identifier is used to identify the corresponding target smart contract; the blockchain node 104 detects the target device service information in response to the target smart contract, generates an information generation request based on the information generation parameter, and sends the information generation request to the target device 106 according to the target device service information; the blockchain node 104 obtains the signed target information returned by the target device 106, and the signed target information is that the target device 106 generates a dialogue statement according to the information generation parameter in the information generation request, replies to the dialogue statement, obtains the initial target information, and digitally signs the initial target information; the blockchain node 104 writes the information generation parameter and the signed target information into the blockchain. The blockchain node 104 may be a terminal or a server. The target device 106 may be a terminal or a server. The terminal may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices. IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0047] In one embodiment, Figure 2 As shown, a blockchain information processing method is provided, which is applied to Figure 1 Take the blockchain node in as an example to illustrate, including the following steps:

[0048] S202, obtaining a blockchain transaction request, parsing the blockchain transaction request, obtaining information generation parameters and a target smart contract identifier, where the target smart contract identifier is used to identify the corresponding target smart contract.

[0049] Among them, the information generation parameter refers to the parameter used when generating the corresponding information. Among them, the information generation parameter can be a keyword parameter for information generation, a description statement parameter for the information to be generated, or an attribute parameter for the information to be generated, etc. The different information generation parameters can generate different information. The information can be various types of media data, for example, images, videos, text, and audio data, etc. The target smart contract identifier refers to the identifier of the smart contract that needs to be used when executing a blockchain transaction request. The identifier can be a name, number, character, etc. Different smart contracts have different smart contract identifiers. Using the target smart contract identifier in the blockchain can call the corresponding target smart contract.

[0050] Specifically, the blockchain node can receive a blockchain transaction request from a terminal that manages the blockchain node, or the blockchain node can obtain the blockchain transaction request from the block currently to be written into the blockchain. The blockchain node can also receive a blockchain transaction request from a server that provides blockchain services. The blockchain node then parses the blockchain transaction request to obtain the information generation parameters and the target smart contract identifier.

[0051] In one embodiment, when a blockchain receives a blockchain transaction request, it may first verify the blockchain transaction request, that is, verify whether the requester who sends the blockchain transaction request has the authority to conduct blockchain transactions, wherein it may verify whether the requester identifier is in the transaction authority table of the blockchain. When the requester identifier is in the transaction authority table of the blockchain, it indicates that the requester has the authority to conduct blockchain transactions, and when the requester identifier is not in the transaction authority table of the blockchain, it indicates that the requester has no authority to conduct blockchain transactions. When the requester has the authority to conduct blockchain transactions, the blockchain transaction request is verified to pass. When the requester has no authority to conduct blockchain transactions, a prompt message for obtaining transaction authority may be sent to the requester. When the blockchain transaction request is verified to pass, the blockchain transaction request is executed, that is, the blockchain transaction request is parsed to obtain information generation parameters and the target smart contract identifier.

[0052] S204, in response to the target smart contract detecting the target device service information, generating an information generation request based on the information generation parameters, and sending the information generation request to the target device according to the target device service information.

[0053] Among them, the target device service information refers to the information generated by using the target device, which can be the call information of the information generation service of the target device. The information generation request refers to the request to generate information corresponding to the information generation parameters, which needs to be sent to the target device, and refers to the request to use the information generation service of the target device. The target device refers to the computer device that provides the information generation service, which can be a server, a terminal, a cloud server, etc.

[0054] Specifically, the blockchain node responds to the blockchain transaction request, calls the target smart contract corresponding to the target smart contract identifier, and executes the target smart contract. When the blockchain node detects a statement that calls the target device service during the execution of the target smart contract, it indicates that the target device service information is detected in the target smart contract. At this time, the blockchain node executes the statement that calls the target device service, generates an information generation request using the information generation parameter, and sends the information generation request to the target device according to the target device service information. The target device receives the information generation request and generates information in response to the information generation request.

[0055] S206, obtaining the signed target information returned by the target device, the signed target information is obtained by the target device generating a dialogue statement according to the information generation parameters in the information generation request, replying to the dialogue statement, obtaining the initial target information, and digitally signing the initial target information.

[0056] The dialogue sentence refers to a natural language sentence during a dialogue, and the dialogue sentence can be a sentence in various languages, such as Chinese, Japanese, English, Russian, etc. The initial target information refers to the reply information generated by the target device using the dialogue sentence. The signed target information is obtained by digitally signing the initial target information. The signed target information includes signature information and initial target information, and the signature information is information obtained by the target device digitally signing the target information.

[0057] Specifically, after receiving the information generation request, the target device parses the information generation request to obtain the information generation parameters. Then the target device generates a dialogue statement using the information generation parameters, and then generates the initial target information corresponding to the dialogue statement through the information generation service, wherein the reply statement corresponding to the dialogue statement can be generated through the natural language model of the dialogue service, and the reply statement is used as the initial target information. Finally, the target information is digitally signed to indicate that the target information is generated by the target device, thereby obtaining the signed target information. Among them, when performing the digital signature, the summary of the target information can be extracted, the summary is encrypted using the signature private key of the target device, the encrypted summary is obtained, the encrypted summary is used as the signature information, and the signature information and the target information are used as the signed target information. When performing the digital signature, the hash value of the target information can also be calculated, the hash value is encrypted using the signature private key of the target device, the encrypted hash value is obtained, the encrypted hash value is used as the signature information, and the signature information and the target information are used as the signed target information. Finally, the target device returns the signed target information to the blockchain node. The blockchain node obtains the signed target information returned by the target device. At this point, the blockchain node has completed the generation of the information.

[0058] S208, write the information generation parameters and the signed target information into the blockchain.

[0059] Specifically, the blockchain node finally writes the information generation parameters and the signed target information into the blockchain, wherein the blockchain node first uses the information generation parameters and the signed target information as the block information of the current block, and writes the block information into the current block, i.e., the blockchain node calculates the information generation parameters and the signed target information as the current hash value of the current block information, and then obtains the hash value of the previous block in the blockchain, and then generates the current block based on the hash value of the previous block, the current hash value, and the current block information, i.e., the information generation parameters and the signed target information. Then the blockchain node reaches a consensus on the current block, and when the consensus is passed, the current block is written into the blockchain.

[0060] The above-mentioned blockchain information processing method, device, computer device, storage medium and computer program product receive a blockchain transaction request and parse the blockchain transaction request to obtain information generation parameters and a target smart contract identifier, wherein the target smart contract identifier is used to identify the corresponding target smart contract; in response to the target smart contract detecting the target device service information, an information generation request is generated based on the information generation parameters, and the information generation request is sent to the target device according to the target device service information; the signed target information returned by the target device is obtained, and the signed target information is obtained by the target device generating a dialogue statement according to the information generation parameters in the information generation request, replying to the dialogue statement, obtaining the initial target information, and digitally signing the initial target information; the information generation parameters and the signed target information are written into the blockchain. That is, by detecting the target device service information in the target smart contract, and then sending the information generation request to the target device according to the target device service information, generating a dialogue statement using the information generation parameters in the target device, replying to the dialogue statement, and obtaining the initial target information, it is possible to avoid information generation processing in the blockchain node, thereby saving the computing power resources of the blockchain node, and thus ensuring the stable operation of the blockchain.

[0061] In one embodiment, Figure 3 As shown, before S202, before receiving the blockchain transaction request, parsing the blockchain transaction request, and obtaining the information generation parameters and the target smart contract identifier, it also includes:

[0062] S302, generate a service registration request, the service registration request carries a blockchain node identifier and interaction parameters.

[0063] Among them, the service registration request is a registration request for using the information generation service. The blockchain node can use the information generation service of the target device only after the registration is passed. The target device authorizes the blockchain node to use the information generation service through the service registration request. The blockchain node identifier refers to the identifier of the blockchain node, which can be a name, number, character, etc. The interaction parameter refers to the parameter required for the target device to communicate and interact with the blockchain node when using the information generation service, which can be the blockchain node interaction service address, blockchain node interaction service port, blockchain node digital certificate, and target device resource utilization information, etc. The target device can communicate and interact with the corresponding blockchain node through the interaction parameter.

[0064] Specifically, before using the information generation service of the target device, the blockchain node needs to register first, that is, it needs to obtain the permission to use the information generation service. At this time, the blockchain node generates a service registration request according to the corresponding blockchain node identifier and interaction parameters.

[0065] S304, digitally sign the blockchain node identifier and interaction parameters to obtain target signature information, and send the target signature information and transaction registration request to the target device.

[0066] Among them, the target signature information refers to the information obtained by digitally signing the blockchain node identifier and interaction parameters using the signature private key of the blockchain node, which is used to represent that the blockchain node identifier and interaction parameters are sent by the blockchain node corresponding to the digital signature.

[0067] Specifically, the blockchain node digitally signs the service registration request to obtain the signed service registration request, that is, the blockchain node obtains the signature private key that represents the blockchain node identity, and then uses the signature private key to digitally sign the blockchain node identifier and interaction parameters to obtain the target signature information. The target signature information and the transaction registration request are then sent to the target device.

[0068] S306, obtaining the registration success information returned by the target device. The registration success information is obtained by the target device performing signature verification on the target signature information. When the signature verification passes, the transaction registration request is parsed to obtain the blockchain node identifier and interaction parameters, and the blockchain node identifier and interaction parameters are associated and stored.

[0069] Specifically, the blockchain node obtains the registration success information returned by the target device by using the interaction parameters. When the target device receives the target signature information and transaction registration request sent by the blockchain node, it first verifies the target signature information, that is, obtains the signature public key corresponding to the blockchain node, and then uses the signature public key to verify the target signature information. When the verification passes, the transaction registration request is parsed to obtain the blockchain node identifier and interaction parameters, and the blockchain node identifier and interaction parameters are associated and stored. At this time, the target device generates registration success information, which is used to indicate that the blockchain node has the authority to use the information generation service of the target device. Finally, the target device uses the interaction service address in the interaction parameters to return the registration success information to the blockchain node.

[0070] In one embodiment, when the target device verifies the target signature information, it searches for the blockchain node identifier in the whitelist database, and the whitelist database stores the blockchain node identifier that can grant the information generation service authority. When the blockchain node identifier is not found in the whitelist database, the target device generates registration failure information, and the registration failure information is used to indicate that the blockchain node fails to apply for the permission to use the information generation service. Then the target device returns the registration failure information to the blockchain node using the interactive service address in the interactive parameter. When the blockchain node identifier is found in the whitelist database, the target device further searches for the blockchain node identifier in the blacklist database, and the blacklist database stores the blockchain node identifier that cannot authorize the information generation service authority. When the blockchain node identifier is found in the blacklist database, the target device generates registration failure information and returns the registration failure information to the blockchain node using the interactive service address in the interactive parameter. When the blockchain node identifier is not found in the blacklist database, the transaction registration request is parsed to obtain the blockchain node identifier and the interactive parameter, and the blockchain node identifier and the interactive parameter are associated and stored. Finally, the target device generates registration success information and returns the registration success information to the blockchain node using the interactive service address in the interactive parameter.

[0071] S308: Write the device information corresponding to the target device into the permission information table based on the registration success information.

[0072] The device information refers to the information of the target device, which may be the device identification, device number, device digital certificate, target device address, etc. The permission information table refers to the data table of the target device whose information has been registered to generate service permissions.

[0073] Specifically, when the blockchain node receives the successful registration information, it can write the device information corresponding to the target device into the permission information table according to the successful registration information, wherein the target device address can be written into the permission information table, and then the target device address can be used to send an information generation request to the target device.

[0074] In one embodiment, the registration success information may include the target device digital certificate and the target device identification. The blockchain node stores the target device identification in the device list providing information generation services, and stores the target device digital certificate in the certificate list providing information generation services.

[0075] S206, obtaining the signed target information returned by the target device, including the steps of:

[0076] Get the signed target information returned by the target device through the interaction parameters.

[0077] Specifically, the blockchain node can obtain the signed target information returned by the target device through the interaction parameters, wherein the target device can send the signed target information to the blockchain node using information such as the blockchain interaction service address and port.

[0078] In a specific embodiment, Figure 4As shown, it is a schematic diagram of the process of target device service registration. Specifically, the blockchain node creates an information generation service registration application request, and then signs the service registration application request. The signature content includes the blockchain node interactive service address, the blockchain node interactive service port, the blockchain node digital certificate, and the target device resource utilization information, etc. The target device resource utilization information refers to the resource information in the target device required by the blockchain node when using the information generation service, such as the occupied memory information and computing resource information, etc. Then the blockchain node sends the signed service registration application request to the target device that provides the information generation service. When the target device receives the signed service registration application request, it first verifies the signed service registration application request through the authentication module, that is, verifies the digital signature. When the digital signature verification passes, the authentication module verifies whether the blockchain node identifier is in the whitelist database. When the blockchain node identifier is in the whitelist database, the authentication module verifies whether the blockchain node identifier is in the blacklist database. When the blockchain node identifier is not in the blacklist database, the service registration application request is parsed to obtain the blockchain node interactive service address, the blockchain node interactive service port, the blockchain node digital certificate, and the target device resource utilization information, that is, the target device obtains the blockchain node registration information. The target device then stores the blockchain node registration information in the database. Finally, the target device returns registration success information to the blockchain node. When the digital signature verification fails, when the blockchain node identifier is not in the whitelist database, and when the blockchain node identifier is in the blacklist database, the target device returns registration failure information to the blockchain node. When the blockchain node obtains the registration success information sent by the target device, it stores the target device in the device whitelist that provides information generation services, and stores the target device digital certificate in the device certificate list that provides information generation services. When the blockchain node obtains the registration failure information sent by the target device, the blockchain node generates a registration failure log, and then the registration failure log can be returned to the management of the blockchain node.

[0079] In the above embodiment, by generating a service registration request, and digitally signing the blockchain node identifier and interaction parameters, the target signature information is obtained, and the target signature information and the transaction registration request are sent to the target device, and the registration success information returned by the target device is obtained. The registration success information is obtained by the target device performing signature verification on the target signature information. When the signature verification passes, the transaction registration request is parsed to obtain the blockchain node identifier and interaction parameters, and the blockchain node identifier and interaction parameters are stored in association, and the device information corresponding to the target device is written into the permission information table based on the registration success information. That is, the information generation service can only be used after the information generation service is successfully registered, which improves the security of the use of the information generation service.

[0080] In one embodiment, S202, receiving a blockchain transaction request, includes the steps of:

[0081] Obtain each pending transaction request in the current block, send each pending transaction request to the virtual execution device, and the virtual execution device sends each pending transaction request to the corresponding execution process; receive the blockchain transaction request through the execution process.

[0082] Among them, the pending transaction request refers to the transaction request that needs to be executed in the blockchain. The virtual execution device refers to the virtual device that executes the blockchain transaction, which can be the virtual machine running the blockchain in the blockchain node. The execution process refers to the entity that executes the transaction, that is, the process in the virtual machine, which can be the process that executes the smart contract.

[0083] Specifically, the blockchain node obtains each pending transaction request in the current block from the blockchain transaction pool. Then each pending transaction request is sent to the virtual execution device for execution. When the virtual execution device receives each pending transaction request, it schedules and distributes each pending transaction request, that is, sends each pending transaction request to the corresponding execution process. Then each execution process receives the corresponding pending transaction request for execution, and the pending transaction request may be a blockchain transaction request.

[0084] In the above embodiment, by obtaining each pending transaction request in the current block, each pending transaction request is sent to the virtual execution device, and the virtual execution device sends each pending transaction request to the corresponding execution process; the blockchain transaction request is received through the execution process, that is, each pending transaction request in the current block is processed through different execution processes, which can improve the efficiency of blockchain in processing transaction requests.

[0085] In one embodiment, S210, associating the information generation parameters with the signed target information and writing them into the blockchain comprises the steps of:

[0086] Write the information generation parameters and the signed target information into the current block; when each pending transaction request is executed, obtain the execution result corresponding to each pending transaction request, and write the execution result corresponding to each pending transaction request into the current block to obtain the target block, and write the target block into the blockchain.

[0087] Among them, the execution result corresponding to each pending transaction request refers to the execution result obtained by calling the smart contract corresponding to the transaction request through the execution process and executing the smart contract. Different pending transaction requests can use different smart contracts to achieve different tasks and obtain different results. Different pending transaction requests can use the same smart contract through different request parameters to obtain different execution results. The target block refers to the final packaged block, which is the block to be written into the blockchain. The target block includes each pending transaction request and the corresponding execution result.

[0088] Specifically, the blockchain node executes the smart contract corresponding to the target smart contract identifier through the execution process, and when the target device service information is detected, the information generation request is generated based on the information generation parameter, and the information generation request is sent to the target device according to the target device service information. The signed target information returned by the target device is obtained. The signed target information is obtained by the target device using the information generation parameter to generate information, obtain the initial target information, and digitally sign the initial target information. At this time, the execution process completes the execution of the smart contract, and then writes the information generation parameter and the signed target information into the current block. Then the blockchain node detects whether all pending transaction requests have been executed. When each pending transaction request is executed, the execution result corresponding to each pending transaction request is obtained, and the execution result corresponding to each pending transaction request is written into the current block to obtain the target block. Finally, the blockchain node writes the target block into the blockchain, that is, broadcasts the target block to each blockchain node for consensus. When the consensus is passed, the target block that passes the consensus is written into the blockchain, so that each blockchain node saves the blockchain including the target block.

[0089] In the above embodiment, when all pending transaction requests corresponding to the current block are executed, the execution results corresponding to each pending transaction request are written into the current block to obtain the target block, and then the target block is written into the blockchain, thereby improving the efficiency of the blockchain in processing transaction requests.

[0090] In one embodiment, S204, generating an information generation request based on the information generation parameter, and sending the information generation request to the target device according to the target device service information, includes the steps of:

[0091] Obtain a blockchain node identifier, generate a target information generation request based on the blockchain node identifier and information generation parameters, and digitally sign the target information generation request to obtain the signed target information generation request; send the signed target information generation request to the target device according to the target device service information, and when the signed target information generation request is verified by the target device, perform service authority verification based on the blockchain node identifier in the target information generation request. When the service authority verification passes, generate a dialogue statement based on the information generation parameters, reply to the dialogue statement, obtain initial target information, digitally sign the initial target information, obtain signed target information, and return the signed target information to the blockchain node corresponding to the blockchain node identifier.

[0092] The signed target information generation request is obtained by digitally signing the blockchain node identifier and information generation parameters carried in the target information generation request. Service authority verification refers to verifying whether the blockchain node has the authority to use the information generation service.

[0093] Specifically, the blockchain node obtains the blockchain node identifier, generates a target information generation request based on the blockchain node identifier and information generation parameters, and uses the signature private key to digitally sign the target information generation request to obtain the signed target information generation request. Among them, the signature private key and the signature public key are generated using a digital signature algorithm. Then the blockchain node sends the signed target information generation request to the target device according to the target device service information. The target device receives the signed target information generation request, obtains the corresponding signature public key using the blockchain node identifier, and then verifies the signed target information generation request using the signature public key, that is, decrypts the signed target information generation request using the signature public key to obtain the decrypted target information generation request, and then compares the decrypted target information generation request with the received target information generation request. When they are inconsistent, the target information generation request after verification signature fails. At this time, the target device directly returns a prompt message of a digital signature error to the blockchain node corresponding to the blockchain node identifier. When they are consistent, the target information generation request after verification signature passes. When the target device passes the target information generation request after verification of the signature, the service authority verification is performed based on the blockchain node identifier in the target information generation request, wherein the blockchain node identifier can be found in the target device whitelist database and the target device blacklist database. When the blockchain node identifier is found in the target device whitelist database and the blockchain node identifier is not found in the target device blacklist database, the service authority verification is performed on the blockchain node identifier. When the service authority verification is passed, a dialogue statement is generated based on the information generation parameters, and the dialogue statement is replied to obtain the initial target information, and then the initial target information is digitally signed using the signature private key of the target device to obtain the signed target information, and the signed target information is returned to the blockchain node corresponding to the blockchain node identifier.

[0094] In the above embodiment, by obtaining the blockchain node identifier, a target information generation request is generated based on the blockchain node identifier and the information generation parameter, and the target information generation request is digitally signed to obtain the signed target information generation request. Then, the signed target information generation request is sent to the target device according to the target device service information. When the target device verifies that the signed target information generation request is passed, the service authority verification is performed based on the blockchain node identifier in the target information generation request. When the service authority verification is passed, a dialogue statement is generated based on the information generation parameter, and the dialogue statement is replied to obtain the initial target information. The initial target information is digitally signed to obtain the signed target information, and the signed target information is returned to the blockchain node corresponding to the blockchain node identifier. That is, the target device generates information only when the signed target information generation request is verified, thereby improving the security of information generation.

[0095] In one embodiment, S206, i.e. obtaining the signed target information returned by the target device, comprises the steps of:

[0096] Obtain the signed first target information returned by the target device; the signed first target information is obtained by the target device generating an information request, using an information generation parameter as a dialogue statement, and inputting the dialogue statement into a trained information generation model for information reply, thereby obtaining the output first target information, and obtaining the signature private key corresponding to the target device, and using the signature private key to digitally sign the first target information.

[0097] The trained information generation model refers to a pre-trained neural network model for information generation, and the neural network model may be a natural language model, that is, outputting corresponding information by inputting natural language text. The trained information generation model is pre-trained using historical conversation sentences and corresponding historical reply information through a neural network algorithm.

[0098] Specifically, a trained information generation model is pre-deployed in the target device, and the information generation model can be a robot model used to provide dialogue services. That is, the target device pre-acquires the historical dialogue sentences and the corresponding historical reply information, and then uses the historical dialogue sentences as the input of the information generation model of the initialization parameters, and uses the historical reply information as the label of the information generation model of the initialization parameters for training. When the training is completed, the trained information generation model is obtained. The trained information generation model is then deployed and used. The blockchain node obtains the signed first target information returned by the target device. Among them, the target device can directly use the information generation parameters as dialogue sentences, and input the dialogue sentences into the trained information generation model for information reply, obtain the output first target information, and obtain the signature private key corresponding to the target device, which is generated by the target device using a digital signature algorithm. The signature private key is the proof of the identity of the target device and is unique. And the target device sends the signature public key to the blockchain node after the blockchain node is successfully registered. Then the first target information is digitally signed using the signature private key to obtain the signed first target information. The trained information generation model can be a large-scale intelligent chat robot, which can generate reply information and respond through dialogue, that is, the target device can input information generation parameters as dialogue sentences into the large-scale intelligent chat robot, and then obtain the target information generated by the large-scale intelligent chat robot according to the dialogue sentences.

[0099] In one embodiment, the target device can calculate the hash value of the first target information, encrypt the hash value using the signature private key of the target device to obtain the encrypted hash value, and send the encrypted hash value and the first target information to the blockchain node. The blockchain node receives the encrypted hash value and the first target information returned by the target device, decrypts the encrypted hash value using the signature public key of the target device, and obtains the decrypted hash value. Then the hash value of the first target information is calculated again. When the decrypted hash value is consistent with the calculated hash value, the blockchain node verifies the digital signature of the first target information.

[0100] In the above embodiment, by obtaining the signed first target information returned by the target device, the first target information is generated by the target device inputting information generation parameters into the trained information generation model to obtain the output first target information, and obtaining the signature private key corresponding to the target device, and using the signature private key to digitally sign the first target information, thereby improving the efficiency of obtaining the target information.

[0101] In one embodiment, S206, i.e. obtaining the signed target information returned by the target device, includes:

[0102] Obtain the signed second target information returned by the target device; the signed second target information is obtained by the target device generating a dialog statement based on an information generation request using information generation parameters, calling an information generation service interface, using a dialog statement to reply information based on the information generation service interface, obtaining the second target information, and obtaining the signature private key corresponding to the target device, and using the signature private key to digitally sign the second target information.

[0103] The information generation service interface refers to an interface for providing information generation services. The information generation service interface is pre-set by the target device, and the information generation service can be called through the information generation service interface. The information generation service can be a service in the target device or a service provided by a third-party service device.

[0104] Specifically, the blockchain node obtains the signed second target information returned by the target device. The signed second target information is generated by calling the information generation service interface through the target device. Then, based on the information generation service interface, the information generation parameters are used to generate information to obtain the second target information, wherein the target device can be the interface key of the information generation service interface, and then the interface key is used to access the information generation service interface through HTTP (Hyper Text Transfer Protocol), that is, by submitting a request carrying the information generation parameters to the information generation service interface, and then the information generation service interface will return the second target information generated by the dialogue statement using the information generation parameters and then using the dialogue statement through the information generation service. The target device then obtains the signature private key corresponding to the target device and uses the signature private key to digitally sign the second target information.

[0105] In one embodiment, the target device can calculate the hash value of the second target information, encrypt the hash value using the signature private key of the target device to obtain the encrypted hash value, and send the encrypted hash value and the second target information to the blockchain node. The blockchain node receives the encrypted hash value and the second target information returned by the target device, decrypts the encrypted hash value using the signature public key of the target device, and obtains the decrypted hash value. Then the hash value of the second target information is calculated again. When the decrypted hash value is consistent with the calculated hash value, the blockchain node verifies the digital signature of the second target information.

[0106] In the above embodiment, by obtaining the signed second target information returned by the target device, the second target information is obtained by the target device calling the information generation service interface, using the information generation parameters based on the information generation service interface to generate the second target information, and obtaining the signature private key corresponding to the target device, and using the signature private key to digitally sign the second target information. The target device does not need to train and deploy the information generation model, and can directly call the information generation service interface to generate information, thereby improving the efficiency of obtaining the target information.

[0107] In one embodiment, S204, in response to the target smart contract detecting the target device service information, generating an information generation request based on the information generation parameter, includes the steps of:

[0108] Execute the target smart contract. When the target device service statement is called through the target smart contract, the target device service information is detected from the statement of calling the target device service. When the target device service information is detected, an information generation request is generated based on the information generation parameters.

[0109] Among them, the statement for calling the target device service refers to the smart contract statement for calling the information generation service in the target device.

[0110] Specifically, when it is necessary to call the information generation service in the target device, a code statement for calling the target device service can be written in advance in the target smart contract. Then, when the blockchain node executes the target smart contract corresponding to the target smart contract identifier, when executing the call target device service statement in the target smart contract, the blockchain node can detect the target device service information from the call target device service statement. At this time, the blockchain node detects the target device service information and then executes the call target device service statement, that is, first generates an information generation request to be sent to the target device based on the information generation parameters, and preferably sends the information generation request to the target device according to the target device service information.

[0111] In the above embodiment, by executing the target smart contract corresponding to the target smart contract identifier, when the target device service statement is executed through the target smart contract, the target device service information is detected from the statement of calling the target device service; when the target device service information is detected, an information generation request is generated based on the information generation parameters, that is, the target information is generated by executing the statement of calling the target device service through the smart contract, which can improve the security of the target device service call.

[0112] In one embodiment, the blockchain information processing method further includes:

[0113] When the target smart contract does not contain a statement to call the target device service, the smart contract corresponding to the target smart contract identifier is executed through information generation parameters to obtain the smart contract execution result; the information generation parameters and the smart contract execution result are written into the blockchain.

[0114] Specifically, when the blockchain node executes the target smart contract corresponding to the target smart contract identifier, it searches the target smart contract for a statement that calls the target device service. When the target smart contract does not contain a statement that calls the target device service, it indicates that the target smart contract is not a smart contract that calls the target device service. At this time, the target smart contract can be used to generate the target information. That is, the target smart contract corresponding to the target smart contract identifier is a smart contract that generates information. The method of information generation is agreed upon in the smart contract that generates information, such as using a trained neural network model to generate target information. At this time, the information generation parameters are used as the contract parameters used when executing the target smart contract, and then the target smart contract corresponding to the target smart contract identifier is executed, and finally the smart contract execution result is obtained. Finally, the blockchain node writes the information generation parameters and the smart contract execution result into the blockchain. The writing refers to writing the information generation parameters and the smart contract execution result into the same block, and then writing the block into the blockchain.

[0115] In the above embodiment, when there is no statement to call the target device service in the target smart contract, the smart contract corresponding to the target smart contract identifier is executed through information generation parameters to obtain the smart contract execution result; the information generation parameters and the smart contract execution result are written into the blockchain, which can avoid the failure of blockchain transaction request execution and improve the stability of blockchain transactions.

[0116] In a specific embodiment, Figure 5 As shown, a schematic diagram of the process of blockchain information generation is provided, specifically:

[0117] The blockchain node extracts all pending transactions in the current block of the blockchain, and then marks all pending transaction requests as "pending". The blockchain node then sends each marked pending transaction request to the virtual machine for execution. The virtual machine schedules and distributes each marked pending transaction request through the transaction scheduling module, that is, distributes each pending transaction request to different contract processes, which are used to execute the corresponding smart contract transaction request. Among them, the pending transaction request carries information generation parameters and target smart contract identifiers. The contract process calls the corresponding smart contract and executes it according to the target smart contract identifier. Then the blockchain node determines whether the call target device service statement in the smart contract is executed. When the call target device service statement in the smart contract is not executed, then it determines whether the end statement in the smart contract is executed. If the end statement in the smart contract is not executed, continue to execute the next statement in the smart contract, and return to the step of determining whether the next statement is the call target device service statement for iterative execution. When the end statement in the smart contract is executed, the smart contract execution result is obtained. At this time, the blockchain node encapsulates the execution result corresponding to the transaction request.

[0118] The blockchain node determines that when executing the call target device service statement in the smart contract, an information generation request is generated, and the information generation request carries information generation parameters. Then the blockchain node sends the information generation request to the target device. When the target device receives the information generation request, it first verifies the digital signature of the information generation request to verify whether it is the information generation request sent by the blockchain node, and verifies whether the sent information generation request has been tampered with. When the digital signature of the information generation request is verified, the target device verifies whether the blockchain node has been authorized to use the information generation service through the authentication module. That is, the target device searches the whitelist database for the existence of the blockchain node identifier. When the blockchain node identifier is found in the whitelist database, the blacklist database is further searched for the existence of the blockchain node identifier. When the blockchain node identifier is not found in the blacklist database, it indicates that the target device has authorized the blockchain node to use the information generation service. At this time, the target device writes the information generation request into the request scheduling queue and waits for scheduling. Then the target device consumes the information generation request in the request scheduling queue through the request scheduler and schedules it for execution. The scheduling execution refers to calling the information generation service interface through the interface calling module, and obtaining the target information corresponding to the information generation request through the information generation service interface. Then the target information is signed, the signed execution success result is obtained, and then the signed execution success result is returned to the blockchain node. Among them, when the digital signature verification of the information generation request fails or when the blockchain node identifier is not found in the whitelist database or when the blockchain node identifier is found in the blacklist database, the target device generates execution failure information, signs the execution failure information, and returns the signed execution failure information to the blockchain node.

[0119] The blockchain node obtains the execution result of the information generation request returned by the target device, which may include the execution success result after signing or the execution failure information after signing. Then continue to execute the next statement in the smart contract, that is, return to the step of iteratively executing whether the next statement is a statement for calling the target device service. When the end statement in the smart contract is executed, the smart contract execution result is obtained. At this time, the blockchain node encapsulates the execution result corresponding to the transaction request, which includes the execution success result after signing or the execution failure information after signing. Then the blockchain node determines whether the execution is successful according to the execution result corresponding to the transaction request. When the execution fails, the transaction request is marked as execution failure. When the execution is successful, the transaction request is marked as execution success. Then the blockchain node writes the transaction request and the corresponding transaction result into the current block. Then determine whether all pending transaction requests are executed. When the execution is completed, all pending transaction requests and the corresponding execution results are written into the blockchain, that is, the blockchain node updates the state data storage, and at the same time appends the current block to the blockchain ledger storage after consensus is passed.

[0120] In the above embodiment, when the statement of calling the target device service in the smart contract is executed by the blockchain node, an information generation request is sent to the target device, information is generated by the target device, and finally the blockchain node obtains the generated target information, thereby avoiding information generation in the blockchain node, thereby saving the computing power resources of the blockchain node, and ensuring the stable operation of the blockchain.

[0121] In one embodiment, Figure 6 As shown, the blockchain information processing method also includes:

[0122] S602, obtaining a transaction request to be verified, where the transaction request to be verified carries parameters for generating information to be verified, target information to be verified, and a corresponding smart contract identifier.

[0123] Among them, the transaction request to be verified refers to the transaction request that needs to be verified by consensus. The transaction request to be verified can be a request in the transaction block that currently needs to be verified in the blockchain. When the verification is passed, the transaction request can be added to the permanent ledger of the blockchain. The parameter for generating the information to be verified refers to the parameter used when generating the target information to be verified. The target information to be verified refers to the target information that needs to be verified, that is, it is necessary to verify whether the target information is generated by the corresponding smart contract.

[0124] Specifically, the blockchain node can obtain the block to be verified through blockchain broadcast, and then obtain the transaction request to be verified from the block to be verified. Then, the transaction request to be verified is parsed to obtain the information generation parameters to be verified, the target information to be verified, and the corresponding smart contract identifier.

[0125] S604, when the target device service information is detected based on the smart contract corresponding to the smart contract identifier, the target device public key corresponding to the target device service information is obtained, and the target device public key is used to perform signature verification on the target information to be verified.

[0126] The target device public key refers to the public key generated by the target device for digital signature verification.

[0127] Specifically, when the blockchain node executes the smart contract corresponding to the smart contract identifier, the target device service information is detected in the smart contract, indicating that the target information of the transaction request to be verified is generated using the target device service. At this time, the blockchain node obtains the target device public key corresponding to the target device service information from the database, and then uses the target device public key to perform signature verification on the target information to be verified, that is, the target device public key decrypts the target information to be verified to obtain the target information, and then determines whether the target information carried in the request is consistent with the decrypted target information. If they are consistent, the signature verification of the target information to be verified is passed, and if they are not consistent, the signature verification of the target information to be verified is failed. When the signature verification of the target information to be verified fails, the blockchain node generates a prompt message of verification failure, and the transaction request will not be written into the blockchain, that is, the transaction request fails to execute in the blockchain.

[0128] In one embodiment, the blockchain node can also obtain the digital certificate of the target device from the digital certificate database, and perform signature verification on the target information to be verified through the digital certificate of the target device.

[0129] S606, when the signature verification of the target information to be verified is passed, the target device identity information corresponding to the target device service information is obtained, and when the identity authority verification of the target device identity information is passed, the verified information generation parameters and the verified target information are obtained.

[0130] The target device identity information is used to represent the identity of the target device, and may be a target device identifier, a target device address, a target device character string, and the like.

[0131] Specifically, when the blockchain node determines that the signature verification of the target information to be verified is passed, the target device identity information corresponding to the target device service information is obtained from the database. Then, the identity authority verification of the target device identity information is performed, wherein the target identity information can be searched in the whitelist database to see whether it is stored. When the target identity information is not found in the whitelist database, it means that the identity authority verification of the target device identity information has not been passed. At this time, the blockchain node generates a prompt message of verification failure, and the transaction request will not be written into the blockchain, that is, the transaction request fails to be executed in the blockchain. When the target identity information is found in the whitelist database, the target device identity information is further searched in the blacklist database. When the target device identity information is found in the blacklist database, it means that the identity authority verification of the target device identity information has not been passed. At this time, the blockchain node generates a prompt message of verification failure, and the transaction request will not be written into the blockchain, that is, the transaction request fails to be executed in the blockchain. When the target device identity information is not found in the blacklist database, it means that the identity authority verification of the target device identity information has been passed. At this time, the information generation parameters of the verification pass and the target information of the verification pass are obtained.

[0132] S608, write the verified information generation parameters and the verified target information into the blockchain.

[0133] Specifically, the blockchain node writes the verified information generation parameters and the verified target information into the blockchain, that is, the blockchain node updates the blockchain status data and writes the verified information generation parameters and the verified target information into the blockchain ledger in the form of blocks for storage.

[0134] In the above embodiment, by obtaining the transaction request to be verified, when the target device service information is detected based on the smart contract corresponding to the smart contract identifier, the target device public key corresponding to the target device service information is obtained, and the target device public key is used to perform signature verification on the target information to be verified. When the signature verification of the target information to be verified is passed, the target device identity information corresponding to the target device service information is obtained. When the identity authority verification of the target device identity information is passed, the verified information generation parameters and the verified target information are obtained. That is, after the digital signature of the verified target information is passed, the verified target information is obtained, so that there is no need to request the target device to repeatedly generate the target information for verification during the verification process, which avoids the repeated generation of target information by the blockchain node and improves the efficiency of verification.

[0135] In one embodiment, the blockchain information processing method further includes the steps of:

[0136] When the signature verification of the target information to be verified fails, an execution error result is generated; based on the execution error result, verification failure information corresponding to the transaction request to be verified is obtained, and the verification failure information is broadcast.

[0137] The execution error result is used to indicate that the verification of the target information to be verified fails. The verification failure information is used to indicate that the result of the verification of the transaction request to be verified is a verification failure result.

[0138] Specifically, when the blockchain node fails to pass the signature verification of the target information to be verified, it generates an execution error result. Then, based on the execution error result, the verification failure information corresponding to the transaction request to be verified is obtained and the verification failure information is broadcast. That is, the blockchain node broadcasts the verification failure information to other nodes in the blockchain, so that other blockchain nodes can perform consensus verification.

[0139] In the above embodiment, by obtaining the transaction request to be verified, when the signature verification of the target information to be verified fails, an execution error result is generated; based on the execution error result, the verification failure information corresponding to the transaction request to be verified is obtained, and the verification failure information is broadcast, that is, when the signature verification of the target information to be verified fails, the verification failure information is obtained, so that there is no need to request the target device to repeatedly generate the target information for verification during the verification process, thereby avoiding the blockchain node from repeatedly generating the target information and improving the efficiency of verification.

[0140] In a specific embodiment, Figure 7 As shown, a flowchart of transaction request verification is provided, specifically:

[0141] The blockchain node can be a verification node in the blockchain, and can verify the transaction requests that require consensus during the consensus process. At this time, the blockchain node obtains the transaction request to be verified broadcast by the blockchain, and then saves the transaction request to be verified to the current transaction pool. Then the blockchain node extracts all the transaction requests to be verified in the current block from the transaction pool, and then marks all the transaction requests to be verified as "to be verified". Then the blockchain node sends each marked transaction request to be verified to the virtual machine for verification. The transaction scheduling module in the virtual machine schedules and distributes each marked transaction request to be verified, that is, distributes each transaction request to be verified to different contract processes, which are used to verify the corresponding transaction request. Among them, the transaction request to be verified carries the parameters for generating information to be verified, the target information to be verified, and the corresponding smart contract identifier. The contract process calls the corresponding smart contract and executes it according to the target smart contract identifier. Then the blockchain node determines whether the call target device service statement in the smart contract is executed. If the call target device service statement in the smart contract is not executed, then it determines whether the end statement in the smart contract is executed. If the end statement in the smart contract is not executed, it continues to execute the next statement in the smart contract and returns to the step of iteratively executing whether the next statement is a call target device service statement. When the end statement in the smart contract is executed, the smart contract execution result is obtained. At this time, the blockchain node encapsulates the verification correct execution result corresponding to the transaction request.

[0142] The blockchain node determines that when executing the call target device service statement in the smart contract, the target device public key corresponding to the target device service information is obtained, and then the target device public key is used to perform signature verification on the target information to be verified. When the signature verification of the target information to be verified is passed, the target device identifier corresponding to the target device service information is obtained, and then the target device identifier is searched in the whitelist database to see whether it exists. When the target device identifier is found in the whitelist database, the blacklist database is further searched to see whether the target device identifier exists. When the target device identifier is not found in the blacklist database, it means that the identity authority verification is passed. At this time, the information generation parameters that have passed the verification and the target information that have passed the verification are obtained. Then, according to the information generation parameters that have passed the verification and the target information that have passed the verification, the verification correct execution result corresponding to the request to be verified is obtained. Among them, when the digital signature verification of the information generation request fails or when the target device identifier is not found in the whitelist database or when the target device identifier is found in the blacklist database, the verification error execution information is generated. Then the blockchain node determines whether the verification is successful according to the verification result corresponding to the transaction request. When the verification fails, the transaction request is marked as verification failure. When the verification is successful, the transaction request is marked as verification success. The blockchain node then writes the pending transaction request and the corresponding transaction result into the current block. It then determines whether all pending transaction requests have been verified. When verification is complete, all pending transaction requests and the corresponding transaction results are written into the blockchain, i.e. the blockchain node updates the state data storage, and at the same time appends the current block to the blockchain ledger storage after consensus is passed.

[0143] In the above embodiment, by obtaining the transaction request to be verified, when the target device service information is detected based on the smart contract corresponding to the smart contract identifier, the target device public key corresponding to the target device service information is obtained, and the target device public key is used to perform signature verification on the target information to be verified. When the signature verification of the target information to be verified is passed, the target device identity information corresponding to the target device service information is obtained. When the identity authority verification of the target device identity information is passed, the verified information generation parameters and the verified target information are obtained. That is, after the digital signature of the verified target information is passed, the verified target information is obtained, so that there is no need to request the target device to repeatedly generate the target information for verification during the verification process, which avoids the repeated generation of target information by the blockchain node and improves the efficiency of verification.

[0144] In a specific embodiment, Figure 8 As shown, a flowchart of a blockchain information processing method is provided, which is executed by a blockchain node and specifically includes the following steps:

[0145] S802, obtain each pending transaction request in the current block, send each pending transaction request to the virtual execution device, the virtual execution device sends each pending transaction request to the corresponding execution process, and obtains the blockchain transaction request through the execution process. The blockchain transaction request carries information generation parameters and the target smart contract identifier.

[0146] S804, executing the smart contract corresponding to the target smart contract identifier, when the smart contract is executed to call the target device service statement, the target device service information is detected from the call target device service statement.

[0147] S806, when the target device service information is detected, obtain the blockchain node identifier, generate a target information generation request based on the blockchain node identifier and the information generation parameters, and digitally sign the target information generation request to obtain the signed target information generation request.

[0148] S808, sending the signed target information generation request to the target device according to the target device service information, and when the signed target information generation request is verified by the target device, performing service authority verification based on the blockchain node identifier in the target information generation request, and when the service authority verification is passed, using the information generation parameters to generate a dialogue statement, and replying to the dialogue statement to obtain the second target information, and digitally signing the second target information to obtain the signed second target information, and returning the signed second target information to the blockchain node corresponding to the blockchain node identifier.

[0149] S810, obtaining the signed second target information returned by the target device; the signed second target information is obtained by the target device verifying the signature of the target information generation request, and performing service authority verification based on the blockchain node identifier in the target information generation request. When the service authority verification passes, a dialogue statement is generated based on the information generation service interface using the information generation parameters, and an information reply is made to the dialogue statement to obtain the second target information, and the signature private key corresponding to the target device is obtained, and the second target information is digitally signed using the signature private key.

[0150] S812, write the information generation parameters and the signed second target information into the current block. When each pending transaction request is executed, obtain the execution result corresponding to each pending transaction request, and write the execution result corresponding to each pending transaction request into the current block to obtain the target block, and write the target block into the blockchain.

[0151] In the above embodiment, the blockchain node obtains the blockchain pending transaction request, and when the target device service information is detected according to the blockchain pending transaction request, generates a signed target information generation request, and sends the signed target information generation request to the target device according to the target device service information, and then obtains the signed second target information returned by the target device, writes the information generation parameters and the signed second target information into the current block, and obtains the target block when all pending transaction requests are executed, and finally writes the target block into the blockchain, thereby avoiding information generation in the blockchain node, thereby saving the computing power resources of the blockchain node, and thus ensuring the stable operation of the blockchain.

[0152] In a specific embodiment, Fig. 9 As shown, a schematic diagram of the architecture for generating blockchain information is provided. Specifically, the architecture for generating blockchain information includes a blockchain node and a target device. The target device is a third-party device of the blockchain among other non-blockchain node devices.

[0153] Among them, the blockchain node is a computer device used for tasks such as block generation, consensus, and storage. The blockchain node includes a network module, which is a module for the blockchain to communicate with the outside, including communication with the target device, communication with the user client, and communication with the nodes in the blockchain. The blockchain node also includes a consensus module, which is a module for consensus on blocks between blockchain nodes, including master node execution blocks and verification nodes verification blocks, etc. The consensus is passed when the verification nodes reach a consensus through multiple rounds of consensus. The blockchain node also includes an authentication module, which is a module for storing certificates, black and white lists, and verifying the legitimacy of certificates and transactions. Among them, the blockchain node certificate is the certificate of the blockchain node, which is used for mutual recognition of identity between nodes. The blockchain user certificate is the certificate of the user in the chain organization of the blockchain, which is used to identify whether the user is a legitimate user on the chain. The target device certificate is a digital certificate that stores all target devices. The target device black and white list is used to record the target devices that have the authority to perform information generation services. The target device needs to be in the white list and not in the black list. The blockchain node also includes a storage module, which is a module for storing blockchain status data and ledger data. Each time a new block is stored, the storage module will be updated. Among them, the status data storage module is used to store all status data (latest updated data). The blockchain ledger storage module is used to store new block information in an appended manner. The blockchain node also includes a virtual machine module, which is the core module of smart contract transaction calculation. Among them, the virtual machine transaction scheduling module is used to schedule all virtual machine transaction requests to different contract processes for execution. The contract process is used to execute the entity of the transaction, the runtime state of the contract, and the target device service is initiated through the contract process. The blockchain node also includes an information generation module, which is a module for docking with the target device, such as storing relevant information of the target device.

[0154] Among them, the target device is used to provide smart contract computing capabilities, that is, to generate information, and the blockchain node does not need to have high computing capabilities. The target device mainly includes the following modules: Network module: The network module is used to communicate with the blockchain, obtain task execution applications from the blockchain and return execution results. The authentication module is a module used to store certificates, black and white lists, and verify the legitimacy of certificates and transactions. Among them, the blockchain node certificate is the certificate of the blockchain node, which is used for identity mutual recognition between the target device and the blockchain node. The blockchain node black / white list is used to record the blockchain nodes that have the authority to apply for information generation services. The blockchain node needs to be in the white list and not in the black list. The scheduling module is used to schedule and allocate the obtained blockchain requests, wherein the request scheduling queue is used to put the request in the queue and wait for the next scheduling. The request scheduler is used to obtain the request from the request scheduling queue and start scheduling. The interface calling module is a module that calls the information generation service interface through the target device to perform information generation services. The information generation service interface may be an interface for calling a large conversational language model, and generating target information through the large conversational language model, wherein the large conversational language model may be a ChatGPT (Chat Generative Pre-trained Transformer) model, that is, calling the ChatGPT service through the calling interface of the ChatGPT model, and then obtaining the reply sentence corresponding to the conversation sentence through the ChatGPT service, and using the reply sentence as the generated target information, that is, deploying the ChatGPT model in the target device, which can avoid deploying the ChatGPT model in the blockchain node and save the service resources of the blockchain node.

[0155] In the above embodiment, the various modules in the architectural diagram of blockchain information generation cooperate with each other to realize blockchain information generation, that is, information generation is performed through the target device, which can make full use of the computing power resources of external devices, reduce the computing generation burden on the blockchain, save the computing power resources of the blockchain nodes, and improve the execution efficiency of the blockchain, thereby ensuring that the blockchain can operate stably and efficiently.

[0156] In a specific embodiment, the blockchain information processing method is applied to a video content generation scenario. Specifically, the blockchain node obtains a blockchain transaction request, which carries a video generation parameter and a target smart contract identifier. The video generation parameter can be a text describing the video content to be generated, or a video content keyword, a basic parameter of the video, etc. The basic parameter of the video is used to characterize the basic attributes of the video, such as resolution, frame rate, and bit rate, etc. Then, when the blockchain node detects a call to the target device service interface statement based on the smart contract corresponding to the target smart contract identifier, it generates a video generation request based on the video generation parameter and sends the video generation request to the target device. The signed target video returned by the target device is obtained. The signed target video is generated by the target device by calling the target device service interface based on the video generation parameter to obtain the target video. That is, the target device generates the video by calling the interface of the conversational large language model by the target device. And the target video is digitally signed. The video generation parameters and the signed target video are written into the blockchain. That is, the video is generated through the blockchain smart contract, and finally the generated video is written into the blockchain to prevent the generated video from being tampered with and improve the security of the generated video. In addition, the blockchain node generates the video by calling the target device service, which can save the computing power resources of the blockchain node and ensure the stable and efficient operation of the blockchain node.

[0157] In a specific embodiment, the blockchain information processing method is applied to an image generation scenario. Specifically, the blockchain node obtains a blockchain transaction request, which carries image generation parameters and a target smart contract identifier. The image generation parameters can be text describing the image content to be generated, or can be image content keywords, basic image parameters, etc. The basic image parameters are used to describe the basic attributes of the image, such as image resolution, size, etc. Then, when the blockchain node detects a call to the target device service interface statement based on the smart contract corresponding to the target smart contract identifier, it generates an image generation request based on the image generation parameters and sends the image generation request to the target device. The signed target image returned by the target device is obtained by the target device calling the target device service interface based on the image generation parameters to generate the image, thereby obtaining the target image. That is, the target device generates the image by calling the interface of the conversational large language model by the target device. And the target image is digitally signed. The image generation parameters and the signed target image are written into the blockchain. That is, by generating images in blockchain smart contracts, and finally writing the generated images into the blockchain, the generated images are prevented from being tampered with, and the security of the generated images is improved. In addition, the blockchain nodes generate images by calling the target device service, which can save the computing power resources of the blockchain nodes and ensure the stable and efficient operation of the blockchain nodes. That is, by generating texts in blockchain smart contracts, and finally writing the generated texts into the blockchain, the generated texts are prevented from being tampered with, and the security of the generated texts is improved. In addition, the blockchain nodes generate texts by calling the target device service, which can save the computing power resources of the blockchain nodes and ensure the stable and efficient operation of the blockchain nodes.

[0158] In a specific embodiment, the blockchain information processing method is applied to the audio generation scenario. Specifically, the blockchain node obtains a blockchain transaction request, which carries audio generation parameters and a target smart contract identifier. The audio generation parameters can be text describing the audio content to be generated, or can be audio content keywords, basic audio parameters, etc. The basic audio parameters are used to characterize the basic properties of the audio, such as sampling frequency, sampling bit number, etc. Then, when the blockchain node detects the call to the target device service interface statement based on the smart contract corresponding to the target smart contract identifier, it generates an audio generation request based on the audio generation parameters and sends the audio generation request to the target device. The signed target audio returned by the target device is obtained. The signed target audio is generated by the target device by calling the target device service interface based on the audio generation parameters to obtain the target audio. That is, the target device generates audio by calling the interface of the conversational large language model by the target device. And the target audio is digitally signed. The audio generation parameters and the signed target audio are written into the blockchain. That is, by generating audio in the blockchain smart contract, and finally writing the generated audio into the blockchain, the generated audio is prevented from being tampered with, and the security of the generated audio is improved. In addition, the blockchain node generates audio by calling the target device service, which can save the computing power resources of the blockchain node and ensure the stable and efficient operation of the blockchain node. That is, by generating text in the blockchain smart contract, and finally writing the generated text into the blockchain, the generated text is prevented from being tampered with, and the security of the generated text is improved. In addition, the blockchain node generates text by calling the target device service, which can save the computing power resources of the blockchain node and ensure the stable and efficient operation of the blockchain node.

[0159] In a specific embodiment, the blockchain information processing method is applied to a text generation scenario. Specifically, the blockchain node obtains a blockchain transaction request, which carries a text generation parameter and a target smart contract identifier. The text generation parameter can be a text describing the text content to be generated, or a text content keyword, etc. Then, when the blockchain node detects a call to the target device service interface statement based on the smart contract corresponding to the target smart contract identifier, it generates a text generation request based on the text generation parameter and sends the text generation request to the target device. The signed target text returned by the target device is obtained by the target device calling the target device service interface based on the text generation parameter to generate the text. That is, the target device generates text by calling the interface of the conversational large language model by the target device. And the target text is digitally signed. The text generation parameter and the signed target text are written into the blockchain. That is, by generating text in the blockchain smart contract, and finally writing the generated text into the blockchain, the generated text is prevented from being tampered with, the security of the generated text is improved, and the blockchain node generates text by calling the target device service, which can save the computing power resources of the blockchain node and ensure the stable and efficient operation of the blockchain node.

[0160] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0161] Based on the same inventive concept, the embodiment of the present application also provides a blockchain information processing device for implementing the blockchain information processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more blockchain information processing device embodiments provided below can refer to the limitations of the blockchain information processing method above, and will not be repeated here.

[0162] In one embodiment, Fig.10As shown, a blockchain information processing device 1000 is provided, including: a request receiving module 1002, a request sending module 1004, an information obtaining module 1006 and an information writing module 1008, wherein:

[0163] The request receiving module 1002 is used to receive the blockchain transaction request, parse the blockchain transaction request, and obtain the information generation parameters and the target smart contract identifier;

[0164] A request sending module 1004, configured to generate an information generation request based on information generation parameters in response to the target smart contract detecting the target device service information, and send the information generation request to the target device according to the target device service information;

[0165] The information acquisition module 1006 is used to obtain the signed target information returned by the target device. The signed target information is obtained by the target device generating a dialogue statement according to the information generation parameters in the information generation request, responding to the dialogue statement, obtaining the initial target information, and digitally signing the initial target information.

[0166] The information writing module 1008 is used to write the information generation parameters and the signed target information into the blockchain.

[0167] In one embodiment, the blockchain information processing device 1000 further includes: a registration module, which is used to generate a service registration request, the service registration request carries a blockchain node identifier and interaction parameters; digitally sign the blockchain node identifier and interaction parameters to obtain target signature information, and send the target signature information and transaction registration request to the target device; obtain the registration success information returned by the target device, the registration success information is obtained by the target device performing signature verification on the target signature information, when the signature verification passes, parsing the transaction registration request, obtaining the blockchain node identifier and interaction parameters, and storing the blockchain node identifier and interaction parameters in association. Based on the registration success information, the device information corresponding to the target device is written into the permission information table; the information acquisition module 1006 is also used to obtain the signed target information returned by the target device through the interaction parameters.

[0168] In one embodiment, the request receiving module 1002 is also used to obtain each pending transaction request in the current block, send each pending transaction request to the virtual execution device, and the virtual execution device sends each pending transaction request to the corresponding execution process; the blockchain transaction request is received through the execution process.

[0169] In one embodiment, the information writing module 1008 is also used to write the information generation parameters and the signed target information into the current block; when each pending transaction request is executed, the execution result corresponding to each pending transaction request is obtained, and the execution result corresponding to each pending transaction request is written into the current block to obtain the target block, and the target block is written into the blockchain.

[0170] In one embodiment, the request sending module 1004 is also used to obtain a blockchain node identifier, generate a target information generation request based on the blockchain node identifier and information generation parameters, and digitally sign the target information generation request to obtain the signed target information generation request; send the signed target information generation request to the target device according to the target device service information, and when the signed target information generation request is verified by the target device, perform service authority verification based on the blockchain node identifier in the target information generation request, and when the service authority verification is passed, generate a dialogue statement based on the information generation parameters, reply to the dialogue statement, obtain initial target information, digitally sign the initial target information, obtain signed target information, and return the signed target information to the blockchain node corresponding to the blockchain node identifier.

[0171] In one embodiment, the information acquisition module 1006 is also used to obtain the signed first target information returned by the target device; the signed first target information is obtained by the target device generating an information request, using the information generation parameters as a dialogue statement, and inputting the dialogue statement into the trained information generation model for information reply, thereby obtaining the output first target information, and obtaining the signature private key corresponding to the target device, and using the signature private key to digitally sign the first target information.

[0172] In one embodiment, the information acquisition module 1006 is also used to obtain the signed second target information returned by the target device; the signed second target information is obtained by the target device generating a dialogue statement according to the information generation parameters in the information generation request, calling the information generation service interface, using the dialogue statement to reply information based on the information generation service interface, obtaining the second target information, and obtaining the signature private key corresponding to the target device, and using the signature private key to digitally sign the second target information.

[0173] In one embodiment, the request sending module 1004 is also used to execute the target smart contract. When the target device service statement is called through the target smart contract, the target device service information is detected from the target device service statement; when the target device service information is detected, an information generation request is generated based on the information generation parameters.

[0174] In one embodiment, the blockchain information processing device 1000 also includes: a contract execution module, which is used to execute the smart contract corresponding to the target smart contract identifier through information generation parameters when there is no statement calling the target device service in the target smart contract, and obtain the smart contract execution result; the information generation parameters and the smart contract execution result are written into the blockchain.

[0175] In one embodiment, the blockchain information processing device 1000 also includes: a verification module, which is used to obtain a transaction request to be verified, the transaction request to be verified carries information generation parameters to be verified, target information to be verified and a corresponding smart contract identifier; when the target device service information is detected based on the smart contract corresponding to the smart contract identifier, the target device public key corresponding to the target device service information is obtained, and the target device public key is used to perform signature verification on the target information to be verified; when the signature verification of the target information to be verified is passed, the target device identity information corresponding to the target device service information is obtained, and when the identity authority verification of the target device identity information is passed, the verified information generation parameters and the verified target information are obtained; the verified information generation parameters and the verified target information are written into the blockchain.

[0176] In one embodiment, the verification module is also used to generate an execution error result when the signature verification of the target information to be verified fails; based on the execution error result, verification failure information corresponding to the transaction request to be verified is obtained, and the verification failure information is broadcast.

[0177] Each module in the above-mentioned blockchain information processing device can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0178] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.11As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store blockchain data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a blockchain information processing method is implemented.

[0179] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.12 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless method can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a blockchain information processing method is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.

[0180] Those skilled in the art will understand that Fig.11 or Fig.12The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0181] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0182] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0183] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0184] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0185] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0186] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0187] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A blockchain information processing method, It is characterized in that The method comprises: Receive a blockchain transaction request, parse the blockchain transaction request, and obtain information generation parameters and a target smart contract identifier, where the target smart contract identifier is used to identify the corresponding target smart contract; In response to the target smart contract detecting the target device service information, generating an information generation request based on the information generation parameter, and sending the information generation request to the target device according to the target device service information; Acquire the signed target information returned by the target device, wherein the signed target information is obtained by the target device generating a dialogue statement according to the information generation parameters in the information generation request, making an information reply to the dialogue statement, obtaining initial target information, and digitally signing the initial target information; The information generation parameters and the signed target information are written into the blockchain.

2. The method according to claim 1, It is characterized in that Before receiving the blockchain transaction request, parsing the blockchain transaction request, and obtaining the information generation parameter and the target smart contract identifier, the method further includes: Generate a service registration request, wherein the service registration request carries a blockchain node identifier and interaction parameters; Digitally signing the blockchain node identifier and the interaction parameter to obtain target signature information, and sending the target signature information and the transaction registration request to the target device; Obtaining registration success information returned by the target device, wherein the registration success information is obtained by the target device performing signature verification on the target signature information, and when the signature verification passes, parsing the transaction registration request, obtaining the blockchain node identifier and the interaction parameter, and associating and storing the blockchain node identifier and the interaction parameter; Writing device information corresponding to the target device into the permission information table based on the registration success information; The obtaining the signed target information returned by the target device includes: Obtain the signed target information returned by the target device through the interaction parameter.

3. The method according to claim 1, It is characterized in that The receiving a blockchain transaction request comprises: Obtain each pending transaction request in the current block, and send each pending transaction request to a virtual execution device, and the virtual execution device sends each pending transaction request to a corresponding execution process; The blockchain transaction request is received through the execution process.

4. The method according to claim 3, It is characterized in that Writing the information generation parameter and the signed target information into a blockchain includes: Writing the information generation parameter and the signed target information into the current block; When the execution of each of the pending transaction requests is completed, the execution results corresponding to the each of the pending transaction requests are obtained, and the execution results corresponding to the each of the pending transaction requests are written into the current block to obtain a target block, and the target block is written into the blockchain.

5. The method according to claim 1, It is characterized in that The step of generating an information generation request based on the information generation parameter and sending the information generation request to the target device according to the target device service information includes: Obtaining a blockchain node identifier, generating a target information generation request based on the blockchain node identifier and the information generation parameter, and digitally signing the target information generation request to obtain a signed target information generation request; The signed target information generation request is sent to the target device according to the target device service information. When the signed target information generation request is verified by the target device, a service authority verification is performed based on the blockchain node identifier in the target information generation request. When the service authority verification is passed, a dialogue statement is generated based on the information generation parameters, an information reply is made to the dialogue statement to obtain initial target information, the initial target information is digitally signed to obtain signed target information, and the signed target information is returned to the blockchain node corresponding to the blockchain node identifier.

6. The method according to any one of claims 1 to 5, It is characterized in that Obtain the signed target information returned by the target device, including: Obtaining the signed first target information returned by the target device; The signed first target information is obtained by the target device generating the information request, using the information generation parameters as a dialogue statement, and inputting the dialogue statement into the trained information generation model for information reply, thereby obtaining the output first target information, obtaining the signature private key corresponding to the target device, and using the signature private key to digitally sign the first target information.

7. The method according to any one of claims 1 to 5, It is characterized in that Obtain the signed target information returned by the target device, including: Obtaining the signed second target information returned by the target device; The signed second target information is obtained by the target device generating a dialogue statement according to the information generation parameters in the information generation request, calling the information generation service interface, using the dialogue statement to reply information based on the information generation service interface, obtaining the second target information, and obtaining the signature private key corresponding to the target device, and using the signature private key to digitally sign the second target information.

8. The method according to claim 1, It is characterized in that In response to the target smart contract detecting the target device service information, generating an information generation request based on the information generation parameter includes: Executing the target smart contract, when executing the target smart contract to call a target device service statement, detecting target device service information from the call target device service statement; When target device service information is detected, an information generation request is generated based on the information generation parameter.

9. The method according to claim 5, It is characterized in that The method further comprises: When the target smart contract does not contain a statement for calling the target device service, the smart contract corresponding to the target smart contract identifier is executed by using the information to generate parameters, and a smart contract execution result is obtained; The information generation parameters and the smart contract execution results are written into the blockchain.

10. The method according to claim 1, It is characterized in that The method further comprises: Obtain a transaction request to be verified, where the transaction request to be verified carries parameters for generating information to be verified, target information to be verified, and a corresponding smart contract identifier; When the target device service information is detected based on the smart contract corresponding to the smart contract identifier, a target device public key corresponding to the target device service information is obtained, and the target information to be verified is signed and verified using the target device public key; When the signature verification of the target information to be verified is passed, the target device identity information corresponding to the target device service information is obtained, and when the identity authority verification of the target device identity information is passed, the verified information generation parameters and the verified target information are obtained; The verified information generation parameters and the verified target information are written into the blockchain.

11. The method according to claim 10, It is characterized in that The method further comprises: When the signature verification of the target information to be verified fails, an execution error result is generated; Verification failure information corresponding to the transaction request to be verified is obtained based on the execution error result, and the verification failure information is broadcast.

12. A blockchain information processing device, It is characterized in that The device comprises: A request receiving module, used to receive a blockchain transaction request, and parse the blockchain transaction request to obtain information generation parameters and a target smart contract identifier, where the target smart contract identifier is used to identify the corresponding target smart contract; A request sending module, configured to generate an information generation request based on the information generation parameters in response to the target smart contract detecting the target device service information, and send the information generation request to the target device according to the target device service information; An information acquisition module, used to acquire the signed target information returned by the target device, wherein the signed target information is obtained by the target device generating a dialogue statement according to the information generation parameters in the information generation request, making an information reply to the dialogue statement, obtaining initial target information, and digitally signing the initial target information; The information writing module is used to write the information generation parameters and the signed target information into the blockchain.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.

14. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.

15. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.