Data processing method and device based on block chain network, equipment and storage medium

By storing the contract source code and code dependency information of smart contracts in the blockchain network, the problems of storage pressure and waste of transmission resources are solved, and more efficient contract deployment and resource utilization are achieved.

CN119271214APending Publication Date: 2025-01-07TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310833124.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-06
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The existing blockchain network needs to store a large number of binary files during the smart contract deployment process, resulting in high storage pressure and high processing resource consumption. The contract deployment request carries compiled smart contracts, resulting in wasted transmission resources.

Method used

A data processing method based on blockchain network is proposed. By receiving the client's contract deployment request, the compilability of the contract source code is verified, and the contract source code and code dependency information are stored in the blockchain network to realize the smart contract Deploy and reduce the consumption of storage and transmission resources.

Benefits of technology

It effectively reduces the storage pressure of blockchain networks, saves processing resources required for transmission, and improves the efficiency of contract deployment and resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271214A_ABST
    Figure CN119271214A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device based on a block chain network, equipment and a storage medium, and the method comprises the steps: receiving a contract deployment request initiated by a client, the contract deployment request carrying a contract source code of a to-be-deployed smart contract and code dependence information of the contract source code; the smart contract is generated by compiling a contract source code, and the code dependency information is used for indicating each code warehouse on which the contract source code needs to depend when the contract source code is compiled; according to the code dependency information, obtaining each code warehouse on which the contract source code depends, and verifying the compilability of the contract source code based on each obtained code warehouse; after it is determined that the contract source code has compilability, the contract source code and the code dependency information are stored in the block chain of the block chain network, so that nodes in the block chain network adopt the contract source code and the code dependency information in the block chain to deploy the corresponding intelligent contract, the storage pressure of the block chain network can be relieved, and the user experience is improved. And processing resources required by transmission are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the continuous development of blockchain technology, the storage space required by blockchain is getting larger and larger. Its main storage space is used to store smart contracts, transaction data and status data. At present, the contract languages ​​of mainstream blockchains can be divided into two types. One is a comprehensive high-level programming language such as native Golang and native Java, and the other is a language such as solidity and wasm, which usually has few underlying libraries and interfaces and is not friendly to contract developers. Therefore, most contract developers tend to use the former for research and development, but the former generally requires a larger storage space during the deployment of smart contracts.

[0003] In the deployment process of existing smart contracts, it is usually necessary to compile the contract source code of the smart contract offline to obtain a binary file (i.e., the smart contract), and then store the binary file in the blockchain of the blockchain network, so that the nodes in the blockchain network can implement the deployment of the smart contract based on the binary file stored in the blockchain. Compared with the contract source code, the compiled binary file is usually larger in size, so this deployment method not only consumes a lot of processing resources to transmit the binary file, but also causes great storage pressure on the blockchain network. Summary of the invention

[0004] The embodiments of the present application provide a data processing method, device, equipment and storage medium based on a blockchain network, which can reduce the storage pressure of the blockchain network and save the processing resources required for transmission.

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

[0006] Receive a contract deployment request initiated by a client, the contract deployment request carrying the contract source code of the smart contract to be deployed and the code dependency information of the contract source code; the smart contract is generated by compiling the contract source code, and the code dependency information is used to indicate: when compiling the contract source code, the various code repositories that the contract source code needs to rely on;

[0007] According to the code dependency information, the various code repositories on which the contract source code depends are obtained, and based on the obtained code repositories, the compilability of the contract source code is verified;

[0008] After determining that the contract source code is compilable, the contract source code and the code dependency information are stored in the blockchain of the blockchain network, so that the nodes in the blockchain network adopt the contract source code and the code dependency information in the blockchain to deploy the corresponding smart contract.

[0009] On the one hand, an embodiment of the present application provides a data processing device, including:

[0010] A receiving unit, configured to receive a contract deployment request initiated by a client, wherein the contract deployment request carries the contract source code of the smart contract to be deployed and the code dependency information of the contract source code; the smart contract is generated by compiling the contract source code, and the code dependency information is used to indicate: when compiling the contract source code, the various code repositories that the contract source code needs to rely on;

[0011] A processing unit, configured to obtain, according to the code dependency information, various code repositories on which the contract source code depends, and verify the compilability of the contract source code based on the obtained various code repositories;

[0012] The processing unit is further used to store the contract source code and the code dependency information in the blockchain of the blockchain network after determining that the contract source code is compilable, so that the nodes in the blockchain network adopt the contract source code and the code dependency information in the blockchain to deploy the corresponding smart contract.

[0013] In one aspect, an embodiment of the present application provides a data processing device, the data processing device comprising an input interface and an output interface, and further comprising:

[0014] a processor adapted to implement one or more instructions; and,

[0015] A computer storage medium storing one or more instructions, wherein the one or more instructions are suitable for being loaded by the processor and executing the above-mentioned data processing method based on the blockchain network.

[0016] On the one hand, an embodiment of the present application provides a computer storage medium, in which computer program instructions are stored. When the computer program instructions are executed by a processor, they are used to execute the above-mentioned blockchain network-based data processing method.

[0017] On the one hand, an embodiment of the present application provides a computer program product, which includes a computer program stored in a computer storage medium; a processor of a data processing device reads the computer program from the computer storage medium, and the processor executes the computer program, so that the data processing device executes the above-mentioned data processing method based on the blockchain network.

[0018] In an embodiment of the present application, after receiving a contract deployment request initiated by a client carrying the contract source code of a smart contract to be deployed and the code dependency information of the contract source code, the various code repositories on which the contract source code depends can be obtained according to the code dependency information, and the compilability of the contract source code can be verified based on the obtained code repositories; wherein the smart contract is generated by compiling the contract source code, and the code dependency information is used to indicate: when compiling the contract source code, the various code repositories on which the contract source code needs to depend; after determining that the contract source code is compilable, the contract source code and the code dependency information are stored in the blockchain of the blockchain network, so that the nodes in the blockchain network use the contract source code and the code dependency information in the blockchain to deploy the corresponding smart contract; the contract source code and the code dependency information are small in size, and by storing the contract source code and the code dependency information in the blockchain of the blockchain network, the storage pressure of the blockchain network can be reduced, that is, the storage pressure of the nodes in the blockchain network when storing the blockchain can be reduced; and the contract deployment request of this solution carries the contract source code and the code dependency information, which can effectively save the processing resources required for transmission compared to carrying the compiled smart contract. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be 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.

[0020] Figure 1 It is a structural schematic diagram of a block provided in an embodiment of the present application;

[0021] Figure 2 It is a structural diagram of a data processing system provided in an embodiment of the present application;

[0022] Figure 3 is a structural diagram of another data processing system provided in an embodiment of the present application;

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

[0024] Figure 5 is a schematic diagram of a method for executing data processing provided in an embodiment of the present application;

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

[0026] Figure 7 It is a comparative schematic diagram of a code dependency information table and a contract dependency information table provided in an embodiment of the present application;

[0027] Figure 8a is a schematic diagram of another method for executing data processing provided in an embodiment of the present application;

[0028] Figure 8b is a schematic diagram of another method for executing data processing provided in an embodiment of the present application;

[0029] Fig. 9 is a schematic diagram of another method for executing data processing provided in an embodiment of the present application;

[0030] Fig.10 It is a schematic diagram of constructing a source code dependency tree provided in an embodiment of the present application;

[0031] Fig.11 It is a schematic diagram of adjusting a plaintext information table provided in an embodiment of the present application;

[0032] Fig.12 It is a schematic diagram of storing a code repository based on a plaintext storage space and a compressed storage space provided in an embodiment of the present application;

[0033] Fig.13 It is a schematic diagram of storing a code repository based on a plaintext storage space, a compressed storage space, and a remote storage space provided in an embodiment of the present application;

[0034] Fig.14 It is a module schematic diagram of a data processing device provided in an embodiment of the present application;

[0035] Fig.15 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;

[0036] Fig.16 It is a structural diagram of a data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0038] Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission (P2P transmission), consensus mechanism, encryption algorithm, etc. It is essentially a decentralized database, a string of data blocks generated by cryptographic methods. The data block here can also be called a block, which is essentially a data structure used to record data information; each data block (block) contains a batch of network transaction information (i.e. data), which is used to verify the validity of its information (i.e. anti-counterfeiting) and generate the next block. See Figure 1 , is a schematic diagram of the structure of a block provided in an embodiment of the present application; each block includes the hash value of the transaction record stored in this block (the hash value of this block) and the hash value of the previous block, and each block is connected by the hash value to form a blockchain. Among them, Hash is to transform an input of any length (also called a pre-image) into an output of a fixed length through a hash algorithm (i.e., a hash algorithm), and the output is the hash value (i.e., the hash value). This conversion is a compression mapping, that is, the space of hash values ​​is usually much smaller than the space of input; simply put, it is a function that compresses a message of any length to a message digest of a fixed length.

[0039] The network based on blockchain and peer-to-peer network (P2P network) can be called blockchain network, and the blockchain network can include multiple node devices (referred to as nodes); it should be understood that any node device (i.e. node) in the blockchain network can be a terminal device or a server. Among them, the terminal device can be a smart phone, tablet computer, laptop computer, desktop computer, etc., without limitation; the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides 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 basic cloud computing services such as big data and artificial intelligence platforms, etc., without limitation.

[0040] The functions implemented by each node in the blockchain network may include applications, which are used to be deployed in the blockchain to implement specific services based on actual business needs, record data related to the implementation of functions to form record data, carry digital signatures in the record data to indicate the source of the task data, and send the record data to other nodes in the blockchain network for other nodes to add the record data to a temporary block when they successfully verify the source and integrity of the record data.

[0041] For example, the services implemented by the application may include: (1) Wallets, which are used to provide the function of conducting transactions of electronic resources (i.e., electronic currency), including initiating transactions, that is, sending the transaction record of the current transaction to other nodes in the blockchain network. After the other nodes successfully verify the transaction, as a response to acknowledging the validity of the transaction, the transaction record data is stored in the temporary block of the blockchain; of course, the wallet also supports querying the remaining electronic resources in the electronic resource address. (2) Shared ledgers, which are used to provide functions such as storage, query and modification of account data, and send the record data of the operation on the account data to other nodes in the blockchain network. After the other nodes verify the validity, as a response to acknowledging the validity of the account data, the record data is stored in the temporary block, and a confirmation can also be sent to the node that initiated the operation. (3) Smart contracts, computerized protocols that can execute the terms of a contract, are implemented as codes that are executed when certain conditions are met, and are used to complete automated transactions according to actual business needs; of course, smart contracts are not limited to executing contracts for transactions, but can also execute contracts for processing received information. It is worth noting that the wallets, shared ledgers, transactions, etc. involved in the embodiments of the present application can be understood as computer terminology transactions. In view of the conventional use of these terms in blockchain technology, the embodiments of the present application follow this practice.

[0042] Based on the above description, the embodiment of the present application provides a data processing solution based on a blockchain network. After receiving a contract deployment request initiated by a client, which carries the contract source code of the smart contract to be deployed and the code dependency information of the contract source code, the various code repositories on which the contract source code depends are obtained according to the code dependency information, and the compilability of the contract source code is verified based on the obtained code repositories; wherein the smart contract is generated by compiling the contract source code, and the code dependency information is used to indicate: when compiling the contract source code, the various code repositories that the contract source code needs to depend on; after determining that the contract source code is compilable, the contract source code and the code dependency information are stored in the blockchain of the blockchain network, so that the nodes in the blockchain network use the contract source code and the code dependency information in the blockchain to deploy the corresponding smart contract. Among them, the code repository can be a collection of codes (that is, a library of codes), and a code repository can include one or more codes, and the codes in the code repository can be reused.

[0043] The above-mentioned data processing scheme based on the blockchain network can be executed by a data processing device, which can be a node in the blockchain network. Figure 2, is a structural diagram of a data processing system provided in an embodiment of the present application, the data processing system may include: a blockchain network 21 and a client 22, the devices in the data processing system that have communication needs may communicate directly or indirectly through wired or wireless communication, and the present application does not limit this. Among them, the blockchain network 21 may include one or more nodes 211; multiple nodes 211 support consensus communication based on point-to-point transmission and consensus mechanism, the so-called consensus mechanism refers to a mechanism that completes the verification and confirmation of data in a relatively short time through voting of special nodes (here refers to node 211); the nodes 211 in the blockchain network 21 can deploy smart contracts by compiling and initializing the contract source code of the smart contract. Taking the data processing device as the target node in the blockchain network as an example, the target node can receive a contract deployment request initiated by the client, and the contract deployment request carries the contract source code of the smart contract to be deployed and the code dependency information of the contract source code; according to the code dependency information, the various code repositories on which the contract source code depends are obtained, and based on the obtained code repositories, the compilability of the contract source code is verified; after determining that the contract source code is compilable, the contract source code and the code dependency information are stored in the blockchain of the blockchain network, so that the nodes in the blockchain network use the contract source code and code dependency information in the blockchain to deploy the corresponding smart contract.

