Data processing method and device based on block chain and related equipment
By creating an account address with a limited number of transactions for business objects and performing resource transfer and signature operations on the blockchain, the problem of difficulty in ensuring the resource security of business objects in the existing technology is solved, and the effect of improving resource security is achieved.
Patent Information
- Application Number
- CN202311366195.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-19
- Publication Date
- 2025-04-22
AI Technical Summary
The existing technical solution that directly uses the account address of the business object for transactions is difficult to ensure the security of the resources in the account address of the business object, especially when an illegal object obtains the account address.
By creating an account address with a limited number of transactions for the business object, the security of the resources of the business object in another account address on the blockchain is improved. The specific method includes obtaining the key parameters of the transaction to be signed, identifying the risk parameters, obtaining transaction auxiliary resources, generating business transactions associated with the transaction to be signed, transferring the transaction auxiliary resources from the first account address to the second account address, and signing the signed transaction through the second account address.
By limiting the number of transactions in the account address and the use of private key information, it is improved to improve the difficulty for illegal objects to illegally obtain resources on the account address in the signed transaction, thereby improving the security of resources on the account address of the business object.
Smart Images

Figure CN119865502A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a blockchain-based data processing method, apparatus, and related equipment. Background Art
[0002] In a blockchain scenario, a business object (e.g., user A) can conduct business transactions through its account address on the blockchain (e.g., account address 1). For example, when the business transaction submitted by user A to a blockchain node device through a business terminal is a resource transfer transaction, the blockchain node device can call a smart contract to execute the resource transfer transaction to transfer the resources on the on-chain account address (e.g., account address 1) held by user A to the on-chain account address (e.g., account address 2) of another business object.
[0003] The inventor discovered in practice that when the business terminal constructs a resource transfer transaction for submission to a blockchain node device, it directly uses the account address (e.g., account address 1) held by the business object (e.g., user A) in the resource transfer transaction. In this way, when the blockchain node device subsequently obtains the resource transfer transaction, it will directly use the account address (e.g., account address 1) held by the business object (e.g., user A) to transfer resources. Therefore, once an illegal object illegally obtains the resource transfer transaction and illegally obtains the account address 1 of the user A in the resource transfer transaction, all resources in the account address 1 of the user A will be illegally transferred to the account address of the illegal object. In other words, the existing technical solution of directly using the account address of the business object (e.g., user A) for transactions is difficult to ensure the security of the resources in the account address of the business object (e.g., user A). Summary of the invention
[0004] The embodiments of the present application provide a blockchain-based data processing method, apparatus, and related equipment, which can improve the security of resources of a business object in another account address on the blockchain by creating an account address with a limited number of transactions for the business object.
[0005] On the one hand, an embodiment of the present application provides a data processing method based on blockchain, which is executed by a resource management client and includes:
[0006] Obtain the transaction to be signed initiated by the business object; the transaction parameters of the transaction to be signed include the key parameters to be identified;
[0007] When risk parameters are identified in the key parameters, the transaction auxiliary resources associated with the transaction to be signed are obtained through the blockchain node, and the first account address of the business object is obtained; the first account address is used to store the business data resources of the business object on the blockchain; the resource quota of the business data resources is greater than or equal to the resource quota of the transaction auxiliary resources;
[0008] The second account address of the business object is obtained. When the number of address transactions of the second account address is less than the transaction number threshold, a first business transaction associated with the transaction to be signed is generated based on the transaction auxiliary resources, the first account address and the second account address, and the first business transaction is sent to the blockchain node so that the blockchain node uploads the first business transaction to the blockchain; the first business transaction is used to instruct the blockchain node to transfer the transaction auxiliary resources from the first account address to the second account address;
[0009] When there are transaction auxiliary resources on the second account address, the transaction to be signed is signed by the private key information corresponding to the second account address, and the first transaction signature information of the transaction to be signed is obtained. Based on the second account address, the first transaction signature information and the transaction to be signed, a first signed transaction is constructed, and the first signed transaction is sent to the blockchain node, so that the blockchain node links the first signed transaction to the blockchain.
[0010] On the one hand, an embodiment of the present application provides a data processing method based on blockchain, the method is executed by a blockchain node, and the method includes:
[0011] When the first business transaction sent by the resource management client is obtained, the first business transaction is linked to the blockchain; the first business transaction is used to indicate that the transaction auxiliary resource is transferred from the first account address of the business object to the second account address of the business object; the first business transaction is generated based on the transaction auxiliary resource, the first account address and the second account address when the number of address transactions of the second account address is less than the transaction number threshold; the transaction auxiliary resource is obtained from the blockchain node by the resource management client when the risk parameter is identified in the key parameter; the key parameter is the parameter to be identified included in the transaction parameter of the transaction to be signed initiated by the business object; the first account address is used to store the business data resource of the business object on the blockchain; the resource quota of the business data resource is greater than or equal to the resource quota of the transaction auxiliary resource;
[0012] When the first signed transaction sent by the resource management client is obtained, the first signed transaction is chained to the blockchain; the first signed transaction is constructed based on the second account address, the first transaction signature information of the transaction to be signed, and the transaction to be signed; the first transaction signature information is obtained by signing the transaction to be signed through the private key information corresponding to the second account address when there is a transaction auxiliary resource on the second account address.
[0013] On the one hand, an embodiment of the present application provides a data processing device based on blockchain, the device is run by a resource management client, and the device includes:
[0014] The transaction acquisition module to be signed is used to obtain the transaction to be signed initiated by the business object; the transaction parameters of the transaction to be signed include the key parameters to be identified;
[0015] A first risk processing module is used to obtain, when a risk parameter is identified in the key parameters, a transaction auxiliary resource associated with the transaction to be signed through a blockchain node, and obtain a first account address of the business object; the first account address is used to store the business data resource of the business object on the blockchain; the resource quota of the business data resource is greater than or equal to the resource quota of the transaction auxiliary resource;
[0016] A resource transfer module, used to obtain a second account address of the business object, and when the number of address transactions of the second account address is less than a transaction number threshold, generate a first business transaction associated with the transaction to be signed based on the transaction auxiliary resources, the first account address, and the second account address, and send the first business transaction to the blockchain node so that the blockchain node links the first business transaction to the blockchain; the first business transaction is used to instruct the blockchain node to transfer the transaction auxiliary resources from the first account address to the second account address;
[0017] The transaction signature module is used to sign the transaction to be signed by using the private key information corresponding to the second account address when there are transaction auxiliary resources on the second account address, obtain the first transaction signature information of the transaction to be signed, construct a first signed transaction based on the second account address, the first transaction signature information and the transaction to be signed, and send the first signed transaction to the blockchain node so that the blockchain node can upload the first signed transaction to the blockchain.
[0018] On the one hand, an embodiment of the present application provides a data processing device based on blockchain, the device is run by a blockchain node, and the device includes:
[0019] The first business transaction acquisition module is used to upload the first business transaction to the blockchain when the first business transaction sent by the resource management client is acquired; the first business transaction is used to indicate that the transaction auxiliary resource is transferred from the first account address of the business object to the second account address of the business object; the first business transaction is generated based on the transaction auxiliary resource, the first account address and the second account address when the number of address transactions of the second account address is less than the transaction number threshold; the transaction auxiliary resource is obtained from the blockchain node when the resource management client identifies that there are risk parameters in the key parameters; the key parameters are the parameters to be identified included in the transaction parameters of the transaction to be signed initiated by the business object; the first account address is used to store the business data resources of the business object on the blockchain; the resource quota of the business data resource is greater than or equal to the resource quota of the transaction auxiliary resource;
[0020] The first signed transaction module is used to upload the first signed transaction to the blockchain when the first signed transaction sent by the resource management client is obtained; the first signed transaction is constructed based on the second account address, the first transaction signature information of the transaction to be signed, and the transaction to be signed; the first transaction signature information is obtained by signing the transaction to be signed through the private key information corresponding to the second account address when there is a transaction auxiliary resource on the second account address.
[0021] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for being loaded and executed by a processor so that a computer device having the processor executes the method provided by the embodiment of the present application.
[0022] In one aspect, the present application provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in the present application.
[0023] By adopting the embodiment of the present application, when obtaining the transaction to be signed, it is possible to identify whether there is a risk parameter in the key parameters of the transaction. When the risk parameter exists in the key parameters, the business data resources in the account address (i.e., the first account address) used to store the business data of the business object can be transferred to the account address (i.e., the second account address) with a limited number of transactions created for the business object, and then the transaction to be signed is signed by the private key information corresponding to the second account address, and the first signed transaction is obtained to conduct business transactions through the second account address. Among them, the address transaction number of the second account address is limited, and the private key information corresponding to the second account address is also limited. By signing the transaction to be signed with the private key information with a limited number of times, it is possible to increase the difficulty for illegal objects to illegally obtain resources on the account address in the first signed transaction, thereby improving the security of resources on the account address of the business object. Furthermore, since the second account address is only used to temporarily store part of the resources of the business object, even if an illegal object illegally obtains the first signed transaction, it can only be used to illegally obtain part of the temporarily stored business object resources, and will not affect the remaining business data resources in the first account address, which helps to improve the security of the business data resources of the business object. In this way, the security of the resources in another account address of the business object on the blockchain can be improved by using an account address with a limited number of transactions created for the business object. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0025] Figure 1 It is a structural diagram of a blockchain-based data processing system provided in an embodiment of the present application;
[0026] Figure 2 This is a schematic diagram of a data interaction scenario provided by an embodiment of the present application;
[0027] Figure 3 It is a flowchart of a data processing method based on blockchain provided in an embodiment of the present application;
[0028] Figure 4 It is a flowchart of a data processing method based on blockchain provided in an embodiment of the present application;
[0029] Figure 5 This is a schematic diagram of a transfer result of a first business transaction provided in an embodiment of the present application;
[0030] Figure 6 It is a flowchart of a processing process of a transaction to be signed provided in an embodiment of the present application;
[0031] Figure 7 It is a schematic diagram of resource transfer provided by an embodiment of the present application;
[0032] Figure 8 It is a flowchart of a data processing method based on blockchain provided in an embodiment of the present application;
[0033] Fig. 9 This is a schematic diagram of an interactive timing of a blockchain-based data processing method provided in an embodiment of the present application;
[0034] Fig.10 It is a structural schematic diagram of a blockchain-based data processing device provided in an embodiment of the present application;
[0035] Fig.11 It is a structural schematic diagram of another blockchain-based data processing device provided in an embodiment of the present application;
[0036] Fig.12 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0038] See also Figure 1 , Figure 1 Schematic diagram of a data processing system based on blockchain provided in an embodiment of the present application. The data processing system may include a terminal device cluster and a blockchain network. Figure 1 As shown, the terminal device cluster here can be as follows Figure 1 As shown in the terminal device cluster 100a, the blockchain network here can be as follows Figure 1 Blockchain network 200a is shown.
[0039] Among them, it is understandable that Figure 1 The terminal device cluster 100a shown may include one or more terminal devices. The number of terminal devices in the terminal device cluster 100a is not limited here. Figure 1As shown, the terminal devices in the terminal device cluster 100a may include terminal devices 110a, terminal devices 110b, ..., terminal devices 110n, etc. A resource management client may be run in any terminal device, which may also be referred to as a resource client. The resource management client may be a tool for managing digital resources, which may be used to store the private key information (also referred to as the private key) of the business object in an encrypted file, and then based on the private key information stored by the resource management client, a transaction signature is performed on the transaction to be signed (such as a transaction to transfer digital resources to other accounts), and a signed transaction is obtained, and then the signed transaction may be sent to the blockchain to realize the transfer of digital resources on the blockchain, the transfer of resources on the blockchain, etc. The resource client may be a hardware device or a software program. It is understandable that one or more resource management clients may be run in a terminal device, and the number of resource management clients running in a terminal device will not be limited here. It is understandable that the same business object may correspond to one or more resource management clients, and multiple resource management clients corresponding to the same business object may run on the same terminal device or on different terminal devices, and there is no restriction here.
[0040] It is understandable that the resource client can be used to implement the resource management business function, and can realize the communication connection with the decentralized application client based on the resource management business function. For example, in one or an implementable manner, the decentralized application here can be an application that initiates a business transaction to be signed, and then the business object can initiate a transaction to be signed based on the decentralized application, and then the transaction to be signed is signed by the key (such as a private key) stored by the resource management client to obtain a signed transaction. It should be understood that the decentralized application involved here can be integrated with the resource client (i.e., the resource client) and run on the same terminal device (for example, the above-mentioned terminal device 110a), or it can be run on different terminal devices, which will not be limited here. When the decentralized application and the resource management client run on the same terminal device, the terminal device can pull up the process corresponding to the resource management client after determining the transaction to be signed through the decentralized application, so as to sign the transaction based on the resource management client. When the decentralized application and the resource management client are running on different terminal devices, the terminal device where the decentralized application is located can generate an image code (such as a QR code) for signing the transaction to be signed when determining the transaction to be signed through the decentralized application. Then, the business object can scan the image code through the terminal device where the resource management client is located to obtain the transaction to be signed, and then sign the obtained transaction to be signed.
[0041] It is understandable that if Figure 1The blockchain network 200a shown may include multiple blockchain nodes, and the number of blockchain nodes in the blockchain network 200a is not limited here. Figure 1 As shown, the multiple blockchain nodes in the blockchain network 200a may specifically include blockchain node 11a, blockchain node 11b, blockchain node 11c, blockchain node 11d, etc. The blockchain nodes in the blockchain network can be used to jointly maintain the blockchain. For example, the blockchain stored on each node in the blockchain network 200a (for example, blockchain node 11a, blockchain node 11b, blockchain node 11c, blockchain node 11d, etc.) is blockchain 11e.
[0042] like Figure 1 As shown, the terminal device (such as terminal device 110a) in the terminal device cluster 100a can be connected to the blockchain nodes such as blockchain node 11a, blockchain node 11b, blockchain node 11c, and blockchain node 11d, so as to interact with the blockchain nodes in the blockchain network 200a when the terminal device in the terminal device cluster 100a is connected to the blockchain network 200a. For example, the terminal device 110a can be used as a business terminal, and then the business object can send a data query request to the blockchain network through the business terminal, and then the blockchain node in the blockchain network can determine the request result based on the data query request, and then return the request result to the corresponding business terminal.
[0043] It should be understood that the blockchain involved in the embodiment of the present application is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism and encryption algorithm, which is mainly used to sort the data in chronological order and encrypt it into an account book so that it cannot be tampered with or forged, and can verify, store and update the data at the same time. The blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods, each of which contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. The blockchain can include a blockchain underlying platform, a platform product service layer and an application service layer. The blockchain includes a series of blocks (Block) that are connected to each other in the order of time of generation, and the block records the block data packaged and submitted by the blockchain nodes in the blockchain system. The blockchain underlying platform can include object management, basic services, smart contracts and operation management processing modules. Among them, the object management module is responsible for the identity information management of all blockchain participants, including maintaining public and private key generation (account management), key management, and the maintenance of the corresponding relationship between the user's real identity and the blockchain address (authority management), etc., and, under authorization, supervises and audits the transactions of certain real identities and provides risk control rule configuration (risk control audit); the basic service module is deployed on all blockchain node devices to verify the validity of business requests, and records the valid requests to the storage after consensus is reached. For a new business request, the basic service first adapts the interface for parsing and authentication (interface adaptation), and then encrypts the business information through the consensus algorithm (consensus management The smart contract module is responsible for the registration and issuance of contracts, contract triggering and contract execution. Development members can define the contract logic in a programming language and publish it to the blockchain (contract registration). According to the logic of the contract terms, the key or other events are called to trigger the execution and complete the contract logic. At the same time, it also provides the function of contract upgrade and cancellation. The operation management module is mainly responsible for the deployment, configuration modification, contract setting, cloud adaptation and real-time status visualization output of the product during the product release process, such as alarm, management network status, management node equipment health status, etc. The platform product service layer provides the basic capabilities and implementation framework of typical applications. Based on these basic capabilities, development members can superimpose the characteristics of the business and complete the blockchain implementation of the business logic. The application service layer provides application services based on the blockchain solution for business participants to use.
[0044] It is understandable that a blockchain (such as blockchain 11e) can be composed of multiple blocks. The genesis block (also called the genesis block, i.e., the first block in the blockchain) includes a block header and a block body. The block header stores input information feature values, version numbers, timestamps, and difficulty values, and the block body stores input information. The next block of the genesis block uses the genesis block as a parent block, and the next block also includes a block header and a block body. The block header stores the input information feature values of the current block, the block header feature values of the parent block, version numbers, timestamps, and difficulty values, and so on, so that the block data stored in each block in the blockchain is associated with the block data stored in the parent block, ensuring the security of the input information in the block. It is understandable that each block in the blockchain can correspond to a block height, and the block height of a block refers to the number of blocks between the block and the genesis block in the blockchain. It should be noted that the block height of the genesis block is 0, and the block height of the next block of the genesis block is 1.
[0045] It should be understood that one or more smart contracts (also referred to as contracts) can be deployed on the blockchain (for example, the blockchain 11e) of the above-mentioned blockchain network (for example, the above-mentioned blockchain network 200a). These smart contracts can be distinguished by contract identifiers, and the contract identifiers may include one or more of the following: contract call address (also referred to as contract address), contract identification number (Identity document, ID) or contract name, and the business transaction initiated by the user client may also carry the contract call address or contract identification number or contract name of the smart contract to specify the smart contract to be run. In an embodiment of the present application, the smart contracts deployed on the blockchain may include business contracts. Business contracts may be some contracts used for business processing, such as contracts for lottery business, some contracts for resource transfer, contracts for virtual resource conversion in game scenarios, etc., which are not limited here.
[0046] For further understanding, please see Figure 2 , Figure 2 Schematic diagram of a data interaction scenario provided by an embodiment of the present application. Figure 2 As shown, the terminal device 20a can be the above Figure 1In any terminal device in the terminal device cluster in the corresponding embodiment (such as the above-mentioned terminal device 110a, terminal device 110b, etc.), business object A (such as a business object) can initiate a transaction to be signed Y1 through a decentralized application, and then the resource management client in the terminal device 20a can obtain the transaction to be signed Y1 (step S21a). The transaction parameters in the transaction to be signed Y1 may include key parameters. The key parameters can be parameters for risk identification of transactions to be signed. For example, the key parameters can be the contract address of the contract indicated by the transaction to be signed Y1, the resource quantity of the resources to be transferred, the destination account address to which the resources to be transferred need to be transferred, and other parameters.
[0047] Further, when there are risk parameters in the key parameters, the resources required for the transaction Y1 to be signed are determined, the account address D1 of the business object for storing business data resources is obtained, and the account address D2 of the business object with a transaction number limit is obtained (step S22a). The account address D1 and the account address D2 here can be different account addresses. It can be understood that the account address D2 can be an account address with a transaction number limit, and the address transaction number of the account address D2 is less than a certain threshold (which can be called the transaction number threshold). For example, the transaction number threshold of the account address D2 can be 1, which means that the account address D2 can only be used for one transaction. At this time, the account address D2 can be called a one-time transaction address, and the account address D1 can be called the main account address of the business object. Furthermore, when there are risk parameters in the key parameters, the resources required for the transaction to be signed in the account address D1 need to be transferred to the account address D2, so as to conduct business transactions through the account address D2, such as contract calls or resource transfers based on the account address D2. It can be understood that the resources required for the transaction to be signed can be the resources required to execute the signed transaction corresponding to the transaction to be signed. For the sake of convenience of description, the resources required for the transaction to be signed can be referred to as transaction demand resources.
[0048] When the number of address transactions of account address D2 is less than the threshold, a business transaction TX1 is constructed to transfer the resources required for the transaction Y1 to be signed from account address D1 to account address D2 (step S23a), and then the business transaction TX1 can be sent to the blockchain network 200a (step S24a). It should be understood that the blockchain network 200a can link the business transaction TX1 to the blockchain.
[0049] Further, the resource management client in the terminal device 20a can sign the transaction Y1 to be signed based on the private key information corresponding to the account address D2, and obtain the signed transaction TX2 (step S25a), and then send the signed transaction TX2 to the blockchain network 200a (step S64a). It should be understood that the blockchain network 200a can link the signed transaction TX2 to the blockchain, thereby conducting business transactions through the transfer of the account address D2.
[0050] By adopting the embodiment of the present application, when obtaining the transaction to be signed, whether there is a risk parameter in the key parameters of the identification transaction, when the risk parameter exists in the identification key parameters, the business data resources in the account address (i.e., the first account address, such as the above-mentioned account address D1) used to store the business data of the business object can be transferred to the account address with a limited number of transactions created for the business object (i.e., the second account address, such as the above-mentioned account address D2), and then the transaction to be signed is signed by the private key information corresponding to the second account address, and the first signed transaction (such as the above-mentioned signed transaction TX2) is obtained to conduct business transactions through the second account address. Among them, the address transaction number of the second account address is limited, and the private key information corresponding to the second account address is also limited. By signing the transaction to be signed with the private key information with a limited number of times, it is possible to increase the difficulty for illegal objects to illegally obtain resources on the account address in the first signed transaction, thereby improving the security of resources on the account address of the business object. Furthermore, since the second account address is only used to temporarily store part of the resources of the business object, even if an illegal object illegally obtains the first signed transaction, it can only be used to illegally obtain part of the temporarily stored business object resources, and will not affect the remaining business data resources in the first account address, which helps to improve the security of the business data resources of the business object. In this way, the security of the resources in another account address of the business object on the blockchain can be improved by using an account address with a limited number of transactions created for the business object.
[0051] In addition, since business transactions are conducted through the second account address when there are risk parameters in the key parameters, the first account address of the business object can be prevented from being marked by other objects (or third-party platforms), thereby improving the security and privacy of the first account address of the business object.
[0052] It is understandable that the embodiments of the present application can be applied in financial scenarios. In financial scenarios, the business data resources stored on the first account address and the second account address can be digital resources that can be traded. In addition, when conducting transactions, business transactions can be conducted based on the transfer of the second account address to improve the security of the resources of the business object in the first account address.
[0053] It is understandable that the embodiments of the present application can be applied to game scenarios. In the game scenario, the business data resources stored on the first account address and the second account address can be virtual resources such as points and diamonds in the game. In addition, when conducting transactions, business transactions can be conducted based on the transfer of the second account address to improve the security of the resources of the business object in the first account address.
[0054] It is understandable that the blockchain nodes involved in the embodiments of the present application (such as any blockchain node in the above-mentioned blockchain network 200a) can all be computer devices, which can be servers, terminal devices, or other devices for data processing, without limitation here. Among them, the server can 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 services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms, without limitation here. Terminal devices can include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, smart speakers, smart home appliances, etc.
[0055] The terminal devices involved in the embodiments of the present application (such as any terminal device in the above-mentioned terminal device cluster 100a) can all be computer devices, which can be servers, terminal devices, or other devices for data processing, without limitation here. Among them, the server can 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 services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms, without limitation here. Terminal devices can include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, smart speakers, smart home appliances, etc.
[0056] It should be noted that before collecting relevant data of business objects (such as querying resources owned by business objects) and during the process of collecting relevant data of business objects, this application can display a prompt interface, pop-up window or output voice prompt information. The prompt interface, pop-up window or voice prompt information is used to prompt the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining user-related data after obtaining the user's confirmation operation on the prompt interface or pop-up window, otherwise (that is, when the user's confirmation operation on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining user-related data are terminated, that is, the user's relevant data is not obtained. In other words, all user data collected by this application are collected with the user's consent and authorization, and the collection, use and processing of relevant user data need to comply with relevant laws, regulations and standards in the relevant regions.
[0057] It is understood that the above scenarios are only examples and do not constitute a limitation on the application scenarios of the technical solutions provided in the embodiments of the present application. The technical solutions of the present application can also be applied to other scenarios. For example, it is known to those skilled in the art that with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0058] For further information, see Figure 3 , Figure 3 1 is a flowchart of a data processing method based on blockchain provided in an embodiment of the present application. The method can be executed by a resource management client, for example, a resource management client deployed in the terminal device 110a. The method can at least include the following steps S101-S104.
[0059] S101. Obtain a transaction to be signed initiated by a business object; transaction parameters of the transaction to be signed include key parameters to be identified.
[0060] The business object may be any object that needs to be processed, such as an individual, an enterprise, an institution, etc., which is not limited here.
[0061] It is understandable that the transaction to be signed can be a transaction to be signed. It is understandable that the transaction to be signed can include a contract call transaction or a resource transfer transaction. Among them, the resource transfer transaction can be a transaction for calling a business contract for processing. The resource transfer transaction can be a transaction for transferring resources on an account address (i.e., the account address corresponding to the private key information for signing the resource transfer transaction) to another account address (i.e., the destination account address). Among them, when the transaction to be signed is a contract call transaction, the transaction type of the contract call transaction is a contract call type. When the transaction to be signed is a resource transfer transaction, the transaction type of the resource transfer transaction is a resource transfer type. The contract call type refers to the transaction type for calling a business contract for processing. The resource transfer type refers to the transaction type for transferring resources on an account address to another account address (i.e., the destination account address). In other words, the transaction type of the transaction to be signed can be a contract call type or a resource transfer type. In other words, when the transaction type of the transaction to be signed is a contract call type, the transaction to be signed can be called a contract call transaction. When the transaction type of the transaction to be signed is a resource transfer type, the transaction to be signed can be called a resource transfer transaction.
[0062] It is understandable that the transaction parameters of the transaction to be signed may include the transaction destination address of the transaction and some additional parameters of the transaction. Among them, the transaction destination address of the transaction refers to the address of the transaction recipient. When the transaction type of the transaction to be signed is a contract call type, the transaction destination address of the transaction may be the contract address of the smart contract to be called, and some additional parameters of the transaction may include the data required to pass when calling the smart contract, such as the specific call processing method required when calling the smart contract, other parameters required to be passed in when calling the smart contract, etc., which are not limited here. When the transaction type of the transaction to be signed is a resource transfer type, the transaction destination address of the transaction may be the destination account address to which the resources are to be transferred, and the additional parameters of the transaction may include information such as the quantity of resources to be transferred (i.e., the quantity of resources to be transferred).
[0063] It is understood that the key parameter refers to the parameter in the transaction parameters used to identify the risk of the transaction to be signed. It is understood that when the transaction type of the transaction to be signed is a contract call type, the key parameter can be the transaction destination address, that is, the contract address of the contract to be called, so that the risk of the transaction to be signed can be identified by identifying the contract to be called. When the transaction type of the transaction to be signed is a resource transfer type, the key parameter can be the transaction destination address, that is, the destination account address to which the resources are to be transferred. The key parameter can also be the number of resources to be transferred in the additional parameters of the transaction (that is, the number of resources to be transferred), etc., which are not limited here.
[0064] S102. When risk parameters are identified in key parameters, the transaction auxiliary resources associated with the transaction to be signed are obtained through the blockchain node, and the first account address of the business object is obtained; the first account address is used to store the business data resources of the business object on the blockchain; the resource quota of the business data resources is greater than or equal to the resource quota of the transaction auxiliary resources.
[0065] Among them, the risk parameter refers to the parameter that may bring risks to the account address corresponding to the business object when executing the transaction to be signed. Specifically, the risk parameter in the key parameter can be identified, and the corresponding risk identification strategy can be determined based on the transaction type of the transaction to be signed, and then the risk identification result can be determined based on the risk identification strategy. The risk identification result is used to indicate that there is a risk parameter in the key parameter, or that there is no risk parameter in the key parameter. It can be understood that when the risk parameter is identified in the key parameter, it means that the transaction to be signed is a risky transaction. The risky transaction can refer to a transaction that may cause losses to the resources in the account address of the business object when executing the transaction.
[0066] Among them, the risk identification strategy determined for the transaction to be signed of the contract call type can be used to indicate whether the contract to be called is a risky contract in the key parameters. The risk identification strategy determined for the transaction to be signed of the resource transfer type can be used to indicate whether the risk identification result is determined by the number of interactions between the destination account address in the key parameters and the business object, or by the number of resources to be transferred in the key parameters.
[0067] Specifically, when the transaction to be signed includes a contract call transaction, the transaction type of the contract call transaction is a contract call type; the key parameters of the contract call transaction include the contract address of the target business contract to be called; then, identifying that there are risk parameters in the key parameters can include the following steps: obtaining the contract address of the target business contract from the key parameters in the contract call transaction; when the target business contract is found to be a risky contract based on the contract address of the target business contract, determining that there are risk parameters in the key parameters.
[0068] The target business contract refers to the business contract to be called by the exchange to be signed. The target business contract address can be a contract call address for calling the target business contract. It can be understood that when the target business contract is found to be a risky contract based on the contract address of the target business contract, the risk parameter in the key parameters can be the contract address of the target business contract.
[0069] It is understandable that a risky contract refers to a contract that may cause loss to the resources on the account address of the business object. Generally speaking, to determine whether the target business contract is a risky contract, you can query the contract code of the target business contract from the blockchain node through the contract address of the target business contract to see whether it is open source, or query the contract code of the target business contract from a third-party platform to see whether it is open source. There is no limitation here. If it is found that the contract code of the target business contract is open source, it is determined that the target business contract is not a risky contract. On the contrary, if it is found that the contract code of the target business contract is not open source, it is determined that the target business contract is a risky contract.
[0070] Optionally, determining whether the target business contract is a risky contract may also include: obtaining a contract blacklist or a contract whitelist associated with the business object. The contract blacklist refers to a list of risky smart contracts marked by the business object (or some third-party platforms), which may include at least one contract address of a risky smart contract. Then, if the contract address of the target business contract is found in the contract blacklist, it means that the target business contract is a risky contract. On the contrary, if the contract address of the target business contract is not found in the contract blacklist, it means that the target business contract is not a risky contract. The contract whitelist refers to a list of trustworthy smart contracts (i.e., smart contracts that do not have risks) marked by the business object (or some third-party platforms), which may include at least one contract address of a trustworthy business contract. Then, if the contract address of the target business contract is found in the contract whitelist, it means that the target business contract is not a risky contract (i.e., the target business contract is trustworthy). On the contrary, if the contract address of the target business contract is not found in the contract whitelist, it means that the target business contract is a risky contract.
[0071] It is understandable that when it is found out that the target business contract is not a risky contract based on the contract address of the target business contract, it is determined that there is no risk parameter in the key parameters.
[0072] Among them, when the transaction to be signed includes a resource transfer transaction, the transaction type of the resource transfer transaction is a resource transfer type; the key parameters of the resource transfer transaction include the resource quantity of the resources to be transferred; then, identifying that there are risk parameters in the key parameters can include the following steps: obtaining the resource quantity of the resources to be transferred from the resource transfer transaction; when the resource quantity of the resources to be transferred is greater than or equal to the resource quantity threshold, determining that there are risk parameters in the key parameters.
[0073] Among them, the resources to be transferred included in the resource transfer transaction refer to the resources to be transferred to the destination account address indicated by the resource transfer transaction. It is understandable that the resource quantity threshold can be used to indicate the minimum value that the resource quantity of the resources to be transferred must meet when determining that there is a risk parameter in the key parameter. For example, the resource transfer transaction TX2 is used to indicate that 100 resources A are transferred to the destination account address. The resource to be transferred is resource A, and the resource quantity of the resources to be transferred is 100. If the resource quantity threshold is 90, then since 100 is greater than 90, it means that there is a risk parameter in the key parameters of the resource transfer transaction TX2. It is understandable that when the target business contract is found to be a risky contract based on the contract address of the target business contract, the risk parameter in the key parameter can be the resource quantity of the resources to be transferred.
[0074] It can be understood that when the resource quantity of the resources to be transferred is less than the resource quantity threshold, it can be determined that there is no risk parameter in the key parameters.
[0075] It is understandable that in some scenarios, when the number of resources required to be transferred by the business object is too high, it means that the transaction may have a high risk. Therefore, it is necessary to conduct transactions through the second account address as a transit, that is, all the resources required to execute the signed transaction corresponding to the transaction to be signed (such as transaction demand resources) are transferred to the second account address. Transactions based on the second account address help improve the security of transactions, thereby improving the security of resources on the account address on the chain.
[0076] Specifically, when the transaction to be signed includes a resource transfer transaction, the transaction type of the resource transfer transaction is a resource transfer type; the key parameters of the resource transfer transaction include a destination account address to which the business resources are to be transferred; then, identifying that there are risk parameters in the key parameters may include the following steps: obtaining the number of account interactions between the business object and the destination account address; when the number of account interactions is less than the interaction number threshold, determining that there are risk parameters in the key parameters.
[0077] It is understood that the destination account address is the account address to which the resource is transferred as indicated by the resource transfer transaction. The destination account address may be an account address different from the first account address and the second account address. It is understood that when the target business contract is found to be a risky contract based on the contract address of the target business contract, the risk parameter in the key parameters may be the destination account address.
[0078] The number of account interactions may be the number of times the business object interacts with the destination account address. The number of account interactions here may only include the number of transactions from the business object's account address to the destination account address. The number of account interactions may also include the sum of the number of transactions from the business object's account address to the destination account address and the number of transactions from the destination account address to the business object's account address, which is not limited here.
[0079] The interaction count threshold can be used to indicate the minimum value that the account interaction count of the resource to be transferred must meet when determining that there are risk parameters in the key parameters. For example, the resource transfer transaction TX2 initiated by the business object is used to indicate that resource A is transferred to the destination account address D1, and the account interaction count between the business object and the destination account address D1 is 2. If the interaction count threshold is 1, then since the interaction count threshold is greater than or equal to 1, it indicates that there are risk parameters in the key parameters of the resource transfer transaction TX2.
[0080] It can be understood that when the number of account interactions is greater than or equal to the interaction number threshold, it can be determined that there are no risk parameters in the key parameters.
[0081] It is understandable that in some scenarios, some account addresses may be the account addresses of some illegal objects, and the resources transferred to the account address may be identified as illegal resources. The account address of the business object may also be identified as an illegal account address, and subsequent transactions of the business object based on the account address identified as an illegal account address may be blocked. For example, some resource conversion platforms no longer provide resource conversion services for the business object's account self-production. When a business object interacts with a certain account address less frequently (or has never interacted with a certain account address), it means that the account address is unfamiliar to the business object, and the business object cannot determine whether it is trustworthy. Once the destination account address of the transaction initiated by the business object is the account address of the illegal object mentioned above, the account address of the business object may also be identified as an illegal account address. In other words, the transaction initiated to transfer resources with the unfamiliar account address may be at a higher risk. Therefore, in order to avoid damage to the first account address of the business object used to store business data resources, the second account address can be used as a transit to conduct transactions subsequently, that is, all resources required to execute the transaction are transferred to the second account address. Transactions based on the second account address help improve the security of transactions, thereby improving the security of resources on the account address on the chain.
[0082] It is understood that transaction auxiliary resources refer to resources required to execute transactions to be signed. It is understood that the transaction auxiliary resources can be obtained through blockchain nodes, and specifically, a query request can be sent to the blockchain node, and then the blockchain node determines the transaction auxiliary resources corresponding to the transaction to be signed based on the query request, and returns the transaction auxiliary resources to the resource management client.
[0083] It is understandable that transaction auxiliary resources may include transaction consumption resources. Specifically, the transaction consumption resources associated with the transaction to be signed are queried from the blockchain node, and the transaction auxiliary resources are determined based on the transaction consumption resources. Among them, the transaction consumption resources may be the resources required to be consumed when executing the signed transaction corresponding to the transaction to be signed. It is understandable that the transaction consumption resources may include transaction fee resources used to package transactions when executing transactions. If the transaction to be signed involves a call to a contract (the transaction to be signed involving the call to the contract may be a resource transfer transaction or a contract call transaction), the transaction consumption resources may include transaction fee resources and contract consumption resources that the called contract needs to collect. Contract consumption resources may be the fees that the manager of the contract needs to collect when calling the contract.
[0084] Optionally, if the transaction to be signed is a contract call transaction, and the contract called by the contract call transaction is associated with a contract threshold resource, the transaction auxiliary resource may also include the contract threshold resource of the contract to be called.
[0085] It is understandable that the first account address of the business object refers to the account address used to store the business data resources of the business object on the blockchain. Business data resources may also be referred to as business resources, resources, and the like. The business data resources may be digital resources used for transactions in financial scenarios, or virtual resources in game scenarios, which are not limited here. It is understandable that in order for the signed transaction corresponding to the exchange to be signed to be executed normally on the blockchain node, the resource amount of the business data resources on the first account address must be greater than or equal to the resource amount of the transaction auxiliary resources. It is understandable that if the resource amount of the business data resources is less than the resource amount of the transaction auxiliary resources, the business data resources owned by the business object represented are insufficient to support the execution of the transaction to be signed, and a prompt message may be output to prompt the business object that the business data resources on the current first account address are insufficient.
[0086] S103, obtaining a second account address of the business object, and when the number of address transactions of the second account address is less than the transaction number threshold, generating a first business transaction associated with the transaction to be signed based on the transaction auxiliary resources, the first account address, and the second account address, and sending the first business transaction to the blockchain node so that the blockchain node links the first business transaction to the blockchain; the first business transaction is used to instruct the blockchain node to transfer the transaction auxiliary resources from the first account address to the second account address;
[0087] It is understandable that the second account address of the business object can be an account address with a limited number of transactions for the business object, and the address transaction number of the second account address is less than the transaction number threshold. In other words, the second account address can be an account address with a limited number of transactions for the business object. The second account address can be used to sign the transaction to be signed later. It is understandable that the address transaction number refers to the number of transactions based on the account address, that is, the number of transaction signatures based on the private key information corresponding to the account address. The transaction number threshold can be the maximum number of transactions that can be performed through the second account address. If the address transaction number of the second account address reaches the transaction number threshold, the second account address can be abandoned. It is understandable that the transaction number threshold can be 1 or greater than 1. When the transaction number threshold is 1, it means that the second account address is only used for one transaction, that is, the second account address is a one-time address. It is understandable that if the transaction number threshold is 1, each time it is determined that an account address other than the first account address needs to be transferred to conduct a business transaction, a new account address can be created to conduct the transaction. It is understandable that, since the second account address will be abandoned when the number of address transactions of the second account address reaches the transaction number threshold, the number of address transactions of the second account address that can be obtained may be less than the transaction number threshold.
[0088] For example, if the preset transaction number threshold is 1, then when the transaction to be signed Y1 is obtained and there are risk parameters in the transaction to be signed Y1, account address D3 is created and account address D3 is determined as the second account address of the business object, and transactions are conducted based on account address D3 as a transit, and then the transaction number of account address D3 is updated, and the updated address transaction number is 1, that is, the address transaction number of account address D3 reaches the transaction number threshold, and account address D3 is abandoned. Afterwards, when the transaction to be signed Y2 is obtained and there are risk parameters in the transaction to be signed Y2, account address D4 is created and account address D4 is determined as the new second account address of the business object, and transactions are conducted based on the new account address D4 as a transit, and then the transaction number of account address D4 is updated, and the updated address transaction number is 1, that is, the transaction number threshold is reached, and account address D4 is abandoned. By analogy, each time a transaction to be signed with risk parameters is initiated, a new one-time address can be dynamically created as a transit to conduct transactions, which can improve the security of resources on the first account address of the business object.
[0089] For another example, if the preset transaction number threshold is 2, then when the transaction to be signed Y1 is obtained and there are risk parameters in the transaction to be signed Y1, account address D3 is created, and account address D3 is determined as the second account address of the business object, and transactions are performed based on account address D3 as a transit, and then the transaction number of account address D3 is updated, and the updated address transaction number is 1, which has not reached the transaction number threshold, and account address D3 is not abandoned. Afterwards, when the transaction to be signed Y2 is obtained and there are risk parameters in the transaction to be signed Y2, account address D3 is obtained, account address D3 is determined as the second account address of the business object, and transactions are performed based on account address D3 as a transit, and then the transaction number of account address D3 is updated, and the updated address transaction number is 2. At this time, the transaction number of account address D3 reaches the transaction number threshold, and account address D3 is abandoned. Afterwards, when the transaction to be signed Y2 is obtained and there are risk parameters in the transaction to be signed Y2, the account address D4 is created, and the account address D4 is determined as the new second account address of the business object, and the transaction is conducted based on the account address D4 as a transit, and then the transaction number of the account address D4 will be updated. Similarly, transactions can be conducted through the account address that is specifically used for resource transit for risky transactions, which helps to improve the security of the resources on the first account address of the business object.
[0090] It is understood that the first business transaction may refer to a transaction for transferring transaction auxiliary resources from a first account address to a second account address. It is understood that the first business transaction is signed based on the private key information corresponding to the first account address. It should be understood that the transaction initiation address in the first business transaction may be the first account address, and the transaction destination address in the first business transaction may be the second account address. It is understood that the transaction initiation address refers to the account address of the initiator of the transaction, and the transaction destination address refers to the account address of the recipient of the transaction.
[0091] Specifically, when the transaction to be signed includes a contract call transaction, the transaction type of the contract call transaction is the contract call type; the private key information corresponding to the first account address is the first private key information; then, based on the transaction auxiliary resources, the first account address and the second account address, generating the first business transaction associated with the transaction to be signed may include the following steps: constructing the first business transaction to be signed based on the transaction auxiliary resources and the second account address; signing the first business transaction to be signed by using the first private key information to obtain the transaction signature information of the first business transaction to be signed; constructing the first business transaction associated with the contract call transaction based on the first account address, the transaction signature information of the first business transaction to be signed and the first business transaction to be signed.
[0092] It is understood that the first private key information refers to the private key information corresponding to the first account address. The first business transaction to be signed refers to the transaction to be signed constructed based on the transaction auxiliary resources and the second account address. It is understood that the first business transaction to be signed is an unsigned transaction used to indicate the transfer of resources required for the transaction to be signed (such as transaction auxiliary resources) to the second account address.
[0093] It can be understood that the first business transaction to be signed is signed by the first private key information to obtain the transaction signature information of the first business transaction to be signed, which can include: performing hash calculation on the first business transaction to be signed by a hash algorithm to obtain the reference document summary corresponding to the first business transaction to be signed, encrypting the reference document summary by the first private key information to obtain the transaction signature information of the first business transaction to be signed. Further, it can be understood that the transaction format of the first business transaction to be signed is determined according to the transaction format of the transaction on the blockchain, but the first business transaction to be signed does not include the transaction destination address and the transaction signature information. After obtaining the first business transaction to be signed, the first account address can be used as the transaction source address associated with the first business transaction to be signed, so that the transaction source address and the transaction signature information of the first business transaction to be signed are written into the first business transaction to be signed, thereby forming a complete first business transaction associated with the contract call transaction, and then, the first business transaction can be sent to the blockchain node.
[0094] It is understandable that the first business transaction associated with the contract call transaction can be used to indicate the first business transaction that transfers the transaction auxiliary resources associated with the contract call transaction to the second account address. It is possible that the first business transaction associated with the contract call transaction can only transfer the transaction auxiliary resources to the second account address.
[0095] Specifically, when the transaction to be signed includes a resource transfer transaction, the transaction type of the resource transfer transaction is a resource transfer type; the key parameters of the resource transfer transaction include the resources to be transferred; then, based on the transaction auxiliary resources, the first account address, and the second account address, a first business transaction associated with the transaction to be signed is generated, including: determining the resources to be transferred from the resource transfer transaction; generating the first business transaction associated with the resource transfer transaction based on the transaction auxiliary resources, the resources to be transferred, the first account address, and the second account address; the first business transaction associated with the resource transfer transaction is used to instruct the blockchain node to transfer the resources to be transferred from the first account address to the second account address when transferring the transaction auxiliary resources from the first account address to the second account address.
[0096] Among them, it can be understood that if the transaction to be signed is a resource transfer transaction, then the resources to be transferred (i.e., the resources to be transferred) indicated by the resource transfer transaction need to be transferred from the first account address to the second account address to ensure that the second account address can have all the resources required to execute the transaction, so that the transaction can be carried out based on the second account address.
[0097] It is understandable that the resource to be transferred refers to the resource that the resource transfer transaction requests to transfer. The first business transaction associated with the resource transfer transaction can be used to indicate the first business transaction that transfers the transaction auxiliary resources associated with the resource transfer transaction and the resource to be transferred to the second account address. It is possible that the first business transaction associated with the contract call transaction needs to transfer the resource to be transferred to the second account address while transferring the transaction auxiliary resources to the second account address.
[0098] Specifically, the private key information corresponding to the first account address is the first private key information; then, generating a first business transaction associated with the resource transfer transaction based on the transaction auxiliary resources, the resources to be transferred, the first account address, and the second account address may include the following steps: constructing a second business transaction to be signed based on the transaction auxiliary resources, the resources to be transferred, and the second account address; signing the second business transaction to be signed by using the first private key information to obtain transaction signature information of the second business transaction to be signed, and constructing the first business transaction associated with the resource transfer transaction based on the first account address, the transaction signature information of the second business transaction to be signed, and the second business transaction to be signed.
[0099] The second business transaction to be signed is an unsigned transaction for indicating the transfer of transaction auxiliary resources and resources to be transferred to the second account address. It can be understood that the transaction format of the second business transaction to be signed is the transaction format of transactions on the blockchain.
[0100] It is understandable that the process of signing the transaction of the second business transaction to be signed by the first private key information to obtain the transaction signature information of the second business transaction to be signed can refer to the above-mentioned description of signing the transaction of the first business transaction to be signed by the first private key information to obtain the transaction signature information of the first business transaction to be signed. It is understandable that the process of constructing the first business transaction associated with the resource transfer transaction based on the first account address, the transaction signature information of the second business transaction to be signed and the second business transaction to be signed can refer to the above-mentioned description of constructing the first business transaction associated with the contract call transaction based on the first account address, the transaction signature information of the first business transaction to be signed and the first business transaction to be signed, which will not be repeated here.
[0101] It is understandable that after obtaining the first business transaction, the blockchain node can verify the first business transaction to be signed through the public key information corresponding to the first account address, and when the verification of the first business transaction to be signed is successful, the blockchain node will chain the first business transaction to the blockchain. It is understandable that the process of the blockchain node chaining the first business transaction to the blockchain may include: putting the first business transaction into the transaction pool, and when the transaction packaging conditions are met, packaging the transactions in the transaction pool to obtain a block including the first business transaction, and then executing the transactions in the packaged block, and writing the block to the blockchain.
[0102] It can be understood that the transaction verification of the first business transaction to be signed through the public key information corresponding to the first account address may include: the blockchain node decrypts the transaction signature information in the first business transaction through the public key information corresponding to the first account address to obtain the decrypted reference document summary. The transaction signature information in the first business transaction is hashed by a hash algorithm to obtain the summary of the document to be compared corresponding to the first business transaction; the summary of the document to be compared is compared with the summary of the reference document to obtain a comparison result. When the comparison result indicates that the summary of the document to be compared is consistent with the summary of the reference document, it indicates that the verification of the first business transaction is successful; when the comparison result indicates that the summary of the document to be compared is inconsistent with the summary of the reference document, it indicates that the verification of the first business transaction has failed. Among them, the summary of the document to be compared here refers to the information obtained by hashing the first business transaction in the process of verifying the signature information.
[0103] S104. When there are transaction auxiliary resources on the second account address, the transaction to be signed is signed by using the private key information corresponding to the second account address to obtain the first transaction signature information of the transaction to be signed, and a first signed transaction is constructed based on the second account address, the first transaction signature information and the transaction to be signed, and the first signed transaction is sent to the blockchain node, so that the blockchain node links the first signed transaction to the blockchain.
[0104] It is understood that the first transaction signature information refers to the signature information obtained by signing the transaction to be signed using the private key information of the second account address. It is understood that the process of determining the first transaction signature information can refer to the above-mentioned description of determining the transaction signature information of the first business transaction to be signed, which will not be repeated here.
[0105] It can be understood that the first signed transaction refers to a transaction obtained by signing the transaction to be signed using the private key information corresponding to the second account address. Based on the second account address, the first transaction signature information and the transaction to be signed, the first signed transaction can be constructed by using the second account address as the transaction source address associated with the transaction to be signed, thereby writing the transaction source address and the first transaction signature information into the transaction to be signed to obtain the first signed transaction.
[0106] It is understandable that after obtaining the first signed transaction, the blockchain node can chain the first signed transaction to the blockchain. It is understandable that the description of chaining the first signed transaction to the blockchain can refer to the description of chaining the first business transaction to the blockchain, which is not repeated here.
[0107] See also Figure 4 , Figure 4 1 is a flowchart of a data processing method based on blockchain provided in an embodiment of the present application. The method can be executed by a resource management client, for example, a resource management client deployed in the terminal device 110a. The method can at least include the following steps S201-S208.
[0108] S201. Obtain a transaction to be signed initiated by a business object; transaction parameters of the transaction to be signed include key parameters to be identified.
[0109] S202. When risk parameters are identified in key parameters, the transaction auxiliary resources associated with the transaction to be signed are obtained through the blockchain node, and the first account address of the business object is obtained; the first account address is used to store the business data resources of the business object on the blockchain; the resource quota of the business data resources is greater than or equal to the resource quota of the transaction auxiliary resources.
[0110] Specifically, when the transaction to be signed includes a contract call transaction, the transaction type of the contract call transaction is a contract call type; the key parameters of the contract call transaction include the contract address of the target business contract to be called; then, obtaining the transaction auxiliary resources associated with the transaction to be signed through the blockchain node may include the following steps: based on the contract address of the target business contract, querying the first contract consumption resource associated with the target business contract from the blockchain node; querying the first transaction fee resource associated with the contract call transaction through the blockchain node; based on the contract address of the target business contract, determining the contract threshold resource associated with the target business contract from the blockchain node; when it is queried that the target business contract has a contract threshold resource, determining the transaction auxiliary resource based on the first transaction fee resource, the first contract consumption resource and the contract threshold resource.
[0111] The target business contract may be the contract called by the contract call exchange instruction. It is understandable that the contract address of the target business contract may be carried in the contract call transaction, for example, the contract address of the target business contract may be the transaction destination address in the contract call transaction.
[0112] It is possible that the first contract consumption resources may refer to the resources consumed when calling the target business contract. It is understandable that querying the first contract consumption resources from the blockchain node may be to send a query request to the blockchain node, and then the blockchain node may query the first contract consumption resources of the target business contract, thereby returning the first contract consumption resources to the resource management client. It is understandable that some business contracts require fees, so the first contract consumption resources may be 0.
[0113] It is understandable that the first transaction fee resource may refer to the transaction fee resource required for the blockchain node to execute the signed transaction corresponding to the contract call exchange. As mentioned above, the transaction fee resource may include the transaction fee resource used to package the transaction when executing the transaction. It is understandable that querying the first transaction fee resource may also be sending a query request to the blockchain node, and the query request may carry the transaction to be signed. Then, when the blockchain node obtains the query request, it can determine the transaction fee resource of the transaction to be signed based on the transaction to be signed carried in the query request through the fee query method deployed on the blockchain, that is, it can determine the first transaction fee resource associated with the contract call exchange. It is understandable that the first transaction fee resource and the first contract consumption resource can be collectively referred to as the transaction consumption resource of the contract call transaction.
[0114] It is understandable that the contract threshold resource can refer to the resource corresponding to the conditions that the resources in the account address need to meet when calling the target business contract, and can also be called the contract threshold resource. For example, in some scenarios, the target business contract is a business contract for a lottery business. If the business object wants to draw a lottery through the target business contract, the number of resource A in the account must reach 100, then the contract threshold resource of the target business contract can be 100 resources A.
[0115] It is understandable that some business contracts have contract threshold resources, while some business contracts do not have contract threshold resources. Therefore, when it is found that the target business contract has contract threshold resources, the transaction auxiliary resources are determined based on the first transaction fee resources, the first contract consumption resources and the contract threshold resources. In other words, the sum of the first transaction fee resources, the first contract consumption resources and the contract threshold resources is determined as the transaction auxiliary resources. When it is not found that the target business contract has contract threshold resources, the transaction auxiliary resources are determined based on the first transaction fee resources and the first contract consumption resources. In other words, the sum of the first transaction fee resources and the first contract consumption resources is determined as the transaction auxiliary resources.
[0116] Specifically, when the transaction to be signed includes a resource transfer transaction, the transaction type of the resource transfer transaction is a resource transfer type; then, obtaining the transaction auxiliary resources associated with the transaction to be signed through the blockchain node may include the following steps: when the transaction parameters of the resource conversion transaction include a contract call parameter for indicating the call of a resource transfer contract, querying the second contract consumption resources associated with the resource transfer contract through the blockchain node; querying the second transaction fee resources associated with the resource conversion transaction through the blockchain node; and determining the transaction auxiliary resources based on the second transaction fee resources and the second contract consumption resources.
[0117] It is understandable that a resource transfer contract can be a contract for resource transfer. It is understandable that when transferring resources on a blockchain, some resource transfer transactions can be implemented based on resource transfer contracts, while some resource transfer contracts require the collection of contract consumption resources. For example, when transferring resources across chains, a contract for cross-chain transfer (i.e., a resource transfer contract) is usually required to execute the transaction.
[0118] The second contract consumption resources may refer to the resources consumed when calling the resource transfer contract. It is understandable that the process of determining the second contract consumption resources can refer to the above-mentioned description of determining the first contract consumption resources, which will not be repeated here.
[0119] It is understood that the second transaction fee resource may refer to the transaction fee resource required for the blockchain node to execute the signed transaction corresponding to the resource transfer transaction. It is understood that the processing process of querying the second transaction fee resource can refer to the relevant description of querying the first transaction fee resource above, which will not be repeated here. It is understood that the second transaction fee resource and the second contract consumption resource can be collectively referred to as the transaction consumption resource of the resource transfer transaction.
[0120] It can be understood that the transaction auxiliary resource is determined based on the second transaction fee resource and the second contract consumption resource, and the transaction auxiliary resource can be determined based on the sum of the second transaction fee resource and the second contract consumption resource.
[0121] For example, see Figure 5 , Figure 5 Schematic diagram of the transfer result of a first business transaction provided by an embodiment of the present application. Figure 5 As shown, before the resources required for the transaction to be signed are transferred from the first account address to the second account address, the first account address may include account resources 500a, and the second account address has no resources. Account resources 500a may include resources 501a, resources 502a, and resources 503a. It can be understood that when the transaction to be signed is a contract call transaction, the resource 501a here can be a first transaction fee resource, the resource 502a can be a first contract consumption resource, and the resource 503a can be a contract threshold resource. When the transaction to be signed is a resource transfer transaction, the resource 501a here can be a second transaction fee resource, the resource 502a can be a second contract consumption resource, and the resource 503a can be a resource to be transferred in the resource transfer transaction.
[0122] Further, after the blockchain node executes the first business transaction associated with the contract call transaction, the first account address stores account resources 500b, and the second account address stores account resources 600a. Among them, account resources 500b can be the business data resources remaining after transferring out resources 501a, resources 502a, and resources 503a (i.e., the resources required for the transaction to be signed). It should be understood that when transferring the resources required for the transaction to be signed to the second account address, the corresponding transaction consumption resources also need to be spent, and then account resources 500b can be the account resources 500a, removing resources 501a, resources 502a, resources 503a, and the remaining resources after the transaction consumption resources required to transfer the resources required for the transaction to be signed to the second account address. In account resources 600a, resources 501a, resources 502a, and resources 503a transferred from the first account address can be included.
[0123] S203. Obtain the second account address of the business object. When the number of address transactions of the second account address is less than the transaction number threshold, generate a first business transaction associated with the transaction to be signed based on the transaction auxiliary resources, the first account address, and the second account address, and send the first business transaction to the blockchain node so that the blockchain node uploads the first business transaction to the blockchain; the first business transaction is used to instruct the blockchain node to transfer the transaction auxiliary resources from the first account address to the second account address.
[0124] S204. When there are transaction auxiliary resources on the second account address, the transaction to be signed is signed by using the private key information corresponding to the second account address to obtain first transaction signature information of the transaction to be signed, and a first signed transaction is constructed based on the second account address, the first transaction signature information and the transaction to be signed, and the first signed transaction is sent to the blockchain node, so that the blockchain node links the first signed transaction to the blockchain.
[0125] It is understandable that if it is identified that there are no risk parameters in the key parameters, the transaction can be directly conducted based on the first account address, that is, the transaction to be signed is signed by the private key information corresponding to the first account address, and the signed transaction is sent to the blockchain node.
[0126] Specifically, when it is identified that there is no risk parameter in the key parameters, the first account address of the business object is obtained; the transaction to be signed is signed by the private key information corresponding to the first account address, and the second transaction signature information of the transaction to be signed is obtained; based on the first account address, the second transaction signature information and the transaction to be signed, a second signed transaction is constructed, and the second signed transaction is sent to the blockchain node, so that the blockchain node uploads the second signed transaction to the blockchain.
[0127] It is understandable that the second transaction signature information may refer to the signature information obtained by signing the transaction to be signed based on the private key information corresponding to the first account address. It is understandable that the process of determining the second transaction signature information may refer to the above description of determining the first transaction signature information, which will not be repeated here.
[0128] The second signed transaction refers to a signed transaction obtained by signing the transaction to be signed based on the private key information corresponding to the first account address. It can be understood that the process of constructing the second signed transaction based on the first account address, the second transaction signature information and the transaction to be signed can refer to the above description of constructing the first signed transaction, which will not be repeated here.
[0129] It is understood that if the transaction to be signed is a contract call transaction, the second signed transaction can be used to instruct the blockchain node to call the target business contract for business processing. It should be understood that when the blockchain node uploads the second signed transaction to the blockchain node, it can deduct the corresponding transaction fee resources and contract consumption resources from the first account address. And if the target business contract is associated with a contract threshold resource, the blockchain node determines whether the second signed transaction reaches the contract call threshold based on the resources in the first account address.
[0130] If the transaction to be signed is a contract call transaction, the second signed transaction can be used to instruct the blockchain node to transfer the resources to be transferred from the first account address to the destination account address. It should be understood that when the blockchain node uploads the second signed transaction to the blockchain node, it can deduct the corresponding transaction fee resources and contract consumption resources from the first account address. In addition, when transferring resources based on the second signed transaction, the resources in the first account address are transferred to the destination account address.
[0131] For example, the transaction processing process of the embodiment of the present application is described here with reference to the diagram. Figure 6 , Figure 6 This is a flowchart of a process for processing a transaction to be signed provided by an embodiment of the present application. Figure 6 , the resource management client can obtain the transaction to be signed and determine the key parameters from the transaction to be signed (step S601). Then determine whether there are risk parameters in the key parameters (step S602). If there are risk parameters in the key parameters, the resources required for the transaction to be signed are transferred from the first account address to the second account address through the first business transaction (step S603), and the transaction to be signed is signed based on the private key information of the second account address to obtain the first signed transaction (step S604), and the first signed transaction is sent to the blockchain node so that the blockchain node links the first signed transaction to the blockchain (step S605).
[0132] If there is no risk parameter in the key parameters, the transaction to be signed is signed based on the private key information of the first account address to obtain a first signed transaction (step S606), and then the second signed transaction is sent to the blockchain node so that the blockchain node uploads the second signed transaction to the blockchain (step S607).
[0133] S205. When the blockchain node uploads the first signed transaction to the blockchain, the address transaction count of the second account address is updated based on the first signed transaction to obtain the address transaction update count of the second account address.
[0134] It is understandable that the address transaction number of the second account address is updated based on the first signed transaction, which may be the address transaction number of the second account address plus 1. The address transaction update number may be the address transaction number obtained after the address transaction number of the second account address is updated.
[0135] It is understandable that the blockchain node links the first signed transaction to the blockchain by sending a query request to the blockchain node, and when the query finds that the first signed transaction is confirmed, the blockchain node links the first signed transaction to the blockchain. It is understandable that querying that the first signed transaction is confirmed may include querying the first signed transaction in a block on the blockchain, and the block where the first signed transaction is located is on the longest chain.
[0136] S206. When the number of address transaction updates is equal to the transaction number threshold, query the remaining business resources in the second account address through the blockchain node.
[0137] It is understood that the remaining business resources refer to the resources remaining in the second account address after the blockchain node uploads the second signed transaction to the blockchain. It is understood that when the number of address transaction updates is equal to the transaction number threshold, the second account address can be abandoned later, but before the account address is abandoned, the resources in the second account address can be transferred back to the first account address.
[0138] It is understandable that in some scenarios, if the transaction to be signed is a resource transfer transaction, after the second signed transaction is linked to the blockchain, the remaining resources in the second account address can be the resources after deducting the transaction consumption resources and transferring out the resources to be transferred. It is understandable that in some scenarios, if the transaction to be signed is a contract call transaction, and the contract to be called is an airdrop contract, then after the second signed transaction is linked to the blockchain, the remaining resources in the second account address can be the resources obtained based on the airdrop contract after deducting the transaction consumption resources and transferring out the resources to be transferred. It is understandable that an airdrop contract refers to a contract that calls a contract to transfer business resources to the account address of a business object. For example, the airdrop contract can be a contract for a lottery business. After the business object wins the prize, the prize won by the business object can be transferred to the account address of the business object.
[0139] S207. When the remaining business resources are greater than the remaining resource threshold, a second business transaction is generated based on the remaining business resources in the second account address, the second account address and the first account address, and the second business transaction is sent to the blockchain node so that the blockchain node uploads the second business transaction to the blockchain; the second business transaction is used to instruct the blockchain node to transfer the remaining business resources from the second account address to the first account address.
[0140] It is understandable that the second business transaction may refer to a transaction in which resources in the second account address are transferred to the first account address. The remaining resource threshold refers to the minimum value that the remaining business resources need to meet when the remaining business resources in the second account address need to be transferred back to the first account address. The remaining resource threshold may be 0 or may not be 0. When the remaining business resources are greater than 0, it means that the remaining business resources in the second account address need to be transferred back to the first account address. When the remaining business resources are not 0, they can be directly abandoned. It should be understood that resource transfer transactions on the blockchain require transaction fees. Therefore, when the remaining business resources are less than the remaining resource threshold, the remaining business resources are insufficient to support the costs of transferring the transaction back to the first account address, so there is no need to transfer the remaining business resources back.
[0141] It can be understood that generating a second business transaction based on the remaining business resources in the second account address, the second account address and the first account address may include: constructing a third business transaction to be signed based on the remaining business resources in the second account address and the second account address. Signing the third business transaction to be signed based on the private key information corresponding to the third account address to obtain the transaction signature information of the third business transaction to be signed; constructing a second business transaction based on the second account address and the transaction signature information of the third business transaction to be signed and the third business transaction to be signed. Among them, the third transaction to be signed may be an unsigned transaction that transfers the remaining business resources to the first account address, that is, an unsigned transaction corresponding to the second business transaction. The process of determining the transaction signature information of the third business transaction to be signed may refer to the above-mentioned description of determining the transaction signature information of the first business transaction to be signed, and the process of constructing the second business transaction may refer to the above-mentioned description of constructing the first business transaction, which will not be elaborated here.
[0142] S208: When the remaining business resources are successfully transferred from the second account address to the first account address, the second account address is abandoned.
[0143] It is understandable that abandoning the second account address can be used to instruct the resource management client not to conduct transactions through the second account address in the future. It is understandable that after abandoning the second account address, the resource management client may no longer keep the private key information corresponding to the second account address.
[0144] It is understandable that the successful transfer of the remaining business resources from the second account address to the first account address can be obtained by sending a query request to the blockchain node. Specifically, when the query request finds that the second business transaction has been confirmed, it can be determined that the remaining business resources are successfully transferred from the second account address to the first account address. Alternatively, when the query request finds that the remaining business resources in the second account address are less than or equal to the remaining resource threshold, it can be determined that the remaining business resources are successfully transferred from the second account address to the first account address.
[0145] It is understandable that when the remaining business resources are less than or equal to the remaining resource threshold (for example, the remaining business resources are 0), the second account address can be directly abandoned.
[0146] It is understandable that when the number of address transactions of the second account address reaches the transaction number threshold, and the remaining business resources in the second account address are less than or equal to the remaining resource threshold (such as the remaining business resources are 0), the second account address is abandoned. When the number of address transactions of the second account address reaches the transaction number threshold, and the remaining business resources in the second account address are greater than the remaining resource threshold, the remaining business resources are first transferred back from the second account address to the first account address by initiating a second business transaction, and then the second account address is abandoned.
[0147] See also Figure 7 , Figure 7 This is a schematic diagram of resource transfer provided by an embodiment of the present application. Figure 7 As shown, the business object can initiate a transaction to be signed based on the decentralized application 701. The resource management client 702 can be used to manage the private key information corresponding to the first account address 721 and the private key information corresponding to the second account address 722. When the resource management client obtains the transaction to be signed and there are risk parameters in the transaction to be signed, the resources required for the transaction to be signed can be transferred from the first account address to the second account address (step S71). Then, the transaction to be signed can be signed based on the second account address, that is, the transaction can be conducted through the second account address. Moreover, after the transaction through the second account address is completed, if the number of address transactions of the second account address reaches the threshold, the remaining business resources in the second account address can be transferred to the first account address (step S72), and then the second account address can be abandoned, for example, the resource management client can no longer keep the private key information of the second account address.
[0148] See also Figure 8 , Figure 8 is a flowchart of a data processing method based on blockchain provided by an embodiment of the present application. The method can be executed by a blockchain node, for example, Figure 1The method may include at least the following steps S301-S302.
[0149] S301. When the first business transaction sent by the resource management client is obtained, the first business transaction is linked to the blockchain; the first business transaction is used to indicate the transfer of transaction auxiliary resources from the first account address of the business object to the second account address of the business object; the first business transaction is generated based on the transaction auxiliary resources, the first account address and the second account address when the number of address transactions of the second account address is less than or equal to the transaction number threshold; the transaction auxiliary resources are obtained by the resource management client through the blockchain node when the risk parameters are identified in the key parameters; the key parameters are the parameters to be identified included in the transaction parameters of the transaction to be signed initiated by the business object; the first account address is used to store the business data resources of the business object on the blockchain; the resource quota of the business data resources is greater than the resource quota of the transaction auxiliary resources.
[0150] It is understandable that the determination process of the first business transaction can refer to the above Figure 1 The relevant description in the embodiments is not repeated here.
[0151] It is understandable that when the first business transaction is obtained, the first business transaction can be verified based on the public key information corresponding to the first account address, and when the verification of the first business transaction is successful, the first business transaction is uploaded to the blockchain.
[0152] S302. When a first signed transaction sent by the resource management client is obtained, the first signed transaction is linked to the blockchain; the first signed transaction is constructed based on the second account address, the first transaction signature information of the transaction to be signed, and the transaction to be signed; the first transaction signature information is obtained by signing the transaction to be signed using the private key information corresponding to the second account address when there is a transaction auxiliary resource on the second account address.
[0153] It is understandable that the determination process of the first signed transaction can refer to the above Figure 1 The relevant description in the embodiments is not repeated here.
[0154] It is understandable that when the first signed transaction is obtained, the first signed transaction can be verified based on the public key information corresponding to the second account address, and when the verification of the first signed transaction is successful, the first signed transaction is uploaded to the blockchain. The verification process of the first signed transaction can refer to the above-mentioned relevant description, which will not be repeated here.
[0155] Specifically, the private key information corresponding to the second account address is the second private key information; then, uploading the first signed transaction to the blockchain may include the following steps: obtaining the public key information corresponding to the second private key information, performing transaction verification on the first signed transaction based on the public key information corresponding to the second private key information, and when the verification of the first signed transaction is successful, uploading the first signed transaction to the blockchain.
[0156] Among them, the second private key information refers to the private key information corresponding to the second account address. It is understandable that the second private key information may correspond to public key information, and the public key information and the second private key information constitute a key pair. It is understandable that the second private key information may correspond to public key information, and it can also be understood as the public key information corresponding to the second account address. It is understandable that the transaction verification process for the first signed transaction can refer to the above-mentioned related description, which will not be repeated here.
[0157] See also Fig. 9 , Fig. 9 1 is an interactive timing diagram of a blockchain-based data processing method provided in an embodiment of the present application. The method may involve a resource management client and a blockchain node. The method may include at least the following steps S401-S406.
[0158] S401. The resource management client obtains a transaction to be signed initiated by a business object; the transaction parameters of the transaction to be signed include key parameters to be identified.
[0159] S402. When the resource management client identifies the presence of risk parameters in the key parameters, it obtains the transaction auxiliary resources associated with the transaction to be signed through the blockchain node, and obtains the first account address of the business object; the first account address is used to store the business data resources of the business object on the blockchain; the resource quota of the business data resources is greater than or equal to the resource quota of the transaction auxiliary resources.
[0160] S403, the resource management client obtains the second account address of the business object, and when the number of address transactions of the second account address is less than the transaction number threshold, generates a first business transaction associated with the transaction to be signed based on the transaction auxiliary resources, the first account address and the second account address, and sends the first business transaction to the blockchain node; the first business transaction is used to instruct the blockchain node to transfer the transaction auxiliary resources from the first account address to the second account address.
[0161] Among them, steps S401-S403 can refer to the relevant description of steps S101-S103, and the steps are repeated here.
[0162] S404. When the blockchain node obtains the first business transaction sent by the resource management client, the blockchain node uploads the first business transaction to the blockchain.
[0163] Among them, step S404 can refer to the relevant description of step S301, and the steps are repeated here.
[0164] S405. When there are transaction auxiliary resources on the second account address, the resource management client signs the transaction to be signed by using the private key information corresponding to the second account address, obtains the first transaction signature information of the transaction to be signed, constructs a first signed transaction based on the second account address, the first transaction signature information and the transaction to be signed, and sends the first signed transaction to the blockchain node.
[0165] Among them, step S405 can refer to the relevant description of step S104, and the steps are repeated here.
[0166] S406. When the blockchain node obtains the first signed transaction sent by the resource management client, the blockchain node uploads the first signed transaction to the blockchain.
[0167] Among them, step S406 can refer to the relevant description of step S302, and the steps are repeated here.
[0168] See also Fig.10 , Fig.10 Schematic diagram of a data processing device based on blockchain provided in an embodiment of the present application. Fig.10 As shown, the blockchain-based data processing device 1 can be a computer program (including program code) running on the resource management client, for example, the blockchain-based data processing device 1 is an application software; it can be understood that the blockchain-based data processing device 1 can be used to execute the corresponding steps in the data processing method provided in the embodiment of the present application. Fig.10 As shown, the blockchain-based data processing device 1 may include: a transaction acquisition module 11 to be signed, a first risk processing module 12, a resource transfer module 13, and a transaction signing module 14;
[0169] The transaction acquisition module 11 is used to acquire the transaction to be signed initiated by the business object; the transaction parameters of the transaction to be signed include key parameters to be identified;
[0170] The first risk processing module 12 is used to obtain the transaction auxiliary resources associated with the transaction to be signed through the blockchain node and obtain the first account address of the business object when the risk parameters are identified in the key parameters; the first account address is used to store the business data resources of the business object on the blockchain; the resource quota of the business data resources is greater than or equal to the resource quota of the transaction auxiliary resources;
[0171] The resource transfer module 13 is used to obtain the second account address of the business object, and when the number of address transactions of the second account address is less than the transaction number threshold, generate a first business transaction associated with the transaction to be signed based on the transaction auxiliary resources, the first account address and the second account address, and send the first business transaction to the blockchain node so that the blockchain node links the first business transaction to the blockchain; the first business transaction is used to instruct the blockchain node to transfer the transaction auxiliary resources from the first account address to the second account address;
[0172] The transaction signature module 14 is used to sign the transaction to be signed by using the private key information corresponding to the second account address when there are transaction auxiliary resources on the second account address, obtain the first transaction signature information of the transaction to be signed, and construct a first signed transaction based on the second account address, the first transaction signature information and the transaction to be signed, and send the first signed transaction to the blockchain node so that the blockchain node can link the first signed transaction to the blockchain.
[0173] The blockchain-based data processing device 1 may further include:
[0174] The transaction number updating module 15 is used to update the address transaction number of the second account address based on the first signed transaction when the blockchain node uploads the first signed transaction to the blockchain, so as to obtain the address transaction update number of the second account address;
[0175] The remaining resource query module 16 is used to query the remaining business resources in the second account address through the blockchain node when the number of address transaction updates is equal to the transaction number threshold;
[0176] The resource transfer back module 17 is used to generate a second business transaction based on the remaining business resources in the second account address, the second account address and the first account address when the remaining business resources are greater than the remaining resource threshold, and send the second business transaction to the blockchain node so that the blockchain node links the second business transaction to the blockchain; the second business transaction is used to instruct the blockchain node to transfer the remaining business resources from the second account address to the first account address;
[0177] The address abandonment module 18 is used to abandon the second account address when the remaining business resources are successfully transferred from the second account address to the first account address.
[0178] Among them, when the transaction to be signed includes a contract call transaction, the transaction type of the contract call transaction is the contract call type; the key parameters of the contract call transaction include the contract address of the target business contract to be called;
[0179] The first risk processing module 12 includes: a contract address acquisition unit 121 and a risk contract query unit 122;
[0180] The contract address acquisition unit 121 is used to acquire the contract address of the target business contract from the key parameters in the contract call transaction;
[0181] The risk contract query unit 122 is used to determine whether there is a risk parameter in the key parameters when the target business contract is found to be a risk contract based on the contract address of the target business contract.
[0182] Wherein, when the transaction to be signed includes a contract call transaction, the transaction type of the contract call transaction is the contract call type; the private key information corresponding to the first account address is the first private key information;
[0183] The resource transfer module 13 includes: a first transaction to be signed constructing unit 131 and a first business transaction signing unit 132;
[0184] A first transaction to be signed constructing unit 131, configured to construct a first business transaction to be signed based on the transaction auxiliary resources and the second account address;
[0185] The first business transaction signing unit 132 is used to sign the first business transaction to be signed through the first private key information, obtain the transaction signature information of the first business transaction to be signed, and construct the first business transaction associated with the contract call transaction based on the first account address, the transaction signature information of the first business transaction to be signed and the first business transaction to be signed.
[0186] Among them, when the transaction to be signed includes a contract call transaction, the transaction type of the contract call transaction is the contract call type; the key parameters of the contract call transaction include the contract address of the target business contract to be called;
[0187] The first risk processing module 12 includes: a first auxiliary resource determination unit 123;
[0188] The first auxiliary resource determining unit 123 is configured to:
[0189] Based on the contract address of the target business contract, query the first contract consumption resource associated with the target business contract from the blockchain node;
[0190] Querying a first transaction fee resource associated with the contract call transaction through a blockchain node;
[0191] Based on the contract address of the target business contract, determine the contract threshold resource associated with the target business contract from the blockchain node;
[0192] When it is found that the target business contract has a contract threshold resource, the transaction auxiliary resource is determined based on the first transaction fee resource, the first contract consumption resource and the contract threshold resource.
[0193] Wherein, when the transaction to be signed includes a resource transfer transaction, the transaction type of the resource transfer transaction is a resource transfer type; the key parameters of the resource transfer transaction include the resource to be transferred;
[0194] The resource transfer module 13 includes: a resource determination unit 133 for transfer, and a business transaction determination unit 134;
[0195] The resource to be transferred determining unit 133 is used to determine the resource to be transferred from the resource transfer transaction;
[0196] The business transaction determination unit 134 is used to generate a first business transaction associated with the resource transfer transaction based on the transaction auxiliary resources, the resources to be transferred, the first account address and the second account address; the first business transaction associated with the resource transfer transaction is used to instruct the blockchain node to transfer the resources to be transferred from the first account address to the second account address when transferring the transaction auxiliary resources from the first account address to the second account address.
[0197] Among them, the private key information corresponding to the first account address is the first private key information;
[0198] The business transaction determination unit 134 includes: a second transaction to be signed constructing unit 1341 and a second business transaction signing unit 1342;
[0199] A second transaction to be signed constructing unit 1341, configured to construct a second business transaction to be signed based on the transaction auxiliary resources, the resources to be transferred, and the second account address;
[0200] The second business transaction signature unit 1342 is used to sign the second business transaction to be signed by using the first private key information to obtain the transaction signature information of the second business transaction to be signed, and construct the first business transaction associated with the resource transfer transaction based on the first account address, the transaction signature information of the second business transaction to be signed and the second business transaction to be signed.
[0201] Wherein, when the transaction to be signed includes a resource transfer transaction, the transaction type of the resource transfer transaction is a resource transfer type;
[0202] The first risk processing module 12 includes: a second auxiliary resource determination unit 124;
[0203] The second auxiliary resource determining unit 124 is configured to:
[0204] When the transaction parameters of the resource conversion transaction include a contract call parameter for indicating the call of the resource transfer contract, querying the second contract associated with the resource transfer contract through the blockchain node to consume resources;
[0205] querying, through the blockchain node, a second transaction fee resource associated with the resource conversion transaction;
[0206] The transaction auxiliary resource is determined based on the second transaction fee resource and the second contract consumption resource.
[0207] Wherein, when the transaction to be signed includes a resource transfer transaction, the transaction type of the resource transfer transaction is a resource transfer type; the key parameters of the resource transfer transaction include the resource quantity of the resource to be transferred;
[0208] The first risk processing module 12 includes: a resource quantity determination unit 125 for transfer, and a resource quantity determination unit 126;
[0209] The resource quantity determination unit 125 for transferring resources is used to obtain the resource quantity of the resources to be transferred from the resource transfer transaction;
[0210] Resource quantity judgment 126 is used to determine whether risk parameters exist in the key parameters when the resource quantity of the resources to be transferred is greater than or equal to the resource quantity threshold.
[0211] Wherein, when the transaction to be signed includes a resource transfer transaction, the transaction type of the resource transfer transaction is a resource transfer type; the key parameters of the resource transfer transaction include the destination account address to which the business resources are to be transferred;
[0212] The first risk processing module 12 includes: an interaction number determination unit 127 and an interaction number judgment unit 128;
[0213] An interaction number determination unit 127, used to obtain the account interaction number of the business object and the destination account address;
[0214] The interaction number determination unit 128 is used to determine that there is a risk parameter in the key parameters when the account interaction number is less than the interaction number threshold.
[0215] The transaction acquisition module 11 to be signed further includes: a second risk processing module 19;
[0216] The second risk processing module 19 is used to:
[0217] When it is identified that there is no risk parameter in the key parameters, the first account address of the business object is obtained;
[0218] The transaction to be signed is signed using the private key information corresponding to the first account address to obtain second transaction signature information of the transaction to be signed, and a second signed transaction is constructed based on the first account address, the second transaction signature information and the transaction to be signed, and the second signed transaction is sent to the blockchain node, so that the blockchain node uploads the second signed transaction to the blockchain.
[0219] See also Fig.11 , Fig.11 Schematic diagram of another data processing device based on blockchain provided in an embodiment of the present application. Fig.11 As shown, the blockchain-based data processing device 2 can be a computer program (including program code) running on a blockchain node. For example, the blockchain-based data processing device 2 is an application software. It can be understood that the blockchain-based data processing device 2 can be used to execute the corresponding steps in the data processing method provided in the embodiment of the present application. Fig.11 As shown, the blockchain-based data processing device 2 may include: a first business transaction acquisition module 21, a first signed transaction module 22;
[0220] The first business transaction acquisition module 21 is used to upload the first business transaction to the blockchain when the first business transaction sent by the resource management client is acquired; the first business transaction is used to indicate that the transaction auxiliary resource is transferred from the first account address of the business object to the second account address of the business object; the first business transaction is generated based on the transaction auxiliary resource, the first account address and the second account address when the number of address transactions of the second account address is less than the transaction number threshold; the transaction auxiliary resource is obtained from the blockchain node when the resource management client identifies that there are risk parameters in the key parameters; the key parameters are the parameters to be identified included in the transaction parameters of the transaction to be signed initiated by the business object; the first account address is used to store the business data resources of the business object on the blockchain; the resource quota of the business data resource is greater than or equal to the resource quota of the transaction auxiliary resource;
[0221] The first signed transaction module 22 is used to upload the first signed transaction to the blockchain when the first signed transaction sent by the resource management client is obtained; the first signed transaction is constructed based on the second account address, the first transaction signature information of the transaction to be signed and the transaction to be signed; the first transaction signature information is obtained by signing the transaction to be signed using the private key information corresponding to the second account address when there are transaction auxiliary resources on the second account address.
[0222] Among them, the private key information corresponding to the second account address is the second private key information;
[0223] The first signed transaction module 22 includes: a transaction signature verification unit 221;
[0224] The transaction verification unit 221 is used to obtain the public key information corresponding to the second private key information, and verify the first signed transaction based on the public key information corresponding to the second private key information. When the verification of the first signed transaction is successful, the first signed transaction is uploaded to the blockchain.
[0225] See also Fig.12 , Fig.12 Schematic diagram of the structure of a computer device provided in an embodiment of the present application. Fig.12 As shown, the computer device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the above-mentioned computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, the user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and the user interface 1003 may optionally include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or it may be a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 1005 may optionally also be at least one storage device located away from the aforementioned processor 1001. As Fig.12 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.
[0226] In such Fig.12 In the computer device 1000 shown, the network interface 1004 can provide a network communication function; 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 execute the description of the data processing method in any of the corresponding embodiments above, which will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated.
[0227] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores the computer program executed by the blockchain-based data processing device 1 and the blockchain-based data processing device 2 mentioned above, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the description of the data processing method in the previous embodiment, so it will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.
[0228] The computer-readable storage medium may be the data processing device provided in any of the aforementioned embodiments or the internal storage unit of the computer device, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the computer device. Further, the computer-readable storage medium may also include both the internal storage unit of the computer device and an external storage 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 may also be used to temporarily store data that has been output or is to be output.
[0229] In addition, it should be noted here that: the embodiment of the present application also provides a computer program product or a computer program, which includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided by any of the corresponding embodiments in the foregoing text. In addition, the description of the beneficial effects of adopting the same method will not be repeated. For technical details not disclosed in the computer program product or computer program embodiment involved in this application, please refer to the description of the method embodiment of this application.
[0230] The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, device, product, or equipment that includes a series of steps or units is not limited to the listed steps or modules, but optionally includes steps or modules that are not listed, or optionally includes other step units inherent to these processes, methods, devices, products, or equipment.
[0231] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0232] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A data processing method based on blockchain, characterized in that: The method is executed by a resource management client, and the method includes: Acquire a transaction to be signed initiated by a business object; the transaction parameters of the transaction to be signed include key parameters to be identified; When the risk parameter is identified in the key parameter, the transaction auxiliary resource associated with the transaction to be signed is obtained through the blockchain node, and the first account address of the business object is obtained; the first account address is used to store the business data resource of the business object on the blockchain; the resource amount of the business data resource is greater than or equal to the resource amount of the transaction auxiliary resource; Acquire the second account address of the business object, and when the number of address transactions of the second account address is less than the transaction number threshold, generate a first business transaction associated with the transaction to be signed based on the transaction auxiliary resources, the first account address and the second account address, and send the first business transaction to the blockchain node so that the blockchain node links the first business transaction to the blockchain; the first business transaction is used to instruct the blockchain node to transfer the transaction auxiliary resources from the first account address to the second account address; When the transaction auxiliary resource exists on the second account address, the transaction to be signed is signed by using the private key information corresponding to the second account address to obtain the first transaction signature information of the transaction to be signed, and a first signed transaction is constructed based on the second account address, the first transaction signature information and the transaction to be signed, and the first signed transaction is sent to the blockchain node, so that the blockchain node links the first signed transaction to the blockchain.
2. The method according to claim 1, characterized in that The method further comprises: When the blockchain node uploads the first signed transaction to the blockchain, the address transaction count of the second account address is updated based on the first signed transaction to obtain the address transaction update count of the second account address; When the number of transaction updates of the address is equal to the transaction number threshold, querying the remaining business resources in the second account address through the blockchain node; When the remaining business resources are greater than the remaining resource threshold, a second business transaction is generated based on the remaining business resources in the second account address, the second account address and the first account address, and the second business transaction is sent to the blockchain node so that the blockchain node links the second business transaction to the blockchain; the second business transaction is used to instruct the blockchain node to transfer the remaining business resources from the second account address to the first account address; When the remaining business resources are successfully transferred from the second account address to the first account address, the second account address is abandoned.
3. The method according to claim 1, characterized in that When the transaction to be signed includes a contract call transaction, the transaction type of the contract call transaction is a contract call type; The key parameters of the contract call transaction include the contract address of the target business contract to be called; The identifying that there are risk parameters in the key parameters includes: Obtain the contract address of the target business contract from the key parameters in the contract call transaction; When it is found that the target business contract is a risky contract based on the contract address of the target business contract, it is determined that there are risk parameters in the key parameters.
4. The method according to claim 1, characterized in that: When the transaction to be signed includes a contract call transaction, the transaction type of the contract call transaction is a contract call type; The private key information corresponding to the first account address is the first private key information; The generating, based on the transaction auxiliary resource, the first account address, and the second account address, a first business transaction associated with the transaction to be signed includes: Constructing a first business transaction to be signed based on the transaction auxiliary resource and the second account address; The first business transaction to be signed is signed by using the first private key information to obtain the transaction signature information of the first business transaction to be signed, and the first business transaction associated with the contract call transaction is constructed based on the first account address, the transaction signature information of the first business transaction to be signed and the first business transaction to be signed.
5. The method according to claim 1, characterized in that When the transaction to be signed includes a contract call transaction, the transaction type of the contract call transaction is a contract call type; the key parameters of the contract call transaction include the contract address of the target business contract to be called; The acquiring, through a blockchain node, a transaction auxiliary resource associated with the transaction to be signed includes: Based on the contract address of the target business contract, querying the first contract consumption resource associated with the target business contract from the blockchain node; Querying, through the blockchain node, a first transaction fee resource associated with the contract call transaction; Based on the contract address of the target business contract, determining the contract threshold resource associated with the target business contract from the blockchain node; When it is found that the target business contract has a contract threshold resource, the transaction auxiliary resource is determined based on the first transaction fee resource, the first contract consumption resource and the contract threshold resource.
6. The method according to claim 1, characterized in that When the transaction to be signed includes a resource transfer transaction, the transaction type of the resource transfer transaction is a resource transfer type; the key parameters of the resource transfer transaction include resources to be transferred; The generating, based on the transaction auxiliary resource, the first account address, and the second account address, a first business transaction associated with the transaction to be signed includes: Determining the resource to be transferred from the resource transfer transaction; A first business transaction associated with the resource transfer transaction is generated based on the transaction auxiliary resources, the resources to be transferred, the first account address and the second account address; the first business transaction associated with the resource transfer transaction is used to instruct the blockchain node to transfer the resources to be transferred from the first account address to the second account address when transferring the transaction auxiliary resources from the first account address to the second account address.
7. The method according to claim 6, characterized in that The private key information corresponding to the first account address is the first private key information; The generating a first business transaction associated with the resource transfer transaction based on the transaction auxiliary resource, the resource to be transferred, the first account address, and the second account address includes: Constructing a second business transaction to be signed based on the transaction auxiliary resource, the resource to be transferred and the second account address; The second business transaction to be signed is signed by using the first private key information to obtain the transaction signature information of the second business transaction to be signed, and based on the first account address, the transaction signature information of the second business transaction to be signed and the second business transaction to be signed, a first business transaction associated with the resource transfer transaction is constructed.
8. The method according to claim 1, characterized in that When the transaction to be signed includes a resource transfer transaction, the transaction type of the resource transfer transaction is a resource transfer type; The acquiring, through a blockchain node, a transaction auxiliary resource associated with the transaction to be signed includes: When the transaction parameters of the resource conversion transaction include a contract call parameter for indicating calling a resource transfer contract, querying a second contract consumption resource associated with the resource transfer contract through the blockchain node; querying, through the blockchain node, a second transaction fee resource associated with the resource conversion transaction; The transaction auxiliary resource is determined based on the second transaction fee resource and the second contract consumption resource.
9. The method according to claim 1, characterized in that: When the transaction to be signed includes a resource transfer transaction, the transaction type of the resource transfer transaction is a resource transfer type; the key parameters of the resource transfer transaction include the resource quantity of the resource to be transferred; The identifying that there are risk parameters in the key parameters includes: Obtaining the resource quantity of the resources to be transferred from the resource transfer transaction; When the resource quantity of the resources to be transferred is greater than or equal to the resource quantity threshold, it is determined that there is a risk parameter in the key parameters.
10. The method according to claim 1, characterized in that When the transaction to be signed includes a resource transfer transaction, the transaction type of the resource transfer transaction is a resource transfer type; the key parameters of the resource transfer transaction include a destination account address to which the business resources are to be transferred; The identifying that there are risk parameters in the key parameters includes: Obtaining the number of account interactions between the business object and the destination account address; When the number of account interactions is less than the interaction number threshold, it is determined that there is a risk parameter in the key parameters.
11. The method according to claim 1, characterized in that: The method further comprises: When it is identified that no risk parameter exists in the key parameters, acquiring the first account address of the business object; The transaction to be signed is signed by using the private key information corresponding to the first account address to obtain second transaction signature information of the transaction to be signed, and a second signed transaction is constructed based on the first account address, the second transaction signature information and the transaction to be signed, and the second signed transaction is sent to the blockchain node, so that the blockchain node links the second signed transaction to the blockchain.
12. A data processing method based on blockchain, characterized in that: The method is performed by a blockchain node, and the method includes: Upon obtaining a first business transaction sent by a resource management client, the first business transaction is linked to the blockchain; the first business transaction is used to indicate that a transaction auxiliary resource is transferred from a first account address of a business object to a second account address of the business object; the first business transaction is generated based on the transaction auxiliary resource, the first account address and the second account address when the number of address transactions of the second account address is less than a transaction number threshold; the transaction auxiliary resource is obtained from the blockchain node by the resource management client when risk parameters are identified in key parameters; the key parameters are parameters to be identified included in the transaction parameters of the transaction to be signed initiated by the business object; the first account address is used to store the business data resources of the business object on the blockchain; the resource amount of the business data resource is greater than or equal to the resource amount of the transaction auxiliary resource; When a first signed transaction sent by the resource management client is obtained, the first signed transaction is chained to the blockchain; the first signed transaction is constructed based on the second account address, the first transaction signature information of the transaction to be signed, and the transaction to be signed; the first transaction signature information is obtained by signing the transaction to be signed by using the private key information corresponding to the second account address when the transaction auxiliary resource exists on the second account address.
13. The method according to claim 12, characterized in that The private key information corresponding to the second account address is the second private key information; The uploading the first signed transaction to the blockchain includes: Obtain public key information corresponding to the second private key information, perform transaction verification on the first signed transaction based on the public key information corresponding to the second private key information, and when the verification of the first signed transaction is successful, link the first signed transaction to the blockchain.
14. A data processing device based on blockchain, characterized in that: The device is run by a resource management client, and the device includes: A transaction acquisition module to be signed, used to acquire a transaction to be signed initiated by a business object; the transaction parameters of the transaction to be signed include key parameters to be identified; A first risk processing module is used to obtain, through a blockchain node, a transaction auxiliary resource associated with the transaction to be signed, and obtain a first account address of the business object when a risk parameter is identified in the key parameter; the first account address is used to store the business data resource of the business object on the blockchain; the resource amount of the business data resource is greater than or equal to the resource amount of the transaction auxiliary resource; a resource transfer module, configured to obtain a second account address of the business object, and when the number of address transactions of the second account address is less than a transaction number threshold, generate a first business transaction associated with the transaction to be signed based on the transaction auxiliary resource, the first account address and the second account address, and send the first business transaction to the blockchain node so that the blockchain node links the first business transaction to the blockchain; the first business transaction is used to instruct the blockchain node to transfer the transaction auxiliary resource from the first account address to the second account address; A transaction signing module is used to, when the transaction auxiliary resource exists on the second account address, sign the transaction to be signed by using the private key information corresponding to the second account address, obtain the first transaction signature information of the transaction to be signed, construct a first signed transaction based on the second account address, the first transaction signature information and the transaction to be signed, and send the first signed transaction to the blockchain node so that the blockchain node links the first signed transaction to the blockchain.
15. A data processing device based on blockchain, characterized in that: The device is run by a blockchain node, and the device includes: The first business transaction acquisition module is used to link the first business transaction to the blockchain when the first business transaction sent by the resource management client is acquired; the first business transaction is used to indicate that the transaction auxiliary resource is transferred from the first account address of the business object to the second account address of the business object; the first business transaction is generated based on the transaction auxiliary resource, the first account address and the second account address when the number of address transactions of the second account address is less than the transaction number threshold; the transaction auxiliary resource is obtained from the blockchain node when the resource management client identifies that there is a risk parameter in the key parameter; the key parameter is a parameter to be identified included in the transaction parameter of the transaction to be signed initiated by the business object; the first account address is used to store the business data resource of the business object on the blockchain; the resource quota of the business data resource is greater than or equal to the resource quota of the transaction auxiliary resource; The first signed transaction module is used to upload the first signed transaction to the blockchain when a first signed transaction sent by the resource management client is obtained; the first signed transaction is constructed based on the second account address, the first transaction signature information of the transaction to be signed and the transaction to be signed; the first transaction signature information is obtained by signing the transaction to be signed by the private key information corresponding to the second account address when the transaction auxiliary resource exists on the second account address.
16. A computer device, characterized in that: including memory and processor; The memory is connected to the processor, the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method according to any one of claims 1 to 13.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 13.
18. A computer program product, characterized in that The method comprises a computer program / instruction, which implements the method according to any one of claims 1 to 13 when executed by a processor.
Citation Information
Cited By
Method for extracting and parsing bitcoin transaction autonomy information
US12626253B2
Method for extracting and parsing bitcoin transaction autonomy information
US20250037124A1