A data processing method, device and readable storage medium based on blockchain

By using asset smart contracts to calculate the voting weight based on the number of asset holdings and the height of blocks in the blockchain network, the problem of weakening of the voting results of terminal devices with high security is solved, and the security and fairness of the blockchain network are improved.

CN119788680APending Publication Date: 2025-04-08TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311297342.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-08
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In the existing blockchain network, the voting results of terminal devices with higher security are weakened by the voting results of terminal devices with lower security, resulting in a reduction in network security.

Method used

By introducing asset smart contracts, the voting weight of terminal devices is calculated. The weight is based on the number of asset holdings and the block height of digital assets, ensuring that the voting results of terminal devices with high security are appropriately paid attention to.

Benefits of technology

It improves the security of blockchain networks, prevents the voting results of terminal devices with higher security from being weakened, and promotes the fair distribution of voting weights.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788680A_ABST
    Figure CN119788680A_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a data processing method, device and readable storage medium based on blockchain, the method comprising: obtaining the terminal voting results of S terminal devices for voting content respectively; obtaining the asset holding quantity of digital assets corresponding to the S terminal devices respectively and the block height of the block where the digital assets associated with the S terminal devices are located; performing difference operation on the maximum block height and the block height of the block where the digital assets associated with the S terminal devices respectively correspond to are located, generating the asset holding height of the digital assets corresponding to the S terminal devices respectively; performing weight operation on the S asset holding height and the S asset holding quantity, generating the voting weight corresponding to the S terminal devices respectively; generating the combined voting result corresponding to the voting content according to the S voting weights and the S terminal voting results. The present application can improve the security of the blockchain network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a data processing method, device, and readable storage medium based on blockchain. Background Art

[0002] The existing voting method can determine that all terminal devices have the same voting weight, and then directly generate the combined voting results corresponding to the voting content based on the terminal voting results corresponding to each terminal device. However, if there are more terminal devices with low security (such terminal devices usually hold digital assets for a short period of time) and fewer terminal devices with high security (such terminal devices usually hold digital assets for a long period of time), the terminal voting results of the terminal devices with high security will be weakened by the terminal voting results of the terminal devices with low security, thereby reducing the security of the blockchain network. Summary of the invention

[0003] The embodiments of the present application provide a blockchain-based data processing method, device, and readable storage medium, which can improve the security of the blockchain network.

[0004] On the one hand, an embodiment of the present application provides a data processing method based on blockchain, including:

[0005] Obtain terminal voting results of S terminal devices for voting content respectively; S is a positive integer;

[0006] Obtain the asset holding quantity of the digital assets corresponding to the S terminal devices and the block height of the block associated with the digital assets corresponding to the S terminal devices from the asset list maintained by the asset smart contract;

[0007] Through the asset smart contract, the maximum block height corresponding to the blockchain and the block height of the exchange block associated with the digital assets corresponding to the S terminal devices are calculated to generate the asset holding height of the digital assets corresponding to the S terminal devices;

[0008] Perform weight calculation on the asset holding height of the digital assets corresponding to the S terminal devices and the asset holding quantity of the digital assets corresponding to the S terminal devices, and generate the voting weights corresponding to the S terminal devices;

[0009] According to the voting weights respectively corresponding to the S terminal devices and the terminal voting results respectively corresponding to the S terminal devices, a combined voting result corresponding to the voting content is generated.

[0010] On the one hand, an embodiment of the present application provides a data processing device based on blockchain, including:

[0011] The result acquisition module is used to obtain the terminal voting results of S terminal devices for the voting content respectively; S is a positive integer;

[0012] A data acquisition module, used to obtain the asset holding quantity of the digital assets corresponding to the S terminal devices and the block height of the block associated with the digital assets corresponding to the S terminal devices from the asset list maintained by the asset smart contract;

[0013] The weight calculation module is used to perform a difference calculation on the maximum block height corresponding to the blockchain and the block height of the exchange block associated with the digital assets corresponding to the S terminal devices through the asset smart contract, and generate the asset holding height of the digital assets corresponding to the S terminal devices respectively;

[0014] A weight calculation module, used to perform weight calculation on the asset holding height of the digital assets corresponding to the S terminal devices and the asset holding quantity of the digital assets corresponding to the S terminal devices, and generate the voting weights corresponding to the S terminal devices;

[0015] The result generation module is used to generate a combined voting result corresponding to the voting content according to the voting weights corresponding to the S terminal devices and the terminal voting results corresponding to the S terminal devices.

[0016] Among them, the S terminal devices include terminal device N i , i is a positive integer less than or equal to S; the number of digital assets held by the S terminal devices respectively includes the terminal device N i The number of assets held by the corresponding digital assets; the block height of the block associated with the digital assets corresponding to the S terminal devices includes the block height associated with the terminal device N i The block height of the exchange associated with the corresponding digital asset;

[0017] The weight calculation module includes:

[0018] The function calling unit is used to call the weight generation function in the asset smart contract through the function identifier in the business initiation request; the business initiation request refers to the request to initiate the voting content;

[0019] The weight calculation unit is used to calculate the maximum block height corresponding to the blockchain and the terminal device N through the weight generation function. i The corresponding digital asset-related exchange performs a difference operation at the block height of the block to generate the terminal device N i The asset holding height of the corresponding digital asset;

[0020] Weight calculation unit, used to calculate the weight of the terminal device N i The corresponding digital asset holding height and terminal device Ni The corresponding digital asset holding quantity is weighted to generate the terminal device N i The corresponding voting weight.

[0021] Among them, the terminal device N i Includes M types of digital assets; M is a non-negative integer; terminal device N i The corresponding digital asset holding quantity includes the asset holding quantity corresponding to each of the M types of digital assets; and the terminal device N i The block height of the exchange associated with the corresponding digital asset includes the block height of the exchange associated with the M-type digital asset;

[0022] The weight calculation unit is specifically used to perform a difference calculation on the maximum block height corresponding to the blockchain and the block heights corresponding to the M types of digital assets through a weight generation function to generate the asset holding heights corresponding to the M types of digital assets;

[0023] A weight calculation unit, specifically used to perform a multiplication operation on the asset holding quantity corresponding to each of the M types of digital assets and the asset holding height corresponding to each of the M types of digital assets through a weight generation function, to generate the first candidate voting weights corresponding to each of the M types of digital assets;

[0024] The weight calculation unit is specifically used to sum the first candidate voting weights corresponding to the M types of digital assets respectively through the weight generation function to generate the terminal device N i The corresponding voting weight.

[0025] Among them, Class M digital assets include digital assets P j , j is a positive integer less than or equal to M;

[0026] The weight calculation unit is specifically used to obtain the weight related to the digital asset P through the weight generation function. j The corresponding quantity weight associated with the number of assets held is the value of the digital asset P j The corresponding asset holding quantity and quantity weight are multiplied to generate the digital asset P j The corresponding weighted asset holdings;

[0027] The weight calculation unit is specifically used to obtain the weight related to the digital asset P through the weight generation function. j The corresponding assets hold a high degree of weight associated with the digital asset P j The corresponding asset holding height and height weight are multiplied to generate the digital asset P j The corresponding weighted asset holding height;

[0028] The weight calculation unit is specifically used to calculate the digital asset P through the weight generation function. jThe corresponding weighted asset holdings and digital assets P j The corresponding weighted asset holding height is multiplied to generate the digital asset P j The corresponding first candidate voting weight.

[0029] The result acquisition module is specifically used to receive a service initiation request sent by a target terminal device; the service initiation request includes the scope of participants, voting participation time and voting content;

[0030] A result acquisition module, specifically used to send the voting content to the terminal device corresponding to the participant in the participant range based on the service initiation request;

[0031] The result acquisition module is specifically used to receive the terminal voting results for the voting content sent by the terminal devices corresponding to the participating objects in the participating object range through the resource client, and obtain S terminal voting results whose terminal voting timestamps are within the voting participation time from the received terminal voting results; the terminal devices corresponding to the participating objects in the participating object range include the terminal devices corresponding to the S terminal voting results respectively.

[0032] The data acquisition module is specifically used to obtain the blockchain addresses corresponding to the S terminal devices and the asset list maintained by the asset smart contract; the asset list includes the mapping relationship between the blockchain address, the number of assets held and the block height;

[0033] The data acquisition module is specifically used to search the asset list according to the blockchain addresses corresponding to the S terminal devices, and obtain the asset holding quantity of the digital assets corresponding to the S terminal devices and the block height of the block where the transaction associated with the digital assets corresponding to the S terminal devices is located.

[0034] The S terminal devices include a first terminal device and a second terminal device;

[0035] The device also includes:

[0036] A transaction acquisition module, used to acquire an asset transfer transaction initiated by the first terminal device through the resource client; the asset transfer transaction is used to instruct the first terminal device to transfer a digital asset having an asset transfer amount to the second terminal device;

[0037] A first update module is used to process the asset transfer transaction on the chain. When the asset transfer transaction is successfully chained to the blockchain network, the asset holding quantity of the digital asset corresponding to the first terminal device and the block height of the block in which the transaction associated with the digital asset corresponding to the first terminal device is located are obtained from the asset list, and the asset holding quantity of the digital asset corresponding to the first terminal device and the block height of the block in which the transaction associated with the digital asset corresponding to the first terminal device is located are updated according to the asset transfer quantity;

[0038] The second update module is used to obtain the asset holding quantity of the digital asset corresponding to the second terminal device and the block height of the block in which the transaction associated with the digital asset corresponding to the second terminal device is located from the asset list, and update the asset holding quantity of the digital asset corresponding to the second terminal device and the block height of the block in which the transaction associated with the digital asset corresponding to the second terminal device is located according to the asset transfer quantity.

[0039] Wherein, the first terminal device includes M1 digital assets; M1 is a positive integer; the asset holding quantity of the digital assets corresponding to the first terminal device includes the asset holding quantity corresponding to the M1 digital assets respectively; the block height of the block in which the exchange associated with the digital assets corresponding to the first terminal device is located includes the block height corresponding to the M1 digital assets respectively;

[0040] The first update module is specifically used to obtain the asset holding quantity corresponding to the first block height from the asset holding quantity corresponding to the M1 digital assets. If the asset holding quantity corresponding to the first block height is greater than the asset transfer quantity, the asset holding quantity corresponding to the first block height and the asset transfer quantity are subtracted to obtain the asset holding quantity after the subtraction operation, and the asset holding quantity corresponding to the first block height is updated by the asset holding quantity after the subtraction operation; the first block height is the maximum block height among the block heights corresponding to the M1 digital assets;

[0041] The first update module is specifically used to delete the asset holding quantity corresponding to the first block height from the asset holding quantity corresponding to the M1 digital assets, and delete the first block height from the block heights corresponding to the M1 digital assets, if the asset holding quantity corresponding to the first block height is equal to the asset transfer quantity;

[0042] The first update module is specifically used to obtain the asset holding quantity corresponding to the second block height from the asset holding quantity corresponding to the M1 digital assets if the asset holding quantity corresponding to the first block height is less than the asset transfer quantity, and update the asset holding quantity corresponding to the first terminal device and the block height corresponding to the first terminal device based on the asset holding quantity corresponding to the first block height, the asset holding quantity corresponding to the second block height, and the asset transfer quantity; the second block height is the maximum block height among the block heights corresponding to the M1 digital assets except the first block height.

[0043] Wherein, the second terminal device includes M2 digital assets; M2 is a non-negative integer; the asset holding quantity of the digital assets corresponding to the second terminal device includes the asset holding quantity corresponding to the M2 digital assets respectively; the block height of the block in which the transaction associated with the digital assets corresponding to the second terminal device is located includes the block height corresponding to the M2 digital assets respectively;

[0044] The second update module is specifically used to determine the asset transfer amount as the asset holding amount corresponding to the M2+1th type of digital assets of the second terminal device, and determine the block height of the on-chain block to which the asset transfer transaction belongs as the block height corresponding to the M2+1th type of digital assets;

[0045] The second update module is specifically used to accumulate the asset holding quantity corresponding to the M2+1-th category digital asset to the asset holding quantity corresponding to the M2-th category digital asset, and accumulate the block height corresponding to the M2+1-th category digital asset to the block height corresponding to the M2-th category digital asset.

[0046] The result generation module includes:

[0047] A weight acquisition unit, configured to acquire, if the terminal voting results respectively corresponding to the S terminal devices include an affirmative voting result, the voting weights respectively corresponding to H1 terminal devices from the voting weights respectively corresponding to the S terminal devices; H1 is a positive integer less than or equal to S; the H1 terminal device is a terminal device whose terminal voting result is an affirmative voting result among the S terminal devices;

[0048] A weight acquisition unit, configured to acquire, if the terminal voting results respectively corresponding to the S terminal devices include an opposing voting result, the voting weights respectively corresponding to H2 terminal devices from the voting weights respectively corresponding to the S terminal devices; H2 is a positive integer less than or equal to S; the H2 terminal devices are the terminal devices whose terminal voting results are opposing voting results among the S terminal devices;

[0049] The result generating unit is used to generate a combined voting result corresponding to the voting content according to the voting weights respectively corresponding to the H1 terminal devices and the voting weights respectively corresponding to the H2 terminal devices.

[0050] The result generating unit is specifically used to sum the voting weights corresponding to the H1 terminal devices to generate the affirmative voting weight corresponding to the affirmative voting result;

[0051] A result generating unit, specifically used to sum the voting weights corresponding to the H2 terminal devices, and generate the opposing voting weight corresponding to the opposing voting result;

[0052] A result generating unit, specifically configured to determine the approval voting result as the combined voting result corresponding to the voting content if the approval voting weight is greater than or equal to the opposition voting weight;

[0053] The result generating unit is specifically used to determine the negative voting result as the combined voting result corresponding to the voting content if the weight of the positive voting is less than the weight of the negative voting.

[0054] An embodiment of the present application provides a computer device, including: a processor and a memory;

[0055] The processor is connected to the memory, wherein the memory is used to store a computer program. When the computer program is executed by the processor, the computer device executes the method provided in the embodiment of the present application.

[0056] 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.

[0057] In one aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method provided in the embodiment of the present application.