[0044] In a feasible implementation, the data processing device executing the above data processing solution may be a trusted execution device located outside the blockchain network; based on this, see Figure 3, a structural diagram of another data processing system provided in an embodiment of the present application, the data processing system may include: a blockchain network 31, a client 32 and a trusted execution device 33, and the devices in the data processing system that have communication needs can communicate directly or indirectly through wired or wireless communication, and the present application does not limit this. Optionally, the trusted execution device may be a device with a built-in trusted execution environment, which is a secure area isolated from the operating system of the trusted execution device; further, the trusted execution environment (TEE) is a secure area constructed by software and hardware methods on a computing platform (device), which can ensure that the code and data loaded in the secure area are protected in terms of confidentiality and integrity. Its goal is to ensure that a task is executed as expected, to ensure the confidentiality and integrity of the initial state, and the confidentiality and integrity of the runtime state; that is, the code running in a feasible execution environment and the related data generated can be considered to be trusted. When the above data processing scheme is executed by a trusted execution device, the trusted execution device can receive a contract deployment request initiated by a client, and the contract deployment request carries the contract source code of the smart contract to be deployed and the code dependency information of the contract source code; according to the code dependency information, the various code repositories on which the contract source code depends are obtained, and based on the obtained various code repositories, the compilability of the contract source code is verified; after determining that the contract source code is compilable, the contract source code and the code dependency information are stored in the blockchain of the blockchain network, so that the nodes in the blockchain network use the contract source code and the code dependency information in the blockchain to deploy the corresponding smart contract. Among them, after determining that the contract source code is compilable, the trusted execution device stores the contract source code and the code dependency information in the blockchain of the blockchain network, by sending the contract source code and the code dependency information to the nodes in the blockchain network, and storing them in the blockchain of the blockchain network via the nodes in the blockchain network. When the above data processing scheme is executed by a trusted execution device located outside the blockchain network, the computing pressure of the nodes in the blockchain network can be reduced; for the sake of convenience, the embodiments of the present application are described later by taking the data processing device that executes the above data processing scheme as a node located in the blockchain network as an example.

[0045] The collection and processing of relevant data in this application (such as the contract source code of the smart contract to be deployed, code dependency information of the contract source code, etc.) should be strictly in accordance with the requirements of laws and regulations when applied in instances, and the informed consent or separate consent of the personal information subject should be obtained. Subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.

[0046] Based on the above-mentioned data processing scheme based on blockchain network, the embodiment of the present application provides a data processing method based on blockchain network (also referred to as data processing method). Figure 4 , which is a flow chart of a data processing method based on a blockchain network provided in an embodiment of the present application. Figure 4 The data processing method based on the blockchain network shown can be executed by a data processing device. Figure 4 The data processing method shown may include the following steps:

[0047] S401, receiving a contract deployment request initiated by a client, the contract deployment request carries the contract source code of the smart contract to be deployed and the code dependency information of the contract source code.

[0048] Among them, the smart contract is generated by compiling the contract source code, and the code dependency information is used to indicate: when compiling the contract source code, the various code repositories that the contract source code needs to rely on; wherein, the code repository can be a collection of codes (that is, a code library), and a code repository can include one or more codes, and the codes in the code repository can be reused. Further, the code repository can also be understood as a project, for example, a math library can include many mathematical calculation methods and function codes, and the math library is a code repository. Further, the code dependency information is used to indicate: when compiling the contract source code, the various code repositories that the contract source code needs to rely on, that is, when compiling the contract source code, not only the contract source code is required, but also the various code repositories that the contract source code depends on in order to compile successfully. The various code repositories that the contract source code depends on can provide support for the functions implemented by the contract source code. Further, the various code repositories that the contract source code depends on can be the code repositories called by the contract source code, that is, if the contract source code needs to use a certain function, it also needs to call the code repository to which the function belongs in order to use the code of the function. Furthermore, the code dependency information may include: the warehouse identifier of each code warehouse on which the contract source code depends, and the warehouse identifier is used to indicate the code warehouse, for example, it can be the name of the code warehouse or the hash value of the code warehouse, which is not limited in the embodiments of the present application.

[0049] S402, according to the code dependency information, obtain the various code repositories that the contract source code depends on, and verify the compilability of the contract source code based on the obtained code repositories.

[0050] In one embodiment, when the data processing device obtains the various code repositories that the contract source code depends on based on the code dependency information, when the code repositories indicated by the code dependency information are stored in the local storage space, the corresponding code repositories can be obtained locally, and the code repositories indicated by the code dependency information but not stored locally can be obtained from an external data source (such as the Internet). Verifying the compilability of the contract source code means verifying whether the contract source code can be compiled successfully. When the contract source code is compiled successfully, it is considered that the contract source code is compilable.

[0051] Furthermore, the data processing device may store the code repository obtained from the external data source in the local storage space, so as to obtain the corresponding code repository from the local storage space when it is necessary to verify the compilability of the new contract source code based on one or more code repositories in the code repository obtained from the external data source.

[0052] S403, after determining that the contract source code is compilable, the contract source code and the code dependency information are stored in the blockchain of the blockchain network, so that the nodes in the blockchain network use the contract source code and the code dependency information in the blockchain to deploy the corresponding smart contract.

[0053] Among them, when the data processing device is a trusted execution device located outside the blockchain network, the data processing device sends the contract source code and code dependency information to the nodes in the blockchain network, and stores it in the blockchain of the blockchain network through the nodes in the blockchain network. Further, after determining that the contract source code is compilable, that is, verifying that the contract source code can be compiled successfully, the data processing device can store the contract source code as a code repository in the local storage space, so that the contract source code is relied on by other contract source codes. Further, after determining that the contract source code is not compilable, the data processing device can return the first feedback information indicating that the contract source code is not compilable to the client.

[0054] In one embodiment, if the storage space located locally is used to store the code repository, it is called the contract-dependent storage space, that is, the data processing device includes the contract-dependent storage space located locally, and the contract-dependent storage space refers to the storage space used to store the code repository; see Figure 5, is a schematic diagram of an execution data processing method provided by an embodiment of the present application, wherein a data processing device can receive a contract deployment request initiated by a client, the contract deployment request carrying the contract source code of the smart contract to be deployed and the code dependency information of the contract source code; in a locally located contract dependency storage space, when a code repository indicated by the code dependency information is stored, the corresponding code repository is obtained from the contract dependency storage space; the code repository indicated by the code dependency information but not stored in the contract dependency storage space is obtained from an external data source (such as the Internet), and the code repository obtained from the external data source is stored in the contract dependency storage space; based on each of the obtained code repositories, the compilability of the contract source code is verified; after determining that the contract source code is compilable, the contract source code is stored as a code repository in the contract dependency storage space, so that the contract source code is dependent on other contract source codes, and the contract source code and the code dependency information are stored in the blockchain of the blockchain network, so that the nodes in the blockchain network use the contract source code and the code dependency information in the blockchain to deploy the corresponding smart contract.

[0055] In an embodiment of the present application, after receiving a contract deployment request initiated by a client carrying the contract source code of a smart contract to be deployed and the code dependency information of the contract source code, the various code repositories on which the contract source code depends can be obtained according to the code dependency information, and the compilability of the contract source code can be verified based on the obtained code repositories; wherein the smart contract is generated by compiling the contract source code, and the code dependency information is used to indicate: when compiling the contract source code, the various code repositories on which the contract source code needs to depend; after determining that the contract source code is compilable, the contract source code and the code dependency information are stored in the blockchain of the blockchain network, so that the nodes in the blockchain network use the contract source code and the code dependency information in the blockchain to deploy the corresponding smart contract; the contract source code and the code dependency information are small in size, and by storing the contract source code and the code dependency information in the blockchain of the blockchain network, the storage pressure of the blockchain network can be reduced, that is, the storage pressure of the nodes in the blockchain network when storing the blockchain can be reduced; and the contract deployment request of this solution carries the contract source code and the code dependency information, which can effectively save the processing resources required for transmission compared to carrying the compiled smart contract.

[0056] Based on the above-mentioned related embodiments of the data processing method based on the blockchain network, the present application embodiment provides another data processing method based on the blockchain network. Figure 6 , which is a flow chart of another data processing method based on a blockchain network provided in an embodiment of the present application. Figure 6 The data processing method based on the blockchain network shown can be executed by a data processing device. Figure 6 The data processing method shown may include the following steps:

[0057] S601, receiving a contract deployment request initiated by a client, the contract deployment request carries the contract source code of the smart contract to be deployed and the code dependency information of the contract source code.

[0058] Among them, the smart contract is generated by compiling the contract source code, and the code dependency information is used to indicate: when compiling the contract source code, the various code repositories that the contract source code needs to rely on; further, the code dependency information may include: the warehouse identifier of each code repository on which the contract source code depends, and the warehouse identifier is used to indicate the code repository, for example, it can be the name of the code repository, or it can be the hash value of the code repository. The embodiment of the present application takes the hash value of the code repository as an example for explanation.

[0059] S602, according to the code dependency information, obtain the various code repositories that the contract source code depends on.

[0060] In one embodiment, the data processing device obtains the various code repositories that the contract source code depends on according to the code dependency information, which may include: determining the contract dependency storage space located locally, the contract dependency storage space refers to the storage space used to store the code repository; for the i-th repository identifier in the code dependency information, detecting the storage relationship between the i-th code repository indicated by the i-th repository identifier and the contract dependency storage space; i∈[1, I], I is the number of repository identifiers in the code dependency information; if the storage relationship indicates that the contract dependency storage space includes the i-th code repository, then read the i-th code repository from the contract dependency storage space; if the storage relationship indicates that the contract dependency storage space does not include the i-th code repository, then obtain the i-th code repository from an external data source. Among them, the external data source refers to a data source that is not located locally, for example, the external data source may include: a remote storage space located within the blockchain network for storing code repositories, an Internet network located outside the blockchain network, and the like.

[0061] In a feasible implementation, a data processing device detects the storage relationship between the i-th code repository indicated by the i-th repository identifier and the contract dependency storage space, which may include: based on the i-th repository identifier, searching the contract dependency storage space for the code repository indicated by the i-th repository identifier; if the corresponding code repository is found, using the first relationship as the storage relationship between the i-th code repository indicated by the i-th repository identifier and the contract dependency storage space; wherein the first relationship is used to indicate that the contract dependency storage space includes the i-th code repository; if the corresponding code repository is not found, using the second relationship as the storage relationship between the i-th code repository indicated by the i-th repository identifier and the contract dependency storage space; wherein the second relationship is used to indicate that the contract dependency storage space does not include the i-th code repository.

[0062] In an optional embodiment, the data processing device can record the relevant information of each code repository stored in the contract dependency storage space by constructing a contract dependency information table, so as to better manage the contract dependency storage space; based on this, the data processing device detects the storage relationship between the i-th code repository indicated by the i-th repository identifier and the contract dependency storage space, which can include: searching for the i-th repository identifier in the contract dependency information table, the contract dependency information table including: the repository identifier of each code repository stored in the contract dependency storage space; if the i-th repository identifier is found, then the first relationship is used as the storage relationship between the i-th code repository indicated by the i-th repository identifier and the contract dependency storage space; wherein the first relationship is used to indicate that the contract dependency storage space includes the i-th code repository; if the i-th repository identifier is not found, then the second relationship is used as the storage relationship between the i-th code repository indicated by the i-th repository identifier and the contract dependency storage space; wherein the second relationship is used to indicate that the contract dependency storage space does not include the i-th code repository. That is to say, when there is a repository identifier identical to the code dependency information in the contract dependency information table, the code repository indicated by the same repository identifier can be obtained from the contract dependency storage space, and the code repository indicated by the remaining repository identifiers can be obtained from the external data source.

[0063] In an optional embodiment, the contract dependency information table may also store the storage path of the code repository in the contract dependency storage space, so the data processing device may obtain the corresponding code repository from the contract dependency storage space based on the storage path indicated by the contract dependency information table; that is, the contract dependency information table may also include: the storage path of each code repository stored in the contract dependency storage space in the contract dependency storage space; and in the contract dependency information table, the warehouse identifier and the corresponding storage path of the same code repository are associated with each other; wherein, when the i-th warehouse identifier (i.e., the i-th warehouse identifier in the above code dependency information) is found in the contract dependency information table, the i-th code repository is read from the contract dependency storage space according to the storage path associated with the i-th warehouse identifier in the contract dependency information table. Furthermore, the data in the contract dependency information table can be adaptively adjusted as the code repository stored in the contract dependency storage space is adjusted; for example, if the contract dependency information table includes a repository identifier and an associated storage path, when a new code repository is added to the contract dependency storage space, the repository identifier of the corresponding code repository and the storage path of the corresponding code repository in the contract dependency storage space are added to the contract dependency information table; when the code repository is deleted from the contract dependency storage space, the repository identifier of the corresponding code repository and the associated storage path are deleted from the contract dependency information table; when the storage location of the code repository is adjusted in the contract dependency storage space, the storage path associated with the repository identifier of the corresponding code repository is adjusted in the contract dependency information table. If the i-th code repository is obtained from an external data source, that is, after obtaining the i-th code repository from the external data source, the data processing device can also store the i-th code repository in the contract dependency storage space, so that when the compilability of the new contract source code needs to be verified based on the i-th code repository, the i-th code repository can be obtained from the contract dependency storage space; accordingly, the warehouse identifier of the i-th code repository and the storage path of the i-th code repository in the contract dependency storage space can be added to the contract dependency information table.

