A blockchain-based data processing method, device, and readable storage medium
By introducing a first contract pre-service program into the target device, business transactions that match the blockchain data structure are generated, solving the compatibility problem between the target device and the blockchain network and achieving higher data security.
Patent Information
- Application Number
- CN202210679940.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-16
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2042-06-16
AI Technical Summary
In existing technologies, target devices need to be pre-adapted to the blockchain network before they can upload business data, which makes it difficult to access blockchain services and reduces the data security of the blockchain network.
By introducing a first contract pre-service program into the target device, business transactions that match the blockchain data structure are generated and sent to the target business node, which then calls the associated target business contract for processing, thus avoiding direct adaptation to the blockchain network.
It reduces the difficulty of accessing blockchain services and improves the data security of the blockchain network.
Smart Images

Figure CN117294753B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, and in particular to a data processing method, device and readable storage medium based on blockchain. Background Technology
[0002] With the rapid development of network technology and people's increasing emphasis on data security, blockchain has received great attention and application.
[0003] In existing technologies, target devices need to be pre-adapted to the blockchain network before business participants can upload business data. For example, a target device with an invoice client installed needs to encapsulate blockchain configuration information; that is, developers need to complete the integration of the blockchain data structure. However, the developers of the target device or the invoice client may not be able to obtain the blockchain configuration information or accurately encapsulate it, preventing the target device from uploading business data to the blockchain network. Clearly, existing technologies suffer from the drawback of high difficulty in blockchain business integration. Furthermore, existing technologies involve direct data transmission between the target device and blockchain nodes in the blockchain network. Therefore, the target device can access on-chain data unrelated to business data on the blockchain nodes, thus reducing the data security of the blockchain network. Summary of the Invention
[0004] This application provides a data processing method, device, and readable storage medium based on blockchain, which can not only reduce the difficulty of accessing blockchain services, but also improve the data security of blockchain networks.
[0005] One embodiment of this application provides a data processing method, including:
[0006] The target device obtains a business processing request carrying business data, and calls the first contract front-end service program based on the business processing request; the first contract front-end service program includes node guidance information;
[0007] In the first contract pre-service procedure, business transactions are generated based on business data and matched with the blockchain data structure;
[0008] The business transaction is sent to the target business node indicated by the node guidance information through the first contract pre-service program. The target business node then calls the target business contract deployed in the blockchain network that is associated with the first contract pre-service program, performs business processing on the business transaction through the target business contract, and returns the business processing result to the target device. The target business node belongs to the blockchain network.
[0009] This application provides a data processing method, which is executed by a target business node in a blockchain network. The method includes:
[0010] The system acquires business transactions sent by the target device through the first contract front-end service program. These business transactions are generated by the target device based on business data within the first contract front-end service program, and they match the blockchain data structure. The first contract front-end service program is invoked by the target device when it receives a business processing request carrying business data. The first contract front-end service program includes node guidance information. This node guidance information guides the first contract front-end service program to send the business transaction to the target business node.
[0011] Based on the business transaction, the target business contract deployed in the blockchain network and associated with the first contract front-end service program is invoked;
[0012] The business transaction is processed through the target business contract, and the processing result is returned to the target device.
[0013] One embodiment of this application provides a blockchain-based data processing device, which operates on a target device and includes:
[0014] The request acquisition module is used to acquire business processing requests carrying business data, and to call the first contract front-end service program based on the business processing requests; the first contract front-end service program includes node guidance information;
[0015] The first generation module is used in the first contract pre-service program to generate business transactions that match the blockchain data structure based on business data.
[0016] The first sending module is used to send business transactions to the target business node indicated by the node guidance information through the first contract front-end service program, so that the target business node can call the target business contract deployed in the blockchain network associated with the first contract front-end service program according to the business transaction, perform business processing on the business transaction through the target business contract, and return the business processing result to the target device; the target business node belongs to the blockchain network.
[0017] The request retrieval module includes:
[0018] The type comparison unit is used to compare the business type corresponding to the business data with the business type corresponding to the first contract pre-service program;
[0019] The first generation unit is used to generate a program deployment prompt message if the business type corresponding to the first contract pre-service program is different from the business type corresponding to the business data; the program deployment prompt message is used to prompt the target device to deploy the second contract pre-service program; the business type corresponding to the second contract pre-service program is the same as the business type corresponding to the business data.
[0020] The program calling unit is used to call the first contract front-end service program if the business type corresponding to the first contract front-end service program is the same as the business type corresponding to the business data.
[0021] The first contract pre-service program encapsulates the blockchain configuration information of the blockchain network; the blockchain configuration information is used to indicate the blockchain data structure of the blockchain network.
[0022] The first generation module includes:
[0023] The first acquisition unit is used to acquire the transaction format in the blockchain configuration information during the first contract pre-service program;
[0024] The data encapsulation unit is used to encapsulate business data into business transactions that match the blockchain data structure, based on the transaction format.
[0025] The first contract pre-service procedure includes the device private key for the target device;
[0026] The first sending module includes:
[0027] The second acquisition unit is used to acquire the transaction hash value of the business transaction through the first contract front-end service program, encrypt the transaction hash value based on the device private key, and obtain the transaction signature corresponding to the business transaction.
[0028] The transaction sending unit is used to send a business transaction carrying a transaction signature to the target business node indicated by the node guidance information through the first contract pre-service procedure.
[0029] The first contract pre-service procedure also includes the node public key for the target business node;
[0030] The blockchain-based data processing device also includes:
[0031] The request retrieval module is also used to retrieve business query requests sent by the target object; the business query request carries the object information of the target object;
[0032] The information encryption module is used in the first contract front-end service program to encrypt object information based on the node's public key to obtain encrypted object information;
[0033] The second sending module is used to send a business query request carrying encrypted object information to the target business node through the first contract front-end service program, so that when the target business node successfully decrypts the encrypted object information based on the node private key corresponding to the target business node, it generates object query data for the object information according to the business query request.
[0034] The second sending module is also used to receive object query data returned by the target business node and return it to the target object.
[0035] The blockchain-based data processing device also includes:
[0036] The request acquisition module is also used to acquire program deployment requests for the target business type, and based on the program deployment requests, acquire the initial contract front-end service program with the target business type; the initial contract front-end service program provides the business interface corresponding to the target business type; the initial contract front-end service program encapsulates blockchain configuration information for indicating the blockchain data structure of the blockchain network;
[0037] The program configuration module is used to configure the initial front-end service program and determine the configured initial contract front-end service program as the first contract front-end service program.
[0038] The program configuration module includes:
[0039] The second generation unit is used to generate an asymmetric key pair for the target device and a device communication certificate for the asymmetric key pair in the initial contract pre-service program; the asymmetric key pair includes a device private key and a device public key.
[0040] The first determining unit is used to determine the business nodes in the blockchain network that are used to process the target business type as the target business nodes, and generate node guidance information based on the node information of the target business nodes.
[0041] The second determining unit is used to determine the initial contract pre-service program, which includes an asymmetric key pair, device communication certificate, and node boot information, as the first contract pre-service program.
[0042] The blockchain-based data processing device also includes:
[0043] The second generation module is used to generate a business contract to be compiled for the target business type; the business contract to be compiled includes blockchain configuration information; the blockchain configuration information is used to indicate the blockchain data structure in the blockchain network.
[0044] The third generation module is used to read the contract content of the business contract to be compiled through the front-end service code generator, and generate front-end service code based on the contract content.
[0045] The program deployment module is used to compile the front-end service code into the initial contract front-end service program. If the target business contract generated based on the business contract to be compiled is successfully uploaded to the chain, the initial contract front-end service program is deployed to obtain the first contract front-end service program.
[0046] This application provides, in one aspect, a blockchain-based data processing apparatus, wherein the method is executed by a target business node in a blockchain network, and the method includes:
[0047] The transaction acquisition module is used to acquire business transactions sent by the target device through the first contract front-end service program. The business transaction is generated by the target device based on business data in the first contract front-end service program, and the business transaction matches the blockchain data structure. The first contract front-end service program is invoked by the target device when it receives a business processing request carrying business data. The first contract front-end service program includes node guidance information. The node guidance information is used to guide the first contract front-end service program to send the business transaction to the target business node.
[0048] The contract invocation module is used to invoke the target business contract deployed in the blockchain network that is associated with the first contract front-end service program, based on the business transaction.
[0049] The result return module is used to process business transactions through the target business contract and return the processing results to the target device.
[0050] The contract invocation module includes:
[0051] The type comparison unit is used to obtain the business type to be verified of the business transaction and compare the business type to be verified with the node business type; the node business type is used to indicate the business type of the business processed by the target business node.
[0052] The error return unit is used to return a service error message to the target device if the service type to be verified is different from the node service type.
[0053] The contract invocation unit is used to invoke the target business contract deployed in the blockchain network according to the contract name of the first contract front-end service program if the business type to be verified is the same as the node business type; the contract name of the first contract front-end service program is the same as the contract name of the target business contract.
[0054] This application provides a computer device, including: a processor, a memory, and a network interface;
[0055] The processor is connected to the memory and the network interface, wherein the network interface is used to provide data communication functions, the memory is used to store computer programs, and the processor is used to call the computer programs so that the computer device executes the methods in the embodiments of this application.
[0056] One aspect of this application provides a computer-readable storage medium storing a computer program adapted for loading by a processor and executing the methods described in this application.
[0057] One aspect of this application provides a computer program product, which includes a computer program stored in a computer-readable storage medium; a processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the method described in this application.
[0058] In this embodiment, when the target device receives a business processing request carrying business data, it can invoke a first contract front-end service program including node guidance information based on the business processing request. It is understood that the business type processed by the first contract front-end service program is the same as the business type of the business data. Furthermore, in the first contract front-end service program, a business transaction matching the blockchain data structure is generated based on the business data. That is, the first contract front-end service program can generate a business transaction matching the blockchain data structure. Therefore, through the first contract front-end service program, the target device can bypass the adaptation to the blockchain network. Furthermore, through the first contract front-end service program, the target device can send the business transaction to the target business node indicated by the node guidance information, so that the target business node can invoke the target business contract deployed in the blockchain network associated with the first contract front-end service program according to the business transaction. Through the target business contract, the target business node can process the business transaction and return the business processing result to the target device. As described above, this application provides a first contract front-end service program associated with a target business contract deployed in a blockchain network. Through this first contract front-end service program, the target device can generate business transactions that match the blockchain data structure without needing to adapt to the blockchain network, thus reducing the difficulty of blockchain business access. In addition, by sending the business transaction to the target business node associated with the business type of the business transaction through the first contract front-end service program, the target device can avoid accessing on-chain data unrelated to the business transaction, thus improving the data security of the blockchain network. Attached Figure Description
[0059] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0060] Figure 1a This is a schematic diagram of a system architecture provided in an embodiment of this application;
[0061] Figure 1b This is a schematic diagram of a layered structure of a blockchain network provided in an embodiment of this application;
[0062] Figure 1c This application provides a hierarchical, multi-level blockchain network.
[0063] Figure 2 This is a schematic diagram of a data processing scenario based on blockchain provided in an embodiment of this application;
[0064] Figure 3 This is a schematic flowchart of a blockchain-based data processing method provided in an embodiment of this application;
[0065] Figure 4 This application provides an example of a blockchain-based data processing scenario. Figure 2 ;
[0066] Figure 5 This is a flowchart illustrating a blockchain-based data processing method provided in an embodiment of this application. Figure 2 ;
[0067] Figure 6 This is a flowchart illustrating a blockchain-based initial contract pre-service program deployment method provided in an embodiment of this application.
[0068] Figure 7 This is a flowchart illustrating a blockchain-based data processing method provided in an embodiment of this application. Figure 3 ;
[0069] Figure 8 This is a system architecture diagram of a tax blockchain system provided in an embodiment of this application;
[0070] Figure 9 This is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of this application;
[0071] Figure 10 This is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of this application. Figure 2 ;
[0072] Figure 11 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0073] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0074] To facilitate understanding, the following brief explanations are provided for some of the terms:
[0075] 1. Blockchain: In a narrow sense, blockchain is a chain-like data structure with blocks as the basic unit. The blocks use digital digests to verify the previously obtained transaction history, which is suitable for the needs of anti-tampering and scalability in distributed ledger scenarios. In a broad sense, blockchain also refers to the distributed ledger technology implemented by the blockchain structure, including distributed consensus, privacy and security protection, peer-to-peer communication technology, network protocols, smart contracts, etc.
[0076] The goal of blockchain is to create a distributed data ledger that allows only additions and not deletions. The underlying structure of the ledger is a linear linked list. This list consists of interconnected "blocks," with each subsequent block recording the hash value of its predecessor. The validity of each block (and the transactions within it) can be quickly verified by calculating the hash value. If a node in the network proposes adding a new block, the block must be confirmed through a consensus mechanism.
[0077] 2. Hash Value: Also known as an information feature value or characteristic value, a hash value is generated by converting input data of arbitrary length into cryptography and producing a fixed output using a hash algorithm. The original input data cannot be retrieved by decrypting the hash value; it is a one-way cryptographic function. In a blockchain, each block (except the initial block) contains the hash values of its predecessor blocks. The hash value is a core and crucial aspect of blockchain technology, preserving the authenticity of recorded and viewed data, as well as the integrity of the blockchain as a whole. In this application embodiment, the hash value can be used for signing to verify the legitimacy of the signer.
[0078] 3. Smart Contract: A smart contract is a computer protocol designed to disseminate, verify, or execute contracts in an informational manner. In a blockchain system, a smart contract (or simply contract) is code that all nodes on the blockchain can understand and execute, capable of performing arbitrary logic and producing results. In practical applications, smart contracts are managed and tested through transactions on the blockchain. Each transaction is equivalent to a Remote Procedure Call (RPC) request to the blockchain system. If a smart contract is like an executable program, the blockchain is like the operating system that provides the runtime environment. A blockchain can contain multiple contracts, distinguished by contract identity (ID), identifier, or name. In this application example, the target business contract is a smart contract in the blockchain network.
[0079] 4. Contract Execution: By initiating a transaction, users can invoke contracts already deployed on the blockchain. Each node in the blockchain system runs the same contract. For contracts that need to read data, they access their own ledger. Ultimately, each node verifies the consistency of the execution results (consensus). If the results are consistent, each node stores the necessary results in its own ledger and returns the results to the user.
[0080] 5. Public Key and Private Key: A public key and a private key are a key pair (one public key and one private key) obtained through an algorithm. The public key is the publicly disclosed part of the key pair, while the private key is the private key. Public keys are typically used for encrypting data, verifying digital signatures, etc. This algorithm ensures that the resulting key pair is unique. When using this key pair, if data is encrypted with one key, it must be decrypted with the other key. For example, if data is encrypted with the public key, it must be decrypted with the private key, and vice versa; otherwise, decryption will fail.
[0081] 6. Certificate: In this application, "certificate" refers to a Public Key Infrastructure (PKI) system. In a PKI system, a certificate is proof of identity for the owner of a public key, issued by a Certificate Authority (CA). Asymmetric encryption and digital signatures for information can be implemented based on the PKI system.
[0082] Please see Figure 1a , Figure 1a This is a schematic diagram of a system architecture provided in an embodiment of this application. For example... Figure 1aAs shown, the system may include a blockchain network 10 and a target device cluster. The target device cluster may include: target device 100a, target device 100b, target device 100c, ..., target device 100n. It is understood that the above system may include one or more target devices, and this application does not limit the number of target devices. In this embodiment, the target device refers to the device that generates business transactions and transmits the business transactions to the blockchain network 10. The target device includes, but is not limited to, terminal devices or business servers. Among them, the business server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud databases, cloud services, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Terminal devices include, but are not limited to, mobile phones, computers, smart voice interaction devices, smart home appliances, vehicle terminals, aircraft, etc.
[0083] The target devices in the cluster can have communication connections with each other. For example, target device 100a can communicate with target device 100b, and target device 100a can communicate with target device 100c. Simultaneously, any target device in the cluster can communicate with the blockchain network 10, for example, target device 100a can communicate with the blockchain network 10. The communication connection method is not limited; it can be established directly or indirectly via wired communication, wireless communication, or other methods. This application does not impose any restrictions on this method.
[0084] It should be understood that, such as Figure 1a Each target device in the target device cluster shown can be equipped with a contract front-end service program that includes blockchain configuration information of the blockchain network 10. When the contract front-end service program runs on each target device, it can interact with the aforementioned... Figure 1a The blockchain network 10 shown interacts with data. The contract front-end service program in this embodiment is a contract-level front-end service deployed for business participants. The contract front-end service program encapsulates the description of the blockchain ledger structure and state data of the blockchain network 10. It can provide all the interfaces (Application Programming Interface, or API) of a business contract deployed in the blockchain network 10. The target device can call the interface of the contract-level front-end service like calling a normal API service.
[0085] This application does not limit the business type corresponding to the contract pre-service program, and it can be set according to the actual application scenario. The contract pre-service program can be a contract pre-service program for virtual asset transfer business (e.g., a first contract pre-service program), a contract pre-service program for invoicing business (e.g., a second contract pre-service program), a contract pre-service program for credit investigation business, a contract pre-service program for loss-in / loss-out business, a contract pre-service program for enterprise qualification business, or a contract pre-service program for tax refund business. The contract pre-service program can be a standalone client or an embedded sub-client integrated into a client (e.g., a social client, an educational client, or a multimedia client), and this is not limited here. The contract pre-service programs installed on each target device can be the same or different. The blockchain network 10 includes blockchain nodes for processing the business type corresponding to each contract pre-service program.
[0086] This application does not limit the network structure of the blockchain network 10. The blockchain network 10 can be a peer-to-peer blockchain network. Under this structure, the blockchain nodes are in a peer-to-peer relationship. Therefore, each blockchain node can act as both a business node and a consensus node.
[0087] Blockchain network 10 can be a layered blockchain network; please refer to [link / reference]. Figure 1b , Figure 1b This is a schematic diagram of a blockchain network C-layer structure provided in an embodiment of this application. For example... Figure 1b As shown, the layered blockchain network 10c can include a witness network 10a and a consensus network 10b. Nodes in the witness network 10a can be called business nodes, possessing business data associated with the type of business they handle. Business nodes primarily execute business processes and do not participate in accounting consensus. They obtain block header data and partially authorized visible block data from the consensus network 10b through identity authentication. The consensus network 10b can also be called the core network. Nodes in the consensus network 10b can be called full nodes or consensus nodes, and full nodes possess all the data. The witness network 10a and the consensus network 10b operate in different network environments. Typically, the witness network 10a is in a public network while the consensus network 10b is in a private network, and the two interact through routing boundaries.
[0088] Please see again. Figure 1b Witness network 10a may include business nodes 101a, 102a, 103a, ..., 104a. The aforementioned witness network 10a may include one or more business nodes; the number of business nodes is not limited here. Figure 1bIn the witness network 10a, each business node is in a peer-to-peer relationship (i.e., a point-to-point relationship), and each business node can be a target business node.
[0089] Please see again. Figure 1b Consensus network 10b can include full nodes 101b, 102b, 103b, ..., 104b. The aforementioned consensus network 10b can include one or more full nodes; there is no limit to the number of full nodes. Figure 1b In the consensus network 10b, each consensus node is a peer.
[0090] To ensure data interoperability among all blockchain nodes (including full nodes and business nodes), data connections can exist between each blockchain node. For example, there is a data connection between business node 101a and business node 102a, between business node 101a and business node 103a, and between full node 101b and full node 104b. Furthermore, there are data connections between the witness network 10a and the consensus network 10b, for example, between business node 101a and full node 102b, between business node 101a and full node 103b, and between full node 101b and business node 104a.
[0091] It is understandable that blockchain nodes can transmit data or blocks through the aforementioned data connections. The hierarchical blockchain network 10c can realize data connections between nodes based on node identifiers. Each blockchain node in the hierarchical blockchain network 10c has a corresponding node identifier, and each blockchain node can store the node identifiers of other blockchain nodes that are connected to it. This allows the acquired data or generated blocks to be broadcast to other blockchain nodes based on their node identifiers. For example, business node 101a can maintain a node identifier list as shown in Table 1, which stores the node names and node identifiers of other blockchain nodes.
[0092] Table 1
[0093] Business Node 102a 117.114.151.174 Business Node 103a 117.116.189.145 … … Business Node 104a 119.123.789.258 101b full nodes 117.114.151.183 102b full nodes 117.116.189.125 103b full nodes 119.250.485.362 104b full nodes 119.123.789.369
[0094] The node identifier can be an Internet Protocol (IP) address or any other information that can be used to identify a node in a hierarchical blockchain network 10c. Table 1 only uses IP addresses as an example.
[0095] Assuming the node identifier of business node 101a is 117.116.156.425, business node 101a can send a data synchronization request to all nodes 101b through node identifier 117.114.151.183. All nodes 101b can then know that the data synchronization request was sent by business node 101a through node identifier 117.116.156.425. Similarly, business node 101a can send transaction data A to business node 103a through node identifier 117.116.189.145. Business node 103a can then know that transaction data A was sent by business node 101a through node identifier 117.116.156.425. Data transmission between other nodes is similar, so it will not be elaborated further.
[0096] also, Figure 1a Blockchain network 10 in the text can be a hierarchical, multi-tiered blockchain network; please refer to [link / reference]. Figure 1c , Figure 1c This application provides a hierarchical, multi-cascaded blockchain network. (And...) Figure 1b Similar to the layered blockchain network 10c, the layered multi-level blockchain network 10d can include witness networks (such as...). Figure 1c Witness networks (10e) and consensus networks (such as...) Figure 1c The consensus network (10f) in the context of the network, including the consensus network and all nodes (such as...) Figure 1c For the meaning of the examples of full nodes 101f, 102f, 103f, ..., 104f, please refer to [link to example]. Figure 1b The consensus network 10b and the description of all nodes are not detailed here.
[0097] Witness Network 10e features a multi-tiered business model. Each level of business node, based on its own business permissions, sorts and isolates corresponding business data. Business participants connect to the last-level business node to read business information and upload business transactions to the blockchain. For example... Figure 1cAs shown, business nodes 102e and 105e are cascaded with business node 103e. In this case, business nodes 103e and 105e cannot directly interact with the consensus network 10f; they need to interact with the consensus network 10f through business node 103e. For example, after receiving a business transaction, business node 102e synchronizes the transaction to business node 103e, and then business node 103e synchronizes the transaction to the consensus network 10f. Similarly, business nodes 101e and 104e are cascaded and need to interact with the consensus network 10f through business node 104e. For details on the data interaction between business nodes 103e and 104e and the consensus network 10f, please refer to [link to documentation]. Figure 1b The description of the data interaction between Witness Network 10a and Consensus Network 10b is omitted here.
[0098] In the scenario where the blockchain network 10 is a hierarchical multi-level blockchain network 10d, a contract pre-service program can be deployed for business participants outside the last-level business node (the target business node in this embodiment).
[0099] In this embodiment, the data interaction between the target device and the blockchain network is achieved through a contract front-end service program. When a business processing request carrying business data is received, the target device can call a first contract front-end service program based on the business processing request. The first contract front-end service program includes node guidance information. Furthermore, in the first contract front-end service program, the target device can generate a business transaction that matches the blockchain data structure based on the business data. Furthermore, through the first contract front-end service program, the target device can send the business transaction to the target business node indicated by the node guidance information. Therefore, according to the business transaction, the target business node can call the target business contract deployed in the blockchain network associated with the first contract front-end service program. Through the target business contract, the target business node can perform business processing on the business transaction and return the business processing result to the target device.
[0100] As described above, this application designs a contract-level front-end service scheme at the business node level. This scheme allows business contracts in the blockchain network to be deployed as independent services. Outside the final business node, embodiments of this application can deploy contract-level front-end services (i.e., contract front-end service programs) for business participants (target devices). These programs encapsulate the understanding of the blockchain ledger structure and state data, providing only all interfaces for a single contract. Therefore, external business parties can simply call the contract-level front-end service interfaces like calling an API service. Using this application, the target device does not need to adapt to the blockchain network, thus reducing the difficulty of blockchain business access. Furthermore, the contract front-end service program allows for strict control over the target device's access permissions to business nodes, thereby improving the data security of the blockchain network.
[0101] It is understood that the methods provided in this application embodiment can be executed by computer devices, including but not limited to target devices (terminal devices or business servers) or target business nodes (terminal devices or business servers). The business server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud databases, cloud services, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Terminal devices include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, and aircraft.
[0102] Further, please see Figure 2 , Figure 2 This is a schematic diagram illustrating a blockchain-based data processing scenario provided in this application embodiment. This application embodiment can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, and assisted driving. Figure 2 The target device 20a in the middle can be Figure 1a Any target device in the target device cluster. For example... Figure 2 As shown, target device 20a obtains a service processing request 20b carrying service data. This embodiment does not limit the service type of the service data; it can be set according to the actual application scenario. For ease of understanding and description, this embodiment sets the service type as a transfer service and the service data as "object 201b transfers resource 202b to object 203b". This embodiment does not limit the device generating the service data; it can be target device 20b or other devices that have an interactive relationship with target device 20b.
[0103] The target device 20a is equipped with a first contract pre-service program 201a, which is associated with the target business contract 202a in the blockchain network 10. Specifically, the contract names of the two are the same, and both are generated from the same source code. The difference between the two is that the target business contract 202a is used for invocation by the target business node in the blockchain network 10, while the first contract pre-service program 201a is used for invocation by the target device 20a. For the association between the first contract pre-service program 201a and the target business contract 202a, please refer to the following text. Figure 5 The descriptions in the corresponding embodiments are not elaborated here. Figure 2 For a description of blockchain network 10, please refer to [link / reference]. Figure 1a Description of blockchain network 10 in the text.
[0104] The first contract pre-service program 201a encapsulates the blockchain configuration information of the blockchain network 10, which may include the understanding of the blockchain ledger structure and state data of the blockchain network 10a. Therefore, the target device 20a does not need to be adapted to the blockchain network 10 and can achieve data interaction with the blockchain network 201a through the first contract pre-service program 201a.
[0105] Based on business processing request 20b, target device 20a can call the first contract front-end service program 201a, such as Figure 2 As shown, the first contract pre-service procedure 201a includes node guidance information 20c. Node guidance information 20c refers to information used to indicate the target business node, which refers to the blockchain node in the blockchain network 10 used to process business transactions. This application embodiment does not limit the content of the node guidance information 20c; it can be node information such as the node name and node identifier of the blockchain node in the blockchain network 10. Figure 2 To understand this, let's take the example of node name in node indication information, as shown in node indication information 20c, which includes a first node name and a second node name.
[0106] Since the first contract pre-service program 201a encapsulates the blockchain configuration information of the blockchain network 10, it can be based on business data (such as...) Figure 2 In the example shown, object "201b" transfers resource 202b to object 203b, and target device 20a generates a business transaction that matches the blockchain data structure. Further, through the first contract pre-service procedure 201b, target device 20a sends the business transaction to the target business node indicated by the node guidance information 20c, such as... Figure 2As shown, the target business nodes include business node 201c corresponding to the first node name and business node 202c corresponding to the second node name. Both business node 201c and business node 202c belong to blockchain network 10.
[0107] Understandable Figure 2 This example uses a total of 2 target business nodes. In actual application scenarios, the total number of target business nodes is a positive integer. Target business nodes (e.g., Figure 2 The example business nodes 201c and 202c can, based on business transactions, invoke the target business contract 202c deployed in the blockchain network 10, which is associated with the first contract pre-service program 201a. Figure 2 In this context, the target business contract 202c can be a transfer business contract. Through the target business contract 202a, the target business node can perform business processing on business transactions. This business processing includes, but is not limited to, verifying, broadcasting, reaching consensus (when it has consensus permissions), and producing blocks on business transactions. Furthermore, the target business node can generate the business processing result of the business transaction and then return the business processing result to the target device 20a.
[0108] As described above, this application provides a first contract front-end service program associated with a target business contract deployed in a blockchain network. Through this first contract front-end service program, the target device can generate business transactions that match the blockchain data structure without needing to adapt to the blockchain network, thus reducing the difficulty of blockchain business access. In addition, by sending the business transaction to the target business node associated with the business type of the business transaction through the first contract front-end service program, the target device can avoid accessing on-chain data unrelated to the business transaction, thus improving the data security of the blockchain network.
[0109] Further, please see Figure 3 , Figure 3 This is a flowchart illustrating a blockchain-based data processing method provided in an embodiment of this application. Figure 3 As shown, the data processing method may include at least the following steps S101-S103.
[0110] Step S101: The target device obtains a business processing request carrying business data and calls the first contract front-end service program based on the business processing request; the first contract front-end service program includes node guidance information.
[0111] Specifically, the business type corresponding to the business data is compared with the business type corresponding to the first contract pre-service program; if the business type corresponding to the first contract pre-service program is different from the business type corresponding to the business data, a program deployment prompt message is generated; the program deployment prompt message is used to prompt the target device to deploy the second contract pre-service program; the business type corresponding to the second contract pre-service program is the same as the business type corresponding to the business data; if the business type corresponding to the first contract pre-service program is the same as the business type corresponding to the business data, the first contract pre-service program is invoked.
[0112] Please see also Figure 4 , Figure 4 This application provides an example of a blockchain-based data processing scenario. Figure 2 .in, Figure 4 The meaning of target equipment 20a and Figure 2 The target equipment 20a has the same meaning. Furthermore... Figure 2 and Figure 4 The meanings of other identical symbols are the same, so they will not be elaborated here. For example... Figure 4 As shown, when a business processing request carrying business data is received, the target device 20a determines the business type corresponding to the business data. If the business data is asset transfer data, the business type is asset transfer business type; if the business data is invoicing business data, the business type is invoicing business type. This application embodiment does not limit the specific content of the business data and can be set according to the actual application scenario. It is understood that in the specific implementation of this application, data related to user information (such as object information, business data) is involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.
[0113] The target device 20a determines the deployed first contract front-end service program 201a. This application embodiment proposes a method to transform business contracts in a blockchain network into services independent of the blockchain network, namely, contract front-end service programs (including a first contract front-end service program and a second contract front-end service program). This application embodiment does not limit the total number of first contract front-end service programs 201a deployed on the target device 20a. If the total number is multiple, it indicates that the target device 20a can transmit various different types of business transactions to the blockchain network. Further, the target device 20a determines the business type corresponding to the first contract front-end service program 201a, where the business type corresponding to the first contract front-end service program 201a refers to the business type of the business data processed by the first contract front-end service program 201a. Figure 4The business type corresponding to the business data is described by the business type to be verified, and the business type corresponding to the first contract pre-service program 201a is described by the contract business type.
[0114] Target device 20a compares the business type to be verified with the contract business type, obtaining comparison result 30a. If comparison result 30a indicates that the business type to be verified is different from the contract business type, a program deployment prompt message can be generated. This program deployment prompt message is used to prompt target device 20a to deploy a second contract pre-service program; the business type corresponding to the second contract pre-service program is the same as the business type corresponding to the business data, such as... Figure 4 As shown, target device 20a can display program deployment prompts, such as "Please deploy the second contract pre-service program". If the comparison result 30a shows that the business type to be verified is the same as the contract business type, then target device 20a calls the first contract pre-service program 201a.
[0115] Step S102: In the first contract pre-service procedure, a business transaction matching the blockchain data structure is generated based on the business data.
[0116] Specifically, the first contract pre-service program encapsulates the blockchain configuration information of the blockchain network; the blockchain configuration information is used to indicate the blockchain data structure of the blockchain network; in the first contract pre-service program, the transaction format in the blockchain configuration information is obtained; based on the transaction format, the business data is encapsulated into a business transaction that matches the blockchain data structure.
[0117] For details on the generation and deployment of the first contract pre-service program, please refer to the following text. Figure 5 The descriptions in the corresponding embodiments will not be elaborated here. The first contract front-end service program encapsulates the blockchain configuration information of the blockchain network. This blockchain configuration information can indicate the blockchain data structure in the blockchain network, specifically including the transaction format in the blockchain network. Therefore, when the target device transmits business data to the first contract front-end service program, the first contract front-end service program can encapsulate the business data into a business transaction that matches the blockchain data structure based on the transaction format.
[0118] Step S103: The business transaction is sent to the target business node indicated by the node guidance information through the first contract pre-service program, so that the target business node calls the target business contract deployed in the blockchain network associated with the first contract pre-service program according to the business transaction, performs business processing on the business transaction through the target business contract, and returns the business processing result to the target device; the target business node belongs to the blockchain network.
[0119] Specifically, the first contract pre-service procedure includes the device private key for the target device; through the first contract pre-service procedure, the transaction hash value of the business transaction is obtained, the transaction hash value is encrypted based on the device private key to obtain the transaction signature corresponding to the business transaction; through the first contract pre-service procedure, the business transaction carrying the transaction signature is sent to the target business node indicated by the node guidance information.
[0120] Please see also Figure 4 The first contract pre-service program 201a stores the device private key 30b for the target device 20a, as well as node guidance information. To verify the identity of the target device 20a, the target device 20a can call and run the first contract pre-service program 201a. During runtime, the first contract pre-service program 201a generates a business transaction summary, i.e., a transaction hash value. Furthermore, based on the device private key 30b, the first contract pre-service program 201a can encrypt the transaction hash value to obtain the transaction signature 30c corresponding to the business transaction. The target device 20a uses the first contract pre-service program 201a as a transmission medium to send the business transaction carrying the transaction signature 30c to the target business node 30d indicated by the node guidance information.
[0121] The first contract pre-service procedure also includes: the node public key for the target business node; the target device obtaining the business query request sent by the target object; the business query request carrying the object information of the target object; in the first contract pre-service procedure, encrypting the object information based on the node public key to obtain encrypted object information; sending the business query request carrying the encrypted object information to the target business node through the first contract pre-service procedure, so that when the target business node successfully decrypts the encrypted object information based on the node private key corresponding to the target business node, it generates object query data for the object information according to the business query request; receiving the object query data returned by the target business node and returning it to the target object.
[0122] Understandably, the target device can write business data to and read business data from the blockchain network. When reading data, the target device can obtain the business query request sent by the target object, which carries the object information of the target object. Similarly, the target device needs to verify whether the business type corresponding to the business query request is the same as the business type corresponding to the first contract pre-service program. In the case where the two business types are the same, the target device can call and run the first contract pre-service program. The first contract pre-service program includes not only the asymmetric key pair for the target device, but also the node public key of the target business node indicated by the node guidance information. Therefore, when the first contract pre-service program runs, it can encrypt the object information based on the above node public key to obtain encrypted object information, ensuring that the object information cannot be obtained by unauthorized devices.
[0123] Through the first contract pre-service procedure, the target device sends a business query request carrying encrypted object information to the target business node. Upon obtaining the encrypted object information, the target business node decrypts the encrypted object information based on its private key. When decryption is successful, the target business node generates object query data for the object information according to the business query request and returns the object query data to the target device. At this point, the target device returns the obtained object query data to the target object.
[0124] This application proposes a method to transform business contracts in a blockchain network into a contract front-end service program independent of the blockchain network, allowing target devices to deploy it. Once deployed, the target device can invoke the deployed contract front-end service program as if it were an API call. The contract front-end service program provided in this application provides the following functions:
[0125] a. Based on public key identity (such as the node public key mentioned above), the business query request is packaged and the business data is queried from the target business node. Therefore, the business data does not need to be stored locally.
[0126] b. Based on the private key identity (such as the device private key mentioned above), package the business processing request, such as the transaction on-chain request, sign the business transaction, and then forward the transaction signature to the target business node.
[0127] c. Provide all business interfaces for business contracts deployed in the blockchain network, allowing target devices to call or query them. Target devices do not need to adapt to the blockchain network's ledger structure or blockchain transaction interfaces. The target device's business program does not need to perform signing operations; instead, the contract's front-end service program handles signing, encryption, and other operations. Developers also do not need to develop interfaces for the blockchain data structure; they can directly develop the business interfaces.
[0128] d. By restricting the interfaces and data that the target device can call and view through the contract front-end service program itself, the security and privacy of other data on the blockchain are guaranteed on the one hand, and the interference of irrelevant data and interfaces on business participants is reduced on the other hand. The contract front-end service program implements secure access guarantees for the connection to the target business node, providing developers with data and communication security mechanisms.
[0129] e. Provides a contract event subscription function for business sectors, meaning that visitors only need to subscribe or check if there are any new events / data of interest in the current contract A on the chain, without needing to know the height of the blockchain itself or other event information in the block.
[0130] In this embodiment, when the target device receives a business processing request carrying business data, it can invoke a first contract front-end service program including node guidance information based on the business processing request. It is understood that the business type processed by the first contract front-end service program is the same as the business type of the business data. Furthermore, in the first contract front-end service program, a business transaction matching the blockchain data structure is generated based on the business data. That is, the first contract front-end service program can generate a business transaction matching the blockchain data structure. Therefore, through the first contract front-end service program, the target device can bypass the adaptation to the blockchain network. Furthermore, through the first contract front-end service program, the target device can send the business transaction to the target business node indicated by the node guidance information, so that the target business node can invoke the target business contract deployed in the blockchain network associated with the first contract front-end service program according to the business transaction. Through the target business contract, the target business node can process the business transaction and return the business processing result to the target device. As described above, this application provides a first contract front-end service program associated with a target business contract deployed in a blockchain network. Through this first contract front-end service program, the target device can generate business transactions that match the blockchain data structure without needing to adapt to the blockchain network, thus reducing the difficulty of blockchain business access. In addition, by sending the business transaction to the target business node associated with the business type of the business transaction through the first contract front-end service program, the target device can avoid accessing on-chain data unrelated to the business transaction, thus improving the data security of the blockchain network.
[0131] Please see Figure 5 , Figure 5 This is a flowchart illustrating a blockchain-based data processing method provided in an embodiment of this application. Figure 2This method can be executed by the target business node in the blockchain network, by the target device, or by an interaction between the target business node and the target device. For ease of understanding, this application's embodiments illustrate the method as being executed by the target device. Figure 5 As shown, the method may include at least the following steps.
[0132] Step S201: Obtain a program deployment request for the target business type; based on the program deployment request, obtain an initial contract front-end service program with the target business type; the initial contract front-end service program provides the business interface corresponding to the target business type; the initial contract front-end service program encapsulates blockchain configuration information used to indicate the blockchain data structure of the blockchain network.
[0133] Specifically, embodiments of this application can provide the target device with a contract pre-service program (including a first contract pre-service program) associated with the target business contract deployed in the blockchain network, thus enabling the target device to deploy the contract pre-service program. The program deployment request is used to request the target device to deploy, obtain, and configure the initial contract pre-service program. When a program deployment request for a target business type is received, the target device can obtain the initial contract pre-service program corresponding to the target business type based on the program deployment request.
[0134] Step S202: Configure the initial pre-service program and determine the configured initial contract pre-service program as the first contract pre-service program.
[0135] Specifically, in the initial contract pre-service procedure, an asymmetric key pair for the target device and a device communication certificate for the asymmetric key pair are generated; the asymmetric key pair includes the device private key and the device public key; the business nodes in the blockchain network used to process the target business type are identified as target business nodes, and node boot information is generated based on the node information of the target business nodes; the initial contract pre-service procedure, which includes the asymmetric key pair, the device communication certificate, and the node boot information, is identified as the first contract pre-service procedure.
[0136] The device communication certificate includes the proof certificate required for the target device to communicate, as well as the Transport Layer Security (TLS) certificate. It can be understood that the initial contract pre-service program is similar to an installation package; therefore, the target device needs to configure it to adapt to its needs when deploying the initial contract pre-service program. During the configuration process, the initial pre-service program generates an asymmetric key pair for the target device, such as the device's private key and public key, and generates the corresponding device communication certificate. This first contract pre-service program serves as the transmission medium between the target device and the blockchain network; therefore, during the configuration process, the initial contract pre-service program generates node guidance information to instruct the target business node based on its node information. Upon completion of configuration, the target device receives the first contract pre-service program.
[0137] A contract-level front-end service (such as the first contract front-end service program of this application) only provides an interface to a certain business contract, such as an invoice business contract. The participants in the invoice business are concerned with the invoice business, so the participants can deploy an invoice business contract front-end service, which only provides all the business interfaces of the invoice business contract.
[0138] The process involves the target device generating a business contract to be compiled for the target business type; the business contract to be compiled includes blockchain configuration information; the blockchain configuration information is used to indicate the blockchain data structure in the blockchain network; the front-end service code generator reads the contract content of the business contract to be compiled and generates front-end service code based on the contract content; the front-end service code is compiled into an initial contract front-end service program; if the target business contract generated based on the business contract to be compiled is successfully uploaded to the blockchain, the initial contract front-end service program is deployed to obtain the first contract front-end service program.
[0139] It is understandable that the target device has the permission to generate contract pre-service programs, and therefore can generate the initial contract pre-service program, and then deploy the initial contract pre-service program. Please refer to [link / reference needed]. Figure 6 , Figure 6 This is a flowchart illustrating a blockchain-based initial contract pre-service program deployment method provided in an embodiment of this application. Figure 6As shown, the method may include the following steps: Step S401, the target device generates a business contract to be compiled, that is, completes the writing of the business contract corresponding to the target business type; Step S402, generates the target business contract. The target device compiles the business contract to be compiled corresponding to the target business type into a target business contract, which will be used for subsequent deployment on the blockchain. Step S403, generates pre-service code. Through the pre-service code generator, the target device reads the methods of the business contract to be compiled and converts the read methods into API services in the general API server, for example, converting the issue invoice method in the original business contract into / invoce / IssueInvoice in the API server. Step S404, compiles the pre-service code. The target device compiles the generated pre-service code into the initial transaction pre-service program corresponding to the target business contract. Step S405, generates the initial contract pre-service program. Step S406, puts the target business contract on the blockchain and deploys the initial contract pre-service program. The target device processes the target business contract on the blockchain. When the blockchain upload is successful, it provides the initial contract pre-service program corresponding to the target business contract to the business participants, who can then deploy the initial contract pre-service program.
[0140] This application embodiment transforms the target business contract into a contract-level front-end service through composite compilation of the business contract code. This encapsulates the interaction between blockchain business participants and blockchain-related structures, allowing business participants to access business services and conduct business interactions based on blockchain and smart contracts. Through the contract front-end service program, the threshold for blockchain business access can be reduced, providing a highly automated and convenient integration solution.
[0141] Step S203: The target device obtains a business processing request carrying business data and calls the first contract front-end service program based on the business processing request; the first contract front-end service program includes node guidance information.
[0142] Step S204: In the first contract pre-service procedure, a business transaction matching the blockchain data structure is generated based on the business data.
[0143] Step S205: The business transaction is sent to the target business node indicated by the node guidance information through the first contract pre-service program, so that the target business node calls the target business contract deployed in the blockchain network associated with the first contract pre-service program according to the business transaction, performs business processing on the business transaction through the target business contract, and returns the business processing result to the target device; the target business node belongs to the blockchain network.
[0144] For the specific implementation process of steps S203-S205, please refer to the above text. Figure 3Steps S101-S103 in the corresponding embodiments will not be described in detail here.
[0145] In this embodiment, when the target device receives a business processing request carrying business data, it can invoke a first contract front-end service program including node guidance information based on the business processing request. It is understood that the business type processed by the first contract front-end service program is the same as the business type of the business data. Furthermore, in the first contract front-end service program, a business transaction matching the blockchain data structure is generated based on the business data. That is, the first contract front-end service program can generate a business transaction matching the blockchain data structure. Therefore, through the first contract front-end service program, the target device can bypass the adaptation to the blockchain network. Furthermore, through the first contract front-end service program, the target device can send the business transaction to the target business node indicated by the node guidance information, so that the target business node can invoke the target business contract deployed in the blockchain network associated with the first contract front-end service program according to the business transaction. Through the target business contract, the target business node can process the business transaction and return the business processing result to the target device. As described above, this application provides a first contract front-end service program associated with a target business contract deployed in a blockchain network. Through this first contract front-end service program, the target device can generate business transactions that match the blockchain data structure without needing to adapt to the blockchain network, thus reducing the difficulty of blockchain business access. In addition, by sending the business transaction to the target business node associated with the business type of the business transaction through the first contract front-end service program, the target device can avoid accessing on-chain data unrelated to the business transaction, thus improving the data security of the blockchain network.
[0146] Please see Figure 7 , Figure 7 This is a flowchart illustrating a blockchain-based data processing method provided in an embodiment of this application. Figure 3 This method can be executed by the target business node in the blockchain network, by the target device, or by interaction between the target business node and the target device. For ease of understanding, this application embodiment illustrates the method as being executed by the target business node. Figure 7 As shown, the method may include at least the following steps.
[0147] Step S301: Obtain the business transaction sent by the target device through the first contract front-end service program; the business transaction is generated by the target device based on business data in the first contract front-end service program, and the business transaction matches the blockchain data structure; the first contract front-end service program is invoked by the target device when it obtains a business processing request carrying business data; the first contract front-end service program includes node guidance information; the node guidance information is used to guide the first contract front-end service program to send the business transaction to the target business node.
[0148] Specifically, in this embodiment of the application, the target device interacts with the target business node through the first contract front-end service program.
[0149] Step S302: Based on the business transaction, invoke the target business contract deployed in the blockchain network that is associated with the first contract pre-service program.
[0150] Specifically, the process involves obtaining the business type to be verified for a business transaction and comparing it with the node business type. The node business type indicates the type of business processed by the target business node. If the business type to be verified differs from the node business type, a business error message is returned to the target device. If the business type to be verified is the same as the node business type, the target business contract deployed in the blockchain network is invoked according to the contract name of the first contract front-end service program. The contract name of the first contract front-end service program is the same as the contract name of the target business contract.
[0151] Step S303: Process the business transaction through the target business contract and return the business processing result to the target device.
[0152] Specifically, for ease of understanding, this application uses tax-related business as an example for description; please refer to [the relevant documentation / reference]. Figure 8 , Figure 8 This is a system architecture diagram of a tax blockchain system provided in an embodiment of this application. For example... Figure 8 As shown, the business network, routing proxy network, and core consensus network in this embodiment constitute the entire complete blockchain business system. The core consensus network may include a core chain (e.g., the one described above). Figure 1b (The core chain in the consensus network shown). Optionally, the core consensus network may also include... Figure 8The diagram shows multiple core chains. Each core chain can be used to store business data corresponding to different business types. These business transactions include various sub-businesses related to taxation, specifically invoicing, credit reporting, profit and loss reporting, enterprise qualification reporting, and tax refunds. For example, core chain 0 can be used to store business data related to invoicing, core chain 1 can be used to store business data related to credit reporting, and so on.
[0153] It is understandable that when blockchain is used in some enterprise scenarios, in order to improve the confidentiality and security of data, when enterprise information or business security-related data are involved in the blockchain system, the layered blockchain structure of "business network - core consensus network" in this application embodiment can be adopted.
[0154] Because the entire tax process involves regulatory agencies, invoicing parties, reimbursement parties, and tax filing parties, therefore... Figure 8 The business nodes in the illustrated business network can include terminal devices corresponding to tax bureau objects, enterprise objects, and consumer objects. Tax bureau objects can refer to regulatory agencies in the regulatory network (e.g., computer equipment corresponding to provincial, municipal, or district tax bureaus), enterprise objects can be invoicing service providers, reimbursement service providers, or retail enterprises (e.g., KA enterprises, i.e., large retail customers and key retail customers) in the public cloud, and consumer objects can be payment service providers, circulation service providers, or retail enterprises in the private cloud. The business nodes in the business network generate business query requests to retrieve business result data. These requests can then be forwarded to consensus nodes in the core consensus network via proxy nodes in the routing proxy network. The consensus nodes then retrieve the business result data to be returned to the business nodes based on their node cache.
[0155] In this routing proxy network, proxy nodes can be used to isolate the business network and the core consensus network. Proxy nodes can provide peer-to-peer (P2P) services, routing services, certificate caching, and authentication services. Peer-to-peer services refer to services in a P2P network based on a specific network protocol. In a P2P network, network nodes do not require a central node to maintain the network state; instead, each node maintains the overall network state or the connection state of its neighbors through broadcast interactions. Routing services are a basic function of nodes and can be used for communication between nodes to isolate the business network and the core consensus network. Certificate caching is used to cache the identity certificates of each node. Here, "certificate" can refer to a Public Key Infrastructure (PKI) system. In a PKI system, a certificate is proof of identity for the owner of a public key, issued by an authoritative Certificate Authority (CA). Asymmetric encryption and digital signatures can be implemented based on PKI. The PKI system can include public-private key cryptography, x.509 certificates, CA certificate issuing centers, etc. The authentication service can be used to authenticate business nodes in a business network. It is understood that, in this embodiment, the proxy node can be used to forward business query requests sent by business nodes to consensus nodes in the core consensus network, and can also be used to forward business result data returned by the consensus nodes to business nodes.
[0156] In this core consensus network, consensus nodes (i.e., ledger nodes) can be trusted nodes within the tax intranet, defining their consensus responsibilities by invoking permission contracts. These permission contracts also store the entire lifecycle logic of electronic invoices, including their status, flow, data access permissions, application conditions, and issuance conditions. For instance, a consensus node in the core consensus network can write a lease management contract sent by the system management device into the core chain. It can also write business configuration information associated with invoice business contracts sent by the business contract management device into the core chain. Furthermore, the consensus node can publish services based on state data, periodically updating the business state data corresponding to each query interface stored in the node cache according to the cache duration of the lease level corresponding to the query interface. This allows it to call the cached query service when receiving a business query request forwarded by a proxy node, determining the corresponding business result data based on the request type, business query interface, and node cache.
[0157] As described above, this application provides a first contract front-end service program associated with a target business contract deployed in a blockchain network. Through this first contract front-end service program, the target device can generate business transactions that match the blockchain data structure without needing to adapt to the blockchain network, thus reducing the difficulty of blockchain business access. In addition, by sending the business transaction to the target business node associated with the business type of the business transaction through the first contract front-end service program, the target device can avoid accessing on-chain data unrelated to the business transaction, thus improving the data security of the blockchain network.
[0158] Further, please see Figure 9 , Figure 9 This is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of this application. The blockchain-based data processing device 1 can run on a target device and can be used to execute the corresponding steps in the method provided in the embodiment of this application. Figure 9 As shown, the blockchain-based data processing device 1 may include: a request acquisition module 11, a first generation module 120, and a first sending module 13.
[0159] The request acquisition module 11 is used to acquire a business processing request carrying business data, and to call the first contract front-end service program based on the business processing request; the first contract front-end service program includes node guidance information;
[0160] The first generation module 12 is used to generate business transactions that match the blockchain data structure based on business data in the first contract pre-service program.
[0161] The first sending module 13 is used to send business transactions to the target business node indicated by the node guidance information through the first contract pre-service program, so that the target business node can call the target business contract deployed in the blockchain network associated with the first contract pre-service program according to the business transaction, perform business processing on the business transaction through the target business contract, and return the business processing result to the target device; the target business node belongs to the blockchain network.
[0162] The specific functional implementations of the request acquisition module 11, the first generation module 12, and the first sending module 13 can be found above. Figure 3 Steps S101-S103 in the corresponding embodiment will not be described again here.
[0163] Please see again Figure 9 The request acquisition module 11 may include: a type comparison unit 111, a first generation unit 112, and a program call unit 113.
[0164] The type comparison unit 111 is used to compare the business type corresponding to the business data with the business type corresponding to the first contract pre-service program;
[0165] The first generation unit 112 is used to generate program deployment prompt information if the business type corresponding to the first contract pre-service program is different from the business type corresponding to the business data; the program deployment prompt information is used to prompt the target device to deploy the second contract pre-service program; the business type corresponding to the second contract pre-service program is the same as the business type corresponding to the business data.
[0166] The program calling unit 113 is used to call the first contract front-end service program if the business type corresponding to the first contract front-end service program is the same as the business type corresponding to the business data.
[0167] The specific functional implementation methods of the type comparison unit 111, the first generation unit 112, and the program calling unit 113 can be found in the above description. Figure 3 Step S101 in the corresponding embodiment will not be described again here.
[0168] Please see again Figure 9 The first contract pre-service program encapsulates the blockchain configuration information of the blockchain network; the blockchain configuration information is used to indicate the blockchain data structure of the blockchain network.
[0169] The first generation module 12 may include a first acquisition unit 121 and a data encapsulation unit 122.
[0170] The first acquisition unit 121 is used to acquire the transaction format in the blockchain configuration information in the first contract pre-service program;
[0171] The data encapsulation unit 122 is used to encapsulate business data into business transactions that match the blockchain data structure based on the transaction format.
[0172] The specific functional implementation of the first acquisition unit 121 and the data encapsulation unit 122 can be found in the above description. Figure 3 Step S102 in the corresponding embodiment will not be described again here.
[0173] Please see again Figure 9 The first pre-contract service procedure includes the device private key for the target device;
[0174] The first sending module 13 may include a second acquisition unit 131 and a transaction sending unit 132.
[0175] The second acquisition unit 131 is used to acquire the transaction hash value of the business transaction through the first contract front-end service program, encrypt the transaction hash value based on the device private key, and obtain the transaction signature corresponding to the business transaction.
[0176] The transaction sending unit 132 is used to send a business transaction carrying a transaction signature to the target business node indicated by the node guidance information through the first contract pre-service procedure.
[0177] The specific functional implementation methods of the second acquisition unit 131 and the transaction sending unit 132 can be found in the above description. Figure 3 Step S103 in the corresponding embodiment will not be described again here.
[0178] Please see again Figure 9 The first contract pre-service procedure also includes the node public key for the target business node;
[0179] The blockchain-based data processing device 1 may further include: an information encryption module 14 and a second sending module 15.
[0180] The request retrieval module 11 is also used to retrieve the business query request sent by the target object; the business query request carries the object information of the target object;
[0181] Information encryption module 14 is used to encrypt object information based on the node's public key in the first contract pre-service program to obtain encrypted object information;
[0182] The second sending module 15 is used to send a business query request carrying encrypted object information to the target business node through the first contract front-end service program, so that when the target business node successfully decrypts the encrypted object information based on the node private key corresponding to the target business node, it generates object query data for the object information according to the business query request.
[0183] The second sending module 15 is also used to receive object query data returned by the target service node and return it to the target object.
[0184] The specific functional implementations of the request acquisition module 11, the information encryption module 14, and the second sending module 15 can be found above. Figure 3 Step S103 in the corresponding embodiment will not be described again here.
[0185] Please see again Figure 9 The blockchain-based data processing device 1 may also include: a program configuration module 16.
[0186] The request acquisition module 11 is also used to acquire a program deployment request for the target business type, and based on the program deployment request, acquire an initial contract front-end service program with the target business type; the initial contract front-end service program provides a business interface corresponding to the target business type; the initial contract front-end service program encapsulates blockchain configuration information for indicating the blockchain data structure of the blockchain network;
[0187] The program configuration module 16 is used to configure the initial pre-service program and determine the configured initial contract pre-service program as the first contract pre-service program.
[0188] The specific functional implementation methods of the request acquisition module 11 and the program configuration module 16 can be found in the above description. Figure 5 Steps S201-S202 in the corresponding embodiment will not be described again here.
[0189] Please see again Figure 9 The program configuration module 16 may include: a second generation unit 161, a first determination unit 162, and a second determination unit 163.
[0190] The second generation unit 161 is used to generate an asymmetric key pair for the target device and a device communication certificate for the asymmetric key pair in the initial contract pre-service program; the asymmetric key pair includes a device private key and a device public key.
[0191] The first determining unit 162 is used to determine the business nodes in the blockchain network that are used to process the target business type as the target business node, and generate node guidance information based on the node information of the target business node.
[0192] The second determining unit 163 is used to determine the initial contract pre-service program, which includes an asymmetric key pair, a device communication certificate, and node boot information, as the first contract pre-service program.
[0193] The specific functional implementation methods of the second generation unit 161, the first determination unit 162, and the second determination unit 163 can be found above. Figure 5 Step S202 in the corresponding embodiment will not be described again here.
[0194] Please see again Figure 9 The blockchain-based data processing device 1 may also include: a second generation module 17, a third generation module 18, and a program deployment module 19.
[0195] The second generation module 17 is used to generate a business contract to be compiled for the target business type; the business contract to be compiled includes blockchain configuration information; the blockchain configuration information is used to indicate the blockchain data structure in the blockchain network.
[0196] The third generation module 18 is used to read the contract content of the business contract to be compiled through the front-end service code generator and generate front-end service code based on the contract content.
[0197] The program deployment module 19 is used to compile the front-end service code into the initial contract front-end service program. If the target business contract generated based on the business contract to be compiled is successfully uploaded to the chain, the initial contract front-end service program is deployed to obtain the first contract front-end service program.
[0198] The specific functional implementation methods of the second generation module 17, the third generation module 18, and the program deployment module 19 can be found above. Figure 6 Steps S401-S406 in the corresponding embodiment will not be described again here.
[0199] In this embodiment, when the target device receives a business processing request carrying business data, it can invoke a first contract front-end service program including node guidance information based on the business processing request. It is understood that the business type processed by the first contract front-end service program is the same as the business type of the business data. Furthermore, in the first contract front-end service program, a business transaction matching the blockchain data structure is generated based on the business data. That is, the first contract front-end service program can generate a business transaction matching the blockchain data structure. Therefore, through the first contract front-end service program, the target device can bypass the adaptation to the blockchain network. Furthermore, through the first contract front-end service program, the target device can send the business transaction to the target business node indicated by the node guidance information, so that the target business node can invoke the target business contract deployed in the blockchain network associated with the first contract front-end service program according to the business transaction. Through the target business contract, the target business node can process the business transaction and return the business processing result to the target device. As described above, this application provides a first contract front-end service program associated with a target business contract deployed in a blockchain network. Through this first contract front-end service program, the target device can generate business transactions that match the blockchain data structure without needing to adapt to the blockchain network, thus reducing the difficulty of blockchain business access. In addition, by sending the business transaction to the target business node associated with the business type of the business transaction through the first contract front-end service program, the target device can avoid accessing on-chain data unrelated to the business transaction, thus improving the data security of the blockchain network.
[0200] Further, please see Figure 10 , Figure 10 This is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of this application. Figure 2The aforementioned blockchain-based data processing device 2 can operate on a target business node in a blockchain network and can be used to execute the corresponding steps in the methods provided in the embodiments of this application. Figure 10 As shown, the blockchain-based data processing device 2 may include: a transaction acquisition module 21, a contract invocation module 22, and a result return module 23.
[0201] The transaction acquisition module 21 is used to acquire business transactions sent by the target device through the first contract front-end service program. The business transaction is generated by the target device based on business data in the first contract front-end service program, and the business transaction matches the blockchain data structure. The first contract front-end service program is invoked by the target device when it receives a business processing request carrying business data. The first contract front-end service program includes node guidance information. The node guidance information is used to guide the first contract front-end service program to send the business transaction to the target business node.
[0202] Contract invocation module 22 is used to invoke the target business contract deployed in the blockchain network that is associated with the first contract front-end service program, based on the business transaction.
[0203] Result return module 23 is used to process business transactions through the target business contract and return the business processing results to the target device.
[0204] The specific implementation methods of the transaction acquisition module 21, contract invocation module 22, and result return module 23 can be found in the above description. Figure 7 Steps S301-S303 in the corresponding embodiment will not be described again here.
[0205] Please see again Figure 10 The contract invocation module 22 may include: a type comparison unit 221, an error return unit 222, and a contract invocation unit 223.
[0206] The type comparison unit 221 is used to obtain the business type to be verified of the business transaction and compare the business type to be verified with the node business type; the node business type is used to indicate the business type of the business processed by the target business node.
[0207] Error return unit 222 is used to return a service error message to the target device if the service type to be verified is different from the service type of the node.
[0208] Contract invocation unit 223 is used to invoke the target business contract deployed in the blockchain network according to the contract name of the first contract front-end service program if the business type to be verified is the same as the node business type; the contract name of the first contract front-end service program is the same as the contract name of the target business contract.
[0209] The specific implementation methods of the type comparison unit 221, error return unit 222, and contract call unit 223 can be found above. Figure 7 Step S302 in the corresponding embodiment will not be described again here.
[0210] As described above, this application provides a first contract front-end service program associated with a target business contract deployed in a blockchain network. Through this first contract front-end service program, the target device can generate business transactions that match the blockchain data structure without needing to adapt to the blockchain network, thus reducing the difficulty of blockchain business access. In addition, by sending the business transaction to the target business node associated with the business type of the business transaction through the first contract front-end service program, the target device can avoid accessing on-chain data unrelated to the business transaction, thus improving the data security of the blockchain network.
[0211] Further, please see Figure 11 , Figure 11 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Figure 11 As shown, the computer device 1000 may include: at least one processor 1001, such as a CPU; at least one network interface 1004; a user interface 1003; a memory 1005; and at least one communication bus 1002. The communication bus 1002 is used to enable communication between these components. In some embodiments, the user interface 1003 may include a display screen and a keyboard, and the network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 1005 may also be at least one storage device located remotely from the aforementioned processor 1001. Figure 11 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a device control application program.
[0212] exist Figure 11 In the computer device 1000 shown, the network interface 1004 provides network communication functionality; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:
[0213] Obtain a business processing request carrying business data, and invoke the first contract front-end service program based on the business processing request; the first contract front-end service program includes node guidance information;
[0214] In the first contract pre-service procedure, business transactions are generated based on business data and matched with the blockchain data structure;
[0215] The business transaction is sent to the target business node indicated by the node guidance information through the first contract pre-service program. The target business node then calls the target business contract deployed in the blockchain network that is associated with the first contract pre-service program, performs business processing on the business transaction through the target business contract, and returns the business processing result to the target device. The target business node belongs to the blockchain network.
[0216] It should be understood that the computer device 1000 described in the embodiments of this application can perform the data processing methods or apparatus described in the preceding embodiments, and will not be repeated here. Furthermore, the beneficial effects of using the same methods will also not be repeated.
[0217] This application also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the data processing methods or apparatus described in the preceding embodiments, which will not be repeated here. Furthermore, the beneficial effects of using the same methods will also not be repeated.
[0218] The aforementioned computer-readable storage medium can be an internal storage unit of the data processing apparatus or computer device provided in any of the foregoing embodiments, such as a hard disk or memory of the computer device. The computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., provided on the computer device. Furthermore, the computer-readable storage medium can include both internal and external storage units of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0219] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, enabling the computer device to perform the data processing methods or apparatus described in the preceding embodiments, which will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated here.
[0220] The terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other step units inherent to these processes, methods, apparatuses, products, or devices.
[0221] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0222] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A data processing method based on blockchain, characterized in that, include: The target device obtains a business processing request carrying business data and compares the business type corresponding to the business data with the business type corresponding to the first contract pre-service program. If the business type corresponding to the first contract pre-service program is different from the business type corresponding to the business data, a program deployment prompt message will be generated. The program deployment prompt information is used to prompt the target device to deploy the second contract pre-service program; The business type corresponding to the second contract pre-service procedure is the same as the business type corresponding to the business data; If the business type corresponding to the first contract front-end service program is the same as the business type corresponding to the business data, then the first contract front-end service program is invoked. The first contract pre-service procedure includes node guidance information; In the first contract pre-service procedure, a business transaction matching the blockchain data structure is generated based on the business data. The business transaction is sent to the target business node indicated by the node guidance information through the first contract pre-service program, so that the target business node calls the target business contract deployed in the blockchain network associated with the first contract pre-service program according to the business transaction, performs business processing on the business transaction through the target business contract, and returns the business processing result to the target device; the target business node belongs to the blockchain network.
2. The method according to claim 1, characterized in that, The first contract pre-service program encapsulates the blockchain configuration information of the blockchain network; the blockchain configuration information is used to indicate the blockchain data structure of the blockchain network. The step of generating a business transaction that matches the blockchain data structure based on the business data in the first contract pre-service program includes: In the first contract pre-service program, the transaction format in the blockchain configuration information is obtained; Based on the transaction format, the business data is encapsulated into a business transaction that matches the blockchain data structure.
3. The method according to claim 1, characterized in that, The first contract pre-service procedure includes a device private key for the target device; The step of sending the business transaction to the target business node indicated by the node guidance information through the first contract pre-service procedure includes: The transaction hash value of the business transaction is obtained through the first contract front-end service program, and the transaction hash value is encrypted based on the device private key to obtain the transaction signature corresponding to the business transaction. The business transaction carrying the transaction signature is sent to the target business node indicated by the node guidance information through the first contract pre-service procedure.
4. The method according to claim 1, characterized in that, The first contract pre-service procedure also includes the node public key for the target business node; The method further includes: Obtain the business query request sent by the target object; the business query request carries the object information of the target object; In the first contract pre-service program, the object information is encrypted based on the node's public key to obtain encrypted object information; The first contract pre-service program sends a business query request carrying the encrypted object information to the target business node, so that when the target business node successfully decrypts the encrypted object information based on the node private key corresponding to the target business node, it generates object query data for the object information according to the business query request. Receive the object query data returned by the target business node and return it to the target object.
5. The method according to claim 1, characterized in that, The method further includes: Obtain a program deployment request for a target business type; based on the program deployment request, obtain an initial contract front-end service program with the target business type; the initial contract front-end service program provides a business interface corresponding to the target business type; the initial contract front-end service program encapsulates blockchain configuration information for indicating the blockchain data structure of the blockchain network; Configure the initial contract pre-service program and determine the configured initial contract pre-service program as the first contract pre-service program.
6. The method according to claim 5, characterized in that, The step of configuring the initial contract pre-service program and determining the configured initial contract pre-service program as the first contract pre-service program includes: In the initial contract pre-service procedure, an asymmetric key pair for the target device and a device communication certificate for the asymmetric key pair are generated; the asymmetric key pair includes a device private key and a device public key. The business nodes in the blockchain network used to process the target business type are identified as the target business nodes, and the node guidance information is generated based on the node information of the target business nodes. The initial contract pre-service program, which includes the asymmetric key pair, the device communication certificate, and the node guidance information, is identified as the first contract pre-service program.
7. The method according to claim 1, characterized in that, The method further includes: Generate a business contract to be compiled for the target business type; the business contract to be compiled includes blockchain configuration information; the blockchain configuration information is used to indicate the blockchain data structure in the blockchain network. The front-end service code generator reads the contract content of the business contract to be compiled and generates front-end service code based on the contract content. The pre-service code is compiled into an initial contract pre-service program. If the target business contract generated based on the business contract to be compiled is successfully uploaded to the chain, the initial contract pre-service program is deployed to obtain the first contract pre-service program.
8. A data processing method based on blockchain, characterized in that, The method is executed by a target business node in the blockchain network, and the method includes: The system acquires business transactions sent by the target device through a first contract front-end service program. These business transactions are generated by the target device within the first contract front-end service program based on business data, and the business transactions match the blockchain data structure. The first contract front-end service program is invoked by the target device when it receives a business processing request carrying the business data. The first contract front-end service program includes node guidance information, which guides the first contract front-end service program to send the business transaction to the target business node. Obtain the business type to be verified for the business transaction, and compare the business type to be verified with the node business type; the node business type is used to indicate the business type of the business processed by the target business node; If the service type to be verified is different from the service type of the node, a service error message is returned to the target device; If the business type to be verified is the same as the business type of the node, then the target business contract deployed in the blockchain network is invoked according to the contract name of the first contract front-end service program; the contract name of the first contract front-end service program is the same as the contract name of the target business contract. The business transaction is processed through the target business contract, and the processing result is returned to the target device.
9. A data processing device based on blockchain, characterized in that, The blockchain-based data processing device operates on the target device and includes: The request acquisition module is used to acquire a business processing request carrying business data and compare the business type corresponding to the business data with the business type corresponding to the first contract front-end service program. The request acquisition module is further configured to generate a program deployment prompt if the business type corresponding to the first contract front-end service program is different from the business type corresponding to the business data; the program deployment prompt is used to prompt the target device to deploy a second contract front-end service program; the business type corresponding to the second contract front-end service program is the same as the business type corresponding to the business data; The request acquisition module is further configured to invoke the first contract front-end service program if the business type corresponding to the first contract front-end service program is the same as the business type corresponding to the business data; the first contract front-end service program includes node guidance information; The first generation module is used to generate a business transaction that matches the blockchain data structure based on the business data in the first contract pre-service program. The first sending module is used to send the business transaction to the target business node indicated by the node guidance information through the first contract front-end service program, so that the target business node calls the target business contract deployed in the blockchain network associated with the first contract front-end service program according to the business transaction, performs business processing on the business transaction through the target business contract, and returns the business processing result to the target device; the target business node belongs to the blockchain network.
10. A data processing device based on blockchain, characterized in that, The blockchain-based data processing device operates on a target business node in the blockchain network, including: A transaction acquisition module is used to acquire business transactions sent by a target device through a first contract front-end service program. The business transaction is generated by the target device based on business data within the first contract front-end service program, and the business transaction matches the blockchain data structure. The first contract front-end service program is invoked by the target device when it receives a business processing request carrying the business data. The first contract front-end service program includes node guidance information; the node guidance information is used to guide the first contract front-end service program to send the business transaction to the target business node. The contract invocation module is used to obtain the business type to be verified of the business transaction and compare the business type to be verified with the node business type; the node business type is used to indicate the business type of the business processed by the target business node. The contract invocation module is also used to return a business error message to the target device if the business type to be verified is different from the business type of the node. The contract invocation module is further configured to, if the business type to be verified is the same as the business type of the node, invoke the target business contract deployed in the blockchain network according to the contract name of the first contract front-end service program; the contract name of the first contract front-end service program is the same as the contract name of the target business contract. The result return module is used to process the business transaction through the target business contract and return the business processing result to the target device.
11. A computer device, characterized in that, include: Processor, memory, and network interface; The processor is connected to the memory and the network interface, wherein the network interface is used to provide data communication functions, the memory is used to store computer programs, and the processor is used to invoke the computer programs to cause the computer device to perform the method according to any one of claims 1 to 8.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded and executed by a processor to cause a computer device having the processor to perform the method of any one of claims 1-8.
13. A computer program product, characterized in that, The computer program product includes a computer program stored in a computer-readable storage medium, the computer program being adapted to be read and executed by a processor to cause a computer device having the processor to perform the method of any one of claims 1-8.