[0058] The embodiment of the present application can realize the voting weight calculation based on the number of assets held and the block height by introducing an asset smart contract, thereby realizing voting on the blockchain network. Therefore, the voting method of the embodiment of the present application can simultaneously consider the block height (block height can be a parameter in the time dimension) and the number of assets held (the number of assets held can be a parameter in the quantity dimension) corresponding to the terminal device, so that the terminal voting results of the terminal device with higher security will not be weakened by the terminal voting results of the terminal device with lower security, thereby improving the security of the blockchain network. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0060] Figure 1 It is a structural diagram of a network architecture provided by an embodiment of the present application;

[0061] Figure 2 This is a schematic diagram of a scenario for data interaction provided by an embodiment of the present application;

[0062] Figure 3 It is a flowchart of a data processing method based on blockchain provided in an embodiment of the present application;

[0063] Figure 4It is a schematic diagram of a scenario for generating a combined voting result provided by an embodiment of the present application;

[0064] Figure 5 It is a flowchart of a data processing method based on blockchain provided in an embodiment of the present application;

[0065] Figure 6 It is a flowchart of a data processing method based on blockchain provided in an embodiment of the present application;

[0066] Figure 7 It is a flowchart of a data processing method based on blockchain provided in an embodiment of the present application;

[0067] Figure 8 It is a structural schematic diagram of a blockchain-based data processing device provided in an embodiment of the present application;

[0068] Fig. 9 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0069] 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.

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

[0071] Blockchain nodes (i.e. network nodes): Blockchain networks divide nodes into consensus nodes (also called core nodes) and synchronization nodes (which can include data nodes and light nodes). Among them, consensus nodes are responsible for the consensus business of the entire blockchain network; synchronization nodes are responsible for synchronizing the ledger information of consensus nodes, that is, synchronizing the latest block data. Whether it is a consensus node or a synchronization node, its internal structure includes network communication components, because the blockchain network is essentially a peer-to-peer network, and it needs to communicate with other nodes in the blockchain network through peer-to-peer components. The resources and services in the blockchain network are scattered on each node, and the transmission of information and the implementation of services are carried out directly between nodes without the intervention of intermediate links or centralized servers (third parties). Blockchain nodes can be responsible for verifying transactions, packaging blocks, and maintaining the consistency of the entire blockchain to ensure the security and stable operation of the entire system.

[0072] Smart contract: A protocol defined in digital form that needs to run in a trusted environment, such as a blockchain platform. A smart contract is a code that can be understood and executed by each node of a blockchain (including consensus nodes), which can execute arbitrary logic and obtain results. The blockchain provides an environment for the execution of smart contracts. The blockchain can include one or more smart contracts, which can be distinguished by an identity document (ID) or name. The identification number or name of the smart contract can be used to specify the smart contract that the blockchain needs to run. Among them, the smart contract in the embodiment of the present application can be called an asset smart contract.

[0073] For details, see Figure 1 , Figure 1 Schematic diagram of a network architecture provided by an embodiment of the present application. Figure 1 The network architecture shown may include a blockchain network 100a, a terminal device cluster 100b, and a resource server 100c. The blockchain network 100a may include one or more blockchain nodes, and the number of blockchain nodes in the blockchain network 100a is not limited here. Figure 1As shown, the multiple blockchain nodes may specifically include blockchain node 110a, blockchain node 110b, blockchain node 110c, ..., blockchain node 110n; in order to ensure information intercommunication within the blockchain network 100a, each blockchain node in the blockchain network 100a may be directly or indirectly connected to the network through wired or wireless communication (for example, a network connection may exist between blockchain node 110a and blockchain node 110b), so that the blockchain nodes may interact with each other through the network connection (for example, block transmission); the blockchain node may be a server connected to the blockchain network 100a, or a terminal device connected to the blockchain network 100a, and the specific form of the blockchain node is not limited here.

[0074] It is understandable that each blockchain node in the blockchain network 100a can receive data to be uploaded to the chain sent by off-chain devices (e.g., resource server 100c and terminal devices in terminal device cluster 100b) when performing normal operations, and generate blocks based on the received data to be uploaded to the chain, and then upload the blocks to the chain. It is understandable that the collection and processing of relevant data (e.g., terminal voting results, asset transfer transactions) in this application should be strictly in accordance with the requirements of relevant national laws and regulations when applied in examples, and the informed consent or separate consent of the subject of personal information should be obtained, and subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the subject of personal information.

[0075] The terminal device cluster 100b may specifically include one or more terminal devices, and the number of terminal devices in the terminal device cluster 100b is not limited here. Figure 1 As shown, the multiple terminal devices may specifically include terminal device 120a, terminal device 120b, ..., terminal device 120m; terminal device 120a, terminal device 120b, ..., terminal device 120m may be respectively connected to resource server 100c directly or indirectly through a wired or wireless communication, so that each terminal device may exchange data with resource server 100c through a network connection. At the same time, terminal device cluster 100b and blockchain network 100a may be directly or indirectly connected to a network through a wired or wireless communication, so that terminal devices in terminal device cluster 100b and blockchain nodes in blockchain network 100a may exchange data through a network connection, for example, a network connection may exist between terminal device 120b in terminal device cluster 100b and blockchain node 110a in blockchain network 100a.

[0076] The terminal devices in the embodiments of the present application may include: smart phones, tablet computers, laptop computers, desktop computers, intelligent voice interaction devices, smart home appliances (e.g., smart TVs), wearable devices, vehicle terminals, aircraft, and other smart terminals with data processing functions. It should be understood that each terminal device in the terminal device cluster 100b may be installed with an application client with data processing functions. When the application client runs in each terminal device, it can be respectively connected to the above-mentioned Figure 1 Data is exchanged between the resource servers 100c shown. Among them, the application client may specifically include: a car client, a smart home client, an entertainment client (e.g., a game client), a multimedia client (e.g., a video client), a payment client (i.e., a payment application), and an information client (e.g., a news client), a resource client, a decentralized application client (Decentralized Application, DAPP), a browser, etc. Among them, the application client may be a sub-client integrated in a client (e.g., a browser), and the application client may also be an independent client (e.g., a resource client). The embodiment of the present application does not limit the type of the application client.

[0077] The resource server 100c may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The resource server 100c may be connected to the blockchain network 100a so that the resource server 100c can exchange data through the network connection with the blockchain network 100a.

[0078] For ease of understanding, the embodiment of the present application is described by taking the application client as a resource client as an example. Among them, the resource client can be the front end, the resource server 100c can be the back end corresponding to the front end, the terminal device can realize data interaction between the resource client and the resource server 100c (for example, the terminal device can send the terminal voting result to the resource server 100c through the resource client, and the resource server 100c can return the blockchain account address to the resource client in the terminal device), and the resource server 100c can be used to store the blockchain private key and blockchain account address (i.e., blockchain address) in the resource client.

[0079] The resource client can be used to keep the user's account private key on the blockchain (i.e., the blockchain private key). The blockchain can identify the user's identity through the blockchain private key, and the user's digital assets are managed through the blockchain private key. The operation (e.g., digital asset transfer) can be signed and confirmed by the blockchain private key. The signed transaction can be sent by the resource client to the blockchain node. Only the correct transaction will be executed by the blockchain. The forged signature blockchain will be rejected and prompted to fail. Among them, the terminal device can send the signed transaction directly to the blockchain node; the terminal device can also send the signed transaction to the resource server 100c so that the resource server 100c forwards the signed transaction to the blockchain node; the terminal device can also generate a signed transaction through the resource server 100c and forward the signed transaction to the blockchain node. In addition, all accounts on the chain are publicly available for query, so the resource client can also help users record changes in account assets. Common resource client installation forms include browser extension plug-ins (i.e., browser applications that rely on browsers to run, also understood as browser sub-clients) and APP (i.e., Application).

[0080] It should be understood that the resource client can be a hardware device or a software program. The resource client can be used to implement the resource management business function, and based on the resource management business function, realize the communication connection with the decentralized application client (referred to as decentralized application, decentralized application can be a blockchain application) to realize the user's authorized login and other related operations. Among them, the resource client is a tool for managing and storing user digital assets, initiating transactions, and participating in voting. For example, digital assets can be transferred to other accounts based on the resource client, and digital assets transferred from other accounts can be received based on the resource client. With the widespread deployment of various decentralized applications on the blockchain, the activities of users on the blockchain have increased. When using decentralized applications, general users can use blockchain key management tools (i.e. resource clients) to log in. Among them, digital assets refer to new intangible assets issued, registered, stored, held, transferred or traded based on blockchain technology. These intangible assets exist in a specific system in a digital form as a digital identification of value or rights.

[0081] like Figure 1The blockchain nodes 110a, 110b, 110c, ..., and 110n shown may have a one-to-one correspondence with the corresponding roles (i.e., the entity objects in the corresponding business scenarios) in the blockchain network 100a that need to be accessed. Among them, the embodiments of the present application can be applied to voting scenarios, and the voting content in the voting scenarios may include but is not limited to voting content related to blockchain governance, voting content related to protocol upgrades, voting content related to offline activities, etc. The voting content included in the embodiments of the present application will not be listed one by one here. For example, the voting content related to blockchain governance can be whether to increase transaction costs, whether to modify consensus parameters, etc., the voting content related to protocol upgrades can be whether to modify the consensus algorithm, whether to modify the smart contract, etc., and the voting content related to offline activities can be where to go for dinner today, whether to go shopping on the weekend, etc.

[0082] For easier understanding, see Figure 2 , Figure 2 Schematic diagram of a scenario for data interaction provided by an embodiment of the present application. Figure 2 The resource server 20a shown may be the above Figure 1 The resource server 100c in the corresponding embodiment is as follows: Figure 2 The terminal device 21a, the terminal device 21b, ..., the terminal device 21c shown in the figure can all be the above Figure 1 Any terminal device in the terminal device cluster 100b of the corresponding embodiment; Figure 2 The blockchain network 20b shown can be the above Figure 1 The blockchain network 100a in the corresponding embodiment and the blockchain nodes 23a, 23b, ..., 23c in the blockchain network 20b can all be the above Figure 1 Any blockchain node in the blockchain network 100a of the corresponding embodiment. Among them, the terminal device 21a, the terminal device 21b, ..., the terminal device 21c can all be installed with a resource client, and the number of the terminal device 21a, the terminal device 21b, ..., the terminal device 21c can be S, where S can be a positive integer.

[0083] For ease of understanding, in the present application embodiment, users may be referred to as participating objects, and participating objects corresponding to terminal devices may participate in voting through resource clients in the terminal devices. Figure 2The terminal devices 21a, 21b, ..., and 21c shown can obtain voting content from the blockchain network 20b through the resource client, so that the participants corresponding to the terminal devices 21a, 21b, ..., and 21c can participate in the voting for the voting content in the resource client, and obtain the terminal voting results corresponding to the terminal devices 21a, 21b, ..., and 21c. Among them, the resource server 20a can obtain the voting content from the blockchain network 20b, and then send the voting content to the resource clients in the terminal devices 21a, 21b, ..., and 21c respectively.

[0084] Among them, the participating object corresponding to terminal device 21a can participate in the voting for the voting content in the resource client, and obtain the terminal voting result corresponding to terminal device 21a (that is, terminal voting result 22a); the participating object corresponding to terminal device 21b can participate in the voting for the voting content in the resource client, and obtain the terminal voting result corresponding to terminal device 21b (that is, terminal voting result 22b); the participating object corresponding to terminal device 21c can participate in the voting for the voting content in the resource client, and obtain the terminal voting result corresponding to terminal device 21c (that is, terminal voting result 22c).

[0085] like Figure 2 As shown, terminal device 21a, terminal device 21b, ..., terminal device 21c can send the terminal voting results to resource server 20a respectively, so that resource server 20a can forward terminal voting results 22a, terminal voting results 22b, ..., terminal voting results 22c to blockchain nodes (e.g., blockchain nodes 23c) in blockchain network 20b after receiving terminal voting results 22a, terminal voting results 22b, ..., terminal voting results 22c. Among them, resource server 20a can forward terminal voting results 22a, terminal voting results 22b, ..., terminal voting results 22c together, or can forward terminal voting results 22a, terminal voting results 22b, ..., terminal voting results 22c separately, and this application does not limit this.

[0086] like Figure 2As shown, the blockchain node 23c can receive the terminal voting results 22a, terminal voting results 22b, ..., and terminal voting results 22c forwarded by the resource server 20a, and obtain the asset holding quantities corresponding to the terminal devices 21a, 21b, ..., and 21c, and the asset generation parameters corresponding to the terminal devices 21a, 21b, ..., and 21c, respectively, from the asset list maintained by the asset smart contract. Among them, the asset holding quantity corresponding to the terminal device 21a can be the asset holding quantity 24a, and the asset generation parameter corresponding to the terminal device 21a can be the asset generation parameter 25a; the asset holding quantity corresponding to the terminal device 21b can be the asset holding quantity 24b, and the asset generation parameter corresponding to the terminal device 21b can be the asset generation parameter 25b; the asset holding quantity corresponding to the terminal device 21c can be the asset holding quantity 24c, and the asset generation parameter corresponding to the terminal device 21c can be the asset generation parameter 25c.

[0087] Among them, the asset smart contract can be deployed on the blockchain system 20b by the contract manager, and the asset smart contract can be used to implement the digital asset management system. For example, the asset smart contract can issue digital assets to the initial holder (also referred to as the asset holder or the participating object) according to the predetermined issuance rules. For another example, the asset smart contract can manage the voting process. In addition, S terminal devices can interact with the asset smart contract through the resource client to obtain or update the asset holding quantity and asset generation parameters in the asset list.

[0088] like Figure 2 As shown, blockchain node 23c can perform weight calculations on the asset holding quantities corresponding to terminal device 21a, terminal device 21b, ..., terminal device 21c, and the asset generation parameters corresponding to terminal device 21a, terminal device 21b, ..., terminal device 21c, respectively, through an asset smart contract, to generate voting weights corresponding to terminal device 21a, terminal device 21b, ..., terminal device 21c, respectively. Among them, the blockchain node 23c can perform weight calculations on the asset holding quantity 24a corresponding to the terminal device 21a and the asset generation parameter 25a corresponding to the terminal device 21a through the asset smart contract to generate the voting weight corresponding to the terminal device 21a (i.e., voting weight 26a); the blockchain node 23c can perform weight calculations on the asset holding quantity 24b corresponding to the terminal device 21b and the asset generation parameter 25b corresponding to the terminal device 21b through the asset smart contract to generate the voting weight corresponding to the terminal device 21b (i.e., voting weight 26b); the blockchain node 23c can perform weight calculations on the asset holding quantity 24c corresponding to the terminal device 21c and the asset generation parameter 25c corresponding to the terminal device 21c through the asset smart contract to generate the voting weight corresponding to the terminal device 21c (i.e., voting weight 26c).

