CN111339141A - Data transmission method, block link node equipment and medium - Google Patents

Data transmission method, block link node equipment and medium Download PDF

Info

Publication number
CN111339141A
CN111339141A CN202010119722.4A CN202010119722A CN111339141A CN 111339141 A CN111339141 A CN 111339141A CN 202010119722 A CN202010119722 A CN 202010119722A CN 111339141 A CN111339141 A CN 111339141A
Authority
CN
China
Prior art keywords
logic layer
data request
data
service
service logic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010119722.4A
Other languages
Chinese (zh)
Inventor
李茂材
周开班
王宗友
刘攀
张劲松
朱耿良
孔利
时一防
黄焕坤
廖志勇
刘区城
杨常青
蓝虎
崔嘉辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010119722.4A priority Critical patent/CN111339141A/en
Publication of CN111339141A publication Critical patent/CN111339141A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24564Applying rules; Deductive queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Abstract

The embodiment of the application discloses a data transmission method, block link point equipment and a medium. The data transmission method may include: receiving a data request sent by any interface in at least one interface through a service logic layer; determining a service rule corresponding to the data request through a service logic layer; processing the data request based on the service rule through the service logic layer to obtain a processing result; the resource pool is accessed by the business logic layer based on the processing result. By adopting the embodiment of the application, the data conversion is carried out through the interface, and a series of processing is carried out on the data request through the service logic layer, so that the code amount of the interface can be reduced, and the development efficiency is improved.

Description

