Data management method, device, equipment, storage medium and computer program product

CN116468439BActive Publication Date: 2026-09-22TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210046033.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-12
Publication Date
2026-09-22
Estimated Expiration
2042-01-12

AI Technical Summary

Technical Problem

[0003]在实现相关技术的过程中发现,由于数据的处理逻辑封装在平台端,因此对于用户来说,数据处理的过程是不透明的,比如转出方只能知道数字资产转出有没有成功,但不知道是怎么转移数字资产的,缺乏可信度

Benefits of technology

[0017]本申请实施例中,数据管理平台接收客户端通过调用数据接口发送的数据处理请求,数据处理请求携带客户端的第一地址,调用区块链网络的目标智能合约的数据处理模块对数据处理请求进行处理,得到数据处理请求的处理结果,调用目标智能合约的数据记录模块,将处理结果、第一地址和目标智能合约的第二地址写入区块链网络对应的区块链中;上述方案,使数据的接收、处理和存储都是透明的,可以提高数据处理的透明度和数据可信度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116468439B_ABST
    Figure CN116468439B_ABST
Patent Text Reader

Abstract

The application provides a data management method, device and equipment, a storage medium and a computer program product, which can be applied to various fields or scenes such as cloud technology, artificial intelligence, block chain, Internet of Vehicles, intelligent transportation and smart home, and the method comprises the following steps: receiving a data processing request sent by a client by calling a data interface, wherein the data processing request carries a first address of the client; calling a data processing module of a target smart contract of a block chain network to process the data processing request, and obtaining a processing result of the data processing request; and calling a data recording module of the target smart contract to write the processing result, the first address and a second address of the target smart contract into a corresponding block chain of the block chain network. The application can improve the transparency and data credibility of data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data management method, a data management device, a computer equipment, a computer-readable storage medium, and a computer program product. Background Technology

[0002] In daily life, people install various types of applications on their mobile devices to provide different services. Taking digital asset transactions as an example, when the sender transfers digital assets to the receiver through a payment application, the centralized management platform corresponding to the payment application deducts the corresponding amount of digital assets from the sender's account and adds the corresponding amount of digital assets to the receiver's account.

[0003] In the process of implementing the relevant technologies, it was found that because the data processing logic is encapsulated on the platform side, the data processing process is not transparent to users. For example, the transferor can only know whether the digital asset transfer was successful, but does not know how the digital asset was transferred, which lacks credibility. Summary of the Invention

[0004] This application provides a data management method, apparatus, device, storage medium, and computer program product that can improve the transparency and reliability of data processing.

[0005] On one hand, embodiments of this application provide a data management method applied to a data management platform, the method comprising:

[0006] Receive a data processing request sent by the client through a data interface call, wherein the data processing request carries the client's first address;

[0007] The data processing module of the target smart contract in the blockchain network is invoked to process the data processing request and obtain the processing result of the data processing request.

[0008] The data recording module of the target smart contract is invoked to write the processing result, the first address, and the second address of the target smart contract into the blockchain corresponding to the blockchain network.

[0009] On one hand, embodiments of this application provide a data management device applied to a data management platform, the device comprising:

[0010] The receiving unit is configured to receive a data processing request sent by the client through a data interface call, wherein the data processing request carries the client's first address.

[0011] The processing unit is used to call the data processing module of the target smart contract of the blockchain network to process the data processing request and obtain the processing result of the data processing request.

[0012] The processing unit is further configured to call the data recording module of the target smart contract to write the processing result, the first address, and the second address of the target smart contract into the blockchain corresponding to the blockchain network.

[0013] Accordingly, this application provides a computer device, which includes a processor, a communication interface, and a memory. The processor, the communication interface, and the memory are interconnected. The memory stores a computer program, and the processor is used to call the computer program to execute the data management method of any of the possible implementations.

[0014] Accordingly, embodiments of this application provide a computer-readable storage medium storing a computer program, which is executed by a processor to implement the steps of the data management method provided in embodiments of this application.

[0015] Accordingly, this application also provides a computer program product, which includes a computer program or computer instructions, and the computer program or computer instructions are executed by a processor to implement the steps of the data management method provided in this application.

[0016] Accordingly, this application also provides a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the data management method provided in this application.

[0017] In this embodiment, the data management platform receives a data processing request sent by the client through a data interface call. The data processing request carries the client's first address. The platform calls the data processing module of the target smart contract in the blockchain network to process the data processing request and obtain the processing result. Then, the platform calls the data recording module of the target smart contract to write the processing result, the first address, and the second address of the target smart contract into the corresponding blockchain of the blockchain network. The above scheme makes the reception, processing, and storage of data transparent, which can improve the transparency and credibility of data processing. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 A schematic diagram of a blockchain network architecture provided for an embodiment of this application;

[0020] Figure 2 A schematic diagram of a blockchain structure is provided as an embodiment of this application;

[0021] Figure 3 A flowchart illustrating a block generation process provided in an embodiment of this application;

[0022] Figure 4 A schematic diagram of the system architecture of a data management system provided in this application embodiment;

[0023] Figure 5 A flowchart illustrating a data management method provided in this application embodiment. Figure 1 ;

[0024] Figure 6 A flowchart illustrating a data management method provided in this application embodiment. Figure 2 ;

[0025] Figure 7 A schematic diagram illustrating a password generation rule provided in an embodiment of this application;

[0026] Figure 8 A schematic diagram of the lifecycle of a smart contract provided for an embodiment of this application;

[0027] Figure 9 This is a schematic diagram of the structure of a data management device provided in an embodiment of this application;

[0028] Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0030] It should be noted that the terms "first," "second," etc., used in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, technical features defined with "first," "second," etc., may explicitly or implicitly include at least one of those features.