[0064] In one embodiment, the external data source may include: a remote storage space located within the blockchain network and an Internet network located outside the blockchain network; the remote storage space is used to store code repositories; based on this, the data processing device obtains the i-th code repositories from the external data source, which may include: obtaining the i-th code repositories from the remote storage space; if the i-th code repositories from the remote storage space fail to be obtained, then downloading the i-th code repositories from the Internet network. Among them, since the remote storage space is located within the blockchain network, the code repositories are obtained from the remote storage space first, which can improve the security of the obtained code repositories.

[0065] See also Figure 7, which is a comparative schematic diagram of a code dependency information and a contract dependency information table provided in an embodiment of the present application, wherein, as shown in the mark 701, the code dependency information of the contract source code includes 6 warehouse identifiers, and the 1st to 6th warehouse identifiers are warehouse identifier A1, warehouse identifier A2, warehouse identifier A3, warehouse identifier A4, warehouse identifier A5 and warehouse identifier A6 respectively; as shown in the mark 702, the contract dependency information table includes 10 warehouse identifiers and the storage path of the code warehouse indicated by each warehouse identifier in the contract dependency storage space, and the 1st to 10th warehouse identifiers are warehouse identifier A1, warehouse identifier A2, warehouse identifier A3, warehouse identifier B1, warehouse identifier B2, warehouse identifier B3, warehouse identifier C1, warehouse identifier C2, warehouse identifier C3, warehouse identifier C4 respectively, then the code warehouses indicated by warehouse identifier A1, warehouse identifier A2 and warehouse identifier A3 can be read from the contract dependency storage space, and the code warehouses indicated by warehouse identifier A4, warehouse identifier A5 and warehouse identifier A6 can be obtained from the external data source.

[0066] In another optional embodiment, when the data processing device obtains the various code repositories that the contract source code depends on based on the code dependency information, it can search in the contract dependency information table whether all the repository identifiers in the code dependency information exist; if all the repository identifiers in the code dependency information are found in the contract dependency information table, the code repositories indicated by all the repository identifiers in the code dependency information are obtained from the contract dependency storage space; otherwise, the repository identifier that exists in the code dependency information but does not exist in the contract dependency information table is determined from the code dependency information, and the code repositories indicated by the determined repository identifier are obtained from an external data source; the code repositories obtained from the external data source are stored in the contract dependency storage space, and the repository identifier of the code repositories obtained from the external data source is stored in the contract dependency information table, and the code repositories indicated by all the repository identifiers in the code dependency information are obtained from the contract dependency storage space.

[0067] S603, compile the contract source code based on the obtained code repositories.

[0068] S604, if the contract source code passes the compilation, it is determined that the contract source code is compilable; if the contract source code fails the compilation, it is determined that the contract source code is not compilable.

[0069] S605, after determining that the contract source code is compilable, the contract source code and the code dependency information are stored in the blockchain of the blockchain network, so that the nodes in the blockchain network use the contract source code and the code dependency information in the blockchain to deploy the corresponding smart contract.

[0070] Furthermore, after determining that the contract source code is compilable, the data processing device can also store the contract source code as a code repository in the contract dependency storage space, so that the contract source code is dependent on other contract source codes; accordingly, after storing the contract source code as a code repository in the contract dependency storage space, the contract source code has a warehouse identifier, and the warehouse identifier of the contract source code and the storage path of the contract source code in the contract dependency storage space can be added to the contract dependency information table; wherein, if the warehouse identifier is represented by a hash value, the warehouse identifier of the contract source code can be obtained by calculating the hash value of the contract source code.

[0071] S606: After determining that the contract source code is not compilable, return first feedback information indicating that the contract source code is not compilable to the client.

[0072] In one embodiment, see Figure 8a , a schematic diagram of another execution data processing method provided by an embodiment of the present application; the data processing device can receive a contract deployment request initiated by a client, and the contract deployment request carries the contract source code of the smart contract to be deployed and the code dependency information of the contract source code; the smart contract is generated by compiling the contract source code, and the code dependency information is used to indicate: when compiling the contract source code, the various code repositories that the contract source code needs to rely on. Further, for the i-th warehouse identifier in the code dependency information (i∈[1, I], I is the number of warehouse identifiers in the code dependency information), the i-th warehouse identifier is searched in the contract dependency information table; if the i-th warehouse identifier is found, the i-th code warehouse is read from the contract dependency storage space. If the i-th warehouse identifier is not found, the i-th code warehouse is obtained from an external data source, the i-th code warehouse is stored in the contract dependency storage space, and the warehouse identifier of the i-th code warehouse and the storage path of the i-th code warehouse in the contract dependency storage space are added to the contract dependency information table.

[0073] In the case where the i-th warehouse identifier is the last warehouse identifier in the code dependency information, the contract source code is compiled based on the acquired code repositories; if the contract source code passes the compilation, it is determined that the contract source code is compilable, and the contract source code is stored as a code repository in the contract dependency storage space so that the contract source code is dependent on other contract source codes, the hash value of the contract source code is calculated, and the calculated hash value of the contract source code is stored as the warehouse identifier of the contract source code in the contract dependency information table, and the contract source code and the code dependency information are stored in the blockchain of the blockchain network, so that the nodes in the blockchain network use the contract source code and the code dependency information in the blockchain to deploy the corresponding smart contract. If the contract source code fails to pass the compilation, it is determined that the contract source code is not compilable, and the first feedback information indicating that the contract source code is not compilable is returned to the client.

[0074] In one embodiment, see Figure 8b , a schematic diagram of another execution data processing method provided by an embodiment of the present application; the data processing device can receive a contract deployment request initiated by a client, the contract deployment request carries the contract source code of the smart contract to be deployed and the code dependency information of the contract source code; the smart contract is generated by compiling the contract source code, and the code dependency information is used to indicate: when compiling the contract source code, the contract source code needs to rely on each code repository. Further, the data processing device can find out whether all the repository identifiers in the code dependency information exist in the contract dependency information table; if all the repository identifiers in the code dependency information are found in the contract dependency information table, the code repository indicated by all the repository identifiers in the code dependency information is obtained from the contract dependency storage space; otherwise, the repository identifier that exists in the code dependency information but does not exist in the contract dependency information table is determined from the code dependency information, and the code repository indicated by the determined repository identifier is obtained from the external data source; the code repository obtained from the external data source is stored in the contract dependency storage space, and the repository identifier of the code repository obtained from the external data source and the storage path of the corresponding code repository in the contract dependency storage space are stored in the contract dependency information table, and the code repository indicated by all the repository identifiers in the code dependency information is obtained from the contract dependency storage space.

[0075] Compile the contract source code based on the acquired code repositories; if the contract source code passes the compilation, it is determined that the contract source code is compilable, and the contract source code is stored as a code repository in the contract dependency storage space, so that the contract source code is dependent on other contract source codes, calculate the hash value of the contract source code, and store the calculated hash value of the contract source code as the warehouse identifier of the contract source code in the contract dependency information table, and store the contract source code and code dependency information in the blockchain of the blockchain network, so that the nodes in the blockchain network use the contract source code and code dependency information in the blockchain to deploy the corresponding smart contract. If the contract source code fails to pass the compilation, it is determined that the contract source code is not compilable, and the first feedback information indicating that the contract source code is not compilable is returned to the client.

[0076] In one embodiment, the process of deploying a smart contract may also include initializing the smart contract; then, after determining that the contract source code is compilable, the data processing device may also initialize the smart contract obtained by compiling the contract source code; if the smart contract is successfully initialized, the step of storing the contract source code and code dependency information in the blockchain of the blockchain network is triggered; if the smart contract fails to be initialized, the second feedback information indicating the failure of initialization is returned to the client. Further, if the data processing device is a node in the blockchain network, the relevant data obtained by the successful or failed initialization of the smart contract may also be stored in the blockchain of the blockchain network. Further, the initialization processing of the smart contract obtained by compiling the contract source code may be based on the initialization indication data carried by the contract deployment request, wherein the initialization indication data may include the initialization method and the initialization parameters; that is, the contract deployment request sent by the client may also carry the initialization indication data, and when the data processing device initializes the smart contract obtained by compiling the contract source code, it may start a process to execute the smart contract, and call the process to pass in the initialization parameters to execute the initialization method. Furthermore, if the smart contract is successfully initialized, the initialization indication data can also be stored in the blockchain of the blockchain network, so that the nodes in the blockchain network can use the contract source code, code dependency information and initialization indication data in the blockchain to deploy the corresponding smart contract.

[0077] In one embodiment, the contract deployment request may also carry verification information, the verification information includes a target digital certificate and a target digital signature, the target digital signature is obtained by signing the request data carried by the contract deployment request, the request data includes at least the contract source code and code dependency information, and the target digital certificate includes: a key for verifying the target digital signature; then the data processing device, after receiving the contract deployment request initiated by the client, can perform a trusted verification on the target digital certificate based on the digital certificate stored locally; after the target digital certificate passes the trusted verification, the target digital signature is verified using the key in the target digital certificate to obtain a verification result; if it is determined according to the verification result that the request data carried by the contract deployment request has trusted data, then the step of obtaining the various code repositories on which the contract source code depends according to the code dependency information is triggered. Further, in the case where the target digital certificate fails to pass the trusted verification, a first verification feedback information indicating that the certificate verification fails can be returned to the client; if it is determined according to the verification result that the request data carried by the contract deployment request does not have trusted data, a second verification feedback information indicating that the signature verification fails can be returned to the client, and the second verification feedback information can also be used to indicate that the request data carried by the contract deployment request is untrustworthy. Optionally, when the data processing device performs trusted verification on the target digital certificate based on the locally stored digital certificate, if a digital certificate consistent with the target digital certificate is found in the locally stored digital certificates, it can be determined that the target digital certificate has passed the trusted verification; otherwise, it is determined that the target digital certificate has not passed the trusted verification. The data processing device uses the key in the target digital certificate to verify the target digital signature, and the process of obtaining the verification result is also the process of signature verification. During the signature verification process, the receiver needs to confirm whether the received ciphertext file is really sent by the sender, and also needs to confirm whether the data has been tampered with. The verification is ultimately achieved by comparing the message digest; the data processing device can use the key in the target digital certificate to decrypt the target digital signature to obtain a first digest; use a hash function to perform a hash operation on the request data carried by the contract deployment request to obtain a second digest, wherein the hash function should be the same as the hash function used in the process of signing the request data carried by the contract deployment request; if the first digest and the second digest are the same, a verification result is generated to indicate that the request data carried by the contract deployment request has credible data, that is, a verification result is generated to indicate that the request data carried by the contract deployment request is credible; otherwise, a verification result is generated to indicate that the request data carried by the contract deployment request does not have credible data, that is, a verification result is generated to indicate that the request data carried by the contract deployment request is untrustworthy.

[0078] Further optionally, if it is determined according to the verification result that the request data carried by the contract deployment request has credible data, the data processing device can also: obtain the operation permission information of the initiating object of the contract deployment request; when the operation permission information of the initiating object indicates that the initiating object has the contract deployment permission, trigger the execution of the steps of obtaining the various code repositories on which the contract source code depends according to the code dependency information; when the operation permission information of the initiating object indicates that the initiating object does not have the contract deployment permission, return the third verification feedback information indicating the failure of the contract deployment permission verification to the client. For the sake of convenience, the first verification feedback information, the second verification feedback information, and the third verification feedback information can also be collectively referred to as verification feedback information.

[0079] In one embodiment, before obtaining the various code repositories that the contract source code depends on according to the code dependency information, the data processing device can also perform a contract correctness check and a contract vulnerability scan on the contract source code; wherein, the contract correctness check on the contract source code can prevent the subsequent compilation from failing due to errors in the contract source code, thereby reducing the waste of computing resources; the contract correctness check on the contract source code can include but is not limited to checking whether the contract source code complies with the code specification and checking whether the code volume of the contract source code is too large; the contract vulnerability scan on the contract source code can avoid problems such as excessive system resource usage or resource loss due to potential vulnerabilities in the contract source code. Further, when the contract correctness check on the contract source code passes and the contract vulnerability scan does not scan vulnerabilities, the step of obtaining the various code repositories that the contract source code depends on is executed according to the code dependency information. If the contract correctness check on the contract source code fails, the first prompt information indicating that the contract correctness check fails is returned to the client. If a vulnerability is scanned when the contract vulnerability scan on the contract source code is performed, the second prompt information indicating that the contract source code has a vulnerability is returned to the client.

[0080] In one embodiment, the initiating object of the contract deployment request can write the request data in its client, that is, write the contract source code of the smart contract, write the code dependency information of the contract source code, and write the initialization indication data (including the initialization method and initialization parameters); further, the request data can be signed to obtain the target digital signature, and the contract deployment request is initiated based on the request data, the target digital signature, and the target digital certificate owned by the initiating object. Further optionally, the request data can be a compressed file after compression, then at this time, the initiating object can write the contract source code of the smart contract in its client, write the code dependency information of the contract source code, compress the contract source code and the code dependency information into a compressed package, write the initialization indication data, and package the compressed package and the initialization indication data, the packaged data can be used as the request data, the packaged data (i.e., the request data) is signed to obtain the target digital signature, and the contract deployment request is initiated based on the request data, the target digital signature, and the target digital certificate owned by the initiating object. When the request data is packaged data, after receiving the contract deployment request, the data processing device needs to decompress the request data to obtain the corresponding contract source code, code dependency information, and initialization indication data.