Data transmission method, block link node equipment and medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a data transmission method, a block link node device, and a medium.
Background
In the blockchain technique, the resource pool can be accessed directly through the interface of the blockchain link point device. Wherein, the interface comprises a set of complete programs, and different programs realize different functions. For example, if one interface functions to query a block in the blockchain, the interface includes a procedure for querying the block, and if another interface functions to query a consensus period of the blockchain, the interface includes a procedure for querying the consensus period. Each interface comprises a set of programs, so that the code amount is large, and the development efficiency is low. Therefore, how to process data according to the interface of the block link node device, reduce the code amount, improve the development efficiency, and become a hot topic of current research.
Disclosure of Invention
The embodiment of the application provides a data transmission method, block link point equipment and a medium, which can reduce the code amount and improve the development efficiency.
In a first aspect, an embodiment of the present application provides a method for data transmission, where the method includes: receiving a data request sent by any interface in at least one interface through a service logic layer; determining a service rule corresponding to the data request through a service logic layer; processing the data request based on the service rule through the service logic layer to obtain a processing result; the resource pool is accessed by the business logic layer based on the processing result.
In a second aspect, an embodiment of the present application provides a block-link point device, which includes a service logic layer, a resource pool, at least one interface, a memory, and a processor. Wherein the memory is used for storing the computer program. A processor for invoking a computer program for performing the method of data transmission according to the first aspect.
In a third aspect, an embodiment of the present application provides a block-link point device, where the block-link point device is configured with a service logic layer, a resource pool, and at least one interface. The apparatus has a function of implementing the data transmission described in the first aspect. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In one implementation, a block link point device includes a receiving module, a determining module, a processing module, and an accessing module. The receiving module is used for receiving a data request sent by any interface of the at least one interface through the service logic layer. And the determining module is used for determining the business rule corresponding to the data request through the business logic layer. And the processing module is used for processing the data request based on the service rule through the service logic layer to obtain a processing result. And the access module is used for accessing the resource pool based on the processing result through the service logic layer.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, in which a computer program is stored, the computer program comprising program instructions that, when executed by a processor, cause the processor to perform the functions of data transmission as described in the first aspect.
According to the embodiment of the application, the interface of the block link point equipment sends the data request to the service logic layer, and the service logic layer processes the data request according to the service rule, so that the code amount of the interface can be reduced. And the service logic layer accesses the resource pool according to the processing result, so that the data access process is more convenient and faster, and the development efficiency is improved.
Drawings
In order to more clearly describe the technical solutions in the embodiments or background art of the present application, the drawings required to be used in the embodiments of the present application will be described below.
Fig. 1 is a schematic architecture diagram of a data transmission system according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of a block link point device provided by an embodiment of the present application;
fig. 3 is a schematic flowchart of a method for data transmission according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a blockchain according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of another data transmission method provided in an embodiment of the present application;
FIG. 6 is a schematic structural diagram of a block link point device provided by an embodiment of the present application;
fig. 7 is a schematic structural diagram of another block chain node device according to an embodiment of the present application.
Detailed Description
The embodiments of the present application will be described below with reference to the drawings.
With the rapid development of internet technology, in order to realize fairness of transactions, various industries and fields gradually form a transaction system which is supervised by a third-party management mechanism or a hardware facility. However, the third party authority may have a trust issue, for example, when the third party authority is biased toward one party of the transaction, the transaction process may be unfair. Therefore, the Block Chain (BC) technology becomes a hot topic of research by virtue of the advantages of decentralization, distributed ledger storage, high fairness and the like.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. The blockchain is essentially a decentralized database, which is a string of data blocks associated by using cryptography, each data block contains information of a batch of network transactions, and the information is used for verifying the validity (anti-counterfeiting) of the information and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
The block chain underlying platform can comprise processing modules such as user management, basic service, intelligent contract and operation monitoring. The user management module is responsible for identity information management of all blockchain participants, and comprises public and private key generation maintenance (account management), key management, user real identity and blockchain address corresponding relation maintenance (authority management) and the like, and under the authorization condition, the user management module supervises and audits the transaction condition of certain real identities and provides rule configuration (wind control audit) of risk control; the basic service module is deployed on all block chain node equipment and used for verifying the validity of the service request, recording the service request to storage after consensus on the valid request is completed, for a new service request, the basic service firstly performs interface adaptation analysis and authentication processing (interface adaptation), then encrypts service information (consensus management) through a consensus algorithm, transmits the service information to a shared account (network communication) completely and consistently after encryption, and performs recording and storage; the intelligent contract module is responsible for registering and issuing contracts, triggering the contracts and executing the contracts, developers can define contract logics through a certain programming language, issue the contract logics to a block chain (contract registration), call keys or other event triggering and executing according to the logics of contract clauses, complete the contract logics and simultaneously provide the function of upgrading and canceling the contracts; the operation monitoring module is mainly responsible for deployment, configuration modification, contract setting, cloud adaptation in the product release process and visual output of real-time states in product operation, such as: alarm, monitoring network conditions, monitoring node equipment health status, and the like.
The blockchain network comprises at least one blockchain node device, and the blockchain node device can be any computer device accessed into the blockchain network, such as a server, a user terminal, and the like. Each blockchain node device can receive input information when performing normal operation, and maintain shared data of the blockchain network based on the received input information. In order to ensure information intercommunication among the block link point devices, information connection may exist among each block link point device in the block chain network, and information transmission may be performed among the block link point devices through the information connection. For example, when any blockchain node device in the blockchain network receives input information, other blockchain node devices in the blockchain network acquire the input information according to a consensus algorithm, and store the input information as data in shared data, so that the data stored in all blockchain node devices in the blockchain network are consistent.
Referring to fig. 1, fig. 1 is a schematic diagram of an architecture of a data transmission system according to an embodiment of the present application. The block chain network is composed of a plurality of block chain node devices that can communicate with each other, for example, a block chain network composed of a block chain node device 101, a block chain node device 102, a block chain node device 103, and a block chain node device 104. Each block chain node device stores one same block chain, each block chain is composed of a plurality of blocks, each block comprises a hash value (hash value of the block) of the block storage transaction record and a hash value of the previous block, and the blocks are connected through the hash values to form the block chain. The block also includes information such as a time stamp at the time of block generation. The blocks in the block chain are connected together in the order of block generation time. For example, the blockchain 105 is formed by blocks 1, 2, 3, 4, 5, and 6, which are consecutive to each other in the time sequence of generating the blocks. For example, block 2 is generated after block 1, so block 2 includes the hash value of block 1, and block 2 is connected after block 1.
Currently, a user acquires data stored in a blockchain network by directly accessing a resource pool through an interface, and therefore, different interfaces store different programs for executing different functions. For example, if the function of interface a is to access a target block in a block chain, interface a stores the block height of the target block. For another example, if the function of the interface B is to transmit target data, the interface B stores a program related to the transmission of the target data. Wherein, the interface A and the interface B are different interfaces.
In order to increase the utilization rate of the interface and improve the development efficiency, the application provides a data transmission method which can be applied to block link node equipment. The block link node device is configured with a service logic layer, a resource pool, and at least one interface, and the data transmission method may include: receiving a data request sent by any interface in at least one interface through a service logic layer; determining a service rule corresponding to the data request through a service logic layer; processing the data request based on the service rule through the service logic layer to obtain a processing result; the resource pool is accessed by the business logic layer based on the processing result.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a block link point device according to an embodiment of the present disclosure. The block link node equipment is configured with a service logic layer, a resource pool and at least one interface. The interface is used for data type conversion, for example, the interface can convert the acquired data of the integer type into data of the floating point type. The resource pool is used for storing data written into the block chain. Such as the time of the transaction, the contents of the transaction, and information about both parties to the transaction, etc. The service logic layer is used for processing the data request and accessing the resource pool, wherein the service logic layer is integrated with a function of executing the data transmission method provided by the application. Specifically, the interface may send the data request to the service logic layer, the service logic layer obtains a processing result after performing the data processing provided by the present application, and the service logic layer accesses the resource pool based on the processing result.
Therefore, in the embodiment of the application, a service logic layer is added in the block link node device, the related program of the data transmission method provided by the application is integrated in the service logic layer, and correspondingly, the interface is used for performing a data type conversion function on data. Compared with the method that programs for executing different data processing functions are stored in each interface, the code amount in the interface can be reduced, and the development efficiency can be improved.
Based on the schematic structure of the block link point device shown in fig. 2. Referring to fig. 3, fig. 3 is a schematic flow chart of a data transmission method according to an embodiment of the present application, where the data transmission method may include, but is not limited to, the following steps:
step S301: and receiving a data request sent by any interface in the at least one interface through the service logic layer.
The data request is used for requesting specific data from the resource pool, or for requesting functions such as processing of transmitted data. Because the purpose of the data request is different, the information carried by the data request is different. For example, the data request is used to query a target block in the target block chain according to the block height, and the information carried by the data request is the block height of the target block.
Specifically, the block link node device is configured with at least one interface, wherein any interface can perform an action of sending a data request to the service logic layer. Correspondingly, after the service logic layer receives the data request, the service logic layer can process the data request and return the data requested by the data request to the interface corresponding to the data request, thereby completing the data transmission process.
The interface may obtain the data request in various ways. Optionally, the interface may receive an acquisition request sent by the user side, and the interface generates a data request according to the acquisition request. For example, the acquisition request is information for determining a target block in the target block chain according to the height of the target block. Optionally, the interface may generate the data request when detecting the user operation. For example, the interface can detect a click operation of a user on the display screen and generate a corresponding data request according to the click operation.
In one implementation, the interface may perform data conversion processing on the acquired acquisition request, and generate a data request according to the acquisition request. For example, the acquisition request acquired by the interface includes the a information and the data format of the a information, and it is understood that the data format of the a information received by the interface is not all the data format meeting the requirements of channel transmission or a service logic layer, and therefore, after the interface receives the data format of the a information, the data format of the a information may be converted into a data type, so as to facilitate subsequent processing of the a information. For example, the data format of the information a received by the interface is a low byte, and if the data processed by the service logic layer is a high byte, the interface may convert the data format of the information a into a high byte data format corresponding to the information a, so as to facilitate subsequent processing by the service logic layer.
As can be seen, the interface performs a function of converting the data format, and the amount of code stored by the interface is reduced as compared with a function in which the interface performs data processing.
Step S302: and determining a business rule corresponding to the data request through a business logic layer.
Business rules are created, updated and debugged in real time by business personnel. A business rule may be understood as a flow of a business, or a processing logic of a data item. For example, the method for generating the service rule definition index includes: the index A is obtained by adding the index B and the index C.
Specifically, the data request may include the logical requirements of the data request in addition to the data format of the data. For example, the logic requirement is to query information of a target block in the target block chain, and the like, and therefore, the service logic layer can determine, based on the data request, that the service rule corresponding to the data request is to query information of the target block in the target block chain.
Step S303: and processing the data request through the service logic layer based on the service rule to obtain a processing result.
In one implementation, the data request may indicate information of the query target block, the data request including a height of the target block. Wherein the height of the block is the number of blocks on the block chain. Therefore, the process of obtaining the processing result by processing the data request based on the service rule through the service logic layer can be understood as follows: and determining the identification of the target block based on the height of the target block through the service logic layer, wherein the processing result is the identification of the target block.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a block chain according to the present application. As shown in fig. 4, the block chain is composed of 466 blocks, wherein the starting block 401 includes a block header and a block body, the block header stores characteristic values, version numbers, time stamps, and difficulty values of the input information, and the block body stores the input information. The next block of the starting block 401 takes the starting block 401 as a parent block, the next block also includes a block header and a block main body, the block header stores the input information characteristic value of the current block, the block header characteristic value of the parent block, the version number, the timestamp and the difficulty value, and so on, so that the block data stored in each block in the block chain is associated with the block data stored in the parent block, and the security of the input information in the block is ensured. The height of the starting block 401 is 0, the block height of the next block of the starting block is 1, and so on, and each block has a corresponding block height. Therefore, the corresponding block and the block identifier can be searched according to the block height.
In another implementation, the data request may indicate information to query the target transaction data, the data request including a hash of the target transaction data. Therefore, the process of obtaining the processing result by processing the data request based on the service rule through the service logic layer can be understood as follows: and determining the address information of the target transaction data based on the Hash through the service logic layer, wherein the processing result is the address information of the target transaction data. Specifically, when the block link point device processes the target transaction data, a hash is generated, and the hash has an association relationship with the target transaction data. Therefore, the address information of the target transaction data can be determined according to the hash, and the information of the occurrence time, the transaction state and the like of the target transaction data can be further obtained.
For example, the first block link point device and the second block link point device belong to the same block chain network, the first block link point device obtains address information of the target transaction data according to the hash of the target transaction data, and the address information points to the second block link point device, so that the first block link point device can obtain information of the target transaction data from the second block link point device.
Step S304: the resource pool is accessed by the business logic layer based on the processing result.
The resource pool is used for performing functions of operations such as storage and query of data. The resource pool stores at least one item of data resource, and when there is a data request, the resource pool can allocate the corresponding data resource according to the data request, and give a busy identifier to the data resource, which is used to indicate that the data resource is occupied. When the data resource is used up, the resource pool clears the busy mark of the data resource to indicate that the data resource can be used in the next request.
In one implementation, the data request indicates information of the query target block, the data request includes the height of the target block, and the processing result is the identification of the target block. Accordingly, a method for accessing a resource pool based on a processing result through a business logic layer may include: and accessing the target block indicated by the identification of the target block in the resource pool through the service logic layer to obtain the information of the target block.
In another implementation, the data request indicates information for querying the target transaction data, the data request includes a hash of the target transaction data, and the processing result is address information of the target transaction data. Correspondingly, the method for accessing the resource pool based on the processing result through the business logic layer may include: and accessing the resource pool through the service logic layer based on the address information of the target transaction data to obtain the information of the target transaction data.
Therefore, in the data transmission method provided by the embodiment of the application, the interface has a function of data conversion, and the service logic layer is responsible for processing the data request, so that compared with a method that the interface stores a set of complete data processing program, the code amount of the interface is greatly reduced, and the development efficiency is improved.
Referring to fig. 5, fig. 5 is a schematic flow chart of another data transmission method according to an embodiment of the present application, where the method includes, but is not limited to, the following steps:
step S501: and receiving the data request sent by the interface through the service logic layer.
Step S502: and checking the data request through the service logic layer.
It is understood that the data request sent by the interface to the service logic layer may include various data formats, and the data format of the data request processed by the service logic layer is constant. That is, the data request includes a data format that the business logic layer performs subsequent related steps only if the specifications of the business logic layer are satisfied. Therefore, the service logic layer checks the data request, and if the check is successful, the subsequent steps are executed. For example, the service logic layer only processes the data request in the format a, and if the format of the data request sent by the interface is B, the service logic layer cannot process the data request in the format B.
In an implementation manner, the manner of checking the data request by the service logic layer may be: comparing the data type of the data request with the data type corresponding to the interface stored in the service logic layer through the service logic layer; and if the data type of the data request is the same as the data type corresponding to the interface stored in the service logic layer, the data request is determined to be successfully verified through the service logic layer. For example, if the data type of the data request sent by the interface is integer, and the data type corresponding to the interface stored in the service logic layer is character string type, the data type of the data request sent by the interface may be determined, and if the data type is different from the data type corresponding to the interface stored in the service logic layer, the service logic layer determines that the verification of the data request fails.
In another implementation manner, the manner in which the service logic layer checks the data request may be: judging whether the service field of the data requested by the data request is the service field corresponding to the block link point equipment or not through the service logic layer; and if the service field of the data requested by the data request is the service field corresponding to the block link point equipment, determining that the data request is successfully verified through the service logic layer. For example, the business field corresponding to the block link point device is an educational field, and if the business field of the data requested by the data request is a financial field, the business logic layer may determine that the verification for the data request fails.
Step S503: and determining a business rule corresponding to the data request through a business logic layer.
Step S504: and processing the data request through the service logic layer based on the service rule to obtain a processing result.
Step S505: the resource pool is accessed by the business logic layer based on the processing result.
It should be noted that the implementation process of step 501 is similar to that of step S301, and the implementation processes of step S503 to step S505 are similar to that of step S202 to step S204, which is not described herein again in this embodiment of the present application.
Therefore, according to the embodiment of the application, before the service logic layer determines the service rule according to the data request, the data request is checked, and the subsequent operation is executed under the condition that the check is successful, so that the data request processed by the block chain node equipment can be ensured to be the data request allowed by the block chain node equipment, and the data transmission efficiency is improved. Compared with the program with different functions respectively stored in each interface, the program for processing the integrated data of the business logic layer reduces the code amount and improves the development efficiency.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a block link point device provided in an embodiment of the present application, where the block link point device 60 is used to execute steps executed by the block link point device in the method embodiment corresponding to fig. 3 and fig. 5, and the block link point device 60 may include a receiving module 601, a determining module 602, a processing module 603, and an accessing module 604. Each module in the block link point device 60 is specifically configured to:
a receiving module 601, configured to receive, through a service logic layer, a data request sent by any interface of at least one interface;
a determining module 602, configured to determine, through a service logic layer, a service rule corresponding to the data request;
the processing module 603 is configured to process the data request based on the service rule through the service logic layer to obtain a processing result;
and an accessing module 604, configured to access the resource pool based on the processing result through the service logic layer.
In one implementation, before the determining module 602 determines the business rule corresponding to the data request through the business logic layer, the determining module is further configured to:
the data request is verified through a service logic layer;
and if the verification is successful, triggering a step of determining a business rule corresponding to the data request through a business logic layer.
In an implementation manner, the determining module 602 checks the data request through the service logic layer, and is specifically configured to:
comparing the data type of the data request with the data type corresponding to the interface stored in the service logic layer through the service logic layer;
and if the data type of the data request is the same as the data type corresponding to the interface stored in the service logic layer, the data request is determined to be successfully verified through the service logic layer.
In an implementation manner, the determining module 602 checks the data request through the service logic layer, and is specifically configured to:
judging whether the service field of the data requested by the data request is the service field corresponding to the block link point equipment or not through the service logic layer;
and if the service field of the data requested by the data request is the service field corresponding to the block link point equipment, determining that the data request is successfully verified through the service logic layer.
In one implementation, the data request is used to indicate information of the query target block, and the data request includes the height of the target block;
the processing module 603 processes the data request based on the service rule through the service logic layer to obtain a processing result, which is specifically configured to:
determining the identification of the target block based on the height of the target block through a service logic layer;
the access module 604 accesses the resource pool based on the processing result through the service logic layer, and is specifically configured to:
and accessing the target block indicated by the identification of the target block in the resource pool through the service logic layer to obtain the information of the target block.
In one implementation, the data request is used to indicate information for querying the target transaction data, the data request includes a hash of the target transaction data;
the processing module 603 processes the data request based on the service rule through the service logic layer to obtain a processing result, which is specifically configured to:
determining address information of target transaction data based on the Hash through a business logic layer;
the access module 604 accesses the resource pool based on the processing result through the service logic layer, and is specifically configured to:
and accessing the resource pool through the service logic layer based on the address information of the target transaction data to obtain the information of the target transaction data.
It should be noted that details that are not mentioned in the embodiment corresponding to fig. 6 and specific implementation manners of the steps executed by each module may refer to the embodiments shown in fig. 3 and fig. 5 and the foregoing details, and are not described again here.
Referring to fig. 7, fig. 7 is a schematic structural diagram of another block chain node device according to an embodiment of the present disclosure. The block link node device 70 includes a processor 701, a service logic layer 702, a resource pool 703, an interface 704, and a memory 705, where the processor 701, the service logic layer 702, the resource pool 703, the interface 704, and the memory 705 are connected by one or more communication buses.
The processor 701 is configured to support the blockchain node device to perform the corresponding functions of the blockchain node device in the methods described in fig. 3 and 5. The Processor 701 may be a Central Processing Unit (CPU), a Network Processor (NP), a hardware chip, or any combination thereof.
The memory 705 is used for storing program codes and the like. The Memory 705 may include volatile Memory (volatile), such as Random Access Memory (RAM); the Memory 705 may also include a non-volatile Memory (non-volatile Memory), such as a Read Only Memory (ROM), a flash Memory (flash Memory), a Hard Disk Drive (HDD) or a Solid State Drive (SSD); the memory 705 may also comprise a combination of memories of the kind described above.
The interface may convert the acquired small type of data into a large type of data.
The resource pool is used for storing data written into the block chain.
And the service logic layer is used for processing the data request and accessing the resource pool.
In the embodiment of the present application, the block link point device 70 includes a plurality of interfaces, wherein an interface for transmitting data and an interface for receiving data may not be the same interface.
The processor 701 may call the program code stored in the memory 705 to perform the following operations:
receiving a data request sent by any interface 704 in at least one interface through a business logic layer high 702;
determining a service rule corresponding to the data request through the service logic layer 702;
processing the data request based on the service rule through the service logic layer 702 to obtain a processing result;
the resource pool is accessed by the business logic layer 702 based on the processing results.
In one implementation, before the processor 701 determines the business rule corresponding to the data request through the business logic layer 702, it is further configured to:
the data request is verified through the service logic layer 702;
if the verification is successful, a step of determining a service rule corresponding to the data request through the service logic layer 702 is triggered.
In an implementation manner, the processor 701 checks the data request through the service logic layer 702, and is specifically configured to:
comparing the data type of the data request with the data type corresponding to the interface stored in the service logic layer 702 through the service logic layer 702;
if the data type of the data request is the same as the data type corresponding to the interface 703 stored in the service logic layer 702, it is determined by the service logic layer 702 that the data request is successfully verified.
In an implementation manner, the processor 701 checks the data request through the service logic layer, and is specifically configured to:
judging whether the service field of the data requested by the data request is the service field corresponding to the block link point device or not through the service logic layer 702;
if the service field of the data requested by the data request is the service field corresponding to the block link point device, the data request is determined to be successfully verified through the service logic layer 702.
In one implementation, the data request is used to indicate information of the query target block, and the data request includes the height of the target block;
the processor 701 processes the data request based on the service rule through the service logic layer 702 to obtain a processing result, which is specifically used for:
determining, by the business logic layer 702, an identification of the target block based on the height of the target block;
the processor 701 accesses the resource pool 703 through the service logic layer 702 based on the processing result, and is specifically configured to:
the service logic layer 702 accesses the target block indicated by the identifier of the target block in the resource pool 703 to obtain the information of the target block.
In one implementation, the data request is used to indicate information for querying the target transaction data, the data request includes a hash of the target transaction data;
the processor 701 processes the data request based on the service rule through the service logic layer 702 to obtain a processing result, which is specifically used for:
determining, by the business logic layer 702, address information of the target transaction data based on the hash;
the processor 701 accesses the resource pool 703 through the service logic layer 702 based on the processing result, and is specifically configured to:
the resource pool 703 is accessed through the service logic layer 701 based on the address information of the target transaction data, so as to obtain the information of the target transaction data.
Further, the processor 701 may further cooperate with the service logic layer 702, the resource pool 703, the interface 704, and the memory 705 to execute operations corresponding to the block link node devices in the method embodiments shown in fig. 3 and fig. 5, which may specifically refer to the description in the method embodiments and is not described herein again.
The present invention also provides a computer readable storage medium, which can be used to store a computer program for the block-link point device in the embodiments shown in fig. 3 and 5, and which contains a program designed for the block-link point device in the above embodiments.
The computer readable storage medium includes, but is not limited to, flash memory, hard disk, solid state disk.
Embodiments of the present invention further provide a computer program product, which when executed by a computer device, can execute the method for data transmission designed for the block link node device in the embodiments of fig. 3 and 5.
There is also provided in an embodiment of the present application a chip, including a processor and a memory, where the memory is used to store a computer program, the processor is used to call and run the computer program from the memory, and the computer program is used to implement the method in the above method embodiment.
Those of ordinary skill in the art would appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A method for data transmission, applied to a blockchain node device, wherein the blockchain node device is configured with a service logic layer, a resource pool, and at least one interface, and the method includes:
receiving, by the service logic layer, a data request sent by any interface of the at least one interface;
determining a service rule corresponding to the data request through the service logic layer;
processing the data request based on the service rule through the service logic layer to obtain a processing result;
accessing, by the business logic layer, the resource pool based on the processing result.
2. The method of claim 1, wherein before determining, by the business logic layer, the business rule corresponding to the data request, further comprising:
verifying the data request through the service logic layer;
and if the verification is successful, triggering the step of determining the business rule corresponding to the data request through the business logic layer.
3. The method of claim 2, wherein the verifying the data request by the business logic layer comprises:
comparing the data type of the data request with the data type corresponding to the interface stored in the service logic layer through the service logic layer;
and if the data type of the data request is the same as the data type corresponding to the interface stored in the service logic layer, determining that the data request is successfully verified through the service logic layer.
4. The method of claim 2, wherein the verifying the data request by the business logic layer comprises:
judging whether the service field of the data requested by the data request is the service field corresponding to the block link point equipment or not through the service logic layer;
and if the service field of the data requested by the data request is the service field corresponding to the block chain node equipment, determining that the data request is successfully verified through the service logic layer.
5. The method of claim 1, wherein the data request is used to indicate information for querying a target block, and wherein the data request comprises a height of the target block;
the processing the data request based on the service rule through the service logic layer to obtain a processing result, including:
determining, by the business logic layer, an identity of the target block based on a height of the target block;
the accessing, by the business logic layer, the resource pool based on the processing result includes:
and accessing the target block indicated by the identification of the target block in the resource pool through the service logic layer to obtain the information of the target block.
6. The method of claim 1, wherein the data request is for information indicating a query for target transaction data, the data request including a hash of the target transaction data;
the processing the data request based on the service rule through the service logic layer to obtain a processing result, including:
determining, by the business logic layer, address information of the target transaction data based on the hash;
the accessing, by the business logic layer, the resource pool based on the processing result includes:
and accessing the resource pool through the service logic layer based on the address information of the target transaction data to obtain the information of the target transaction data.
7. A block chain node device is characterized in that the block chain node device comprises a service logic layer, a resource pool, at least one interface, a memory and a processor;
the memory for storing a computer program;
the processor is used for calling the computer program and executing the method of any one of claims 1-6.
8. A blockchain node device configured with a service logic layer, a resource pool, and at least one interface, the device comprising:
a receiving module, configured to receive, through the service logic layer, a data request sent by any interface of the at least one interface;
the determining module is used for determining a business rule corresponding to the data request through the business logic layer;
the processing module is used for processing the data request based on the service rule through the service logic layer to obtain a processing result;
and the access module is used for accessing the resource pool through the service logic layer based on the processing result.
9. The block-link node device of claim 8, wherein the determining module, prior to determining the business rule corresponding to the data request by the business logic layer, is further configured to:
verifying the data request through the service logic layer;
and if the verification is successful, triggering the step of determining the business rule corresponding to the data request through the business logic layer.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions for causing a processor to perform the method according to any of claims 1-6 when the program instructions are executed by the processor.
CN202010119722.4A 2020-02-25 2020-02-25 Data transmission method, block link node equipment and medium Pending CN111339141A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010119722.4A CN111339141A (en) 2020-02-25 2020-02-25 Data transmission method, block link node equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010119722.4A CN111339141A (en) 2020-02-25 2020-02-25 Data transmission method, block link node equipment and medium