[0031] Please see Figure 1 , Figure 1 This is a schematic diagram of a blockchain network structure provided in an embodiment of this application. The blockchain network is a data sharing system that may include multiple nodes, specifically node 1, node 2, node 3, ..., node N. Each node, during normal operation, can receive data sent from the outside world and perform block-on-chain processing based on the received data, and can also send data to the outside world. To ensure data interoperability between nodes, information connections can exist between each node, allowing information transmission between nodes. For example, when any node in the blockchain network receives input information, other nodes in the blockchain network obtain the input information according to a consensus algorithm and store it as data in the shared data, ensuring that the data stored on all nodes in the blockchain network is consistent.

[0032] It is understood that the above-mentioned information connection is not limited to the connection method. It can be connected directly or indirectly through wired communication, or directly or indirectly through wireless communication, or through other connection methods. This application does not impose any restrictions on this.

[0033] It is understandable that each node in a blockchain network has a corresponding node identifier, and each node can store the node identifiers of other nodes in the blockchain network. This allows the generated blocks to be broadcast to other nodes in the blockchain network based on their node identifiers. Each node can maintain a node identifier list as shown in Table 1 below, storing the node name and node identifier in this list. The node identifier can be an IP (Internet Protocol) address or any other information that can be used to identify the node. Table 1 uses IP addresses as an example only.

[0034] Table 1

[0035] Node 1 117.114.151.174 Node 2 117.116.189.145 Node 3 117.113.181.124 … … Node N xx.xx.xx.xx

[0036] Each node in a blockchain network stores an identical copy of the blockchain. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and to generate the next block. See also Figure 2 A blockchain consists of multiple blocks. The genesis block includes a block header and a block body. The block header stores input information feature values, version number, timestamp, and difficulty value, while the block body stores the input information. The next block after the genesis block takes the genesis block as its parent block. The next block also includes a block header and a block body. The block header stores the input information feature values ​​of the current block, the block header feature values ​​of the parent block, version number, timestamp, and difficulty value, and so on. This ensures that the block data stored in each block is related to the block data stored in the parent block, guaranteeing the security of the input information in the blocks.

[0037] When generating the individual blocks in the blockchain, see Figure 3 When a node in the blockchain receives input information, it verifies the input information. After verification, it stores the input information in a memory pool and updates its hash tree used to record the input information. Then, it updates the timestamp to the time the input information was received and tries different random numbers multiple times to calculate the feature value, ensuring that the calculated feature value satisfies the following formula:

[0038] SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x)) <TARGET

[0039] Wherein, SHA256 is the feature value algorithm used to calculate the feature value; version (version number) is the version information of the relevant block protocol in the blockchain; prev_hash is the block header feature value of the parent block of the current block; merkle_root is the feature value of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, which is a fixed value for a period of time and is determined again after exceeding the fixed time period; x is a random number; TARGET is the feature value threshold, which can be determined based on nbits.

[0040] Thus, when a random number satisfying the above formula is calculated, the information can be stored accordingly, generating a block header and a block body to obtain the current block. Subsequently, the node containing the blockchain sends the newly generated block to other nodes in its blockchain network based on the node identifiers of other nodes in the blockchain network. The other nodes verify the newly generated block and, after verification, add the newly generated block to their stored blockchain.

[0041] A smart contract is a computer protocol designed to disseminate, verify, or execute contracts in an informational manner, enabling trusted transactions without the need for a third party, and ensuring these transactions are immutable. The term "transaction," equivalent to the computer term "transaction," encompasses operations that need to be submitted to a blockchain network for execution. It does not solely refer to transactions in a business context; however, given the conventional use of the term "transaction" in blockchain technology, this application's embodiments follow this convention. It should be understood that a blockchain may include one or more smart contracts. By submitting a transaction to a node on the blockchain network, the execution of the corresponding smart contract can be triggered, utilizing the functionality provided by the smart contract to fulfill business requirements.

[0042] Please see Figure 4 , Figure 4 This is a schematic diagram of the architecture of a data management system provided in an embodiment of this application. Figure 4 The data management platform 40 shown can be a server or a service platform running on a server to manage the blockchain network. The server can be a standalone physical server, 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 communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0043] The data management platform 40 can be responsible for the registration and issuance of smart contracts, as well as their triggering and execution. Developers can define contract logic using a programming language and publish it to the blockchain (smart contract registration). Based on the logic of the smart contract terms, it can invoke keys or trigger execution through other events to complete the contract logic. It also provides functions for contract upgrades and cancellations. Furthermore, it can verify the validity of data processing requests and record valid requests in storage after consensus is reached. For a new data processing request, it can first perform interface adaptation parsing and authentication (interface adaptation), then encrypt the information carried by the data processing request using a consensus algorithm (consensus management), and finally transmit it completely and consistently to the shared ledger (network communication) for recording and storage. It can also manage the identity information of all blockchain participants (nodes in the blockchain network), including maintaining public and private key generation (account management), key management, and maintaining the correspondence between user real identities and blockchain addresses (access management). Under authorization, it can monitor and audit transactions of certain real identities and provide risk control rule configurations (risk control audit). Finally, it can deploy the blockchain, allowing users to focus on developing blockchain applications and rapidly deploying blockchain-based services without having to build, maintain, and manage the blockchain network itself.

[0044] Figure 4 The client 41 shown is a program that provides local services to customers. It is installed on the terminal and can be downloaded from the data management platform 40. It needs to work in conjunction with the data management platform 40. The terminal can be a smartphone, tablet, laptop, desktop computer, smart voice interaction device, smart home appliance, vehicle terminal, etc., but is not limited to these.