[0081] In one embodiment, see Fig. 9 , which is a schematic diagram of another execution data processing method provided in an embodiment of the present application; the data processing device can receive a contract deployment request initiated by a client, and the contract deployment request carries the contract source code of the smart contract to be deployed and the code dependency information of the contract source code; the smart contract is generated by compiling the contract source code, and the code dependency information is used to indicate: when compiling the contract source code, the various code repositories that the contract source code needs to rely on; the contract deployment request also carries initialization indication data and verification information, and the verification information includes a target digital certificate and a target digital signature.

[0082] After receiving the contract deployment request initiated by the client, the data processing device can perform trustworthy verification on the target digital certificate based on the locally stored digital certificate; if the target digital certificate fails the trustworthy verification, the data processing device can return first verification feedback information to the client to indicate that the certificate verification failed; after the target digital certificate passes the trustworthy verification, the target digital signature is verified using the key in the target digital certificate to obtain a verification result; if it is determined according to the verification result that the request data carried by the contract deployment request does not contain trustworthy data, second verification feedback information can be returned to the client to indicate that the signature verification failed, and the second verification feedback information can also be used to indicate that the request data carried by the contract deployment request is untrustworthy.

[0083] If it is determined based on the verification result that the request data carried by the contract deployment request is credible data, the data processing device can also verify whether the initiating object has the contract deployment authority based on the operation authority information of the initiating object of the contract deployment request. If the operation authority information of the initiating object indicates that the initiating object does not have the contract deployment authority, the third verification feedback information indicating that the contract deployment authority verification has failed is returned to the client.

[0084] If the operation permission information of the initiating object indicates that the initiating object has the contract deployment permission, the contract correctness check is performed on the contract source code. If the contract correctness check on the contract source code fails, the first prompt information indicating that the contract correctness check fails is returned to the client.

[0085] If the contract correctness check of the contract source code passes, the contract source code is scanned for contract vulnerabilities. If a vulnerability is found during the contract vulnerability scan of the contract source code, a second prompt information indicating that a vulnerability exists in the contract source code is returned to the client.

[0086] If the contract vulnerability scan of the contract source code does not find any vulnerability, the relevant process of obtaining the various code repositories that the contract source code depends on is executed according to the code dependency information. In this relevant process, for the i-th warehouse identifier in the code dependency information (i∈[1, I], I is the number of warehouse identifiers in the code dependency information), the i-th warehouse identifier is searched in the contract dependency information table; if the i-th warehouse identifier is found, the i-th code warehouse is read from the contract dependency storage space. If the i-th warehouse identifier is not found, the i-th code warehouse is obtained from the external data source, and the i-th code warehouse is stored in the contract dependency storage space, and the warehouse identifier of the i-th code warehouse and the storage path of the i-th code warehouse in the contract dependency storage space are added to the contract dependency information table.

[0087] In the case where the i-th warehouse identifier is the last warehouse identifier in the code dependency information, the contract source code is compiled based on the acquired code warehouses; if the contract source code fails to be compiled, it is determined that the contract source code is not compilable, and the first feedback information indicating that the contract source code is not compilable is returned to the client. If the contract source code passes the compilation, it is determined that the contract source code is compilable, and the smart contract obtained by compiling the contract source code is initialized; if the smart contract fails to be initialized, the second feedback information indicating the initialization failure is returned to the client; if the smart contract is successfully initialized, the contract source code is stored as a code warehouse in the contract dependency storage space so that the contract source code is dependent on other contract source codes, the hash value of the contract source code is calculated, and the calculated hash value of the contract source code is stored as the warehouse identifier of the contract source code in the contract dependency information table, and the contract source code, code dependency information and initialization indication data are stored in the blockchain of the blockchain network so that the nodes in the blockchain network adopt the contract source code, code dependency information and initialization indication data in the blockchain to deploy the corresponding smart contract. When the nodes in the blockchain network use the contract source code, code dependency information and initialization indication data in the blockchain to deploy the corresponding smart contract, they can execute a process similar to the above steps S601 to S606, that is, after obtaining the contract source code, code dependency information and initialization indication data from the blockchain, they can execute related processes such as obtaining the various code repositories on which the contract source code depends, compiling the contract source code, and initializing the compiled smart contract to realize the deployment of the smart contract. The successful initialization of the smart contract in the node in the blockchain network can be considered to be a successful deployment.

[0088] In an optional embodiment, after the data processing device stores the contract source code as a code repository in the contract dependency storage space, the contract source code has a repository identifier; the data processing device can also: analyze the dependency relationship between the various code repositories that the contract source code depends on, and analyze the dependency relationship between the contract source code and each code repository that the contract source code depends on; based on the analyzed dependency relationship, use the repository identifier of the contract source code and the repository identifiers of the various code repositories that the contract source code depends on to construct a source code dependency tree corresponding to the contract source code, so that when the contract source code is dependent on other contract source codes, the various code repositories that the contract source code depends on are determined based on the source code dependency tree; wherein the root node in the source code dependency tree stores the repository identifier of the contract source code, and each node except the root node stores the repository identifier of the code repository that the contract source code depends on, and different nodes store different repository identifiers; and for any node except the root node in the source code dependency tree, the code repository indicated by the repository identifier stored in the parent node of any node directly depends on the code repository indicated by the repository identifier stored in any node. Optionally, the node here can be understood as the storage location of the corresponding warehouse identifier in the contract dependency information table. Then, based on this process, the construction of the source code dependency tree can be implemented in the contract dependency information table.

[0089] Furthermore, the data processing device analyzes the dependency relationships between the various code repositories that the contract source code depends on, and analyzes the dependency relationships between the contract source code and each code repositories that the contract source code depends on, in order to determine which code repositories the contract source code directly depends on and which code repositories it indirectly depends on. For example, see Fig.10, which is a schematic diagram of constructing a source code dependency tree provided by an embodiment of the present application. If the code dependency information includes 6 warehouse identifiers, the first to sixth warehouse identifiers are warehouse identifier A1, warehouse identifier A2, warehouse identifier A3, warehouse identifier A4, warehouse identifier A5 and warehouse identifier A6 respectively; if the dependency relationship between the code warehouses on which the contract source code depends is as shown in the mark 1001, the code warehouse indicated by warehouse identifier A1 depends on the code warehouse indicated by warehouse identifier A2, the code warehouse indicated by warehouse identifier A2 depends on the code warehouse indicated by warehouse identifier A3, the code warehouse indicated by warehouse identifier A4 depends on the code warehouse indicated by warehouse identifier A5, and the code warehouse indicated by warehouse identifier A6 does not have a dependent code warehouse; then the contract source code directly depends on: the code warehouse indicated by warehouse identifier A1, the code warehouse indicated by warehouse identifier A4, and the code warehouse indicated by warehouse identifier A6 does not have a dependent code warehouse; it indirectly depends on: the code warehouse indicated by warehouse identifier A2, the code warehouse indicated by warehouse identifier A3, and the code warehouse indicated by warehouse identifier A5; the contract source code tree constructed based on this can be as shown in the mark 1002. By building a contract source code tree based on the repository identifier in the contract dependency information table, when the code repository indicated by the repository identifier in the contract dependency information table (such as the contract source code) is relied upon, the various code repositories that the code repository depends on can be quickly found. That is, based on the contract source code tree, the dependency relationship between code repositories can be quickly found.

[0090] In one embodiment, in order to alleviate the storage pressure of the data processing device and improve the storage performance of the data processing device, so that a smaller storage capacity can be consumed when the same number of code repositories are stored locally, that is, more code repositories can be stored under the same storage capacity, the code repositories stored in the contract-dependent storage space can be compressed and stored; that is, a sub-storage space (called a plaintext storage space) can be set in the contract-dependent storage space to store the code repositories (that is, to store the source files of the code repositories), and another sub-storage space (called a compressed storage space) can be set to store the compressed files after the code repositories are compressed; that is , the contract-dependent storage space includes a plaintext storage space and a compressed storage space, the plaintext storage space is used to store the code repository, and the compressed storage space is used to store the compressed file after compressing the code repository; the data processing device reads the i-th code repository from the contract-dependent storage space, which may include: when it is determined that the i-th code repository is included in the plaintext storage space, read the i-th code repository from the plaintext storage space; when it is determined that the i-th code repository is not included in the plaintext storage space, read the compressed file of the i-th code repository from the compressed storage space, and decompress the read compressed file to the plaintext storage space to obtain the i-th code repository, and read the i-th code repository from the plaintext storage space. Optionally, when the compressed file of the i-th code repository is read from the compressed storage space and decompressed to the plaintext storage space, the compressed file of the i-th code repository in the compressed storage space may be deleted or not, which can be set according to specific needs.

[0091] In a feasible implementation, the data processing device may: based on the i-th warehouse identifier, search for the code warehouse indicated by the i-th warehouse identifier in the plaintext storage space; if the corresponding code warehouse is found, it is determined that the i-th code warehouse is included in the plaintext storage space; otherwise, it is determined that the i-th code warehouse is not included in the plaintext storage space. In another feasible implementation, if a contract dependency information table is stored in a data processing device, and the contract dependency information table includes: a warehouse identifier and an associated storage path of each code repository stored in the contract dependency storage space, then when the storage path associated with the i-th warehouse identifier in the contract dependency information table is a storage path in the plaintext storage space, the data processing device can determine that the i-th code repository is included in the plaintext storage space, and read the i-th code repository from the plaintext storage space. When the storage path associated with the i-th warehouse identifier in the contract dependency information table is a storage path in the compressed storage space, the data processing device can determine that the i-th code repository is not included in the plaintext storage space, and read the compressed file of the i-th code repository from the compressed storage space, and decompress the read compressed file to the plaintext storage space to obtain the i-th code repository, and read the i-th code repository from the plaintext storage space.

[0092] In one embodiment, before the data processing device decompresses the read compressed file into the plaintext storage space to obtain the i-th code repository, it may also: detect the remaining storage capacity of the plaintext storage space and the target storage capacity required to store the i-th code repository in the plaintext storage space; if it is detected that the remaining storage capacity of the plaintext storage space is greater than or equal to the target storage capacity, trigger the execution of the step of decompressing the read compressed file into the plaintext storage space to obtain the i-th code repository; if it is detected that the remaining storage capacity of the plaintext storage space is less than the target storage capacity, continue to release the occupied storage capacity in the plaintext storage space until it is detected that the remaining storage capacity of the plaintext storage space is greater than or equal to the target storage capacity.

[0093] Among them, the data processing device continuously releases the storage capacity occupied in the plaintext storage space, which may include: selecting the target code warehouse to be deleted in the plaintext storage space, and reading the target code warehouse from the plaintext storage space; after reading the target code warehouse, storing the compressed file of the target code warehouse in the compressed storage space, and deleting the target code warehouse in the plaintext storage space to release the storage capacity occupied by the target code warehouse in the plaintext storage space; after releasing the corresponding storage capacity, if the remaining storage capacity of the plaintext storage space is less than the target storage capacity, then jump to the step of selecting the target code warehouse to be deleted in the plaintext storage space. Further, in order to avoid repeated storage of compressed files of the same code warehouse in the compressed storage space, the data processing device can detect whether the compressed file of the target code warehouse has been stored in the compressed storage space before storing the compressed file of the target code warehouse in the compressed storage space. If it is detected that it does not exist, the compressed file of the target code warehouse is stored in the compressed storage space. Further optionally, in order to further alleviate the storage pressure of the data processing device, the code warehouse can be stored in a remote storage space; based on this, after reading the target code warehouse, the data processing device can directly store the target code warehouse in the remote storage space, or can preferentially store the compressed files of the target code warehouse in the compressed storage space. When the remaining storage capacity of the compressed storage space is insufficient to store the compressed files of the target code warehouse, the target code warehouse is stored in the remote storage space, and the selection of the relevant processing logic can be set according to specific needs. In a feasible implementation, after reading the target code warehouse, the data processing device can detect the remaining storage capacity of the compressed storage space and the reference storage capacity required to store the compressed files of the target code warehouse in the compressed storage space; if it is detected that the remaining storage capacity of the compressed storage space is greater than or equal to the reference storage capacity, the step of storing the compressed files of the target code warehouse in the compressed storage space and deleting the target code warehouse in the plaintext storage space is triggered; if it is detected that the remaining storage capacity of the compressed storage space is less than the reference storage capacity, the target code warehouse is stored in the remote storage space, and the target code warehouse is deleted in the plaintext storage space; the remote storage space is used to store the code warehouse and is located in the blockchain network.