Publications (1)

Publication Number Publication Date
CN111339141A true CN111339141A (en) 2020-06-26

Family

ID=71183729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010119722.4A Pending CN111339141A (en) 2020-02-25 2020-02-25 Data transmission method, block link node equipment and medium

Country Status (1)

Country Link
CN (1) CN111339141A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112597105A (en) * 2020-12-26 2021-04-02 中国农业银行股份有限公司 Processing method of file associated object, server side equipment and storage medium
CN112800120A (en) * 2021-01-26 2021-05-14 政采云有限公司 Service processing method and device
CN114928649A (en) * 2022-04-26 2022-08-19 成都质数斯达克科技有限公司 Multi-platform service implementation method, device and equipment based on block chain

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112597105A (en) * 2020-12-26 2021-04-02 中国农业银行股份有限公司 Processing method of file associated object, server side equipment and storage medium
CN112800120A (en) * 2021-01-26 2021-05-14 政采云有限公司 Service processing method and device
CN114928649A (en) * 2022-04-26 2022-08-19 成都质数斯达克科技有限公司 Multi-platform service implementation method, device and equipment based on block chain
CN114928649B (en) * 2022-04-26 2023-11-28 成都质数斯达克科技有限公司 Multi-platform service realization method, device and equipment based on block chain