[0045] Figure 4 The blockchain network 42 shown refers to a network used for data sharing between nodes. The type of blockchain network 42 is flexible and diverse, and can be any of the following: public blockchain, private blockchain, or consortium blockchain. Participants in a public blockchain can read data records on the chain, participate in transactions, and compete for the right to record new blocks. Each participant (i.e., node) can freely join and leave the network. Public blockchains have the highest degree of decentralization. Private blockchains, on the other hand, have data writing permissions controlled by a specific organization or institution, and data reading permissions are regulated by that organization. Simply put, a private blockchain can be a weakly centralized system with strictly limited and few participating nodes, making it more suitable for use within specific institutions. Consortium blockchains are a type of blockchain between public and private blockchains, achieving "partial decentralization." Each node in a consortium blockchain typically has a corresponding entity or organization. Participants join the network through authorization and form a shared interest alliance to jointly maintain the operation of the blockchain.

[0046] The data management platform 40 can access the blockchain network 42 and communicate with nodes in the blockchain network 42, for example, by sending smart contract deployment instructions to the nodes. Smart contracts deployed on the blockchain can typically only reference data stored on the blockchain; therefore, Figure 4 The data interface 43 shown can be an oracle server, which deploys oracle smart contracts and can act as a medium between the client 41 and the data management platform 40, enabling data interaction between the smart contract and the real world. Additionally, the client 41 can also communicate with the blockchain network 42 through the data interface 43.

[0047] Figure 4 The system architecture shown can implement the data management method provided in the embodiments of this application. The implementation process of this method generally includes:

[0048] ① The data management platform 40 receives a data processing request sent by the client 41 through the data interface 43. The data processing request carries the first address of the client 41.

[0049] ② The data management platform 40 calls the data processing module of the target smart contract of the blockchain network 42 to process the data processing request and obtain the processing result of the data processing request.

[0050] ③ The data management platform 40 calls the data recording module of the target smart contract and writes the processing result, the first address, and the second address of the target smart contract into the blockchain corresponding to the blockchain network 42.

[0051] The above method makes the data receiving, processing, and storage process transparent by writing the processing results related to the data processing request, the client's first address, and the target smart contract's second address into the blockchain, thereby improving the transparency and credibility of data processing.

[0052] It is understood that the system architecture diagrams described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0053] The above provides a brief overview of the data management method provided in the embodiments of this application. The specific implementation of this data management method will be described in detail below.

[0054] Please see Figure 5 , Figure 5 A flowchart illustrating a data management method provided in this application embodiment. Figure 1 This data management method can be developed by... Figure 4 The data management platform 40 in the middle is executed. The method includes the following steps S501-S503:

[0055] S501: Receive a data processing request sent by the client through a data interface call. The data processing request carries the client's first address.

[0056] A data processing request is used to request data processing on the ledger. The ledger is a collective term for the blockchain (also known as ledger data) and the state database synchronized with the blockchain; the state database records transactions in the blockchain in the form of key-value pairs of different types, supporting fast querying of transactions in the blockchain. This data processing involves operations such as writing, modifying, reading, or deleting.

[0057] This application does not limit the business scenarios involved in data processing. For example, it can be the transfer processing of digital assets, the reading and processing of medical data or game data, or the writing processing of electronic insurance contracts or electronic travel service contracts.

[0058] The first address is the client's virtual address within the blockchain network. When the blockchain network is a public blockchain, the client can directly access it without verification. When the blockchain network is a consortium blockchain, access conditions can be set, allowing the client to access only if these conditions are met. When the blockchain network is a private blockchain, client access requires permission from the organization or institution. By writing the first address into the blockchain, the data reception process becomes transparent while simultaneously hiding the client's real information, thus protecting user privacy.

[0059] The data interface can be an oracle server. In one implementation, the client can first send a data processing request to the oracle server, and then the oracle smart contract deployed on the oracle server can send the data processing request to the data management platform. Alternatively, the data management platform can also call the oracle server to obtain external data and provide the external data to the smart contract to complete the transaction.

[0060] S502: Call the data processing module of the target smart contract of the blockchain network to process the data processing request and obtain the processing result of the data processing request.

[0061] The target smart contract may include one or more data processing modules. The data processing modules are pre-written and compiled according to the business logic, and each business logic corresponds to a data processing module. For example, checking the account balance and transferring funds each have their own data processing modules.

[0062] In one implementation, the data management platform invokes the data processing module of the target smart contract on the blockchain network to process the data processing request and obtain the processing result. Specifically, after receiving the data processing request, the data management platform can determine the target node from the blockchain network. The target node can be any node in the blockchain network, the node closest to the client or data management platform, or the node with the best communication quality with the client or data management platform.

[0063] In feasible embodiments, the target node can also be elected by all nodes in the blockchain network according to a consensus algorithm. The consensus algorithm is an algorithm based on a consensus mechanism, a mathematical algorithm in a blockchain network that enables different nodes to establish trust and acquire rights. In a blockchain network, through voting by special nodes, the verification and confirmation of transactions can be completed in a very short time. For a transaction, if several nodes with unrelated interests can reach a consensus, it can be assumed that all nodes in the system can also reach a consensus. Consensus algorithms include, but are not limited to, Proof of Work (PoW), Proof of Stake (PoS), Delegated Proof of Stake (DPoS), and Practical Byzantine Fault Tolerance (PBFT).

[0064] Furthermore, the data management platform can submit transaction proposals to the target node based on data processing requests. For example, a transaction proposal may include a contract identifier (which could be the name or serial number of the smart contract), a module identifier (used to identify the data processing module within the smart contract), and the transaction data to be transmitted to the smart contract. The transaction data is the object of the smart contract's operations; for example, when the smart contract performs add, delete, query, or modify operations, the transaction data can be the data processed by those operations. The target node can use the smart contract matching the contract identifier as the target smart contract, and the module identifier to match the data processing module within the target smart contract. By transmitting the transaction data to the data processing module in the target smart contract, the data processing module can process the data according to its corresponding business logic, obtaining the processing result of the data processing request. For example, when a data processing request involves fund transfer, the transaction data may include information such as the identifier of the sending account, the identifier of the receiving account, and the transfer amount. The identifiers of the sending and receiving accounts may be added to the data processing request with the user's permission or consent on the client side. The processing result may include the balance of the sending account after the transfer, information indicating a successful or failed transfer, and a digital signature obtained by encrypting the processing result. As another example, when reading medical data, the processing result may include the read medical data, information indicating whether the reading was successful or failed. The data management platform can return the processing result of the data processing request to the client, allowing the client user to understand the processing outcome.