[0094] Among them, the target code warehouse to be deleted should be the other code warehouses in the plaintext storage space except the code warehouse on which the contract source code (i.e., the contract source code carried by the received contract deployment request) depends. That is to say, in order to ensure that the code warehouses on which the contract source code depends can be stored in the plaintext storage space, when it is necessary to release the occupied storage capacity in the plaintext storage space, other code warehouses can be removed from the plaintext storage space. Based on this, in a feasible implementation, the data processing device selects the target code warehouse to be deleted in the plaintext storage space, and can select any other code warehouse in the plaintext storage space except the code warehouse on which the contract source code depends as the target code warehouse to be deleted, that is, any other code warehouse in the plaintext storage space except the code warehouse indicated by the warehouse identifier in the code dependency information is selected as the target code warehouse to be deleted. In another feasible implementation, the data processing device may determine the target code warehouse to be deleted by means of a plaintext information table including warehouse identifiers of code warehouses stored in a plaintext storage space. Based on this, the data processing device selects the target code warehouse to be deleted in the plaintext storage space, which may include: obtaining the plaintext information table corresponding to the plaintext storage space, the plaintext information table including: warehouse identifiers of code warehouses stored in the plaintext storage space, and the warehouse identifiers in the plaintext information table are arranged in sequence; searching for a valid warehouse identifier from the plaintext information table, a valid warehouse identifier refers to: a warehouse identifier that is simultaneously located in the plaintext information table and the code dependency information; if a valid warehouse identifier is found, adjusting the arrangement order of the warehouse identifiers in the plaintext information table so that the arrangement position of the valid warehouse identifier is located before the arrangement positions of other warehouse identifiers in the plaintext information table; in the plaintext storage space, selecting the code warehouse indicated by the last warehouse identifier in the adjusted plaintext information table as the target code warehouse to be deleted.Furthermore, after selecting the target code warehouse, the data processing device may delete the last warehouse identifier in the adjusted plaintext information table; and, after decompressing the compressed file of the i-th code warehouse into the plaintext storage space to obtain the i-th code warehouse, the warehouse identifier of the i-th code warehouse is stored in the plaintext information table; wherein the warehouse identifier of the i-th code warehouse is arranged in the first position in the plaintext information table to ensure the consistency between the warehouse identifier included in the adjusted plaintext information table and the warehouse identifier of the code warehouse stored in the plaintext storage space; optionally, the data processing device may also delete the last warehouse identifier in the adjusted plaintext information table after deleting the target code warehouse in the plaintext storage space, that is, so that the warehouse identifier included in the plaintext information table is adjusted following the code warehouse stored in the plaintext storage space, for example, after adding a new code warehouse in the plaintext storage space, the warehouse identifier of the corresponding code warehouse is added to the plaintext information table, and the arrangement position of the newly added warehouse identifier can usually be set to the first position in the plaintext information table, and for example, after deleting the code warehouse in the plaintext storage space, the warehouse identifier of the corresponding code warehouse is deleted from the plaintext information table. Among them, the other warehouse identifiers here refer to the warehouse identifiers other than the valid warehouse identifiers in the plaintext information table; if multiple valid warehouse identifiers are found, the arrangement positions of the multiple valid warehouse identifiers all need to be located before the arrangement positions of other warehouse identifiers in the plaintext information table, and the embodiments of the present application do not limit the relative arrangement order of the multiple valid warehouse identifiers. For example, the relative arrangement order of the multiple valid warehouse identifiers in the adjusted plaintext information table may be the same as or opposite to the relative arrangement order of the multiple valid warehouse identifiers in the plaintext information table before adjustment.

[0095] See also Fig.11 , is a schematic diagram of adjusting a plaintext information table provided in an embodiment of the present application. If the code dependency information and contract dependency information tables are Figure 7The content shown, that is, the code dependency information includes 6 warehouse identifiers, the 1st to the 6th warehouse identifiers are warehouse identifier A1, warehouse identifier A2, warehouse identifier A3, warehouse identifier A4, warehouse identifier A5 and warehouse identifier A6 respectively; the contract dependency information table includes 10 warehouse identifiers, the 1st to the 10th warehouse identifiers are warehouse identifier A1, warehouse identifier A2, warehouse identifier A3, warehouse identifier B1, warehouse identifier B2, warehouse identifier B3, warehouse identifier C1, warehouse identifier C2, warehouse identifier C3, warehouse identifier C4; among them, warehouse identifier A1, warehouse The code repositories indicated by identifier A2, warehouse identifier B1, warehouse identifier C1, and warehouse identifier C2 are stored in the plaintext storage space. The compressed files obtained by compressing the code repositories indicated by warehouse identifier A3, warehouse identifier B2, warehouse identifier B3, warehouse identifier C3, and warehouse identifier C4 are stored in the compressed storage space. The plaintext information table corresponding to the plaintext storage space is shown in the mark 1101. The arrangement order of each warehouse identifier from front to back is: warehouse identifier C1, warehouse identifier C2, warehouse identifier A1, warehouse identifier B1, and warehouse identifier A2. If the i-th warehouse identifier is warehouse identifier A3, based on the above description, it can be known that: the valid warehouse identifiers found in the plain text information table include: warehouse identifier A1 and warehouse identifier A2, then the data processing device can adjust the arrangement order of each warehouse identifier in the plain text information table. An exemplary adjusted plain text information table can be shown as marked 1102. At this time, the arrangement order of each warehouse identifier from front to back is: warehouse identifier A2, warehouse identifier A1, warehouse identifier C1, warehouse identifier C2, and warehouse identifier B1. At this time, the relative arrangement order of the multiple valid warehouse identifiers in the adjusted plain text information table is the same as The relative arrangement order of the multiple valid warehouse identifiers in the plain text information table before adjustment is opposite; another exemplary adjusted plain text information table can be shown as marked as 1103, at this time, the arrangement order of the warehouse identifiers from front to back is: warehouse identifier A1, warehouse identifier A2, warehouse identifier C1, warehouse identifier C2, and warehouse identifier B1, at this time, the relative arrangement order of the multiple valid warehouse identifiers in the adjusted plain text information table is the same as the relative arrangement order of the multiple valid warehouse identifiers in the plain text information table before adjustment; at this time, the target code warehouse to be deleted is the code warehouse indicated by warehouse identifier B1. Furthermore, after selecting the target code warehouse, the data processing device can delete the last warehouse identifier (warehouse identifier B1) in the adjusted plaintext information table; and, after decompressing the compressed file of the i-th code warehouse (the code warehouse indicated by the warehouse identifier A3) to the plaintext storage space to obtain the i-th code warehouse, store the warehouse identifier (warehouse identifier A3) of the i-th code warehouse in the plaintext information table; the plaintext information table obtained at this time can be exemplarily shown as marked 1104 and 1105 respectively.

[0096] See also Fig.12 , which is a schematic diagram of storing a code repository based on a plaintext storage space and a compressed storage space provided in an embodiment of the present application; at this time, the data processing device can adjust the data (code repository or compressed file) stored in the plaintext storage space and the compressed storage space in batches by analyzing the code dependency information and the contract dependency information table. First, the data processing device can receive a contract deployment request initiated by a client, and the contract deployment request carries the contract source code of the smart contract to be deployed and the code dependency information of the contract source code; the code dependency information and the contract dependency information table are compared and analyzed, and the warehouse identifier that is located in both the code dependency information and the contract dependency information table and whose storage path is the storage path in the plaintext storage space is determined as a plaintext storage warehouse identifier. It can be seen that the code warehouse indicated by each plaintext storage warehouse identifier is stored in the plaintext storage space; further, the warehouse identifier that is located in both the code dependency information and the contract dependency information table and whose storage path is the storage path in the compressed storage space is determined as a compressed storage warehouse identifier. It can be seen that the code warehouse indicated by each compressed storage warehouse identifier is compressed and stored in the compressed storage space, that is, the compressed file of the code warehouse indicated by each compressed storage warehouse identifier is stored; further, the warehouse identifier that is located in the code dependency information and not in the contract dependency information table is determined as an external storage warehouse identifier. It can be seen that the contract dependency storage space does not include the code warehouse indicated by each external storage warehouse identifier.

[0097] Then, the data processing device can obtain the code warehouses indicated by each plaintext storage warehouse identifier from the plaintext storage space, and adjust the arrangement position of each plaintext storage warehouse identifier in the plaintext information table to the first place (i.e., before the arrangement position of other warehouse identifiers in the plaintext information table) in turn. The compressed files of the code warehouses indicated by each compressed storage warehouse identifier are read from the compressed storage space, and the compressed files of the code warehouses indicated by each compressed storage warehouse identifier are decompressed to the plaintext storage space in turn. If it is detected that the remaining storage capacity of the plaintext storage space is insufficient to store the code warehouse indicated by the corresponding compressed storage warehouse identifier during each decompression of the compressed files of the code warehouse indicated by the corresponding compressed storage warehouse identifier to the plaintext storage space, the last warehouse identifier in the plaintext information table is continuously deleted, and the code warehouse indicated by the corresponding warehouse identifier in the plaintext storage space is compressed into the compressed storage space to continuously release the occupied storage capacity in the plaintext storage space until it is detected that the remaining storage capacity of the plaintext storage space is sufficient to store the code warehouse indicated by the corresponding compressed storage warehouse identifier. Then, the code warehouses indicated by each compressed storage warehouse identifier can be read from the plaintext storage space.

[0098] Obtain the code warehouse indicated by each external storage warehouse identifier from an external data source, and store the code warehouse indicated by each external storage warehouse identifier into the plaintext storage space in turn. If it is detected that the remaining storage capacity of the plaintext storage space is insufficient to store the code warehouse indicated by the corresponding external storage warehouse identifier during each storage of the code warehouse indicated by the corresponding external storage warehouse identifier into the plaintext storage space, then continuously delete the last warehouse identifier in the plaintext information table, and compress the code warehouse indicated by the corresponding warehouse identifier in the plaintext storage space into the compressed storage space to continuously release the occupied storage capacity in the plaintext storage space, until it is detected that the remaining storage capacity of the plaintext storage space is sufficient to store the code warehouse indicated by the corresponding external storage warehouse identifier. Then, the code warehouse indicated by each external storage warehouse identifier can be read from the plaintext storage space.

[0099] See also Fig.13 , is a schematic diagram of storing a code repository based on a plain text storage space, a compressed storage space, and a remote storage space provided by an embodiment of the present application; at this time, the data processing device can adjust the data (code repository or compressed file) stored in the plain text storage space and the compressed storage space by batch by analyzing the code dependency information and the contract dependency information table. Fig.12 On the basis of the process shown, when the data processing device sequentially decompresses the compressed files of the code warehouses indicated by the compressed storage warehouse identifiers to the plaintext storage space, if it is detected that the remaining storage capacity of the plaintext storage space is insufficient to store the code warehouse indicated by the corresponding compressed storage warehouse identifier during each decompression of the compressed files of the code warehouse indicated by the corresponding compressed storage warehouse identifier to the plaintext storage space, the last warehouse identifier in the plaintext information table is continuously deleted, and when the remaining storage capacity of the compressed storage space is sufficient to store the compressed files of the code warehouse indicated by the corresponding warehouse identifier, the code warehouse indicated by the corresponding warehouse identifier in the plaintext storage space is compressed into the compressed storage space, and when the remaining storage capacity of the compressed storage space is insufficient to store the compressed files of the code warehouse indicated by the corresponding warehouse identifier, the code warehouse indicated by the corresponding warehouse identifier in the plaintext storage space is stored in the remote storage space, so as to continuously release the occupied storage capacity in the plaintext storage space, until it is detected that the remaining storage capacity of the plaintext storage space is sufficient to store the code warehouse indicated by the corresponding compressed storage warehouse identifier. Then, the code warehouses indicated by the compressed storage warehouse identifiers can be read from the plaintext storage space.

[0100] When the data processing device sequentially stores the code warehouses indicated by each external storage warehouse identifier into the plaintext storage space, if it is detected that the remaining storage capacity of the plaintext storage space is insufficient to store the code warehouse indicated by the corresponding external storage warehouse identifier during each process of storing the code warehouse indicated by the corresponding external storage warehouse identifier into the plaintext storage space, the last warehouse identifier in the plaintext information table is continuously deleted, and when the remaining storage capacity of the compressed storage space is sufficient to store the compressed file of the code warehouse indicated by the corresponding warehouse identifier, the code warehouse indicated by the corresponding warehouse identifier in the plaintext storage space is compressed into the compressed storage space, and when the remaining storage capacity of the compressed storage space is insufficient to store the compressed file of the code warehouse indicated by the corresponding warehouse identifier, the code warehouse indicated by the corresponding warehouse identifier in the plaintext storage space is stored in the remote storage space, so as to continuously release the occupied storage capacity in the plaintext storage space, until it is detected that the remaining storage capacity of the plaintext storage space is sufficient to store the code warehouse indicated by the corresponding external storage warehouse identifier. Then, the code warehouse indicated by each external storage warehouse identifier can be read from the plaintext storage space.

[0101] In one embodiment, see Fig.14, is a module diagram of a data processing device provided in an embodiment of the present application, and the data processing device may include but is not limited to the following modules: a network module, an authentication module, a virtual machine module, and a storage module; wherein the network module can be used to communicate with other electronic devices such as a client and a node in a blockchain network, and can be used to implement data transmission and reception, such as the reception of a contract deployment request. The authentication module can be used to implement functions such as verifying permissions and saving digital certificates, and may include: a node certificate module and an authentication algorithm module, wherein the node certificate module can be used to locally store digital certificates, and the authentication algorithm module is used to implement processes related to the verification of contract deployment requests, such as verification of target digital certificates, target digital signatures, and initiating object permissions. The virtual machine module can be used to implement the processing logic related to the deployment of smart contracts, including but not limited to the processes related to the compilation of contract source code, the initialization and execution of smart contracts, etc.; the virtual machine module may include: a contract correctness check module, a contract vulnerability scanning module, a contract dependency construction module, and a contract dependency download module; wherein the contract correctness check module can be used to check the contract correctness of the contract source code, the contract vulnerability scanning module can be used to scan the contract source code for vulnerabilities, the contract dependency construction module can be used to implement the construction of the source code dependency tree, and the contract dependency download module can be used to download the code repository from an external data source. The storage module can be used to implement the relevant functions of data storage, and the storage module may include: a contract dependency information table module and a contract dependency storage module, wherein the contract dependency information table module is used to store the contract dependency information table, and the contract dependency storage module corresponds to the contract dependency storage space, which is used to store the code repository; further, when the data processing device is a node in a blockchain network, the storage module may also include a block data storage module for storing block data in the blockchain, and a state data storage module for storing state data in the blockchain.

[0102] In an embodiment of the present application, after receiving a contract deployment request initiated by a client carrying the contract source code of a smart contract to be deployed and the code dependency information of the contract source code, the various code repositories on which the contract source code depends can be obtained according to the code dependency information, and the compilability of the contract source code can be verified based on the obtained code repositories; wherein the smart contract is generated by compiling the contract source code, and the code dependency information is used to indicate: when compiling the contract source code, the various code repositories on which the contract source code needs to depend; after determining that the contract source code is compilable, the contract source code and the code dependency information are stored in the blockchain of the blockchain network, so that the nodes in the blockchain network use the contract source code and the code dependency information in the blockchain to deploy the corresponding smart contract; the contract source code and the code dependency information are small in size, and by storing the contract source code and the code dependency information in the blockchain of the blockchain network, the storage pressure of the blockchain network can be reduced, that is, the storage pressure of the nodes in the blockchain network when storing the blockchain can be reduced; and the contract deployment request of this solution carries the contract source code and the code dependency information, which can realize lightweight data transmission, improve data transmission efficiency, and effectively save processing resources required for transmission compared to carrying the compiled smart contract. Furthermore, by storing the contract source code and code dependency information in the blockchain of the blockchain network, the nodes in the blockchain network can use the contract source code and code dependency information in the blockchain to deploy the corresponding smart contract, that is, support contract source code deployment, which can improve the programming freedom of contract developers (who can be the initiators of contract deployment requests).

[0103] Furthermore, by storing the code repository in the local contract dependency storage space, after receiving the contract deployment request, the code repository that the contract source code depends on can be obtained from the contract dependency storage space based on the code dependency information, and then the contract source code can be compiled based on the obtained code repositories; when different contract source codes all depend on some of the same code repositories, the code repository in the contract dependency storage space can be reused through this mechanism. In addition, this solution also proposes that a source code dependency tree of a code repository (for example, when the contract source code is used as a code repository) can be constructed, so that when a code repository (for example, the contract source code) is relied upon, the various code repositories that the code repository depends on can be quickly found based on the source code dependency tree of the code repository. Furthermore, the present solution also proposes that the code repository can be compressed and stored through the plaintext storage space and compressed storage space in the local contract-dependent storage space, and the data stored in the plaintext storage space and the compressed storage space can be automatically adjusted according to the remaining storage capacity of the plaintext storage space, that is, the code repository in the plaintext storage space is compressed to the compressed storage space, or the compressed file in the compressed storage space is decompressed to the plaintext storage space; and the code repository stored in the local contract-dependent storage space can also be remotely stored based on the remote storage space, and the storage of the code repository and compressed files in the contract-dependent storage space can be further optimized based on the remote storage space. Based on compressed storage and remote storage, lightweight storage of the code repository can be achieved to alleviate the storage pressure of data processing equipment.

[0104] Based on the above method embodiment, the present application embodiment provides a data processing device. Fig.15 , is a structural diagram of a data processing device provided in an embodiment of the present application, and the data processing device may include a receiving unit 1501 and a processing unit 1502. Fig.15 The data processing device shown can run the following units:

[0105] The receiving unit 1501 is used to receive a contract deployment request initiated by a client, wherein the contract deployment request carries the contract source code of the smart contract to be deployed and the code dependency information of the contract source code; the smart contract is generated by compiling the contract source code, and the code dependency information is used to indicate: when compiling the contract source code, the various code repositories that the contract source code needs to rely on;

[0106] The processing unit 1502 is used to obtain, according to the code dependency information, various code repositories on which the contract source code depends, and verify the compilability of the contract source code based on the obtained various code repositories;

[0107] The processing unit 1502 is also used to store the contract source code and the code dependency information in the blockchain of the blockchain network after determining that the contract source code is compilable, so that the nodes in the blockchain network adopt the contract source code and the code dependency information in the blockchain to deploy the corresponding smart contract.

[0108] In one embodiment, the code dependency information includes: repository identifiers of various code repositories that the contract source code depends on;

[0109] When the processing unit 1502 obtains each code repository on which the contract source code depends according to the code dependency information, it specifically performs the following operations:

[0110] Determine the contract-dependent storage space located locally, where the contract-dependent storage space refers to the storage space used to store the code repository;

[0111] For the i-th warehouse identifier in the code dependency information, detect the storage relationship between the i-th code warehouse indicated by the i-th warehouse identifier and the contract dependency storage space; i∈[1, I], I is the number of warehouse identifiers in the code dependency information;

[0112] If the storage relationship indicates that the contract dependency storage space includes the i-th code repository, then reading the i-th code repository from the contract dependency storage space;

[0113] If the storage relationship indicates that the contract dependency storage space does not include the i-th code repository, the i-th code repository is obtained from an external data source.

[0114] In one embodiment, when the processing unit 1502 detects the storage relationship between the i-th code repository indicated by the i-th repository identifier and the contract dependency storage space, the processing unit 1502 specifically performs the following operations:

[0115] Searching for the i-th repository identifier in a contract dependency information table, wherein the contract dependency information table includes: a repository identifier of each code repository stored in the contract dependency storage space;

[0116] If the i-th warehouse identifier is found, the first relationship is used as the storage relationship between the i-th code warehouse indicated by the i-th warehouse identifier and the contract dependency storage space; wherein the first relationship is used to indicate that the contract dependency storage space includes the i-th code warehouse;

[0117] If the i-th warehouse identifier is not found, the second relationship is used as the storage relationship between the i-th code warehouse indicated by the i-th warehouse identifier and the contract dependency storage space; wherein the second relationship is used to indicate that the i-th code warehouse is not included in the contract dependency storage space.

[0118] In one embodiment, the contract dependency information table further includes: a storage path of each code repository in the contract dependency storage space; and in the contract dependency information table, a repository identifier and a corresponding storage path of the same code repository are associated with each other;

[0119] Among them, when the i-th warehouse identifier is found in the contract dependency information table, the i-th code warehouse is read from the contract dependency storage space according to the storage path associated with the i-th warehouse identifier in the contract dependency information table.

[0120] In one embodiment, the contract-dependent storage space includes a plaintext storage space and a compressed storage space, the plaintext storage space is used to store the code repository, and the compressed storage space is used to store a compressed file after compressing the code repository;

[0121] When the processing unit 1502 reads the i-th code repository from the contract dependency storage space, the processing unit 1502 specifically performs the following operations:

[0122] When it is determined that the plaintext storage space includes the i-th code repository, reading the i-th code repository from the plaintext storage space;

[0123] When it is determined that the i-th code warehouse is not included in the plaintext storage space, the compressed file of the i-th code warehouse is read from the compressed storage space, and the read compressed file is decompressed to the plaintext storage space to obtain the i-th code warehouse, and the i-th code warehouse is read from the plaintext storage space.

[0124] In one embodiment, before the processing unit 1502 decompresses the read compressed file into the plaintext storage space to obtain the i-th code repository, it is further configured to:

[0125] Detecting the remaining storage capacity of the plaintext storage space and the target storage capacity required to store the i-th code repository in the plaintext storage space;

[0126] If it is detected that the remaining storage capacity of the plaintext storage space is greater than or equal to the target storage capacity, triggering the step of decompressing the read compressed file into the plaintext storage space to obtain the i-th code repository;

[0127] If it is detected that the remaining storage capacity of the plaintext storage space is less than the target storage capacity, the occupied storage capacity in the plaintext storage space is continuously released until it is detected that the remaining storage capacity of the plaintext storage space is greater than or equal to the target storage capacity.

[0128] In one embodiment, when the processing unit 1502 continuously releases the occupied storage capacity in the plaintext storage space, the processing unit 1502 specifically performs the following operations:

[0129] Selecting a target code repository to be deleted in the plaintext storage space, and reading the target code repository from the plaintext storage space;

[0130] After reading the target code warehouse, storing the compressed file of the target code warehouse in the compressed storage space, and deleting the target code warehouse in the plaintext storage space to release the storage capacity occupied by the target code warehouse in the plaintext storage space;

[0131] After releasing the corresponding storage capacity, if the remaining storage capacity of the plaintext storage space is less than the target storage capacity, jump to the step of selecting the target code repository to be deleted in the plaintext storage space.

[0132] In one embodiment, when the processing unit 1502 selects a target code repository to be deleted in the plaintext storage space, the processing unit 1502 specifically performs the following operations:

[0133] Obtaining a plaintext information table corresponding to the plaintext storage space, the plaintext information table comprising: warehouse identifiers of code warehouses stored in the plaintext storage space, and the warehouse identifiers in the plaintext information table are arranged in sequence;

[0134] Searching for a valid warehouse identifier from the plaintext information table, wherein the valid warehouse identifier refers to a warehouse identifier that is located in both the plaintext information table and the code dependency information;

[0135] If the valid warehouse identifier is found, adjusting the arrangement order of the warehouse identifiers in the plain text information table so that the arrangement position of the valid warehouse identifier is located before the arrangement positions of other warehouse identifiers in the plain text information table;

[0136] In the plaintext storage space, the code warehouse indicated by the last warehouse identifier in the adjusted plaintext information table is selected as the target code warehouse to be deleted.

[0137] In one embodiment, after selecting the target code repository, the processing unit 1502 is further configured to:

[0138] In the adjusted plaintext information table, delete the last warehouse identifier;

[0139] After decompressing the compressed file of the i-th code warehouse into the plaintext storage space to obtain the i-th code warehouse, the warehouse identifier of the i-th code warehouse is stored in the plaintext information table; wherein the warehouse identifier of the i-th code warehouse is arranged in the first position in the plaintext information table.

[0140] In one embodiment, after reading the target code repository, the processing unit 1502 is further configured to:

[0141] After reading the target code repository, detecting the remaining storage capacity of the compressed storage space and the reference storage capacity required for storing the compressed files of the target code repository in the compressed storage space;

[0142] If it is detected that the remaining storage capacity of the compressed storage space is greater than or equal to the reference storage capacity, triggering the step of storing the compressed file of the target code repository in the compressed storage space and deleting the target code repository in the plaintext storage space;

[0143] If it is detected that the remaining storage capacity of the compressed storage space is less than the reference storage capacity, the target code repository is stored in the remote storage space, and the target code repository is deleted in the plaintext storage space; the remote storage space is used to store the code repository and is located in the blockchain network.

[0144] In one embodiment, the external data source includes: a remote storage space located within the blockchain network and an Internet network located outside the blockchain network; the remote storage space is used to store a code repository;

[0145] When the processing unit 1502 obtains the i-th code repository from the external data source, the processing unit 1502 specifically performs the following operations:

[0146] Obtain the i-th code repository from the remote storage space;

[0147] If obtaining the i-th code repository from the remote storage space fails, downloading the i-th code repository from the Internet network.

[0148] In one embodiment, the processing unit 1502 is further configured to:

[0149] After determining that the contract source code is compilable, the contract source code is stored as a code repository in the contract dependency storage space, so that the contract source code is dependent on other contract source codes.

[0150] In one embodiment, after the contract source code is stored as a code repository in the contract dependency storage space, the contract source code has a repository identifier; the processing unit 1502 is further used to:

[0151] Analyze the dependency relationship between the various code repositories that the contract source code depends on, and analyze the dependency relationship between the contract source code and each code repositories that the contract source code depends on;

[0152] Based on the analyzed dependency relationships, a source code dependency tree corresponding to the contract source code is constructed using the repository identifier of the contract source code and the repository identifiers of the various code repositories on which the contract source code depends, so that when the contract source code is dependent on other contract source codes, the various code repositories on which the contract source code depends are determined based on the source code dependency tree;

[0153] Among them, the root node in the source code dependency tree stores the repository identifier of the contract source code, and each node except the root node stores the repository identifier of the code repository on which the contract source code depends, and different nodes store different repository identifiers; and for any node except the root node in the source code dependency tree, the code repository indicated by the repository identifier stored in the parent node of any node directly depends on the code repository indicated by the repository identifier stored in any node.

[0154] In one embodiment, when the processing unit 1502 verifies the compilability of the contract source code based on the acquired code repositories, it specifically performs the following operations:

[0155] Compile the contract source code based on the obtained code repositories;

[0156] If the contract source code passes the compilation, it is determined that the contract source code is compilable; if the contract source code fails the compilation, it is determined that the contract source code is not compilable.

[0157] In one embodiment, the process of deploying the smart contract includes initializing the smart contract; after determining that the contract source code is compilable, the processing unit 1502 is further used to:

[0158] Initializing the smart contract obtained by compiling the contract source code;

[0159] If the smart contract is successfully initialized, the step of storing the contract source code and the code dependency information in the blockchain of the blockchain network is triggered.

[0160] In one embodiment, the contract deployment request also carries verification information, the verification information includes a target digital certificate and a target digital signature, the target digital signature is obtained by signing the request data carried by the contract deployment request, the request data includes at least the contract source code and the code dependency information, and the target digital certificate includes: a key for verifying the target digital signature;

[0161] The processing unit 1502 is further configured to:

[0162] Based on the locally stored digital certificate, the target digital certificate is authenticated;

[0163] After the target digital certificate passes the trusted verification, the target digital signature is verified using the key in the target digital certificate to obtain a verification result;

[0164] If it is determined according to the verification result that the request data carried by the contract deployment request is credible data, the step of obtaining the various code repositories on which the contract source code depends according to the code dependency information is triggered.

[0165] In one embodiment, if it is determined according to the verification result that the request data carried by the contract deployment request has credible data, the processing unit 1502 is further used to:

[0166] Obtaining the operation permission information of the initiator of the contract deployment request;

[0167] When the operation permission information of the initiating object indicates that the initiating object has the contract deployment permission, the step of obtaining the various code repositories on which the contract source code depends according to the code dependency information is triggered.

[0168] According to one embodiment of the present application, Figure 4 as well as Figure 6 The various steps involved in the data processing method based on the blockchain network shown can be Fig.15 The data processing device shown in FIG. 1 is executed by each unit in the data processing device shown in FIG. Figure 4 Step S401 shown can be performed by Fig.15 The receiving unit 1501 in the data processing device shown is executed, Figure 4 Steps S402 to S403 shown in FIG. Fig.15 The processing unit 1502 in the data processing device shown in the figure is used for execution. Figure 6 Step S601 shown can be performed by Fig.15 The receiving unit 1501 in the data processing device shown is executed, Figure 6 Steps S602 to S606 shown in FIG. Fig.15 The processing unit 1502 in the data processing device shown is executed.

[0169] According to another embodiment of the present application, Fig.15 The various units in the data processing device shown can be separately or all combined into one or several other units to constitute, or one (some) of the units can also be split into multiple smaller units in function to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the function of one unit can also be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of the present application, the data processing device based on logical function division can also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.

[0170] According to another embodiment of the present application, the program can be executed by running on a general computing device such as a computer including a central processing unit (CPU), a random access memory medium (RAM), a read-only memory medium (ROM), and other processing elements and storage elements. Figure 4 as well as Figure 6 A computer program (including program code) for each step involved in the corresponding method shown in FIG. Fig.15 The data processing device shown in the embodiment of the present application is used to implement the data processing method based on the blockchain network. The computer program can be recorded on, for example, a computer-readable storage medium, and loaded into the above-mentioned computing device through the computer-readable storage medium, and run therein.

[0171] In an embodiment of the present application, after receiving a contract deployment request initiated by a client carrying the contract source code of a smart contract to be deployed and the code dependency information of the contract source code, the various code repositories on which the contract source code depends can be obtained according to the code dependency information, and the compilability of the contract source code can be verified based on the obtained code repositories; wherein the smart contract is generated by compiling the contract source code, and the code dependency information is used to indicate: when compiling the contract source code, the various code repositories on which the contract source code needs to depend; after determining that the contract source code is compilable, the contract source code and the code dependency information are stored in the blockchain of the blockchain network, so that the nodes in the blockchain network use the contract source code and the code dependency information in the blockchain to deploy the corresponding smart contract; the contract source code and the code dependency information are small in size, and by storing the contract source code and the code dependency information in the blockchain of the blockchain network, the storage pressure of the blockchain network can be reduced, that is, the storage pressure of the nodes in the blockchain network when storing the blockchain can be reduced; and the contract deployment request of this solution carries the contract source code and the code dependency information, which can effectively save the processing resources required for transmission compared to carrying the compiled smart contract.

[0172] Based on the above method embodiment and device embodiment, the present application also provides a data processing device. Fig.16 , is a structural diagram of a data processing device provided in an embodiment of the present application. Fig.16 The data processing device shown may include at least a processor 1601, an input interface 1602, an output interface 1603, and a computer storage medium 1604. The processor 1601, the input interface 1602, the output interface 1603, and the computer storage medium 1604 may be connected via a bus or other means.

[0173] The computer storage medium 1604 can be stored in the memory of the data processing device. The computer storage medium 1604 is used to store a computer program. The computer program includes program instructions. The processor 1601 is used to execute the program instructions stored in the computer storage medium 1604. The processor 1601 (or CPU (Central Processing Unit)) is the computing core and control core of the data processing device, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions to implement the above-mentioned data processing method flow or corresponding functions based on the blockchain network.

[0174] The embodiment of the present application also provides a computer storage medium (Memory), which is a memory device in a data processing device for storing programs and data. It is understandable that the computer storage medium here can include both the built-in storage medium in the terminal and the extended storage medium supported by the terminal. The computer storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor 1601 are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer storage medium here can be a high-speed random access memory (RAM) memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage; optionally, it can also be at least one computer storage medium located away from the aforementioned processor.

[0175] In one embodiment, the processor 1601 may load and execute one or more instructions stored in a computer storage medium to implement the above-mentioned Figure 4 as well as Figure 6 In the corresponding steps of the method in the embodiment of the data processing method based on the blockchain network, in a specific implementation, one or more instructions in the computer storage medium are loaded by the processor 1601 and execute the following steps:

[0176] Receive a contract deployment request initiated by a client, the contract deployment request carrying the contract source code of the smart contract to be deployed and the code dependency information of the contract source code; the smart contract is generated by compiling the contract source code, and the code dependency information is used to indicate: when compiling the contract source code, the various code repositories that the contract source code needs to rely on;

[0177] According to the code dependency information, the various code repositories on which the contract source code depends are obtained, and based on the obtained code repositories, the compilability of the contract source code is verified;

[0178] After determining that the contract source code is compilable, the contract source code and the code dependency information are stored in the blockchain of the blockchain network, so that the nodes in the blockchain network adopt the contract source code and the code dependency information in the blockchain to deploy the corresponding smart contract.

[0179] In one embodiment, the code dependency information includes: repository identifiers of various code repositories that the contract source code depends on;

[0180] When the processor 1601 obtains each code repository on which the contract source code depends according to the code dependency information, it specifically performs the following operations:

[0181] Determine the contract-dependent storage space located locally, where the contract-dependent storage space refers to the storage space used to store the code repository;

[0182] For the i-th warehouse identifier in the code dependency information, detect the storage relationship between the i-th code warehouse indicated by the i-th warehouse identifier and the contract dependency storage space; i∈[1, I], I is the number of warehouse identifiers in the code dependency information;

[0183] If the storage relationship indicates that the contract dependency storage space includes the i-th code repository, then reading the i-th code repository from the contract dependency storage space;

[0184] If the storage relationship indicates that the contract dependency storage space does not include the i-th code repository, the i-th code repository is obtained from an external data source.

[0185] In one embodiment, when the processor 1601 detects the storage relationship between the i-th code repository indicated by the i-th repository identifier and the contract dependency storage space, the processor 1601 specifically performs the following operations:

[0186] Searching for the i-th repository identifier in a contract dependency information table, wherein the contract dependency information table includes: a repository identifier of each code repository stored in the contract dependency storage space;

[0187] If the i-th warehouse identifier is found, the first relationship is used as the storage relationship between the i-th code warehouse indicated by the i-th warehouse identifier and the contract dependency storage space; wherein the first relationship is used to indicate that the contract dependency storage space includes the i-th code warehouse;

[0188] If the i-th warehouse identifier is not found, the second relationship is used as the storage relationship between the i-th code warehouse indicated by the i-th warehouse identifier and the contract dependency storage space; wherein the second relationship is used to indicate that the i-th code warehouse is not included in the contract dependency storage space.

[0189] In one embodiment, the contract dependency information table further includes: a storage path of each code repository in the contract dependency storage space; and in the contract dependency information table, a repository identifier and a corresponding storage path of the same code repository are associated with each other;

[0190] Among them, when the i-th warehouse identifier is found in the contract dependency information table, the i-th code warehouse is read from the contract dependency storage space according to the storage path associated with the i-th warehouse identifier in the contract dependency information table.

[0191] In one embodiment, the contract-dependent storage space includes a plaintext storage space and a compressed storage space, the plaintext storage space is used to store the code repository, and the compressed storage space is used to store a compressed file after compressing the code repository;

[0192] When the processor 1601 reads the i-th code repository from the contract dependency storage space, the processor 1601 specifically performs the following operations:

[0193] When it is determined that the plaintext storage space includes the i-th code repository, reading the i-th code repository from the plaintext storage space;

[0194] When it is determined that the i-th code warehouse is not included in the plaintext storage space, the compressed file of the i-th code warehouse is read from the compressed storage space, and the read compressed file is decompressed to the plaintext storage space to obtain the i-th code warehouse, and the i-th code warehouse is read from the plaintext storage space.

[0195] In one embodiment, before the processor 1601 decompresses the read compressed file into the plaintext storage space to obtain the i-th code repository, it is further configured to:

[0196] Detecting the remaining storage capacity of the plaintext storage space and the target storage capacity required to store the i-th code repository in the plaintext storage space;

[0197] If it is detected that the remaining storage capacity of the plaintext storage space is greater than or equal to the target storage capacity, triggering the step of decompressing the read compressed file into the plaintext storage space to obtain the i-th code repository;

[0198] If it is detected that the remaining storage capacity of the plaintext storage space is less than the target storage capacity, the occupied storage capacity in the plaintext storage space is continuously released until it is detected that the remaining storage capacity of the plaintext storage space is greater than or equal to the target storage capacity.

[0199] In one embodiment, when the processor 1601 continuously releases the occupied storage capacity in the plaintext storage space, the processor 1601 specifically performs the following operations:

[0200] Selecting a target code repository to be deleted in the plaintext storage space, and reading the target code repository from the plaintext storage space;

[0201] After reading the target code warehouse, storing the compressed file of the target code warehouse in the compressed storage space, and deleting the target code warehouse in the plaintext storage space to release the storage capacity occupied by the target code warehouse in the plaintext storage space;

[0202] After releasing the corresponding storage capacity, if the remaining storage capacity of the plaintext storage space is less than the target storage capacity, jump to the step of selecting the target code repository to be deleted in the plaintext storage space.

[0203] In one embodiment, when the processor 1601 selects a target code repository to be deleted in the plaintext storage space, the processor 1601 specifically performs the following operations:

[0204] Obtaining a plaintext information table corresponding to the plaintext storage space, the plaintext information table comprising: warehouse identifiers of code warehouses stored in the plaintext storage space, and the warehouse identifiers in the plaintext information table are arranged in sequence;

[0205] Searching for a valid warehouse identifier from the plaintext information table, wherein the valid warehouse identifier refers to a warehouse identifier that is located in both the plaintext information table and the code dependency information;

[0206] If the valid warehouse identifier is found, adjusting the arrangement order of the warehouse identifiers in the plain text information table so that the arrangement position of the valid warehouse identifier is located before the arrangement positions of other warehouse identifiers in the plain text information table;

[0207] In the plaintext storage space, the code warehouse indicated by the last warehouse identifier in the adjusted plaintext information table is selected as the target code warehouse to be deleted.

[0208] In one embodiment, after selecting the target code repository, the processor 1601 is further configured to:

[0209] In the adjusted plaintext information table, delete the last warehouse identifier;

[0210] After decompressing the compressed file of the i-th code warehouse into the plaintext storage space to obtain the i-th code warehouse, the warehouse identifier of the i-th code warehouse is stored in the plaintext information table; wherein the warehouse identifier of the i-th code warehouse is arranged in the first position in the plaintext information table.

[0211] In one embodiment, after reading the target code repository, the processor 1601 is further configured to:

[0212] After reading the target code repository, detecting the remaining storage capacity of the compressed storage space and the reference storage capacity required for storing the compressed files of the target code repository in the compressed storage space;

[0213] If it is detected that the remaining storage capacity of the compressed storage space is greater than or equal to the reference storage capacity, triggering the step of storing the compressed file of the target code repository in the compressed storage space and deleting the target code repository in the plaintext storage space;

[0214] If it is detected that the remaining storage capacity of the compressed storage space is less than the reference storage capacity, the target code repository is stored in the remote storage space, and the target code repository is deleted in the plaintext storage space; the remote storage space is used to store the code repository and is located in the blockchain network.

[0215] In one embodiment, the external data source includes: a remote storage space located within the blockchain network and an Internet network located outside the blockchain network; the remote storage space is used to store a code repository;

[0216] When the processor 1601 obtains the i-th code repository from the external data source, the processor 1601 specifically performs the following operations:

[0217] Obtain the i-th code repository from the remote storage space;

[0218] If obtaining the i-th code repository from the remote storage space fails, downloading the i-th code repository from the Internet network.

[0219] In one embodiment, the processor 1601 is further configured to:

[0220] After determining that the contract source code is compilable, the contract source code is stored as a code repository in the contract dependency storage space, so that the contract source code is dependent on other contract source codes.

[0221] In one embodiment, after the contract source code is stored as a code repository in the contract dependency storage space, the contract source code has a repository identifier; the processor 1601 is further used to:

[0222] Analyze the dependency relationship between the various code repositories that the contract source code depends on, and analyze the dependency relationship between the contract source code and each code repositories that the contract source code depends on;

[0223] Based on the analyzed dependency relationships, a source code dependency tree corresponding to the contract source code is constructed using the repository identifier of the contract source code and the repository identifiers of the various code repositories on which the contract source code depends, so that when the contract source code is dependent on other contract source codes, the various code repositories on which the contract source code depends are determined based on the source code dependency tree;