[0089] Furthermore, the blockchain node 23c can generate a combined voting result corresponding to the voting content according to the voting weights corresponding to the terminal devices 21a, 21b, ..., and 21c (i.e., voting weight 26a, voting weight 26b, ..., voting weight 26c), and the terminal voting results corresponding to the terminal devices 21a, 21b, ..., and 21c (i.e., terminal voting results 22a, terminal voting results 22b, ..., terminal voting results 22c). The combined voting result here can be a positive voting result or a negative voting result; a positive voting result indicates that the voting content can be executed, and a negative voting result indicates that the voting content cannot be executed. For example, when the voting content is whether to increase the transaction fee, the positive voting result indicates that the transaction fee is increased (at this time, the blockchain node can execute the relevant decision on the voting content through the asset smart contract, that is, the asset smart contract will increase the transaction fee), and the negative voting result indicates that the transaction fee is not increased. Optionally, the combined voting result here can be different voting options (for example, when the voting content is where to have dinner today, the different voting options can be hotel 1, hotel 2, and restaurant 3).

[0090] It can be seen that the embodiment of the present application can simultaneously consider the parameters of the time dimension (i.e., the asset generation parameters) and the parameters of the quantity dimension (i.e., the number of assets held), and jointly determine the voting weight corresponding to the terminal device through the asset generation parameters and the number of assets held, so that the terminal voting results corresponding to the terminal devices with low security will not have a significant impact on the combined voting results, which can improve the security of the blockchain network. In addition, the embodiment of the present application can avoid the concentration of power, thereby reducing competition and costs in the blockchain network, and improving the stability of the blockchain network.

[0091] For further information, see Figure 3 , Figure 3 is a flowchart of a data processing method based on blockchain provided in an embodiment of the present application. The data processing method can be executed by a blockchain node, which can be the above-mentioned Figure 1 Any blockchain node (e.g., blockchain node 110a) in the blockchain network 100a of the corresponding embodiment. The data processing method may include the following steps S101-S104:

[0092] Step S101, obtaining terminal voting results of S terminal devices for voting contents respectively;

[0093] Specifically, the blockchain node can receive a service initiation request sent by the target terminal device. The service initiation request includes the scope of participants, voting participation time and voting content. Further, the blockchain node can send the voting content to the terminal device corresponding to the participant in the scope of participants based on the service initiation request. Further, the blockchain node can receive the terminal voting results for the voting content sent by the terminal device corresponding to the participant in the scope of participants through the resource client, and obtain S terminal voting results with the terminal voting timestamp within the voting participation time from the received terminal voting results (i.e., the terminal voting results for the voting content sent by the terminal device corresponding to the participant in the scope of participants). Wherein, S here can be a positive integer; the terminal devices corresponding to the participant in the scope of participants include the terminal devices corresponding to the S terminal voting results, that is, the terminal devices corresponding to the participant in the scope of participants include the terminal devices corresponding to the received terminal voting results.

[0094] Among them, the blockchain node can send the voting content to the terminal devices corresponding to all the participating objects in the scope of the participating objects; since the participating objects in the scope of the participating objects may participate in the voting or may not participate in the voting after receiving the voting content, the blockchain node can receive the terminal voting results sent by some of the participating objects in the scope of the participating objects, and can also receive the terminal voting results sent by all the participating objects in the scope of the participating objects.

[0095] Among them, the terminal voting timestamp can represent the timestamp of the participating object participating in the voting in the participating object range, that is, the timestamp of the participating object submitting the terminal voting result through the resource client. For example, the terminal voting timestamp can be the timestamp of the participating object clicking the confirmation control after selecting the voting option in the resource client. At this time, the terminal device can send the terminal voting timestamp corresponding to the terminal voting result to the blockchain node at the same time as sending the terminal voting result to the blockchain node. Since the terminal voting result is not necessarily within the voting participation time, the blockchain node can obtain the terminal voting result with the terminal voting timestamp within the voting participation time from the received terminal voting result. Among them, the voting participation time can include the voting start time and the voting end time. If the terminal voting timestamp is not earlier than the voting start time and the terminal voting timestamp is not later than the voting end time, it can be determined that the terminal voting timestamp is within the voting participation time, otherwise it is determined that the terminal voting timestamp is not within the voting participation time. For example, the voting participation time can be 00:00 on September 14, 2023-00:00 on September 15, 2023, and the terminal voting timestamp can be 08:16 on September 14, 2023 or 08:16 on September 15, 2023. At this time, 08:16 on September 14, 2023 is within the voting participation time, and 08:16 on September 15, 2023 is not within the voting participation time.

[0096] Optionally, the blockchain node may also determine the received terminal voting results as S terminal voting results, that is, the default number of received terminal voting results is S. At this time, when the blockchain node sends the voting content to the terminal device corresponding to the participant in the participant range, it may send the voting participation time together, so that the participant in the participant range can only participate in the voting within the voting participation time. If the participant in the participant range participates in the voting outside the voting participation time, it will be prompted that the voting is unsuccessful, thereby ensuring that the terminal voting results sent by the terminal device are within the voting participation time, so that the blockchain node no longer needs to compare the terminal voting timestamp and the voting participation time.

[0097] Optionally, the blockchain node may receive a service initiation request sent by a target terminal device. The service initiation request includes the scope of participants, voting participation time, and voting content (i.e., target voting content). Further, the blockchain node may receive terminal voting requests sent by R terminal devices through resource clients respectively, and based on the terminal voting requests, the scope of participants, and the voting participation time corresponding to the R terminal devices respectively, send the voting content (i.e., target voting content) to the R terminal devices respectively. Wherein, R here may be a positive integer greater than or equal to S; the terminal devices corresponding to the participants in the scope of participants include R terminal devices. Further, the blockchain node may receive terminal voting results for voting content (i.e., target voting content) sent by S terminal devices through resource clients respectively. Wherein, the S terminal devices belong to the R terminal devices.

[0098] Among them, the blockchain node can send the voting content to R terminal devices; since the participating objects corresponding to the R terminal devices may or may not participate in the voting after receiving the voting content, the blockchain node can receive the terminal voting results sent by the R terminal devices (at this time R is equal to S), and can also receive the terminal voting results sent by S terminal devices among the R terminal devices (at this time R is greater than S).

[0099] The blockchain node may receive the terminal voting results for the voting content sent by K terminal devices through the resource client, and obtain S terminal voting results whose terminal voting timestamps are within the voting participation time from the terminal voting results corresponding to the K terminal devices. K here may be an integer less than or equal to R and greater than or equal to S.

[0100] Optionally, the blockchain node may also determine the received terminal voting results as S terminal voting results, that is, the default number of received terminal voting results is S. At this time, when the blockchain node sends the voting content to the R terminal devices, it may send the voting participation time together, so that the participants corresponding to the R terminal devices can only participate in the voting within the voting participation time. If the participants participate in the voting outside the voting participation time, it will be prompted that the voting is unsuccessful, so that the terminal voting results sent by the terminal device are all within the voting participation time, so that the blockchain node does not need to compare the terminal voting timestamp and the voting participation time.

[0101] Among them, the terminal voting request can be sent by the participating object corresponding to the terminal device through the resource client in the terminal device when the participating object needs to participate in the voting. For example, when the participating object needs to participate in the voting, a trigger operation can be performed on the voting acquisition control in the resource client. In this way, the terminal device can respond to the trigger operation performed by the participating object on the voting acquisition control and send a terminal voting request to the blockchain node.

[0102] The blockchain node may also receive terminal voting requests sent by terminal devices other than the R terminal devices through the resource client. The participating objects corresponding to the R terminal devices may be participating objects in the participating object range, and the participating objects corresponding to the terminal devices other than the R terminal devices are not participating objects in the participating object range, so the blockchain node does not need to send the voting content to the terminal devices other than the R terminal devices.

[0103] Among them, when the blockchain node sends the target voting content to the R terminal devices respectively, it can also send the voting content other than the target voting content to the R terminal devices. For ease of understanding, the candidate terminal device among the R terminal devices is used as an example for explanation. It can be understood that the blockchain node can receive the terminal voting request sent by the candidate terminal device through the resource client, and obtain the voting content set within the voting participation time based on the terminal voting request corresponding to the candidate terminal device. Among them, the voting content set may include the voting content with the current timestamp within the voting participation time, and the voting content set may include the target voting content. Further, the blockchain node can filter the range of participating objects corresponding to the voting content in the voting content set, and obtain the voting content of the participating object range including the participating object corresponding to the candidate terminal device from the voting content set. Among them, the voting content of the participating object range including the participating object corresponding to the candidate terminal device may include the target voting content. Further, the blockchain node can send the voting content obtained from the voting content set to the candidate terminal device.

[0104] It is understandable that the target terminal device may be the above Figure 1Any terminal device in the terminal device cluster 100b of the corresponding embodiment, which means that the voting content is initiated by the off-chain device; optionally, the target terminal device can also be the above Figure 1 Any blockchain node in the blockchain network 100a of the corresponding embodiment, which means that the voting content is initiated by the on-chain device. For ease of understanding, the target terminal device is taken as an example as an off-chain device. The target terminal device can be installed with a resource client. The target terminal device can send a service initiation request to the resource server through the resource client. In this way, the resource server can generate a service voting transaction corresponding to the service initiation request, and then send the service voting transaction to any blockchain node in the blockchain network (for example, the above Figure 1 The blockchain node 110a in the blockchain network 100a of the corresponding embodiment). In other words, the target terminal device can initiate a business voting transaction through the resource client. Further, after receiving the business voting transaction, the blockchain node 110a can initiate a consensus request for the business voting transaction to the blockchain network 100a, and after the blockchain node 110a determines that the business voting transaction consensus has passed, the voting content can be sent to the terminal device.

[0105] Step S102, obtaining the asset holding quantities corresponding to the S terminal devices and the asset generation parameters corresponding to the S terminal devices from the asset list maintained by the asset smart contract;

[0106] Specifically, the blockchain node can obtain the blockchain addresses corresponding to the S terminal devices and the asset list maintained by the asset smart contract. Among them, the asset list includes the mapping relationship between the blockchain address, the asset holding quantity and the asset generation parameter; the blockchain address can represent the key field in the asset list, the asset holding quantity and the asset generation parameter can represent the value field in the asset list, and the value field in the asset list can be obtained through the key field in the asset list. Further, the blockchain node can perform data search on the asset list according to the blockchain addresses corresponding to the S terminal devices, and obtain the asset holding quantity corresponding to the S terminal devices and the asset generation parameter corresponding to the S terminal devices. In other words, the blockchain node can perform data search on the asset list according to the S key fields, and obtain the value fields corresponding to the S key fields. Among them, the S value fields can include the asset holding quantity corresponding to the S terminal devices and the asset generation parameter corresponding to the S terminal devices, and the S key fields can include the blockchain addresses corresponding to the S terminal devices.

[0107] Among them, the S terminal devices may include terminal device N i , where i can be a positive integer less than or equal to S; the number of assets held by the S terminal devices respectively includes the terminal device N iThe corresponding asset holding quantity, the asset generation parameters corresponding to the S terminal devices include the terminal device N i Corresponding asset generation parameters. It should be understood that the S terminal devices may include digital assets of the same number of categories or digital assets of different numbers of categories, and this application does not limit this. Among them, the embodiment of the present application can determine digital assets with the same asset generation parameters as digital assets of the same number of categories, and determine digital assets with different asset generation parameters as digital assets of different numbers of categories.

[0108] Among them, the terminal device N i It can include M types of digital assets (i.e., the number of types is equal to M), where M can be a non-negative integer; terminal device N i The corresponding asset holdings include the asset holdings corresponding to M types of digital assets, and the terminal device N i The corresponding asset generation parameters include asset generation parameters corresponding to the M-type digital assets. Among them, the asset generation parameters (the asset generation parameters in the embodiment of the present application may also be referred to as block generation parameters) may include but are not limited to the block height of the block in which the transaction associated with the M-type digital asset is located, the block generation timestamp of the block in which the transaction associated with the M-type digital asset is located, and the transaction initiation time of the transaction associated with the M-type digital asset.

[0109] For ease of understanding, please refer to Table 1, which is an asset list provided in an embodiment of the present application. The asset list may store key fields and value fields. The key field may include a blockchain address, and the value field may include the number of assets held and asset generation parameters. As shown in Table 1:

[0110] Table 1

[0111]

[0112]

[0113] As shown in Table 1, the blockchain address EEEEEE can be the above Figure 2 The blockchain address corresponding to the terminal device 21b in the corresponding embodiment, the blockchain address FFFFFF can be the above Figure 2 The blockchain address corresponding to the terminal device 21a in the corresponding embodiment, the blockchain address GGGGGG can be the above Figure 2 The blockchain address corresponding to the terminal device 21c in the corresponding embodiment.

[0114] Among them, the terminal device 21b may include 1 type of digital assets, the asset holding quantity corresponding to this type of digital assets may be equal to 100, and the asset generation parameter corresponding to this type of digital assets may be equal to 1000; the terminal device 21a may include 1 type of digital assets, the asset holding quantity corresponding to this type of digital assets may be equal to 150, and the asset generation parameter corresponding to this type of digital assets may be equal to 2000; the terminal device 21c may include 1 type of digital assets, the asset holding quantity corresponding to this type of digital assets may be equal to 300, and the asset generation parameter corresponding to this type of digital assets may be equal to 3000.

[0115] Among them, the S terminal devices may include a first terminal device and a second terminal device. It should be understood that the blockchain node can obtain an asset transfer transaction initiated by the first terminal device through a resource client. Among them, the asset transfer transaction is used to instruct the first terminal device to transfer a digital asset with an asset transfer quantity to the second terminal device. Further, the blockchain node can process the asset transfer transaction on the chain. Further, when the asset transfer transaction is successfully chained to the blockchain network, the blockchain node can obtain the asset holding quantity corresponding to the first terminal device and the asset generation parameter corresponding to the first terminal device from the asset list, and update the asset holding quantity corresponding to the first terminal device and the asset generation parameter corresponding to the first terminal device according to the asset transfer quantity. Among them, the blockchain node can subtract the asset transfer quantity from the asset holding quantity corresponding to the first terminal device. At the same time, when the asset transfer transaction is successfully chained to the blockchain network, the blockchain node can obtain the asset holding quantity corresponding to the second terminal device and the asset generation parameter corresponding to the second terminal device from the asset list, and update the asset holding quantity corresponding to the second terminal device and the asset generation parameter corresponding to the second terminal device according to the asset transfer quantity. Among them, the blockchain node can add the asset transfer quantity to the asset holding quantity corresponding to the second terminal device. In addition, the blockchain node can update the asset list through the asset smart contract; when the blockchain node receives an asset transfer transaction, it will verify and process the asset transfer transaction according to the rules of the asset smart contract (for example, verify whether the asset transfer transaction is initiated by the first terminal device and verify whether the first terminal device has the digital asset of the asset transfer quantity).