[0065] In one implementation, the target node can reach a consensus with other nodes in the blockchain network to verify the transaction data included in the transaction proposal. After the verification is successful, a new block corresponding to the transaction data included in the transaction proposal is generated and added to the blockchain corresponding to the blockchain network. Subsequently, other nodes in the blockchain network can obtain the new block.

[0066] S503: Call the data recording module of the target smart contract to write the processing result, the first address, and the second address of the target smart contract into the blockchain corresponding to the blockchain network.

[0067] The second address is the calling address of the target smart contract within the blockchain. A target smart contract written in a high-level programming language can be deployed on the blockchain after consensus is reached and approved by the blockchain network. The target smart contract deployed on the blockchain is the bytecode of a smart contract that can be executed by a virtual machine or processor, and a corresponding calling address is also assigned to it. Once deployed, the target smart contract can be trusted by users, and its terms cannot be changed.

[0068] High-level programming languages ​​include, but are not limited to, any of the following: Solidity, C++, Go, Rust, Python, JavaScript, Java, Hashell, Ruby, etc.

[0069] The data recording module is pre-written and compiled according to the recording logic. In one implementation, the recording logic includes obtaining the processing result of the data processing request, the client's first address, and the target smart contract's second address, and writing the processing result, the first address, and the second address into the corresponding blockchain of the blockchain network. Specifically, the data management platform can send the recorded data consisting of the processing result, the first address, and the second address to the target node through a transaction, and require the target node to perform consensus and on-chain processing on the recorded data. For example, the target node can perform consensus verification with other nodes in the blockchain network on the recorded data consisting of the processing result, the first address, and the second address. After successful verification, a new block corresponding to the recorded data is generated and added to the corresponding blockchain of the blockchain network. Subsequently, other nodes in the blockchain network can obtain this new block. By recording the second address on the blockchain, users can determine the business logic included in the smart contract of the data processing request through the second address, thus achieving transparency in the data processing process.

[0070] In one embodiment, the blockchain network corresponds to a blockchain explorer. Users can initiate query requests to a data management platform through the blockchain explorer. The data management platform can initiate query requests to the blockchain network by accessing the blockchain network. Alternatively, users can directly initiate query requests to the blockchain network through the blockchain explorer. The query request may include one or both of the address to be queried and the storage address of the block corresponding to the record data in the blockchain. The target node in the blockchain network can query the record data corresponding to the target data processing request on the blockchain based on one or both of the address to be queried and the storage address of the block corresponding to the record data. The target data processing request is sent by the client corresponding to the address to be queried. The record data includes a first address of the client sending the target data processing request, a second address of the invoked smart contract, and the processing result of the target data processing request. By returning this record data to the blockchain explorer, users can view the processing process of the data processing request on the blockchain explorer.

[0071] Furthermore, users can initiate query requests using a second address on the blockchain explorer to view the business logic of the smart contracts invoked when processing target data requests, thus achieving transparency in the data processing process. The blockchain explorer facilitates subsequent data processing review and other operations, improving the user experience.

[0072] In this embodiment, the data management platform receives a data processing request sent by a client through a data interface call. The data processing request carries the client's first address. The platform then calls the data processing module of the target smart contract in the blockchain network to process the data processing request, obtains the processing result, and calls the data recording module of the target smart contract to write the processing result, the first address, and the second address of the target smart contract into the corresponding blockchain. By writing the processing result, the client's first address, and the second address of the target smart contract related to the data processing request into the blockchain, the above solution makes the data receiving, processing, and storage processes transparent, thereby improving the transparency and reliability of data processing.

[0073] Please see Figure 6 , Figure 6 A flowchart illustrating a data management method provided in this application embodiment. Figure 2 This data management method can be developed by... Figure 4 The data management platform 40 in the middle is executed. The method includes the following steps S601-S603:

[0074] S601. Receive a data processing request sent by the client through a data interface call. The data processing request carries the client's first address.

[0075] In one implementation, such as Figure 7As shown, the address generation rules of the blockchain network include: ① Generating a public key from the private key using an asymmetric encryption algorithm. Asymmetric encryption is an irreversible algorithm; knowing the private key allows you to obtain the public key, but knowing the public key does not allow you to reverse-engineer the private key. Asymmetric encryption algorithms can include public-key cryptography (RSA), knapsack algorithms, key exchange algorithms (DH), elliptic curve cryptography, etc. In one implementation, the asymmetric encryption algorithm can specifically be elliptic curve cryptography, an asymmetric encryption algorithm based on elliptic curve mathematical theory, which yields a 65-byte public key, where 1 byte is 0x04, 32 bytes are the x-coordinate, and 32 bytes are the y-coordinate. ② Calculating the SHA-256 hash value of the public key. Specifically, the SHA-256 hash value can be obtained using a secure hash algorithm. For any message length, the SHA-256 algorithm will produce a 256-bit hash value, which is equivalent to a 32-byte array. This can be represented by a 64-bit hexadecimal string, where one byte equals 8 bits and one hexadecimal character is 4 bits long. ③ Calculate the RIPEMD-160 hash value based on ②. This can be obtained using a cryptographic hash function algorithm (RIPEMD-160 algorithm). For any message length, the RIPEMD-160 algorithm will produce a 160-bit hash value. ④ Add an address version number to the hash value obtained in ③. This address version number is the version number of the blockchain network's communication protocol, and its value can range from 0x00 to 0xFF. The communication protocol is the general communication rule followed by the blockchain network. ⑤ Calculate the SHA-256 hash value based on ④. ⑥ Calculate the SHA-256 hash value a second time based on ⑤. ⑦ Take the first 4 bytes (8-bit hexadecimal) of the hash value obtained in ⑥, and append these 4 bytes to the result obtained in ④. ⑧ Transform the result from ⑦ using base58 notation to obtain the compressed address, and use the compressed address as the final address. Base58 notation is an algorithm for converting binary to a visual string, mainly used to convert large integer values.