[0224] Among them, the root node in the source code dependency tree stores the repository identifier of the contract source code, and each node except the root node stores the repository identifier of the code repository on which the contract source code depends, and different nodes store different repository identifiers; and for any node except the root node in the source code dependency tree, the code repository indicated by the repository identifier stored in the parent node of any node directly depends on the code repository indicated by the repository identifier stored in any node.

[0225] In one embodiment, when the processor 1601 verifies the compilability of the contract source code based on the acquired code repositories, it specifically performs the following operations:

[0226] Compile the contract source code based on the obtained code repositories;

[0227] If the contract source code passes the compilation, it is determined that the contract source code is compilable; if the contract source code fails the compilation, it is determined that the contract source code is not compilable.

[0228] In one embodiment, the process of deploying the smart contract includes initializing the smart contract; after determining that the contract source code is compilable, the processor 1601 is further used to:

[0229] Initializing the smart contract obtained by compiling the contract source code;

[0230] If the smart contract is successfully initialized, the step of storing the contract source code and the code dependency information in the blockchain of the blockchain network is triggered.

[0231] In one embodiment, the contract deployment request also carries verification information, the verification information includes a target digital certificate and a target digital signature, the target digital signature is obtained by signing the request data carried by the contract deployment request, the request data includes at least the contract source code and the code dependency information, and the target digital certificate includes: a key for verifying the target digital signature;

[0232] The processor 1601 is further configured to:

[0233] Based on the locally stored digital certificate, the target digital certificate is authenticated;

[0234] After the target digital certificate passes the trusted verification, the target digital signature is verified using the key in the target digital certificate to obtain a verification result;

[0235] If it is determined according to the verification result that the request data carried by the contract deployment request is credible data, the step of obtaining the various code repositories on which the contract source code depends according to the code dependency information is triggered.

[0236] In one embodiment, if it is determined according to the verification result that the request data carried by the contract deployment request has credible data, the processor 1601 is further used to:

[0237] Obtaining the operation permission information of the initiator of the contract deployment request;

[0238] When the operation permission information of the initiating object indicates that the initiating object has the contract deployment permission, the step of obtaining the various code repositories on which the contract source code depends according to the code dependency information is triggered.

[0239] The present application provides a computer program product, which includes a computer program stored in a computer storage medium; a processor of a data processing device reads the computer program from the computer storage medium, and the processor executes the computer program, so that the data processing device performs the above-mentioned Figure 4 as well as Figure 6 The method embodiment shown in the figure. The computer-readable storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0240] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A data processing method based on a blockchain network, characterized in that: include: Receive a contract deployment request initiated by a client, wherein the contract deployment request carries the contract source code of the smart contract to be deployed and code dependency information of the contract source code; The smart contract is generated by compiling the contract source code, and the code dependency information is used to indicate: when compiling the contract source code, the various code repositories that the contract source code needs to rely on; According to the code dependency information, the various code repositories on which the contract source code depends are obtained, and based on the obtained code repositories, the compilability of the contract source code is verified; After determining that the contract source code is compilable, the contract source code and the code dependency information are stored in the blockchain of the blockchain network, so that the nodes in the blockchain network adopt the contract source code and the code dependency information in the blockchain to deploy the corresponding smart contract.

2. The method according to claim 1, characterized in that The code dependency information includes: the repository identifiers of the code repositories on which the contract source code depends; The obtaining, according to the code dependency information, various code repositories on which the contract source code depends, includes: Determine the contract-dependent storage space located locally, where the contract-dependent storage space refers to the storage space used to store the code repository; For the i-th warehouse identifier in the code dependency information, detect the storage relationship between the i-th code warehouse indicated by the i-th warehouse identifier and the contract dependency storage space; i∈[1, I], I is the number of warehouse identifiers in the code dependency information; If the storage relationship indicates that the contract dependency storage space includes the i-th code repository, then reading the i-th code repository from the contract dependency storage space; If the storage relationship indicates that the contract dependency storage space does not include the i-th code repository, the i-th code repository is obtained from an external data source.

3. The method according to claim 2, characterized in that The detecting a storage relationship between the i-th code repository indicated by the i-th repository identifier and the contract dependency storage space includes: Searching for the i-th repository identifier in a contract dependency information table, wherein the contract dependency information table includes: a repository identifier of each code repository stored in the contract dependency storage space; If the i-th warehouse identifier is found, the first relationship is used as the storage relationship between the i-th code warehouse indicated by the i-th warehouse identifier and the contract dependency storage space; wherein the first relationship is used to indicate that the contract dependency storage space includes the i-th code warehouse; If the i-th warehouse identifier is not found, the second relationship is used as the storage relationship between the i-th code warehouse indicated by the i-th warehouse identifier and the contract dependency storage space; wherein the second relationship is used to indicate that the i-th code warehouse is not included in the contract dependency storage space.

4. The method according to claim 3, characterized in that The contract dependency information table also includes: the storage path of each code repository in the contract dependency storage space; and in the contract dependency information table, the repository identifier and the corresponding storage path of the same code repository are associated with each other; Among them, when the i-th warehouse identifier is found in the contract dependency information table, the i-th code warehouse is read from the contract dependency storage space according to the storage path associated with the i-th warehouse identifier in the contract dependency information table.

5. The method according to any one of claims 2 to 4, characterized in that: The contract-dependent storage space includes a plaintext storage space and a compressed storage space, wherein the plaintext storage space is used to store the code repository, and the compressed storage space is used to store the compressed file after compressing the code repository; The reading the i-th code repository from the contract dependency storage space includes: When it is determined that the plaintext storage space includes the i-th code repository, reading the i-th code repository from the plaintext storage space; When it is determined that the i-th code warehouse is not included in the plaintext storage space, the compressed file of the i-th code warehouse is read from the compressed storage space, and the read compressed file is decompressed to the plaintext storage space to obtain the i-th code warehouse, and the i-th code warehouse is read from the plaintext storage space.

6. The method according to claim 5, characterized in that Before decompressing the read compressed file into the plaintext storage space to obtain the i-th code repository, the method further includes: Detecting the remaining storage capacity of the plaintext storage space and the target storage capacity required to store the i-th code repository in the plaintext storage space; If it is detected that the remaining storage capacity of the plaintext storage space is greater than or equal to the target storage capacity, triggering the step of decompressing the read compressed file into the plaintext storage space to obtain the i-th code repository; If it is detected that the remaining storage capacity of the plaintext storage space is less than the target storage capacity, the occupied storage capacity in the plaintext storage space is continuously released until it is detected that the remaining storage capacity of the plaintext storage space is greater than or equal to the target storage capacity.

7. The method according to claim 6, characterized in that The continuously releasing the occupied storage capacity in the plaintext storage space includes: Selecting a target code repository to be deleted in the plaintext storage space, and reading the target code repository from the plaintext storage space; After reading the target code warehouse, storing the compressed file of the target code warehouse in the compressed storage space, and deleting the target code warehouse in the plaintext storage space to release the storage capacity occupied by the target code warehouse in the plaintext storage space; After releasing the corresponding storage capacity, if the remaining storage capacity of the plaintext storage space is less than the target storage capacity, jump to the step of selecting the target code repository to be deleted in the plaintext storage space.

8. The method according to claim 7, characterized in that The step of selecting a target code repository to be deleted from the plaintext storage space includes: Obtaining a plaintext information table corresponding to the plaintext storage space, the plaintext information table comprising: warehouse identifiers of code warehouses stored in the plaintext storage space, and the warehouse identifiers in the plaintext information table are arranged in sequence; Searching for a valid warehouse identifier from the plaintext information table, wherein the valid warehouse identifier refers to a warehouse identifier that is located in both the plaintext information table and the code dependency information; If the valid warehouse identifier is found, adjusting the arrangement order of the warehouse identifiers in the plain text information table so that the arrangement position of the valid warehouse identifier is located before the arrangement positions of other warehouse identifiers in the plain text information table; In the plaintext storage space, the code warehouse indicated by the last warehouse identifier in the adjusted plaintext information table is selected as the target code warehouse to be deleted.

9. The method according to claim 8, characterized in that After selecting the target code repository, the method further includes: In the adjusted plaintext information table, delete the last warehouse identifier; After decompressing the compressed file of the i-th code warehouse into the plaintext storage space to obtain the i-th code warehouse, the warehouse identifier of the i-th code warehouse is stored in the plaintext information table; wherein the warehouse identifier of the i-th code warehouse is arranged in the first position in the plaintext information table.

10. The method according to claim 7, characterized in that After reading the target code repository, the method further includes: After reading the target code repository, detecting the remaining storage capacity of the compressed storage space and the reference storage capacity required for storing the compressed files of the target code repository in the compressed storage space; If it is detected that the remaining storage capacity of the compressed storage space is greater than or equal to the reference storage capacity, triggering the step of storing the compressed file of the target code repository in the compressed storage space and deleting the target code repository in the plaintext storage space; If it is detected that the remaining storage capacity of the compressed storage space is less than the reference storage capacity, the target code repository is stored in the remote storage space, and the target code repository is deleted in the plaintext storage space; the remote storage space is used to store the code repository and is located in the blockchain network.

11. The method according to claim 2, characterized in that The external data source includes: a remote storage space located within the blockchain network and an Internet network located outside the blockchain network; the remote storage space is used to store the code repository; The acquiring the i-th code repository from the external data source includes: Obtain the i-th code repository from the remote storage space; If obtaining the i-th code repository from the remote storage space fails, downloading the i-th code repository from the Internet network.

12. The method according to claim 2, characterized in that The method further comprises: After determining that the contract source code is compilable, the contract source code is stored as a code repository in the contract dependency storage space, so that the contract source code is dependent on other contract source codes.

13. The method according to claim 12, characterized in that After storing the contract source code as a code repository in the contract dependency storage space, the contract source code has a repository identifier; the method further includes: Analyze the dependency relationship between the various code repositories that the contract source code depends on, and analyze the dependency relationship between the contract source code and each code repositories that the contract source code depends on; Based on the analyzed dependency relationships, a source code dependency tree corresponding to the contract source code is constructed using the repository identifier of the contract source code and the repository identifiers of the various code repositories on which the contract source code depends, so that when the contract source code is dependent on other contract source codes, the various code repositories on which the contract source code depends are determined based on the source code dependency tree; Among them, the root node in the source code dependency tree stores the repository identifier of the contract source code, and each node except the root node stores the repository identifier of the code repository on which the contract source code depends, and different nodes store different repository identifiers; and for any node except the root node in the source code dependency tree, the code repository indicated by the repository identifier stored in the parent node of any node directly depends on the code repository indicated by the repository identifier stored in any node.

14. The method according to claim 1, wherein: The verification of the compilability of the contract source code based on the acquired code repositories includes: Compile the contract source code based on the obtained code repositories; If the contract source code passes the compilation, it is determined that the contract source code is compilable; if the contract source code fails the compilation, it is determined that the contract source code is not compilable.

15. The method according to claim 1 or 14, characterized in that The process of deploying the smart contract includes initializing the smart contract; after determining that the contract source code is compilable, the method further includes: Initializing the smart contract obtained by compiling the contract source code; If the smart contract is successfully initialized, the step of storing the contract source code and the code dependency information in the blockchain of the blockchain network is triggered.

16. The method according to claim 1, wherein: The contract deployment request also carries verification information, which includes a target digital certificate and a target digital signature. The target digital signature is obtained by signing the request data carried by the contract deployment request. The request data includes at least the contract source code and the code dependency information. The target digital certificate includes: a key for verifying the target digital signature; The method further comprises: Based on the locally stored digital certificate, the target digital certificate is authenticated; After the target digital certificate passes the trusted verification, the target digital signature is verified using the key in the target digital certificate to obtain a verification result; If it is determined according to the verification result that the request data carried by the contract deployment request is credible data, the step of obtaining the various code repositories on which the contract source code depends according to the code dependency information is triggered.

17. The method according to claim 16, characterized in that If it is determined according to the verification result that the request data carried by the contract deployment request has credible data, the method further includes: Obtaining the operation permission information of the initiator of the contract deployment request; When the operation permission information of the initiating object indicates that the initiating object has the contract deployment permission, the step of obtaining the various code repositories on which the contract source code depends according to the code dependency information is triggered.

18. A data processing device, characterized in that: include: A receiving unit, configured to receive a contract deployment request initiated by a client, wherein the contract deployment request carries the contract source code of the smart contract to be deployed and code dependency information of the contract source code; The smart contract is generated by compiling the contract source code, and the code dependency information is used to indicate: when compiling the contract source code, the various code repositories that the contract source code needs to rely on; A processing unit, configured to obtain, according to the code dependency information, various code repositories on which the contract source code depends, and verify the compilability of the contract source code based on the obtained various code repositories; The processing unit is further used to store the contract source code and the code dependency information in the blockchain of the blockchain network after determining that the contract source code is compilable, so that the nodes in the blockchain network adopt the contract source code and the code dependency information in the blockchain to deploy the corresponding smart contract.

19. A data processing device, characterized in that: The data processing device includes an input interface and an output interface, and further includes: a processor adapted to implement one or more instructions; and, A computer storage medium storing one or more instructions, wherein the one or more instructions are suitable for being loaded by the processor and executing the data processing method based on the blockchain network as described in any one of claims 1 to 17.

20. A computer storage medium, characterized in that The computer storage medium stores computer program instructions, which, when executed by a processor, are used to execute the data processing method based on a blockchain network as described in any one of claims 1 to 17.