[0116] Wherein, the first terminal device includes M1 digital assets, where M1 can be a positive integer; the number of assets held corresponding to the first terminal device includes the number of assets held corresponding to the M1 digital assets, and the asset generation parameters corresponding to the first terminal device include the asset generation parameters corresponding to the M1 digital assets. It can be understood that the specific process of the blockchain node updating the number of assets held corresponding to the first terminal device and the asset generation parameters corresponding to the first terminal device according to the asset transfer quantity can be described as follows: the blockchain node can obtain the number of assets held corresponding to the first asset generation parameter from the number of assets held corresponding to the M1 digital assets. Further, if the number of assets held corresponding to the first asset generation parameter is greater than the number of asset transfers, the blockchain node can subtract the number of assets held corresponding to the first asset generation parameter from the number of assets transferred, obtain the number of assets held after the subtraction, and update the number of assets held corresponding to the first asset generation parameter by the number of assets held after the subtraction. Wherein, the first asset generation parameter is the maximum asset generation parameter among the asset generation parameters corresponding to the M1 digital assets. Optionally, if the number of assets held corresponding to the first asset generation parameter is equal to the number of assets transferred, the blockchain node may delete the number of assets held corresponding to the first asset generation parameter from the number of assets held corresponding to the M1 digital assets, delete the first asset generation parameter from the asset generation parameters corresponding to the M1 digital assets, and delete the blockchain address corresponding to the first asset generation parameter. Optionally, if the number of assets held corresponding to the first asset generation parameter is less than the number of assets transferred, the blockchain node may obtain the number of assets held corresponding to the second asset generation parameter from the number of assets held corresponding to the M1 digital assets, and update the number of assets held corresponding to the first terminal device and the asset generation parameter corresponding to the first terminal device based on the number of assets held corresponding to the first asset generation parameter, the number of assets held corresponding to the second asset generation parameter, and the number of assets transferred. The second asset generation parameter is the maximum asset generation parameter among the asset generation parameters corresponding to the M1 digital assets except the first asset generation parameter.

[0117] Among them, it can be understood that the specific process of the blockchain node updating the asset holding quantity corresponding to the first terminal device and the asset generation parameter corresponding to the first terminal device based on the asset holding quantity corresponding to the first asset generation parameter, the asset holding quantity corresponding to the second asset generation parameter and the asset transfer quantity can be described as follows: the blockchain node can sum the asset holding quantity corresponding to the first asset generation parameter and the asset holding quantity corresponding to the second asset generation parameter to obtain the combined asset holding quantity. Further, if the combined asset holding quantity is greater than the asset transfer quantity, the blockchain node can subtract the combined asset holding quantity and the asset transfer quantity to obtain the asset holding quantity after the subtraction operation, update the asset holding quantity corresponding to the second asset generation parameter by the asset holding quantity after the subtraction operation, delete the asset holding quantity corresponding to the first asset generation parameter from the asset holding quantity corresponding to the M1 type digital assets respectively, delete the first asset generation parameter from the asset generation parameters corresponding to the M1 type digital assets respectively, and delete the blockchain address corresponding to the first asset generation parameter. Optionally, if the combined asset holding quantity is equal to the asset transfer quantity, the blockchain node may delete the asset holding quantity corresponding to the first asset generation parameter and the asset holding quantity corresponding to the second asset generation parameter from the asset holding quantity corresponding to the M1 digital assets, delete the first asset generation parameter and the second asset generation parameter from the asset generation parameters corresponding to the M1 digital assets, and delete the blockchain addresses corresponding to the first asset generation parameter and the second asset generation parameter. Optionally, if the combined asset holding quantity is less than the asset transfer quantity, the blockchain node may obtain the asset holding quantity corresponding to the third asset generation parameter from the asset holding quantity corresponding to the M1 digital assets, and update the asset holding quantity corresponding to the first terminal device and the asset generation parameter corresponding to the first terminal device based on the combined asset holding quantity, the asset holding quantity corresponding to the third asset generation parameter and the asset transfer quantity. The third asset generation parameter is the maximum asset generation parameter among the asset generation parameters corresponding to the M1 digital assets except the first asset generation parameter and the second asset generation parameter.

[0118] Among them, the specific process of the blockchain node updating the asset holding quantity corresponding to the first terminal device and the asset generation parameter corresponding to the first terminal device based on the combined asset holding quantity, the asset holding quantity corresponding to the third asset generation parameter and the asset transfer quantity can be found in the description of updating the asset holding quantity corresponding to the first terminal device and the asset generation parameter corresponding to the first terminal device based on the asset holding quantity corresponding to the first asset generation parameter, the asset holding quantity corresponding to the second asset generation parameter and the asset transfer quantity, and the description of updating the asset holding quantity corresponding to the first terminal device and the asset generation parameter corresponding to the first terminal device according to the asset transfer quantity, which will not be repeated here.

[0119] Among them, the second terminal device includes M2 digital assets, where M2 can be a non-negative integer; the number of assets held corresponding to the second terminal device includes the number of assets held corresponding to the M2 digital assets, and the asset generation parameters corresponding to the second terminal device include the asset generation parameters corresponding to the M2 digital assets. It can be understood that the specific process of the blockchain node updating the number of assets held corresponding to the second terminal device and the asset generation parameters corresponding to the second terminal device according to the asset transfer quantity can be described as follows: the blockchain node can determine the asset transfer quantity as the number of assets held corresponding to the M2+1th digital asset of the second terminal device, and determine the asset generation parameters of the on-chain block to which the asset transfer transaction belongs (for example, the asset generation parameters of the on-chain block to which the asset transfer transaction belongs can be equal to 4000) as the asset generation parameters corresponding to the M2+1th digital asset. Furthermore, the blockchain node may add the number of assets held corresponding to the M2+1th digital asset to the number of assets held corresponding to the M2th digital asset, add the asset generation parameters corresponding to the M2+1th digital asset to the asset generation parameters corresponding to the M2th digital asset, and set the blockchain address corresponding to the second terminal device to the blockchain address corresponding to the M2+1th digital asset. In other words, the blockchain node may update the blockchain address of the digital asset corresponding to the asset transfer transaction (i.e., the digital asset with the asset transfer quantity) (i.e., update the blockchain address of the digital asset corresponding to the asset transfer transaction from the blockchain address corresponding to the first terminal device to the blockchain address of the second terminal device), and record the new asset generation parameters (e.g., block height, block generation timestamp). At this time, the number of assets held corresponding to the second terminal device includes the number of assets held corresponding to the M2+1th digital assets, and the asset generation parameters corresponding to the second terminal device include the asset generation parameters corresponding to the M2+1th digital assets.

[0120] For ease of understanding, the present application embodiment takes the first terminal device as the terminal device corresponding to the blockchain address EEEEEE in Table 1 above, and the second terminal device as the terminal device corresponding to FFFFFF in Table 1 above as an example for explanation, and the asset transfer transaction is used to instruct the first terminal device to transfer a digital asset with an asset transfer quantity (e.g., 50) to the second terminal device. At this time, the blockchain node can update the asset list (e.g., Table 1) based on the asset transfer transaction to obtain an updated asset list (e.g., Table 2).

[0121] For ease of understanding, please refer to Table 2, which is an updated asset list provided in an embodiment of the present application. The updated asset list may store key fields and value fields. The key field may include a blockchain address, and the value field may include the number of assets held and asset generation parameters. As shown in Table 2:

[0122] Table 2

[0123]

[0124] Among them, the terminal device 21b may include 1 type of digital assets, the asset holding quantity corresponding to this type of digital assets may be equal to 50, and the asset generation parameter corresponding to this type of digital assets may be equal to 1000; the terminal device 21a may include 2 types of digital assets, the asset holding quantity corresponding to one type of digital assets may be equal to 150, and the asset generation parameter corresponding to one type of digital assets may be equal to 2000, and the asset holding quantity corresponding to the other type of digital assets may be equal to 50, and the asset generation parameter corresponding to the other type of digital assets may be equal to 4000; the terminal device 21c may include 1 type of digital assets, the asset holding quantity corresponding to this type of digital assets may be equal to 300, and the asset generation parameter corresponding to this type of digital assets may be equal to 3000.

[0125] Step S103, performing weight calculation on the asset holding quantities corresponding to the S terminal devices and the asset generation parameters corresponding to the S terminal devices through the asset smart contract, and generating voting weights corresponding to the S terminal devices;

[0126] Specifically, the blockchain node can call the weight generation function in the asset smart contract through the function identifier in the service initiation request. Among them, the service initiation request refers to a request to initiate voting content, and the service initiation request is initiated by the target terminal device. Further, the blockchain node can use the weight generation function to i Corresponding number of assets held and terminal devices N i The corresponding asset generation parameters are weighted to generate the terminal device N i The corresponding voting weight. Among them, the voting weight is proportional to the number of assets held, and the voting weight is inversely proportional to the asset generation parameter.

[0127] Among them, the blockchain node generates weights for the terminal device N i Corresponding number of assets held and terminal devices N i During the weight calculation of the corresponding asset generation parameters, the weight generation function can be called directly, or other functions in the asset smart contract can be called through the weight generation function. This application does not limit this.

[0128] Among them, the blockchain node generates S terminal devices, except for terminal device N i For the specific process of the voting weights corresponding to the terminal devices other than i The description of the corresponding voting weights will not be repeated here.

[0129] Step S104: Generate a combined voting result corresponding to the voting content according to the voting weights respectively corresponding to the S terminal devices and the terminal voting results respectively corresponding to the S terminal devices.

[0130] Specifically, if the terminal voting results corresponding to the S terminal devices include the approval voting results, the blockchain node can obtain the voting weights corresponding to the H1 terminal devices from the voting weights corresponding to the S terminal devices (that is, obtain the voting weights corresponding to the approval voting results from the voting weights corresponding to the S terminal devices). Among them, H1 here can be a positive integer less than or equal to S, and the H1 terminal device is the terminal device whose terminal voting results are approval voting results among the S terminal devices. At the same time, if the terminal voting results corresponding to the S terminal devices include the opposition voting results, the blockchain node can obtain the voting weights corresponding to the H2 terminal devices from the voting weights corresponding to the S terminal devices (that is, obtain the voting weights corresponding to the opposition voting results from the voting weights corresponding to the S terminal devices). Among them, H2 here can be a positive integer less than or equal to S, and the H2 terminal devices are the terminal devices whose terminal voting results are opposition voting results among the S terminal devices. Further, the blockchain node can generate a combined voting result corresponding to the voting content according to the voting weights corresponding to the H1 terminal devices and the voting weights corresponding to the H2 terminal devices. Among them, the blockchain node can generate a combined voting result corresponding to the voting content through an asset smart contract.

[0131] Among them, the blockchain node can sum the voting weights corresponding to the H1 terminal devices to generate the voting weight corresponding to the voting result; the blockchain node can sum the voting weights corresponding to the H2 terminal devices to generate the voting weight corresponding to the voting result. Further, if the voting weight of approval is greater than or equal to the voting weight of disapproval, the blockchain node can determine the voting result of approval as the combined voting result corresponding to the voting content. Optionally, if the voting weight of approval is less than the voting weight of disapproval, the blockchain node can determine the voting result of disapproval as the combined voting result corresponding to the voting content.

[0132] Optionally, if the terminal voting results corresponding to the S terminal devices do not include a positive voting result, the blockchain node may determine the negative voting result as the combined voting result corresponding to the voting content. Optionally, if the terminal voting results corresponding to the S terminal devices do not include a negative voting result, the blockchain node may determine the positive voting result as the combined voting result corresponding to the voting content.

[0133] For example, further, when the combined voting result is a positive voting result and the voting content is to modify the consensus algorithm, the blockchain node can call the modification function in the asset smart contract, obtain the blockchain configuration parameters corresponding to the voting content based on the modification function, and package the blockchain configuration parameters into a blockchain configuration block. Then, the consensus nodes in the blockchain network reach a consensus on the blockchain configuration block. If the blockchain configuration block consensus is passed, the blockchain protocol is updated based on the blockchain configuration parameters.

[0134] For easier understanding, see Figure 4 , Figure 4 FIG. 1 is a schematic diagram of a scenario for generating a combined voting result provided by an embodiment of the present application. Figure 4 Taking S equal to 3 as an example, the voting weight 41a can be Figure 2 The voting weight 26a in the corresponding embodiment (i.e., the voting weight corresponding to the terminal device 21a) and the voting weight 41b can be the above Figure 2 The voting weight 26b in the corresponding embodiment (i.e., the voting weight corresponding to the terminal device 21b) and the voting weight 41c can be the above Figure 2 The voting weight 26c in the corresponding embodiment (ie, the voting weight corresponding to the terminal device 21c).

[0135] like Figure 4 As shown, the terminal voting result corresponding to terminal device 21a is a positive voting result, the terminal voting result corresponding to terminal device 21b is a negative voting result, and the terminal voting result corresponding to terminal device 21c is a positive voting result. At this time, the blockchain node can obtain the voting weight corresponding to the positive voting result (i.e., voting weight 41a and voting weight 41c), sum the voting weight 41a and voting weight 41c, and generate the positive voting weight corresponding to the positive voting result; the blockchain node can obtain the voting weight corresponding to the negative voting result (i.e., voting weight 41b), sum the voting weight 41b, and generate the negative voting weight corresponding to the negative voting result. Further, the blockchain node can determine the positive voting weight or the negative voting weight as the combined voting result corresponding to the voting content.

[0136] It can be seen that the embodiment of the present application can realize the voting weight calculation based on the number of assets held and the asset generation parameters by introducing the asset smart contract, thereby realizing voting on the blockchain network. Therefore, the voting method of the embodiment of the present application can simultaneously consider the asset generation parameters (asset generation parameters can be parameters in the time dimension) and the number of assets held (the number of assets held can be parameters in the quantity dimension) corresponding to the terminal device, so that the terminal voting results of the terminal device with higher security will not be weakened by the terminal voting results of the terminal device with lower security, thereby improving the security of the blockchain network.

[0137] For further information, see Figure 5 , Figure 5 is a flowchart of a data processing method based on blockchain provided in an embodiment of the present application. The data processing method may include the following steps S201-S204, and steps S201-S204 are Figure 3 A specific embodiment of step S103 in the corresponding embodiment.

[0138] Step S201, calling the weight generation function in the asset smart contract through the function identifier in the business initiation request;

[0139] Among them, the terminal device N i It can include M types of digital assets, where M can be a non-negative integer; terminal device N i The corresponding asset holdings include the asset holdings corresponding to M types of digital assets, and the terminal device N i The corresponding asset generation parameters include the block height of the block where the transaction associated with the M-type digital asset is located (i.e., the block height of the block where the transaction is located when the digital asset is last operated (for example, the operation here can be issuance, transfer, etc.)). For example, when the digital asset is transferred from the first terminal device to the second terminal device, the asset generation parameter can be the block height of the block to which the asset transfer transaction belongs. For another example, when the digital asset is issued by the blockchain system, the asset generation parameter can be the block height of the block to which the asset issuance transaction belongs.

[0140] Step S202, performing a difference operation on the maximum block height corresponding to the blockchain and the block heights corresponding to the M types of digital assets respectively through a weight generation function, to generate asset holding heights corresponding to the M types of digital assets respectively;

[0141] Among them, Class M digital assets may include digital assets P j , where j can be a positive integer less than or equal to M. Blockchain nodes can use the weight generation function to calculate the maximum block height and digital asset P j The corresponding block height is calculated by difference to generate digital asset P j The corresponding asset holding height.

[0142] It should be understood that the embodiment of the present application does not limit the specific value of the maximum block height. The maximum block height is obtained in real time and has different values ​​at different times. For example, the embodiment of the present application can be described by taking the maximum block height equal to 4000 as an example.

[0143] Step S203, performing multiplication operation on the asset holding quantity corresponding to each of the M types of digital assets and the asset holding height corresponding to each of the M types of digital assets through a weight generation function, to generate the first candidate voting weights corresponding to each of the M types of digital assets;

[0144] Specifically, blockchain nodes can use weight generation functions to generate digital assets P j The corresponding number of assets held and digital assets P j The corresponding asset holding height is multiplied to generate the digital asset P j The corresponding first candidate voting weight.

[0145] For ease of understanding, please refer to Table 2 again. i When it is the terminal device corresponding to the blockchain address EEEEEE, the terminal device N i The M-type digital assets may include digital asset P1, the asset holding quantity corresponding to digital asset P1 is equal to 50, and the block height corresponding to digital asset P1 is equal to 1000. The blockchain node may perform a difference operation on the maximum block height (i.e., 4000) and the block height corresponding to digital asset P1 (i.e., 1000) to generate the asset holding height corresponding to digital asset P1 (i.e., 4000-1000=3000). Further, the blockchain node may perform a multiplication operation on the asset holding height corresponding to digital asset P1 (i.e., 3000) and the asset holding quantity corresponding to digital asset P1 (i.e., 50) to generate the first candidate voting weight corresponding to digital asset P1 (i.e., 3000*50=150000).

[0146] Optionally, in the terminal device N i When it is the terminal device corresponding to the blockchain address FFFFFF, the terminal device N iThe M-type digital assets may include digital assets P1 and digital assets P2, the asset holding quantity corresponding to digital asset P1 is equal to 150, the block height corresponding to digital asset P1 is equal to 2000, the asset holding quantity corresponding to digital asset P2 is equal to 50, and the block height corresponding to digital asset P2 is equal to 4000. The blockchain node may perform a difference operation on the maximum block height (i.e., 4000) and the block height corresponding to digital asset P1 (i.e., 2000) to generate the asset holding height corresponding to digital asset P1 (i.e., 4000-2000=2000); the blockchain node may perform a difference operation on the maximum block height (i.e., 4000) and the block height corresponding to digital asset P2 (i.e., 4000) to generate the asset holding height corresponding to digital asset P2 (i.e., 4000-4000=0). Furthermore, the blockchain node can perform a multiplication operation on the asset holding height corresponding to the digital asset P1 (i.e., 2000) and the asset holding quantity corresponding to the digital asset P1 (i.e., 150) to generate the first candidate voting weight corresponding to the digital asset P1 (i.e., 2000*150=300000); the blockchain node can perform a multiplication operation on the asset holding height corresponding to the digital asset P2 (i.e., 0) and the asset holding quantity corresponding to the digital asset P2 (i.e., 50) to generate the first candidate voting weight corresponding to the digital asset P2 (i.e., 0*50=0).

[0147] Optionally, in the terminal device N i When it is the terminal device corresponding to the blockchain address GGGGGG, the terminal device N i The M-type digital assets may include digital asset P1, the asset holding quantity corresponding to digital asset P1 is equal to 300, and the block height corresponding to digital asset P1 is equal to 3000. The blockchain node can perform a difference operation on the maximum block height (i.e., 4000) and the block height corresponding to digital asset P1 (i.e., 3000) to generate the asset holding height corresponding to digital asset P1 (i.e., 4000-3000=1000). Further, the blockchain node can perform a multiplication operation on the asset holding height corresponding to digital asset P1 (i.e., 1000) and the asset holding quantity corresponding to digital asset P1 (i.e., 300) to generate the first candidate voting weight corresponding to digital asset P1 (i.e., 1000*300=300000).

[0148] Optionally, blockchain nodes can obtain the digital asset P through the weight generation function j The corresponding quantity weight associated with the number of assets held is the value of the digital asset P j The corresponding asset holding quantity and quantity weight are multiplied to generate the digital asset P j The corresponding weighted asset holdings; blockchain nodes can obtain the digital asset P through the weight generation function jThe corresponding assets hold a high degree of weight associated with the digital asset P j The corresponding asset holding height and height weight are multiplied to generate the digital asset P j The corresponding weighted asset holding height. Furthermore, the blockchain node can generate a weight function for the digital asset P j The corresponding weighted asset holdings and digital assets P j The corresponding weighted asset holding height is multiplied to generate the digital asset P j The corresponding first candidate voting weight.

[0149] Among them, the embodiments of the present application do not limit the specific value of the quantity weight, and the embodiments of the present application do not limit the specific value of the height weight. In addition, different asset holding quantities can correspond to the same quantity weight, and different asset holding quantities can also correspond to different quantity weights; different asset holding heights can correspond to the same height weight, and different asset holding heights can also correspond to different height weights. For example, when the number of assets held is equal to 300, the quantity weight associated with the number of assets held can be equal to 0.9; when the number of assets held is equal to 200, the quantity weight associated with the number of assets held can be equal to 0.6. For another example, when the asset holding height is equal to 4000, the height weight associated with the asset holding height can be equal to 0.6, and when the asset holding height is equal to 2000, the height weight associated with the asset holding height can be equal to 0.9.

[0150] Step S204: summing the first candidate voting weights corresponding to the M types of digital assets respectively through a weight generation function to generate a terminal device N i The corresponding voting weight.

[0151] Further, please refer to Table 2 again. If the terminal voting result of the terminal device corresponding to the blockchain address EEEEEE is a negative voting result, and the terminal voting result of the terminal device corresponding to the blockchain address FFFFFF and the terminal voting result of the terminal device corresponding to the blockchain address GGGGGG are both positive voting results, then the blockchain node can determine that the negative voting weight corresponding to the negative voting result is 15,000, and the positive voting weight corresponding to the positive voting result is 60,000, and then determine the positive voting result as the combined voting result corresponding to the voting content.

[0152] It can be seen that the embodiment of the present application can call the weight generation function in the asset smart contract through the function identifier in the business initiation request, and perform difference calculation on the maximum block height corresponding to the blockchain and the block height corresponding to the M-type digital assets respectively through the weight generation function, generate the asset holding height corresponding to the M-type digital assets respectively, and then based on the asset holding quantity corresponding to the M-type digital assets respectively and the asset holding height corresponding to the M-type digital assets respectively, generate the voting weights corresponding to the S terminal devices respectively. Therefore, the embodiment of the present application can introduce the parameters of the time dimension and the parameters of the quantity dimension to calculate the voting weight. At this time, long-term holders (i.e., asset holders with longer holding time) and novice holders (i.e., asset holders with shorter holding time) can both have an impact on the voting results (more inclined to the terminal voting results of long-term holders), making the voting weights more dispersed, so that the distribution of voting weights can be made more fair. In addition, the embodiment of the present application can encourage long-term holders to participate in network governance, which helps to improve the degree of decentralization of the entire blockchain network and promote blockchain technology to develop in a more fair and stable direction.

[0153] For further information, see Figure 6 , Figure 6 is a flowchart of a data processing method based on blockchain provided in an embodiment of the present application. The data processing method may include the following steps S301-S306, and steps S301-S306 are Figure 3 A specific embodiment of step S103 in the corresponding embodiment.

[0154] Step S301, calling the weight generation function in the asset smart contract through the function identifier in the business initiation request;

[0155] Among them, the terminal device N i It can include M types of digital assets, where M can be a non-negative integer; terminal device N i The corresponding asset holdings include the asset holdings corresponding to M types of digital assets, and the terminal device N i The corresponding asset generation parameters include the block generation timestamp of the block where the transaction associated with the M-type digital asset is located (i.e., the block generation timestamp of the block where the transaction is located when the digital asset is last operated (for example, the operation here can be issuance, transfer, etc.)). For example, when the digital asset is transferred from the first terminal device to the second terminal device, the asset generation parameter can be the block generation timestamp of the block to which the asset transfer transaction belongs. For another example, when the digital asset is issued by the blockchain system, the asset generation parameter can be the block generation timestamp of the block to which the asset issuance transaction belongs.

[0156] Step S302, performing timestamp interval calculation on the current timestamp and the block generation timestamps corresponding to the M types of digital assets respectively through a weight generation function, and generating the asset holding duration corresponding to the M types of digital assets respectively;

[0157] Among them, the embodiment of the present application does not limit the time unit of the asset holding time. For example, the time unit of the asset holding time can be days, months, or hours. The asset holding time under the corresponding time unit can be 2 days, 2 months, or 3 hours.

[0158] Among them, Class M digital assets may include digital assets P j , where j can be a positive integer less than or equal to M. The blockchain node can use the weight generation function to calculate the current timestamp and digital asset P j The corresponding block generation timestamp performs timestamp interval calculation to generate digital asset P j The corresponding asset holding period.

[0159] It should be understood that the embodiment of the present application does not limit the specific value of the current timestamp. The current timestamp is obtained in real time and has different values ​​at different times. For example, the embodiment of the present application can be described by taking the current timestamp equal to 01:01 on August 17, 2023 as an example.

[0160] For ease of understanding, digital assets are used as digital assets P j The blockchain node can obtain the current timestamp and digital asset P through the weight generation function. j The time interval between the corresponding block generation timestamps, and then the digital asset P is determined based on the time interval j The corresponding asset holding period. For example, the current timestamp can be 01:01 on August 17, 2023, and the digital asset P j The corresponding block generation timestamp can be 16:00 on August 16, 2023, and the time interval between 01:01 on August 17, 2023 and 16:00 on August 16, 2023 can be 9 hours and 1 minute; if the asset holding time unit is day, the blockchain node can determine 1 day or 0 day as the digital asset P j The corresponding asset holding period; if the asset holding period is in months, the blockchain node can determine January or October as the digital asset P j The corresponding asset holding time; if the asset holding time is in hours, the blockchain node can determine 9 hours or 10 hours as the digital asset P j The corresponding asset holding period.

[0161] Step S303, converting the asset holding periods corresponding to the M types of digital assets into growth rates through a weight generation function to generate asset growth rates corresponding to the M types of digital assets;

[0162] Specifically, blockchain nodes can use weight generation functions to generate digital assets P j The corresponding asset holding period is converted into a growth rate to generate digital asset P j The corresponding candidate asset growth rate. Furthermore, if the digital asset P j If the corresponding candidate asset growth rate is greater than the asset growth rate threshold (for example, the asset growth rate threshold may be equal to 20%), the blockchain node may determine the asset growth rate threshold as the digital asset P j The corresponding asset growth rate. Optional, if the digital asset P j If the corresponding candidate asset growth rate is less than or equal to the asset growth rate threshold, the blockchain node can transfer the digital asset P j The corresponding candidate asset growth rate is determined as the digital asset P j The corresponding asset growth rate. j Comparing the corresponding candidate asset growth rate with the asset growth rate threshold can avoid the digital asset P j The corresponding asset growth rate increases infinitely, resulting in the digital asset P j The corresponding voting weight is too large, thereby increasing the rationality of the voting weight.

[0163] Among them, the blockchain node can generate a weight function for the digital asset P j The corresponding asset holding period and the first default parameter (for example, the first default parameter may be equal to 1) are subtracted to generate the digital asset P j Further, the blockchain node can generate a weight function for the second default parameter (for example, the second default parameter can be equal to 2) and the digital asset P j The corresponding exponential parameter is exponentially operated to generate the digital asset P j Corresponding candidate asset parameters. Furthermore, blockchain nodes can use weight generation functions to generate digital assets P j The corresponding candidate asset parameter is divided by the third default parameter (for example, the third default parameter may be equal to 100) to generate the digital asset P j The corresponding candidate asset growth rate. For example, in the digital asset P j When the corresponding asset holding period is equal to 2 months, the digital asset P j The corresponding exponential parameter can be equal to 1 (i.e. 2-1=1), and the digital asset P j The corresponding candidate asset parameter can be equal to 2 (i.e. 2 1=2); For example, in the digital asset P j When the corresponding asset holding period is equal to 3 months, the digital asset P j The corresponding exponential parameter can be equal to 2 (i.e. 3-1=2), and the digital asset P j The corresponding candidate asset parameter can be equal to 4 (i.e. 2 2 =4).

[0164] It is understandable that blockchain nodes can be in the digital asset P j When the corresponding asset holding period is equal to the default holding period (for example, the default holding period may be equal to 0 months), the default asset growth rate (for example, the default asset growth rate may be equal to 0%) is determined as the digital asset P j The corresponding asset growth rate. Optionally, the blockchain node can j When the corresponding asset holding period is not equal to the default holding period, the step of converting the growth rate of the asset holding period corresponding to each of the M types of digital assets through the weight generation function is executed to generate the asset growth rate corresponding to each of the M types of digital assets. In other words, the blockchain node can j If the corresponding asset holding period is not equal to the default holding period, step S303 is executed. j When the corresponding asset holding period is equal to 0 months, the digital asset P j The corresponding candidate asset growth rate may be equal to 0%.

[0165] Optionally, blockchain nodes can use weight generation functions to generate digital assets P j The corresponding asset holding period is divided by the third default parameter to generate the digital asset P j The corresponding candidate asset growth rate. For example, in the digital asset P j When the corresponding asset holding period is equal to 2 months, the digital asset P j The corresponding candidate asset growth rate can be equal to 2% (i.e. 2 / 100 = 2%); for example, in the digital asset P j When the corresponding asset holding period is equal to 3 months, the digital asset P j The corresponding candidate asset growth rate can be equal to 3% (i.e. 3 / 100=3%). j When the corresponding asset holding period is equal to 0 months, the digital asset P j The corresponding candidate asset growth rate may be equal to 0% (ie, 0 / 100=0%).

[0166] It should be understood that the embodiments of the present application do not limit the specific process of growth rate conversion. The specific process of growth rate conversion can also be a method of querying a growth rate list, which can include a mapping relationship between asset holding time and asset growth rate. For example, in the digital asset P j When the corresponding asset holding period is equal to 1 month, the digital asset P j The corresponding candidate asset growth rate can be equal to 1%; for example, in the digital asset P j When the corresponding asset holding period is equal to 2 months, the digital asset P j The corresponding candidate asset growth rate can be equal to 1.5%; for example, in the digital asset P j When the corresponding asset holding period is equal to 3 months, the digital asset P j The corresponding candidate asset growth rate may be equal to 1.7%.

[0167] Step S304, combining the growth rates of the total assets and the asset growth rates corresponding to the M types of digital assets through a weight generation function to generate the asset percentages corresponding to the M types of digital assets;

[0168] For example, the total asset growth rate may be equal to 100%.

[0169] Step S305, multiplying the asset holding quantity corresponding to the M types of digital assets and the asset percentage corresponding to the M types of digital assets by a weight generation function to generate second candidate voting weights corresponding to the M types of digital assets;

[0170] Specifically, blockchain nodes can use weight generation functions to generate digital assets P j The corresponding number of assets held and digital assets P j The corresponding asset percentage is multiplied to generate the digital asset P j The corresponding second candidate voting weight.

[0171] Step S306: The second candidate voting weights corresponding to the M types of digital assets are summed up by a weight generation function to generate a terminal device N i The corresponding voting weight.

[0172] For example, for the terminal device corresponding to the blockchain address EEEEEE, the M-type digital assets of the terminal device may include the digital asset P1, the asset holding quantity corresponding to the digital asset P1 is equal to 50, and the asset percentage corresponding to the digital asset P1 is equal to 105%. Further, the blockchain node may multiply the asset percentage corresponding to the digital asset P1 (i.e., 105%) and the asset holding quantity corresponding to the digital asset P1 (i.e., 50) to generate the second candidate voting weight corresponding to the digital asset P1 (i.e., 105%*50=52.5). Optionally, for the terminal device corresponding to the blockchain address FFFFFF, the M-type digital assets of the terminal device may include the digital asset P1 and the digital asset P2, the asset holding quantity corresponding to the digital asset P1 is equal to 150, the asset percentage corresponding to the digital asset P1 is equal to 103%, the asset holding quantity corresponding to the digital asset P2 is equal to 50, and the block height corresponding to the digital asset P2 is equal to 100%. Further, the blockchain node may multiply the asset percentage corresponding to the digital asset P1 (i.e., 103%) and the asset holding quantity corresponding to the digital asset P1 (i.e., 150) to generate the second candidate voting weight corresponding to the digital asset P1 (i.e., 103%*150=154.5); the blockchain node may multiply the asset percentage corresponding to the digital asset P2 (i.e., 100%) and the asset holding quantity corresponding to the digital asset P2 (i.e., 50) to generate the first candidate voting weight corresponding to the digital asset P2 (i.e., 100%*50=50). Optionally, for the terminal device corresponding to the blockchain address GGGGGG, the M-type digital assets of the terminal device may include the digital asset P1, the asset holding quantity corresponding to the digital asset P1 is equal to 300, and the asset percentage corresponding to the digital asset P1 is equal to 101%. Furthermore, the blockchain node can perform a multiplication operation on the asset percentage corresponding to the digital asset P1 (i.e., 101%) and the asset holding quantity corresponding to the digital asset P1 (i.e., 300) to generate the second candidate voting weight corresponding to the digital asset P1 (i.e., 101%*300=303).

[0173] Furthermore, if the terminal voting result of the terminal device corresponding to the blockchain address EEEEEE is a negative voting result, and the terminal voting result of the terminal device corresponding to the blockchain address FFFFFF and the terminal voting result of the terminal device corresponding to the blockchain address GGGGGG are both positive voting results, then the blockchain node can determine that the negative voting weight corresponding to the negative voting result is 52.5, and the positive voting weight corresponding to the positive voting result is 507.5, and then determine the positive voting result as the combined voting result corresponding to the voting content.

[0174] It can be seen that the embodiment of the present application can call the weight generation function in the asset smart contract through the function identifier in the business initiation request, and perform timestamp interval calculation on the block generation timestamp corresponding to the current timestamp and the M-type digital assets respectively through the weight generation function, generate the asset holding time corresponding to the M-type digital assets respectively, and then based on the asset holding quantity corresponding to the M-type digital assets respectively and the asset holding time corresponding to the M-type digital assets respectively, generate the voting weights corresponding to the S terminal devices respectively. Therefore, the embodiment of the present application can introduce the parameters of the time dimension and the parameters of the quantity dimension to calculate the voting weight. At this time, long-term holders (i.e., asset holders with longer holding time) and novice holders (i.e., asset holders with shorter holding time) can both have an impact on the voting results (more inclined to the terminal voting results of long-term holders), making the voting weights more dispersed, so that the distribution of voting weights can be made more fair. In addition, the embodiment of the present application can encourage long-term holders to participate in network governance, which helps to improve the degree of decentralization of the entire blockchain network and promote blockchain technology to develop in a more fair and stable direction.

[0175] For further information, see Figure 7 , Figure 7 is a flowchart of a data processing method based on blockchain provided in an embodiment of the present application. The data processing method can be executed by a blockchain node, which can be the above-mentioned Figure 1 Any blockchain node (e.g., blockchain node 110a) in the blockchain network 100a of the corresponding embodiment. The data processing method may include the following steps S401-S405:

[0176] Step S401, obtaining terminal voting results of S terminal devices for voting contents respectively;

[0177] The specific process of the blockchain node obtaining the terminal voting results of S terminal devices for the voting content can be seen in the above Figure 3 The description of step S101 in the corresponding embodiment will not be repeated here.

[0178] Step S402, obtaining the asset holding quantity of the digital assets corresponding to the S terminal devices and the block height of the block associated with the digital assets corresponding to the S terminal devices from the asset list maintained by the asset smart contract;

[0179] Specifically, the blockchain node can obtain the blockchain addresses corresponding to the S terminal devices and the asset list maintained by the asset smart contract. The asset list includes the mapping relationship between the blockchain address, the number of assets held, and the block height. Furthermore, the blockchain node can perform data search on the asset list according to the blockchain addresses corresponding to the S terminal devices, and obtain the number of digital assets held by the S terminal devices and the block height of the transaction associated with the digital assets corresponding to the S terminal devices.

[0180] Among them, the blockchain node performs data search on the asset list according to the blockchain addresses corresponding to the S terminal devices, and obtains the asset holding quantity of the digital assets corresponding to the S terminal devices and the block height of the block of the exchange associated with the digital assets corresponding to the S terminal devices. For the specific process, please refer to the above description of performing data search on the asset list according to the blockchain addresses corresponding to the S terminal devices, obtaining the asset holding quantity corresponding to the S terminal devices and the asset generation parameters corresponding to the S terminal devices, which will not be repeated here.

[0181] Among them, the S terminal devices include terminal device N i , where i can be a positive integer less than or equal to S; the number of digital assets held by the S terminal devices respectively includes the terminal device N i The number of digital assets held by the corresponding terminal devices, the block height of the block associated with the digital assets corresponding to the S terminal devices, including the block height associated with the terminal device N i The block height of the exchange associated with the corresponding digital asset.

[0182] Step S403, performing a difference operation on the maximum block height corresponding to the blockchain and the block height of the exchange block associated with the digital assets corresponding to the S terminal devices respectively through the asset smart contract, and generating the asset holding height of the digital assets corresponding to the S terminal devices respectively;

[0183] Specifically, the blockchain node can call the weight generation function in the asset smart contract through the function identifier in the business initiation request. The business initiation request refers to a request to initiate voting content. Furthermore, the blockchain node can use the weight generation function to compare the maximum block height corresponding to the blockchain and the weight generation function with the terminal device N. i The corresponding digital asset-related exchange performs a difference operation at the block height of the block to generate the terminal device N i The asset holding height of the corresponding digital asset.

[0184] Among them, the maximum block height corresponding to the blockchain node and the terminal device N iThe corresponding digital asset-related exchange performs a difference operation at the block height of the block to generate the terminal device N i The specific process of the corresponding digital asset holding height can be found in the above Figure 5 The description of step S202 in the corresponding embodiment will not be repeated here.

[0185] Step S404, performing weight calculation on the asset holding heights of the digital assets corresponding to the S terminal devices and the asset holding quantities of the digital assets corresponding to the S terminal devices, to generate voting weights corresponding to the S terminal devices;

[0186] Specifically, the blockchain node can i The corresponding digital asset holding height and terminal device N i The corresponding digital asset holding quantity is weighted to generate the terminal device N i The corresponding voting weight.

[0187] Among them, the blockchain node has a i The corresponding digital asset holding height and terminal device N i The corresponding digital asset holding quantity is weighted to generate the terminal device N i For the specific process of the corresponding voting weights, please refer to the above Figure 5 The description of step S203 - step S204 in the corresponding embodiment will not be repeated here.

[0188] Among them, the terminal device N i It includes M types of digital assets, where M can be a non-negative integer; terminal device N i The corresponding digital asset holding quantity includes the asset holding quantity corresponding to M types of digital assets, and the terminal device N i The block height of the block in which the corresponding digital asset is associated includes the block height of the block in which the M-type digital asset is associated.

[0189] Step S405: Generate a combined voting result corresponding to the voting content according to the voting weights respectively corresponding to the S terminal devices and the terminal voting results respectively corresponding to the S terminal devices.

[0190] The specific process of the blockchain node generating the combined voting result corresponding to the voting content according to the voting weights corresponding to the S terminal devices and the terminal voting results corresponding to the S terminal devices can be seen in the above Figure 3 The description of step S104 in the corresponding embodiment will not be repeated here.

[0191] Among them, the S terminal devices include a first terminal device and a second terminal device. It should be understood that the blockchain node can obtain the asset transfer transaction initiated by the first terminal device through the resource client. Among them, the asset transfer transaction is used to instruct the first terminal device to transfer a digital asset with an asset transfer quantity to the second terminal device. Further, the blockchain node can process the asset transfer transaction on the chain. When the asset transfer transaction is successfully chained to the blockchain network, the asset holding quantity of the digital asset corresponding to the first terminal device and the block height of the block associated with the digital asset corresponding to the first terminal device are obtained from the asset list, and the asset holding quantity of the digital asset corresponding to the first terminal device and the block height of the block associated with the digital asset corresponding to the first terminal device are updated according to the asset transfer quantity. At the same time, the blockchain node can obtain the asset holding quantity of the digital asset corresponding to the second terminal device and the block height of the block associated with the digital asset corresponding to the second terminal device from the asset list, and update the asset holding quantity of the digital asset corresponding to the second terminal device and the block height of the block associated with the digital asset corresponding to the second terminal device according to the asset transfer quantity.

[0192] Wherein, the first terminal device includes M1 digital assets, where M1 can be a positive integer; the asset holding quantity of the digital assets corresponding to the first terminal device includes the asset holding quantity corresponding to the M1 digital assets respectively, and the block height of the block of the transaction associated with the digital assets corresponding to the first terminal device includes the block height corresponding to the M1 digital assets respectively. It can be understood that the specific process of the blockchain node updating the asset holding quantity of the digital assets corresponding to the first terminal device and the block height of the transaction associated with the digital assets corresponding to the first terminal device according to the asset transfer quantity can be described as follows: the blockchain node can obtain the asset holding quantity corresponding to the first block height from the asset holding quantity corresponding to the M1 digital assets respectively, if the asset holding quantity corresponding to the first block height is greater than the asset transfer quantity, then the asset holding quantity corresponding to the first block height and the asset transfer quantity are subtracted to obtain the asset holding quantity after the subtraction operation, and the asset holding quantity corresponding to the first block height is updated by the asset holding quantity after the subtraction operation. Wherein, the first block height is the maximum block height among the block heights corresponding to the M1 digital assets respectively. Optionally, if the number of assets held corresponding to the first block height is equal to the number of assets transferred, the number of assets held corresponding to the first block height is deleted from the number of assets held corresponding to the M1 digital assets, and the first block height is deleted from the block heights corresponding to the M1 digital assets. Optionally, if the number of assets held corresponding to the first block height is less than the number of assets transferred, the number of assets held corresponding to the second block height is obtained from the number of assets held corresponding to the M1 digital assets, and based on the number of assets held corresponding to the first block height, the number of assets held corresponding to the second block height, and the number of assets transferred, the number of assets held corresponding to the first terminal device and the block height corresponding to the first terminal device are updated. Among them, the second block height is the maximum block height among the block heights corresponding to the M1 digital assets except the first block height.

[0193] Among them, the specific process of the blockchain node updating the asset holding quantity of the digital asset corresponding to the first terminal device and the block height of the block in which the transaction associated with the digital asset corresponding to the first terminal device is performed according to the asset transfer quantity can be referred to the above description of updating the asset holding quantity corresponding to the first terminal device and the asset generation parameters corresponding to the first terminal device according to the asset transfer quantity, which will not be repeated here.

[0194] Among them, the second terminal device includes M2 digital assets, where M2 can be a non-negative integer; the asset holding quantity of the digital assets corresponding to the second terminal device includes the asset holding quantity corresponding to the M2 digital assets respectively, and the block height of the block of the transaction associated with the digital assets corresponding to the second terminal device includes the block height corresponding to the M2 digital assets respectively. It can be understood that the specific process of the blockchain node updating the asset holding quantity of the digital assets corresponding to the second terminal device and the block height of the transaction associated with the digital assets corresponding to the second terminal device according to the asset transfer quantity can be described as: the blockchain node can determine the asset transfer quantity as the asset holding quantity corresponding to the M2+1th digital asset of the second terminal device, and determine the block height of the on-chain block to which the asset transfer transaction belongs as the block height corresponding to the M2+1th digital asset. Further, the blockchain node can add the asset holding quantity corresponding to the M2+1th digital asset to the asset holding quantity corresponding to the M2th digital asset respectively, and add the block height corresponding to the M2+1th digital asset to the block height corresponding to the M2th digital asset respectively.

[0195] Among them, the specific process of the blockchain node updating the asset holding quantity of the digital asset corresponding to the second terminal device and the block height of the block in which the transaction associated with the digital asset corresponding to the second terminal device is performed according to the asset transfer quantity can be referred to the above description of updating the asset holding quantity corresponding to the second terminal device and the asset generation parameters corresponding to the second terminal device according to the asset transfer quantity, which will not be repeated here.

[0196] It can be seen that the embodiment of the present application can realize the voting weight calculation based on the number of assets held and the block height by introducing the asset smart contract, thereby realizing voting on the blockchain network. Therefore, the voting method of the embodiment of the present application can simultaneously consider the block height (block height can be a parameter in the time dimension) and the number of assets held (the number of assets held can be a parameter in the quantity dimension) corresponding to the terminal device, so that the terminal voting results of the terminal device with higher security will not be weakened by the terminal voting results of the terminal device with lower security, thereby improving the security of the blockchain network.

[0197] For further information, see Figure 8 , Figure 8 1 is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of the present application. The data processing device 1 may include: a result acquisition module 11, a data acquisition module 12, a weight calculation module 13, and a result generation module 14; further, the data processing device 1 may also include: a transaction acquisition module 15, a first update module 16, and a second update module 17;

[0198] The result acquisition module 11 is used to obtain the terminal voting results of S terminal devices for the voting content respectively; S is a positive integer;

[0199] The result acquisition module 11 is specifically used to receive a service initiation request sent by a target terminal device; the service initiation request includes the scope of participants, voting participation time and voting content;

[0200] The result acquisition module 11 is specifically used to send the voting content to the terminal device corresponding to the participant in the participant range based on the service initiation request;

[0201] The result acquisition module 11 is specifically used to receive the terminal voting results for the voting content sent by the terminal devices corresponding to the participating objects in the participating object range through the resource client, and obtain S terminal voting results whose terminal voting timestamps are within the voting participation time from the received terminal voting results; the terminal devices corresponding to the participating objects in the participating object range include the terminal devices corresponding to the S terminal voting results respectively.

[0202] The data acquisition module 12 is used to obtain the asset holding quantity of the digital assets corresponding to the S terminal devices and the block height of the block associated with the digital assets corresponding to the S terminal devices from the asset list maintained by the asset smart contract;

[0203] The data acquisition module 12 is specifically used to obtain the blockchain addresses corresponding to the S terminal devices and the asset list maintained by the asset smart contract; the asset list includes the mapping relationship between the blockchain address, the number of assets held and the block height;

[0204] The data acquisition module 12 is specifically used to perform data search on the asset list according to the blockchain addresses corresponding to the S terminal devices, and obtain the asset holding quantity of the digital assets corresponding to the S terminal devices and the block height of the block where the transaction associated with the digital assets corresponding to the S terminal devices is located.

[0205] The weight calculation module 13 is used to perform a difference calculation on the maximum block height corresponding to the blockchain and the block height of the exchange block associated with the digital assets corresponding to the S terminal devices through the asset smart contract, and generate the asset holding height of the digital assets corresponding to the S terminal devices respectively;

[0206] The weight calculation module 13 is used to perform weight calculation on the asset holding height of the digital assets corresponding to the S terminal devices and the asset holding quantity of the digital assets corresponding to the S terminal devices, and generate the voting weights corresponding to the S terminal devices;

[0207] Among them, the S terminal devices include terminal device N i, i is a positive integer less than or equal to S; the number of digital assets held by the S terminal devices respectively includes the terminal device N i The number of assets held by the corresponding digital assets; the block height of the block associated with the digital assets corresponding to the S terminal devices includes the block height associated with the terminal device N i The block height of the exchange associated with the corresponding digital asset;

[0208] The weight calculation module 13 includes: a function calling unit 131, a weight calculation unit 132;

[0209] The function calling unit 131 is used to call the weight generation function in the asset smart contract through the function identifier in the business initiation request; the business initiation request refers to a request to initiate voting content;

[0210] The weight calculation unit 132 is used to calculate the maximum block height corresponding to the blockchain and the terminal device N through a weight generation function. i The corresponding digital asset-related exchange performs a difference operation at the block height of the block to generate the terminal device N i The asset holding height of the corresponding digital asset;

[0211] The weight calculation unit 132 is used to calculate the weight of the terminal device N. i The corresponding digital asset holding height and terminal device N i The corresponding digital asset holding quantity is weighted to generate the terminal device N i The corresponding voting weight.

[0212] Among them, the terminal device N i Includes M types of digital assets; M is a non-negative integer; terminal device N i The corresponding digital asset holding quantity includes the asset holding quantity corresponding to each of the M types of digital assets; and the terminal device N i The block height of the exchange associated with the corresponding digital asset includes the block height of the exchange associated with the M-type digital asset;

[0213] The weight calculation unit 132 is specifically used to perform a difference calculation on the maximum block height corresponding to the blockchain and the block heights corresponding to the M types of digital assets through a weight generation function to generate asset holding heights corresponding to the M types of digital assets;

[0214] The weight calculation unit 132 is specifically used to perform a multiplication operation on the asset holding quantity corresponding to the M types of digital assets and the asset holding height corresponding to the M types of digital assets through a weight generation function to generate the first candidate voting weights corresponding to the M types of digital assets;

[0215] The weight calculation unit 132 is specifically used to sum the first candidate voting weights corresponding to the M types of digital assets respectively through the weight generation function to generate the terminal device N i The corresponding voting weight.

[0216] Among them, Class M digital assets include digital assets P j , j is a positive integer less than or equal to M;

[0217] The weight calculation unit 132 is specifically used to obtain the weight related to the digital asset P through the weight generation function. j The corresponding quantity weight associated with the number of assets held is the value of the digital asset P j The corresponding asset holding quantity and quantity weight are multiplied to generate the digital asset P j The corresponding weighted asset holdings;

[0218] The weight calculation unit 132 is specifically used to obtain the weight related to the digital asset P through the weight generation function. j The corresponding assets hold a high degree of weight associated with the digital asset P j The corresponding asset holding height and height weight are multiplied to generate the digital asset P j The corresponding weighted asset holding height;

[0219] The weight calculation unit 132 is specifically used to calculate the digital asset P through a weight generation function. j The corresponding weighted asset holdings and digital assets P j The corresponding weighted asset holding height is multiplied to generate the digital asset P j The corresponding first candidate voting weight.

[0220] The specific implementation of the function calling unit 131 and the weight calculation unit 132 can be found in the above Figure 3 In the corresponding embodiment, step S103, Figure 5 In the corresponding embodiment, steps S201 to S204, Figure 6 In the corresponding embodiment, steps S301 to S306, and Figure 7 The description of step S403-step S404 in the corresponding embodiment will not be repeated here.

[0221] The result generating module 14 is used to generate a combined voting result corresponding to the voting content according to the voting weights respectively corresponding to the S terminal devices and the terminal voting results respectively corresponding to the S terminal devices.

[0222] The result generation module 14 includes: a weight acquisition unit 141, a result generation unit 142;

[0223] The weight acquisition unit 141 is used for acquiring the voting weights corresponding to H1 terminal devices from the voting weights corresponding to the S terminal devices if the terminal voting results corresponding to the S terminal devices include an affirmative voting result; H1 is a positive integer less than or equal to S; the H1 terminal device is a terminal device whose terminal voting result is an affirmative voting result among the S terminal devices;

[0224] The weight acquisition unit 141 is used for acquiring the voting weights corresponding to H2 terminal devices from the voting weights corresponding to the S terminal devices if the terminal voting results corresponding to the S terminal devices include an opposing voting result; H2 is a positive integer less than or equal to S; the H2 terminal devices are the terminal devices whose terminal voting results are opposing voting results among the S terminal devices;

[0225] The result generating unit 142 is used to generate a combined voting result corresponding to the voting content according to the voting weights respectively corresponding to the H1 terminal devices and the voting weights respectively corresponding to the H2 terminal devices.

[0226] The result generating unit 142 is specifically used to perform a sum operation on the voting weights corresponding to the H1 terminal devices, and generate a positive voting weight corresponding to the positive voting result;

[0227] The result generating unit 142 is specifically used to sum the voting weights corresponding to the H2 terminal devices to generate the opposing voting weight corresponding to the opposing voting result;

[0228] The result generating unit 142 is specifically configured to determine the approval voting result as the combined voting result corresponding to the voting content if the approval voting weight is greater than or equal to the opposition voting weight;

[0229] The result generating unit 142 is specifically configured to determine the negative voting result as the combined voting result corresponding to the voting content if the weight of the positive voting is less than the weight of the negative voting.

[0230] The specific implementation of the weight acquisition unit 141 and the result generation unit 142 can be found in the above Figure 3 The description of step S104 in the corresponding embodiment will not be repeated here.

[0231] Optionally, the S terminal devices include a first terminal device and a second terminal device;

[0232] The transaction acquisition module 15 is used to acquire an asset transfer transaction initiated by the first terminal device through the resource client; the asset transfer transaction is used to instruct the first terminal device to transfer a digital asset having an asset transfer amount to the second terminal device;

[0233] The first update module 16 is used to process the asset transfer transaction on the blockchain. When the asset transfer transaction is successfully uploaded to the blockchain network, the asset holding quantity of the digital asset corresponding to the first terminal device and the block height of the block in which the transaction associated with the digital asset corresponding to the first terminal device is located are obtained from the asset list, and the asset holding quantity of the digital asset corresponding to the first terminal device and the block height of the block in which the transaction associated with the digital asset corresponding to the first terminal device is located are updated according to the asset transfer quantity;

[0234] Wherein, the first terminal device includes M1 digital assets; M1 is a positive integer; the asset holding quantity of the digital assets corresponding to the first terminal device includes the asset holding quantity corresponding to the M1 digital assets respectively; the block height of the block in which the exchange associated with the digital assets corresponding to the first terminal device is located includes the block height corresponding to the M1 digital assets respectively;

[0235] The first update module 16 is specifically used to obtain the asset holding quantity corresponding to the first block height from the asset holding quantity corresponding to the M1 digital assets. If the asset holding quantity corresponding to the first block height is greater than the asset transfer quantity, the asset holding quantity corresponding to the first block height and the asset transfer quantity are subtracted to obtain the asset holding quantity after the subtraction operation, and the asset holding quantity corresponding to the first block height is updated by the asset holding quantity after the subtraction operation; the first block height is the maximum block height among the block heights corresponding to the M1 digital assets;

[0236] The first update module 16 is specifically used to delete the asset holding quantity corresponding to the first block height from the asset holding quantity corresponding to the M1 digital assets, and delete the first block height from the block heights corresponding to the M1 digital assets, if the asset holding quantity corresponding to the first block height is equal to the asset transfer quantity;

[0237] The first update module 16 is specifically used to obtain the asset holding quantity corresponding to the second block height from the asset holding quantity corresponding to the M1 digital assets if the asset holding quantity corresponding to the first block height is less than the asset transfer quantity, and update the asset holding quantity corresponding to the first terminal device and the block height corresponding to the first terminal device based on the asset holding quantity corresponding to the first block height, the asset holding quantity corresponding to the second block height and the asset transfer quantity; the second block height is the maximum block height among the block heights corresponding to the M1 digital assets except the first block height.

[0238] The second update module 17 is used to obtain the asset holding quantity of the digital asset corresponding to the second terminal device and the block height of the block in which the transaction associated with the digital asset corresponding to the second terminal device is located from the asset list, and update the asset holding quantity of the digital asset corresponding to the second terminal device and the block height of the block in which the transaction associated with the digital asset corresponding to the second terminal device is located according to the asset transfer quantity.

[0239] Wherein, the second terminal device includes M2 digital assets; M2 is a non-negative integer; the asset holding quantity of the digital assets corresponding to the second terminal device includes the asset holding quantity corresponding to the M2 digital assets respectively; the block height of the block in which the transaction associated with the digital assets corresponding to the second terminal device is located includes the block height corresponding to the M2 digital assets respectively;

[0240] The second update module 17 is specifically used to determine the asset transfer amount as the asset holding amount corresponding to the M2+1th type of digital assets of the second terminal device, and determine the block height of the on-chain block to which the asset transfer transaction belongs as the block height corresponding to the M2+1th type of digital assets;

[0241] The second updating module 17 is specifically used to accumulate the asset holding quantity corresponding to the M2+1-th digital asset to the asset holding quantity corresponding to the M2-th digital asset, and accumulate the block height corresponding to the M2+1-th digital asset to the block height corresponding to the M2-th digital asset.

[0242] The specific implementation methods of the result acquisition module 11, the data acquisition module 12, the weight calculation module 13, the result generation module 14, the transaction acquisition module 15, the first update module 16, and the second update module 17 can be found in the above Figure 3 In the corresponding embodiment, steps S101 to S104, Figure 5 In the corresponding embodiment, steps S201 to S204, Figure 6 In the corresponding embodiment, steps S301 to S306, and Figure 7 The description of steps S401 to S405 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here either.

[0243] For further information, see Fig. 9 , Fig. 9 Schematic diagram of a computer device provided in an embodiment of the present application, the computer device may be a terminal device or a server. Fig. 9As 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, in some embodiments, the user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. Optionally, the network interface 1004 may 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. Optionally, the memory 1005 may also be at least one storage device located away from the aforementioned processor 1001. As Fig. 9 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.

[0244] In such Fig. 9 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 achieve:

[0245] Obtain terminal voting results of S terminal devices for voting content respectively; S is a positive integer;

[0246] Obtain the asset holding quantity of the digital assets corresponding to the S terminal devices and the block height of the block associated with the digital assets corresponding to the S terminal devices from the asset list maintained by the asset smart contract;

[0247] Through the asset smart contract, the maximum block height corresponding to the blockchain and the block height of the exchange block associated with the digital assets corresponding to the S terminal devices are calculated to generate the asset holding height of the digital assets corresponding to the S terminal devices;

[0248] Perform weight calculation on the asset holding height of the digital assets corresponding to the S terminal devices and the asset holding quantity of the digital assets corresponding to the S terminal devices, and generate the voting weights corresponding to the S terminal devices;

[0249] According to the voting weights respectively corresponding to the S terminal devices and the terminal voting results respectively corresponding to the S terminal devices, a combined voting result corresponding to the voting content is generated.

[0250] It should be understood that the computer device 1000 described in the embodiment of the present application can execute the above Figure 3 , Figure 5 , Figure 6 and Figure 7 The description of the data processing method in the corresponding embodiment can also be performed as described above. Figure 8 The description of the data processing device 1 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here either.

[0251] 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 a computer program executed by the data processing device 1 mentioned above. When the processor executes the computer program, it can execute the above-mentioned Figure 3 , Figure 5 , Figure 6 and Figure 7 The description of the data processing method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of 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.

[0252] In addition, it should be noted that: the embodiment of the present application also provides a computer program product, which may include a computer program, and the computer program may be stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor may execute the computer program, so that the computer device performs the above Figure 3 , Figure 5 , Figure 6 and Figure 7 The description of the data processing method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer program product embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0253] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0254] 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: include: Obtain terminal voting results of S terminal devices for voting contents respectively; Said S is a positive integer; Obtaining from the asset list maintained by the asset smart contract the asset holding quantity of the digital assets corresponding to the S terminal devices and the block height of the block of the exchange associated with the digital assets corresponding to the S terminal devices; Performing a difference operation on the maximum block height corresponding to the blockchain and the block height of the transaction block associated with the digital assets corresponding to the S terminal devices respectively through the asset smart contract, and generating the asset holding height of the digital assets corresponding to the S terminal devices respectively; Performing weight calculation on the asset holding heights of the digital assets corresponding to the S terminal devices and the asset holding quantities of the digital assets corresponding to the S terminal devices, to generate voting weights corresponding to the S terminal devices; A combined voting result corresponding to the voting content is generated according to the voting weights respectively corresponding to the S terminal devices and the terminal voting results respectively corresponding to the S terminal devices.

2. The method according to claim 1, characterized in that: The S terminal devices include terminal device N i , i is a positive integer less than or equal to S; the number of digital assets held by the S terminal devices respectively corresponding to the terminal devices N i The number of assets held in the corresponding digital asset; The block height of the block associated with the digital assets corresponding to the S terminal devices includes the block height associated with the terminal device N i The block height of the exchange associated with the corresponding digital asset; The method of performing a difference operation on the maximum block height corresponding to the blockchain and the block height of the transaction block associated with the digital assets corresponding to the S terminal devices respectively through the asset smart contract to generate the asset holding height of the digital assets corresponding to the S terminal devices respectively includes: The weight generation function in the asset smart contract is called through the function identifier in the business initiation request; the business initiation request is a request to initiate the voting content; The weight generation function is used to compare the maximum block height corresponding to the blockchain and the terminal device N i The corresponding digital asset-related exchange performs a difference operation at the block height of the block to generate the terminal device N i The asset holding height of the corresponding digital asset; The weighting operation is performed on the asset holding heights of the digital assets respectively corresponding to the S terminal devices and the asset holding quantities of the digital assets respectively corresponding to the S terminal devices to generate the voting weights respectively corresponding to the S terminal devices, including: For the terminal device N i The corresponding digital asset holding height and the terminal device N i The corresponding digital asset holding quantity is weighted to generate the terminal device N i The corresponding voting weight.

3. The method according to claim 2, characterized in that The terminal device N i It includes M types of digital assets; M is a non-negative integer; the terminal device N i The corresponding digital asset holding quantity includes the asset holding quantity corresponding to the digital assets of the M categories; and the terminal device N i The block height of the block in which the corresponding digital asset is associated includes the block height of the block in which the digital asset in Category M is associated; The weight generation function is used to compare the maximum block height corresponding to the blockchain and the terminal device N i The corresponding digital asset-related exchange performs a difference operation at the block height of the block to generate the terminal device N i The corresponding digital asset holding height includes: Performing a difference operation on the maximum block height corresponding to the blockchain and the block heights corresponding to the M types of digital assets respectively through the weight generation function, generating the asset holding heights corresponding to the M types of digital assets respectively; The terminal device N i The corresponding digital asset holding height and the terminal device N i The corresponding digital asset holding quantity is weighted to generate the terminal device N i The corresponding voting weights include: Perform multiplication operation on the asset holding quantity corresponding to each of the M types of digital assets and the asset holding height corresponding to each of the M types of digital assets through the weight generation function to generate the first candidate voting weights corresponding to each of the M types of digital assets; The weight generation function is used to sum the first candidate voting weights corresponding to the M types of digital assets to generate the terminal device N i The corresponding voting weight.

4. The method according to claim 3, characterized in that The digital assets described in Category M include digital assets P j , j is a positive integer less than or equal to M; The method of performing multiplication operation on the asset holding quantity corresponding to the M types of digital assets and the asset holding height corresponding to the M types of digital assets by the weight generation function to generate the first candidate voting weights corresponding to the M types of digital assets respectively includes: Obtain the digital asset P through the weight generation function j The corresponding quantity weight associated with the number of assets held is the value of the digital asset P j The corresponding asset holding quantity and the quantity weight are multiplied to generate the digital asset P j The corresponding weighted asset holdings; Obtain the digital asset P through the weight generation function j The corresponding asset holding height is highly associated with the height weight of the digital asset P j The corresponding asset holding height and the height weight are multiplied to generate the digital asset P j The corresponding weighted asset holding height; The digital asset P is j The corresponding weighted asset holdings and the digital asset P j The corresponding weighted asset holding height is multiplied to generate the digital asset P j The corresponding first candidate voting weight.

5. The method according to claim 1, characterized in that The obtaining of the terminal voting results of the S terminal devices for the voting content respectively includes: Receive a service initiation request sent by a target terminal device; the service initiation request includes a scope of participants, voting participation time, and voting content; Sending the voting content to a terminal device corresponding to a participant in the participant range based on the service initiation request; Receive the terminal voting results for the voting content sent by the terminal device corresponding to the participating object in the participating object range through the resource client, and obtain S terminal voting results with terminal voting timestamps within the voting participation time from the received terminal voting results; the terminal devices corresponding to the participating objects in the participating object range include the terminal devices corresponding to the S terminal voting results respectively.

6. The method according to claim 1, characterized in that The obtaining, from the asset list maintained by the asset smart contract, the asset holding quantity of the digital assets respectively corresponding to the S terminal devices and the block height of the block of the exchange associated with the digital assets respectively corresponding to the S terminal devices, includes: Obtaining the blockchain addresses corresponding to the S terminal devices and the asset list maintained by the asset smart contract; the asset list includes a mapping relationship between the blockchain address, the number of assets held, and the block height; The asset list is searched for data according to the blockchain addresses corresponding to the S terminal devices, so as to obtain the asset holding quantity of the digital assets corresponding to the S terminal devices and the block height of the block in which the transaction associated with the digital assets corresponding to the S terminal devices is located.

7. The method according to claim 1, characterized in that The S terminal devices include a first terminal device and a second terminal device; The method further comprises: Acquire an asset transfer transaction initiated by the first terminal device through the resource client; the asset transfer transaction is used to instruct the first terminal device to transfer a digital asset having an asset transfer amount to the second terminal device; The asset transfer transaction is processed on the blockchain. When the asset transfer transaction is successfully uploaded to the blockchain network, the asset holding quantity of the digital asset corresponding to the first terminal device and the block height of the block in which the transaction associated with the digital asset corresponding to the first terminal device is located are obtained from the asset list, and the asset holding quantity of the digital asset corresponding to the first terminal device and the block height of the block in which the transaction associated with the digital asset corresponding to the first terminal device is located are updated according to the asset transfer quantity; The asset holding quantity of the digital asset corresponding to the second terminal device and the block height of the block in which the transaction associated with the digital asset corresponding to the second terminal device is located are obtained from the asset list, and the asset holding quantity of the digital asset corresponding to the second terminal device and the block height of the block in which the transaction associated with the digital asset corresponding to the second terminal device is located are updated according to the asset transfer quantity.

8. The method according to claim 7, characterized in that The first terminal device includes an M1-type digital asset; M1 is a positive integer; the asset holding quantity of the digital asset corresponding to the first terminal device includes the asset holding quantity corresponding to the M1-type digital assets respectively; the block height of the block of the exchange associated with the digital asset corresponding to the first terminal device includes the block height corresponding to the M1-type digital assets respectively; The updating of the asset holding quantity of the digital asset corresponding to the first terminal device and the block height of the exchange associated with the digital asset corresponding to the first terminal device according to the asset transfer quantity includes: The number of assets held corresponding to the first block height is obtained from the number of assets held corresponding to the digital assets of category M1. If the number of assets held corresponding to the first block height is greater than the number of assets transferred, the number of assets held corresponding to the first block height and the number of assets transferred are subtracted to obtain the number of assets held after the subtraction, and the number of assets held corresponding to the first block height is updated by the number of assets held after the subtraction; the first block height is the maximum block height among the block heights corresponding to the digital assets of category M1; If the asset holding quantity corresponding to the first block height is equal to the asset transfer quantity, then the asset holding quantity corresponding to the first block height is deleted from the asset holding quantity corresponding to the digital assets of category M1, and the first block height is deleted from the block heights corresponding to the digital assets of category M1; If the number of assets held corresponding to the first block height is less than the number of assets transferred, the number of assets held corresponding to the second block height is obtained from the number of assets held corresponding to the digital assets of category M1, and based on the number of assets held corresponding to the first block height, the number of assets held corresponding to the second block height and the number of assets transferred, the number of assets held corresponding to the first terminal device and the block height corresponding to the first terminal device are updated; the second block height is the maximum block height among the block heights corresponding to the digital assets of category M1 except the first block height.

9. The method according to claim 7, characterized in that: The second terminal device includes an M2-type digital asset; M2 is a non-negative integer; the number of digital assets held by the second terminal device includes the number of digital assets held corresponding to the M2-type digital assets; the block height of the block of the exchange associated with the digital asset corresponding to the second terminal device includes the block height corresponding to the M2-type digital assets; The updating of the asset holding quantity of the digital asset corresponding to the second terminal device and the block height of the exchange associated with the digital asset corresponding to the second terminal device according to the asset transfer quantity includes: Determine the asset transfer amount as the asset holding amount corresponding to the M2+1th category digital asset of the second terminal device, and determine the block height of the on-chain block to which the asset transfer transaction belongs as the block height corresponding to the M2+1th category digital asset; The number of assets held corresponding to the digital assets in the M2+1th category is added to the number of assets held corresponding to the digital assets in the M2th category, and the block height corresponding to the digital assets in the M2+1th category is added to the block height corresponding to the digital assets in the M2th category.

10. The method according to claim 1, characterized in that Generating a combined voting result corresponding to the voting content according to the voting weights respectively corresponding to the S terminal devices and the terminal voting results respectively corresponding to the S terminal devices includes: If the terminal voting results respectively corresponding to the S terminal devices include an affirmative voting result, then the voting weights respectively corresponding to H1 terminal devices are obtained from the voting weights respectively corresponding to the S terminal devices; the H1 terminal device is a terminal device whose terminal voting result is the affirmative voting result among the S terminal devices; If the terminal voting results respectively corresponding to the S terminal devices include an opposing voting result, then the voting weights respectively corresponding to H2 terminal devices are obtained from the voting weights respectively corresponding to the S terminal devices; the H2 terminal devices are the terminal devices whose terminal voting results are the opposing voting results among the S terminal devices; A combined voting result corresponding to the voting content is generated according to the voting weights respectively corresponding to the H1 terminal devices and the voting weights respectively corresponding to the H2 terminal devices.

11. The method according to claim 10, characterized in that The generating a combined voting result corresponding to the voting content according to the voting weights respectively corresponding to the H1 terminal devices and the voting weights respectively corresponding to the H2 terminal devices includes: Performing a sum operation on the voting weights corresponding to the H1 terminal devices respectively, to generate an affirmative voting weight corresponding to the affirmative voting result; Performing a sum operation on the voting weights corresponding to the H2 terminal devices respectively, to generate a dissenting voting weight corresponding to the dissenting voting result; If the approval vote weight is greater than or equal to the opposition vote weight, the approval vote result is determined as the combined voting result corresponding to the voting content; If the approval vote weight is less than the opposition vote weight, the opposition vote result is determined as the combined voting result corresponding to the voting content.

12. A data processing device based on blockchain, characterized in that: include: A result acquisition module is used to obtain the terminal voting results of S terminal devices for the voting content respectively; Said S is a positive integer; A data acquisition module, used to obtain the asset holding quantity of the digital assets corresponding to the S terminal devices and the block height of the block associated with the digital assets corresponding to the S terminal devices from the asset list maintained by the asset smart contract; A weight calculation module, used to perform a difference calculation on the maximum block height corresponding to the blockchain and the block height of the transaction block associated with the digital assets corresponding to the S terminal devices respectively through the asset smart contract, to generate the asset holding height of the digital assets corresponding to the S terminal devices respectively; A weight calculation module, used to perform weight calculation on the asset holding heights of the digital assets corresponding to the S terminal devices and the asset holding quantities of the digital assets corresponding to the S terminal devices, to generate voting weights corresponding to the S terminal devices; The result generating module is used to generate a combined voting result corresponding to the voting content according to the voting weights respectively corresponding to the S terminal devices and the terminal voting results respectively corresponding to the S terminal devices.

13. A computer device, characterized in that: include: Processor and memory; The processor is connected to the memory, wherein 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 11.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which 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 11.

15. A computer program product, characterized in that The computer program product comprises a computer program, which is stored in a computer-readable storage medium and is suitable for being read and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 11.