[0076] In one implementation, the first address is generated by the client based on the corresponding private key and the address generation rules of the blockchain network. The private key is allocated by the data management platform when the client is downloaded. If the blockchain network is a private or consortium blockchain, the allocated private key must be authorized by the corresponding institution or organization before allocation. The private key can be a randomly selected 32-byte random number, with a size between 1 and 0xFFFF FFFF FFFF FFFFFFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4141.

[0077] In one embodiment, after obtaining the client's first address, the data management platform can check whether the first address conforms to the address generation rules. If the first address does not conform to the address generation rules, it can determine that the client is a device illegally accessing the blockchain network and return a prompt message indicating execution failure. If the first address conforms to the address generation rules, it can check whether the first address is unique in the blockchain. If the first address is not unique in the blockchain, it can determine that the client is a device illegally accessing the blockchain network and return a prompt message indicating execution failure. If the first address is unique in the blockchain, it can continue to execute steps S602-S603.

[0078] S602. The data processing module of the target smart contract of the blockchain network is invoked to verify the structure data in the data processing request in order to determine the result identifier of the processing result.

[0079] In one embodiment, the data management platform can obtain the data recording function corresponding to the data recording module, add the data recording function to the basic smart contract to obtain the target smart contract, and deploy the target smart contract to the blockchain network.

[0080] The data recording function is program code that implements the recording logic indicated by the data recording module. The basic smart contract is the smart contract to be published, including data processing functions corresponding to the data processing module, but excluding the data recording function. The data processing function is program code that implements the business logic indicated by the data processing module. When an instruction is given to deploy the basic smart contract to the blockchain network, the data management platform can automatically add a data recording function to the basic smart contract to obtain the target smart contract. After compiling the target smart contract into bytecode using a compilation tool, the bytecode is sent to the target node in the blockchain network via a transaction. The target node can perform consensus verification with other nodes in the blockchain network on the bytecode. After successful consensus verification, a new block corresponding to the bytecode is generated and added to the corresponding blockchain. Subsequently, other nodes in the blockchain network can obtain the new block and run the bytecode of the smart contract within it. Through this embodiment, the smart contract published on the data management platform has the function of recording the data processing process in response to data processing requests.

[0081] In one implementation, when the target smart contract is successfully deployed on the blockchain network, the data management platform can generate the call address of the target smart contract in the blockchain according to the address generation rules of the blockchain network, and use the call address as the second address of the target smart contract.

[0082] In one implementation, such as Figure 8As shown, users can build data recording functions for the data recording module and data processing functions for the data processing module of the target smart contract on the data management platform. The data management platform can write the source code file of the built target smart contract into the blockchain of the blockchain network and deploy the target smart contract to the blockchain network. The data management platform can periodically check whether there are processing functions that meet the definition of the target smart contract. For example, when the data processing module of the target smart contract requires to obtain weather data at 1:00 AM every day, the data management platform can submit the obtained weather data to the data processing module of the target smart contract at 1:00 AM every day.

[0083] In one embodiment, the data management platform can send the source code file of a target smart contract to a target node in the blockchain network via a transaction. This target node can then perform consensus verification of the target smart contract's source code file with other nodes in the blockchain network. After successful consensus verification, a new block corresponding to the smart contract's source code file can be generated and added to the corresponding blockchain. Understandably, compiling the source code file of the target smart contract yields its bytecode, and adding the source code file to the blockchain allows users to view the lowest-level program code and understand the business logic of the smart contract during data processing.

[0084] In one implementation, the structured data includes one or both of the data to be processed and the module identifier of the data processing module. The data to be processed can be understood as the aforementioned transaction data (or encrypted transaction data). The data management platform can call the data processing module of the target smart contract in the blockchain network to verify one or both of the data to be processed and the module identifier of the data processing module in the data processing request. If the verification passes, the structured data is consumed (i.e., the ledger is processed), and the result identifier of the data processing request is determined as the processing success identifier. If the verification fails, the result identifier of the data processing request is determined as the processing failure identifier.

[0085] The result of the processing is identified as a processing failure, including at least one of the following: ① The target smart contract does not include a data processing module that matches the module identifier; ② The data processing module corresponding to the module identifier cannot execute the business logic required by the data processing request, for example, the data processing request instructs to perform a transfer, while the data processing module that matches the module identifier is used to query the balance; ③ The format, size, structure, or syntax of the data to be processed does not conform to the data specifications required by the data processing module. For example, the data processing module requires the input of the identifier of the transfer-out account, but the identifier of the transfer-out account is not included in the data to be processed, or the data to be processed does not include the transfer amount, which causes the data processing module to be unable to perform the transfer. All of these can be determined as verification failure. The identifier of the transfer-out account and the transfer amount are added to the data processing request after the user has authorized or agreed to them on the client side.

[0086] In feasible embodiments, the data processing module may include the definition of transaction objects related to the data processing function. These transaction objects can be determined based on the business scenario. For example, when dealing with digital assets, the defined transaction objects may include the sending account (including the data type of the sending account), the receiving account (including the data type of the receiving account), the transfer amount (including the data type of the transfer amount), and so on. Whether the data to be processed conforms to the data specifications required by the data processing module can be determined by whether the data type of the transaction data in the data processing request matches the data type of the corresponding transaction object defined in the data processing module. For example, if the data type of the transaction data in the data processing request is a string, but the corresponding transaction object is a transfer amount, then it does not match the data type of the transfer amount defined by the data processing module (data type is number), and it can be determined that the data to be processed does not conform to the data specifications required by the data processing module.

[0087] In one embodiment, the aforementioned consumption structure data includes at least one of the following: ① If the data processing request requires the deletion of data in the ledger, the data processing module of the target smart contract can be a deletion processing module, which can call the deletion processing module of the target smart contract to delete the corresponding data in the ledger according to the deletion logic; ② If the data processing request requires the modification of data in the ledger, the data processing module of the target smart contract can be a modification processing module, which can call the modification processing module of the target smart contract to modify the corresponding data in the ledger according to the modification logic (the modification processing includes updating or writing); ③ If the business logic required by the data processing request is to query data in the ledger, the data processing module of the target smart contract can be a query processing module, which can call the query processing module of the target smart contract to obtain the corresponding data in the ledger according to the query logic.

[0088] S603. Call the data recording module of the target smart contract to write one or more of the following into the blockchain of the blockchain network: the order identifier corresponding to the data processing request, the structure data in the data processing request, the result identifier of the processing result, the first address, and the second address of the target smart contract.

[0089] In one embodiment, if the result identifier of the processing result is a successful processing identifier, then the order identifier corresponding to the data processing request (used to uniquely identify the data processing request), the structure data in the data processing request, the successful processing identifier, the client's first address, and the target smart contract's second address are written into the blockchain corresponding to the blockchain network. For example, the data management platform can send the record data consisting of the order identifier, structure data, successful processing identifier, first address, and second address to the target node through a transaction. The target node can perform consensus verification with other nodes in the blockchain network on the record data, and after successful verification, generate a new block corresponding to the record data and add the new block to the blockchain corresponding to the blockchain network. Subsequently, other nodes in the blockchain network can obtain the aforementioned new block.

[0090] In one embodiment, if the processing result is identified as a processing failure identifier, the order identifier corresponding to the data processing request, the processing failure identifier, the first address, and the second address of the target smart contract are written into the blockchain corresponding to the blockchain network. For example, the data management platform can send the record data consisting of the order identifier, the processing failure identifier, the first address, and the second address to the target node through a transaction. The target node can perform consensus verification with other nodes in the blockchain network on the record data, and after successful verification, generate a new block corresponding to the record data and add the new block to the blockchain corresponding to the blockchain network. Subsequently, other nodes in the blockchain network can obtain the aforementioned new block.

[0091] In one embodiment, the data processing request carries a timestamp (the time the data processing request was sent), the identifier of the smart contract to be called, and the module identifier of the data processing module in the smart contract to be called. A random number can be constructed using the timestamp, the smart contract identifier, and the module identifier of the data processing module. The order identifier corresponding to the data processing request is obtained by encrypting the random number once or multiple times using an asymmetric encryption algorithm.

[0092] In one feasible approach, the data management platform can return a result identifier to the client, including both success and failure identifiers. This result identifier can be displayed on the client's interface to allow the user to determine whether the data processing request was successfully executed. The data management platform can also return success and failure messages to the client.

[0093] In one implementation, the data management platform can return an order identifier corresponding to the data processing request to the client. This order identifier can be displayed on the client's interface, allowing the user to search for the record data corresponding to the data processing request in the blockchain explorer based on the displayed order identifier.

[0094] In one implementation, the data management platform can return the result identifier of the processing result and the order identifier corresponding to the data processing request to the client. These two identifiers can then be displayed on the client's interface, allowing the user to access them.

[0095] In one embodiment, the blockchain network corresponds to a blockchain explorer. Users can initiate query requests to the data management platform through the blockchain explorer. The data management platform receives the query requests sent by the blockchain explorer and, by accessing the blockchain network, initiates query requests to the blockchain network. These query requests may include one or both of the address to be queried and the order identifier to be queried. Target nodes in the blockchain network can query the record data corresponding to the target data processing request on the blockchain based on one or both of the address to be queried and the order identifier to be queried. The target data processing request is sent by the client corresponding to the address to be queried, and there is a one-to-one correspondence between the order identifier to be queried and the target data processing request. Therefore, when the input is the address to be queried, there can be one or more target data processing requests. The record data corresponding to the target data processing request can be returned to the blockchain explorer, allowing users to understand the processing process of the data processing request by viewing the record data on the blockchain explorer. If the target data processing request is successful, the recorded data includes the first address of the client that sent the request, the second address of the invoked smart contract, a success identifier, the order identifier of the request, and the structure data of the request. If the target data processing request fails, the recorded data includes the first address of the client that sent the request, the second address of the invoked smart contract, a failure identifier, and the order identifier. Additionally, users can use the second address to initiate a query request on the blockchain explorer to view the processing logic of the smart contract that processed the target data processing request. The blockchain explorer facilitates subsequent data processing review and improves the user experience. Furthermore, users do not need to manually write program code to query recorded data, eliminating language barriers.

[0096] In one embodiment, the second address can also indicate the storage address of the smart contract's source code file in the blockchain. By entering the second address in the blockchain explorer, the source code file of the smart contract can be returned so that users can view it and other developers can use it.

[0097] In this embodiment, the data management platform receives a data processing request sent by a client through a data interface call. The data processing request carries the client's first address. The platform calls the data processing module of the target smart contract in the blockchain network to verify the structure data in the data processing request, obtains the result identifier of the data processing request, and calls the data recording module of the target smart contract to write one or more of the following into the corresponding blockchain: the result identifier of the processing result, the order identifier of the data processing request, the structure data, the first address, and the second address of the target smart contract. The above solution makes the data receiving, processing, and storage processes transparent by writing the information related to the data processing request into the blockchain, thereby improving the transparency and credibility of data processing. At the same time, the blockchain explorer can conveniently and quickly query the recorded data.

[0098] It is understood that in the specific implementation of this application, user account identifiers and other related data are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0099] The methods of the embodiments of this application have been described in detail above. To facilitate better implementation of the above solutions of the embodiments of this application, the apparatus of the embodiments of this application is provided below. Please refer to... Figure 9 , Figure 9 This is a schematic diagram of a data management device provided in an embodiment of this application. The data management device is applied to a data management platform, and the data management device 90 may include:

[0100] Receiving unit 901 is used to receive a data processing request sent by a client through a data interface call, wherein the data processing request carries the first address of the client;

[0101] Processing unit 902 is used to call the data processing module of the target smart contract of the blockchain network to process the data processing request and obtain the processing result of the data processing request;

[0102] The processing unit 902 is further configured to call the data recording module of the target smart contract to write the processing result, the first address, and the second address of the target smart contract into the blockchain corresponding to the blockchain network.

[0103] In one embodiment, the data management device 90 includes an acquisition unit 903, which is used to: acquire the data recording function corresponding to the data recording module;

[0104] The processing unit 902 is specifically used for: adding the data recording function to the basic smart contract to obtain the target smart contract; deploying the target smart contract to the blockchain network; and writing the source code file of the target smart contract into the blockchain corresponding to the blockchain network.

[0105] In one embodiment, the processing unit 902 is specifically configured to: invoke the data processing module of the target smart contract of the blockchain network to verify the structure data in the data processing request, wherein the structure data includes one or both of the data to be processed and the module identifier of the data processing module; if the verification passes, consume the structure data and determine the result identifier of the processing result of the data processing request as a processing success identifier; if the verification fails, determine the result identifier of the processing result of the data processing request as a processing failure identifier.

[0106] In one embodiment, the processing unit 902 is specifically used to: generate an order identifier corresponding to the data processing request; call the data recording module of the target smart contract to write one or more of the order identifier, the structure data in the data processing request, the result identifier of the processing result, the first address, and the second address of the target smart contract into the blockchain corresponding to the blockchain network.

[0107] In one embodiment, the processing unit 902 is specifically used to: return one or both of the result identifier of the processing result and the order identifier corresponding to the data processing request to the client.

[0108] In one embodiment, the first address is generated by the client according to the corresponding private key and the address generation rules of the blockchain network. The private key is assigned by the data management platform when the client is downloaded from the data management platform. The second address is generated by the data management platform according to the address generation rules of the blockchain network.

[0109] In one embodiment, the receiving unit 901 is specifically used to: receive a query request sent by a blockchain explorer, the query request carrying one or both of the order identifier to be queried and the address to be queried;

[0110] The acquisition unit 903 is specifically used to: acquire record data corresponding to the target data processing request from the blockchain network based on one or both of the order identifier to be queried and the address to be queried, wherein the target data processing request is sent by the client corresponding to the address to be queried;

[0111] The processing unit 902 is specifically used to: return the recorded data to the blockchain explorer.

[0112] It is understood that the functions of each functional unit of the data management device described in the embodiments of this application can be specifically implemented according to the methods in the above method embodiments, and the specific implementation process can be referred to the relevant descriptions in the above method embodiments, which will not be repeated here.

[0113] In this embodiment, the data management platform receives a data processing request sent by the client through a data interface call. The data processing request carries the client's first address. The platform calls the data processing module of the target smart contract in the blockchain network to process the data processing request and obtain the processing result. Then, the platform calls the data recording module of the target smart contract to write the processing result, the first address, and the second address of the target smart contract into the corresponding blockchain of the blockchain network. This can improve the transparency and credibility of data processing.

[0114] like Figure 10 As shown, Figure 10 This is a schematic diagram of the structure of a computer device according to an embodiment of this application. The internal structure of the computer device 100 is as follows: Figure 10 As shown, it includes: one or more processors 1001, memory 1002, and communication interface 1003. The processors 1001, memory 1002, and communication interface 1003 can be connected via bus 1004 or other means. This embodiment of the application takes the connection via bus 1004 as an example.

[0115] The processor 1001 (or CPU, Central Processing Unit) is the computing and control core of the computer device 100. It can parse various instructions within the computer device 100 and process various data. For example, the CPU can parse power-on / off commands sent by the user to the computer device 100 and control the computer device 100 to perform power-on / off operations; it can also transmit various interactive data between internal structures of the computer device 100, and so on. The communication interface 1003 may optionally include standard wired interfaces or wireless interfaces (such as Wi-Fi, mobile communication interfaces, etc.), and is controlled by the processor 1001 for sending and receiving data. The memory 1002 is the storage device in the computer device 100, used to store computer programs and data. It is understood that the memory 1002 here can include both the computer device 100's built-in memory and extended memory supported by the computer device 100. The memory 1002 provides storage space for the operating system of the computer device 100, which may include, but is not limited to, Windows, Linux, etc. This application does not limit this specific to any particular system. Specifically, the processor 1001 executes the following operations by running the computer program stored in the memory 1002:

[0116] Receive a data processing request sent by the client through a data interface call, wherein the data processing request carries the client's first address;

[0117] The data processing module of the target smart contract in the blockchain network is invoked to process the data processing request and obtain the processing result of the data processing request.

[0118] The data recording module of the target smart contract is invoked to write the processing result, the first address, and the second address of the target smart contract into the blockchain corresponding to the blockchain network.

[0119] In one embodiment, the processor 1001 is specifically used to: obtain the data recording function corresponding to the data recording module; add the data recording function to the basic smart contract to obtain the target smart contract; deploy the target smart contract to the blockchain network, and write the source code file of the target smart contract into the blockchain corresponding to the blockchain network.

[0120] In one embodiment, the processor 1001 is specifically configured to: invoke the data processing module of the target smart contract of the blockchain network to verify the structure data in the data processing request, wherein the structure data includes one or both of the data to be processed and the module identifier of the data processing module; if the verification passes, consume the structure data and determine the result identifier of the processing result of the data processing request as a processing success identifier; if the verification fails, determine the result identifier of the processing result of the data processing request as a processing failure identifier.

[0121] In one embodiment, the processor 1001 is specifically configured to: generate an order identifier corresponding to the data processing request; call the data recording module of the target smart contract to write one or more of the order identifier, the structure data in the data processing request, the result identifier of the processing result, the first address, and the second address of the target smart contract into the blockchain corresponding to the blockchain network.

[0122] In one embodiment, the processor 1001 is specifically configured to: return one or both of the result identifier of the processing result and the order identifier corresponding to the data processing request to the client.

[0123] In one embodiment, the first address is generated by the client according to the corresponding private key and the address generation rules of the blockchain network. The private key is assigned by the data management platform when the client is downloaded from the data management platform. The second address is generated by the data management platform according to the address generation rules of the blockchain network.

[0124] The processor 1001 is specifically configured to: receive a query request sent by a blockchain explorer, the query request carrying one or both of an order identifier and an address to be queried; obtain record data corresponding to a target data processing request from the blockchain network based on one or both of the order identifier and the address to be queried, the target data processing request being sent by a client corresponding to the address to be queried; and return the record data to the blockchain explorer.

[0125] In specific implementations, the processor 1001, memory 1002, and communication interface 1003 described in the embodiments of this application can execute the implementation of the computer device described in the data management method provided in the embodiments of this application, or the implementation of the data management device provided in the embodiments of this application, which will not be repeated here.

[0126] In this embodiment, the data management platform receives a data processing request sent by the client through a data interface call. The data processing request carries the client's first address. The platform calls the data processing module of the target smart contract in the blockchain network to process the data processing request and obtain the processing result. Then, the platform calls the data recording module of the target smart contract to write the processing result, the first address, and the second address of the target smart contract into the corresponding blockchain of the blockchain network. This can improve the transparency and credibility of data processing.

[0127] This application also provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the data management method as described in this application. The specific implementation details are as described above and will not be repeated here.

[0128] This application also provides a computer program product, which includes a computer program or computer instructions. When executed by a processor, the computer program or computer instructions implement the steps of the data management method provided in this application. The specific implementation method can be found in the foregoing description and will not be repeated here.

[0129] This application also provides a computer program comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the data management method provided in this application. Specific implementation details are provided above and will not be repeated here.

[0130] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0131] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0132] The above-disclosed embodiments are only some of the embodiments of this application, and should not be construed as limiting the scope of this application. Therefore, any equivalent changes made in accordance with the claims of this application shall still fall within the scope of this application.

Claims

1. A data management method, characterized in that, Applied to a data management platform, the method includes: Receive a data processing request sent by the client through a data interface call, wherein the data processing request carries the client's first address; The data processing module of the target smart contract in the blockchain network verifies the structure data in the data processing request. If the verification is successful, the structure data is consumed, and the result identifier of the data processing request is determined as a successful processing identifier. If the verification fails, the result identifier of the data processing request is determined as a failed processing identifier. The structure data includes one or both of the data to be processed and the module identifier of the data processing module. Generate the order identifier corresponding to the data processing request; The data recording module of the target smart contract is invoked to write one or more of the following into the blockchain corresponding to the blockchain network: the order identifier, the structure data in the data processing request, the result identifier of the processing result, the first address, and the second address of the target smart contract.

2. The method according to claim 1, characterized in that, The method further includes: Obtain the data recording function corresponding to the data recording module; Add the data recording function to the basic smart contract to obtain the target smart contract; The target smart contract is deployed to the blockchain network, and the source code file of the target smart contract is written into the blockchain corresponding to the blockchain network.

3. The method according to claim 1, characterized in that, The method further includes: The result identifier of the processing result and the order identifier corresponding to the data processing request are returned to the client.

4. The method according to claim 1, characterized in that, The first address is generated by the client according to the corresponding private key and the address generation rules of the blockchain network. The private key is assigned by the data management platform when the client is downloaded from the data management platform. The second address is generated by the data management platform according to the address generation rules of the blockchain network.

5. The method according to claim 1, characterized in that, The method further includes: Receive a query request sent by a blockchain explorer, the query request carrying one or both of the order identifier and the address to be queried; Based on one or both of the order identifier to be queried and the address to be queried, the record data corresponding to the target data processing request is obtained from the blockchain network, wherein the target data processing request is sent by the client corresponding to the address to be queried; The recorded data is returned to the blockchain explorer.

6. A data management device, characterized in that, The device includes: The receiving unit is configured to receive a data processing request sent by the client through a data interface call, wherein the data processing request carries the client's first address. The processing unit is used to call the data processing module of the target smart contract of the blockchain network to verify the structure data in the data processing request. If the verification is successful, the structure data is consumed and the result identifier of the data processing request is determined as a successful processing identifier. If the verification fails, the result identifier of the data processing request is determined as a failed processing identifier. The structure data includes one or both of the data to be processed and the module identifier of the data processing module. The processing unit is further configured to generate an order identifier corresponding to the data processing request; and to call the data recording module of the target smart contract to write one or more of the order identifier, the structure data in the data processing request, the result identifier of the processing result, the first address, and the second address of the target smart contract into the blockchain corresponding to the blockchain network.

7. A computer device, characterized in that, The computer device includes a memory, a communication interface, and a processor, wherein the memory, the communication interface, and the processor are interconnected; the memory stores a computer program, and the processor calls the computer program stored in the memory to implement the data management method according to any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the data management method according to any one of claims 1-5.

9. A computer program product, characterized in that, The computer program product includes a computer program or computer instructions, which, when executed by a processor, implement the data management method according to any one of claims 1-5.

Citation Information

Patent Citations

  • A point-to-point internet public benefit management method and device based on a block chain technology

    CN109583862A

  • Business processing method and device based on block chain

    CN113766034A