Similar Documents

Publication Publication Date Title
CN113691597B (en) Block chain contract deployment method, device, equipment and storage medium
CN110826111B (en) Test supervision method, device, equipment and storage medium
CN111339141A (en) Data transmission method, block link node equipment and medium
CN110266872B (en) Address book data management and control method and device, cloud address book system, computer equipment and computer readable storage medium
CN112087502B (en) Method, device and equipment for processing request and storage medium
CN111753334B (en) Method and device for verifying consistency of data across alliance chains and electronic equipment
CN110944046A (en) Control method of consensus mechanism and related equipment
CN110597541B (en) Interface updating processing method, device, equipment and storage medium based on block chain
CN110866265A (en) Data storage method, device and storage medium based on block chain
CN111367923A (en) Data processing method, data processing device, node equipment and storage medium
CN110647583B (en) Block chain construction method, device, terminal and medium
CN110825776A (en) Air quality detection report processing method and device, computing equipment and storage medium
CN113162971B (en) Block link point management method, device, computer and readable storage medium
CN111327602B (en) Equipment access processing method, equipment and storage medium
CN110598475A (en) Block chain-based work attribute information acquisition method and device and computer equipment
CN112995357B (en) Domain name management method, device, medium and electronic equipment based on cloud hosting service
CN114301912A (en) Information interaction method and device based on block chain
CN116070191A (en) Information processing method and device, storage medium, and program product
CN113379577A (en) Transaction auditing method, device and equipment
CN110598374A (en) Block chain-based work registration method, device and computer-readable storage medium
CN117040929B (en) Access processing method, device, equipment, medium and program product
CN112597512B (en) Temperature data control method and device based on block chain and storage medium
CN112202734B (en) Service processing method, electronic device and readable storage medium
CN117370463A (en) Block chain-based data storage method, device and storage medium
CN117522551A (en) Blockchain transaction management method, device, equipment, storage medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40024697

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination