CN111651467B - Block chain node interface issuing and calling method and device - Google Patents

Block chain node interface issuing and calling method and device Download PDF

Info

Publication number
CN111651467B
CN111651467B CN202010448323.2A CN202010448323A CN111651467B CN 111651467 B CN111651467 B CN 111651467B CN 202010448323 A CN202010448323 A CN 202010448323A CN 111651467 B CN111651467 B CN 111651467B
Authority
CN
China
Prior art keywords
application program
node
program interface
interface information
identification information
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.)
Active
Application number
CN202010448323.2A
Other languages
Chinese (zh)
Other versions
CN111651467A (en
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.)
Hangzhou Rivtower Technology Co Ltd
Original Assignee
Hangzhou Rivtower Technology 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 Hangzhou Rivtower Technology Co Ltd filed Critical Hangzhou Rivtower Technology Co Ltd
Priority to CN202010448323.2A priority Critical patent/CN111651467B/en
Publication of CN111651467A publication Critical patent/CN111651467A/en
Application granted granted Critical
Publication of CN111651467B publication Critical patent/CN111651467B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the specification discloses a block chain node interface issuing and calling method which is applied to a first component and comprises the following steps of: initializing an intelligent contract according to the blockchain node identification information, wherein the blockchain comprises at least 1 node capable of providing corresponding interfaces and interface methods for application programs; receiving the identification information and the application program interface information sent by the node so as to enable the node identification information to be associated with the application program interface information; and calling the intelligent contract to issue the node application program interface information to the blockchain. The invention accesses the node application program by the way of the intelligent contract of the blockchain through the application program interface information of the node opening, and can acquire the available application program interface and the realization method thereof by acquiring the application program interface information of the corresponding node in the intelligent contract, thereby being convenient for integrating the application program and the blockchain system.

Description

Block chain node interface issuing and calling method and device
Technical Field
The present disclosure relates to the field of computer software technologies, and in particular, to a method, an apparatus, a system, and an electronic device for issuing and calling a block link point interface.
Background
The blockchain-based application framework generally includes three layers, an application layer, a blockchain support layer, and an infrastructure layer. The application system layer comprises various application programs facing users; the blockchain support layer is a blockchain system and comprises a standard account book operation interface, distributed consensus nodes, intelligent contracts, authority configuration and the like; the infrastructure layer comprises supporting resources such as magnetic disks, distributed storage systems, operating systems and the like and basic software. Various applications need to read, write account book data stored in the blockchain, or deploy and execute smart contract methods through an application program interface (Application Program Interface, API) of the blockchain system. However, since the blockchain system is a distributed system, the method of application interfaces issued by each node in the blockchain may be different, for example, some nodes are masked for security reasons or some interfaces and their implementation methods are turned off, which is detrimental to the integration of the application and blockchain system.
Disclosure of Invention
In order to solve the above problems, an embodiment of the present disclosure provides a method and an apparatus for issuing and calling a blockchain node interface, which can enable a node to issue application program interface information, and access the node application program in a blockchain intelligent contract manner, so as to obtain available application program interfaces and implementation methods thereof by obtaining application program interface information of a corresponding node in the intelligent contract.
In order to solve the above technical problems, the embodiments of the present specification are implemented as follows:
in a first aspect, a method for issuing and calling a block link point interface is provided, applied to a first component, and after an intelligent contract is created and deployed to a block chain, the method includes:
initializing an intelligent contract according to node identification information of the blockchain, wherein the blockchain comprises at least 1 node capable of providing corresponding interfaces and interface methods for application programs;
receiving the node identification information and the application program interface information so as to enable the node identification information to be associated with the application program interface information;
and calling the intelligent contract to issue the node application program interface information to the blockchain.
In a second aspect, a block link point interface issuing and calling device is provided, including:
the block chain management module is used for managing node identification information and node application program interface information stored on the block chain;
an intelligent contract management module for creating and deploying intelligent contracts to the blockchain;
the receiving module is used for receiving the application program interface information sent by the node;
and the sending module is used for updating the node application program interface information to the intelligent contract.
In a third aspect, a block link point interface issuing and calling method is provided, applied to a second component, and includes:
establishing network connection between an application program and a node;
receiving the node identification information sent by the application program;
calling an intelligent contract query transaction processing method of a first component according to the node identification information to acquire the node application program interface information;
and sending the node application program interface information to the application program, wherein the application program calls the node application program interface according to an interface implementation method contained in the node application program interface information.
In a fourth aspect, a block link point interface issuing and calling device is provided, including:
the network management module is used for establishing network connection between the application program and the node;
the receiving module is used for periodically receiving the node identification information sent by the application program and receiving transaction processing result data returned by the first component;
and the sending module is used for sending the node identification information to the intelligent contract of the first component for transaction processing and sending the node application program interface information to the application program.
In a fifth aspect, a block link point interface issuing and calling system is provided, including a first component and a second component, wherein,
the first component creates an intelligent contract and deploys the intelligent contract to a blockchain, acquires node identification information and node application program interface information, and calls the intelligent contract to issue the node application program interface information to the blockchain; the second component is arranged in an application program, and network connection with a node is established to acquire the node application program interface information;
the blockchain receives the node identification information and the application program interface information sent by the first component; the plurality of second components request the node identification information and application program interface information from the blockchain.
In a sixth aspect, an electronic device is provided, including: a processor; and
a memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method of the first aspect.
In a seventh aspect, an electronic device is provided, including: a processor; and
a memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method of the third aspect.
In an eighth aspect, a computer readable storage medium is provided, the computer readable storage medium storing one or more programs, which when executed by an electronic device comprising a plurality of application programs, cause the electronic device to perform the method of the first aspect.
In a ninth aspect, a computer readable storage medium is provided, the computer readable storage medium storing one or more programs, which when executed by an electronic device comprising a plurality of application programs, cause the electronic device to perform the method of the third aspect.
The specification can achieve at least the following technical effects:
the invention accesses the node application program by the way of the intelligent contract of the blockchain through the application program interface information of the node opening, and can acquire the available application program interface and the realization method thereof by acquiring the application program interface information of the corresponding node in the intelligent contract, thereby being convenient for integrating the application program and the blockchain system.
Drawings
In order to more clearly illustrate the embodiments of the present description or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some of the embodiments described in the present description, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram illustrating steps of a method for issuing a call to a blockchain node interface according to an embodiment of the present disclosure.
FIG. 2 is a second step diagram of a method for issuing calls to a blockchain node interface according to embodiments of the present disclosure.
FIG. 3 is a third exemplary diagram illustrating a method for issuing a call to a blockchain node interface according to the embodiments of the present disclosure.
FIG. 4 is a diagram illustrating steps of a method for issuing a call to a blockchain node interface in accordance with an embodiment of the present disclosure.
Fig. 5 is a schematic diagram of a block chain node interface issuing and calling device according to an embodiment of the present disclosure.
FIG. 6 is a diagram illustrating a second exemplary architecture of a block chain node interface issue call device according to an embodiment of the present disclosure.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
Key terms
Blockchain techniques: the system is a brand new distributed infrastructure and calculation paradigm which uses a block chain type data structure to verify and store data, uses a distributed node consensus algorithm to generate and update data, uses a cryptography mode to ensure the safety of data transmission and access, and uses an intelligent contract consisting of automatic script codes to program and operate the data. Essentially, the system is a shared database, and data or information stored in the shared database has the characteristics of incapability of counterfeiting, whole trace, traceability, openness, transparency, collective maintenance and the like. Based on the characteristics, the blockchain technology lays a solid trust foundation, creates a reliable cooperation mechanism and has wide application prospect.
Intelligent contract: the program running in the block chain system has the characteristics of automatic execution according to the set logic and non-falsification of the execution result.
Application program interface (Application Program Interface, API): is a predefined function or convention that refers to the engagement of different components of a software system in order to provide an application with the ability of a developer to access a set of routines based on certain software or hardware without having to access source code or understand the details of the internal operating mechanism.
The following details, by way of specific examples, of a blockchain interface issuing invocation scheme referred to in this specification.
Example 1
The issuing and calling of the blockchain interface information involves 2 execution subjects, namely a blockchain system and an application program. The method comprises the steps of deploying intelligent contract service in a blockchain, receiving identification information and application program interface information sent by the node, releasing the node application program interface information and the like, and packaging to form a first component. Establishing network connection between the application program and the node, receiving node request of the application program, calling intelligent contract inquiry transaction processing method, transmitting node application program interface information to the application program and the like, and packaging to form a second component. A blockchain system includes a first component, the first component corresponding to a plurality of blockchain nodes; a blockchain system may support multiple applications; an application comprises a second component; an application may invoke an application interface of at least one blockchain node.
For blockchain systems:
in the deployment of the smart contract service phase, first, a smart contract is created by a first component built into the blockchain system. The transaction processing method of the intelligent contract comprises at least one of issuing and inquiring application program interface information; the contract is then deployed to a blockchain that includes at least 1 node that provides the corresponding interface and interface method for the application, i.e., a blockchain consensus node.
In the stage of receiving node information, the node actively issues node identification information as the node unique identification, and simultaneously submits all available interface information of the node and an interface implementation method thereof to a first component. And establishing association between the node identification information and the current node interface information hash by the first component so as to ensure the one-to-one correspondence of the node and the interface information thereof.
And in the stage of publishing node interface information, searching whether a block which is identical to the node application program interface information exists in a block chain according to the received node identification information and the received application program interface information by using a transaction processing method of the intelligent contract, and storing the node identification information and the application program interface information into the block chain when the block which is identical to the node application program interface information does not exist. In particular, when there is a block in the blockchain that is identical to the application program interface information, the node identification information is associated with the existing application program interface information of the block. This has the advantage that nodes using the same application program interface can share the same piece of information, so that an application program can call the application program interface and its implementation method through any node having the same application program interface.
For an application program:
firstly, establishing network connection between an application program and a node; then, receiving the node identification information sent by the application program; calling an intelligent contract query transaction processing method of a first component according to the node identification information to acquire the node application program interface information; and then, sending the node application program interface information to the application program, and calling the node application program interface by the application program according to an interface implementation method contained in the node application program interface information.
In summary, on the basis of the technical scheme, the issuing and calling system of the block link point interface can be formed and comprises a first component and a second component, wherein,
the first component creates an intelligent contract and deploys the intelligent contract to a blockchain, acquires node identification information and node application program interface information, and calls the intelligent contract to issue the node application program interface information to the blockchain; the second component is arranged in an application program, and network connection with a node is established to acquire the node application program interface information;
the blockchain receives the node identification information and the application program interface information sent by the first component; the plurality of second components request the node identification information and application program interface information from the blockchain.
Example two
Referring to fig. 1, a schematic step diagram of a block chain node interface issuing and calling method according to an embodiment of the present disclosure is shown, where an execution body of the node interface issuing and calling method may be a block chain side, that is, defined as a first component in the present disclosure; the first component may specifically be a service program or an electronic device such as a terminal. The method comprises the steps of creating an intelligent contract and deploying the intelligent contract to a blockchain, wherein the transaction processing method of the intelligent contract comprises at least one of issuing and inquiring application program interface information, deploying the written intelligent contract to the blockchain, and the method comprises the following steps of:
step 101: initializing intelligent contracts according to the block chain node identification information so as to obtain addresses of various contract methods for issuing and calling node interface information. The blockchain includes at least 1 node that can provide a corresponding interface and interface method for an application.
Optionally, as shown in fig. 2, the method for processing the issuing transaction of the smart contract includes:
step 121: receiving the node identification information and the application program interface information;
step 122: when the block chain does not have the block which is completely the same as the corresponding block of the node application program interface information, the node identification information and the application program interface information are stored into the block chain;
step 123: when the application program interface information which corresponds to the application program interface information is completely the same in the blockchain, the node identification information is associated with the existing application program interface information in the blockchain.
Optionally, as shown in fig. 3, the query transaction processing method of the smart contract includes:
step 131: receiving the node identification information sent by the second component;
step 132: inquiring the application program interface information corresponding to the node identification information in a block chain;
step 133: transmitting the application program interface information to a second component;
step 134: and when the obtained application program interface information is related to other node identification information in the block chain, sending the other node identification information to a second component.
Step 102: receiving the identification information and the application program interface information sent by the node so as to enable the node identification information to be associated with the application program interface information; and establishing association between the node identification information and the current node interface information hash by the first component so as to ensure the one-to-one correspondence of the node and the interface information thereof.
Step 103: and calling the intelligent contract to issue the node application program interface information to the blockchain. As described above, the method for issuing transactions of intelligent contracts first searches for whether there is a block corresponding to the node application program interface information in the blockchain according to the received node identification information and application program interface information, and stores the node identification information and application program interface information in the blockchain when there is no block. In particular, when there is a block in the blockchain that is identical to the application program interface information, the node identification information is associated with the existing application program interface information of the block. It should be understood that nodes using the same application program interface may share the same piece of information so that an application program can call the application program interface and its implementation method through any node having the same application program interface.
Referring to fig. 4, a schematic step diagram of a block chain node interface issuing and calling method according to an embodiment of the present disclosure is shown, where an execution body of the node interface issuing and calling method may be an application program side, and the node interface issuing and calling method is defined as a second component in the present disclosure; the second component is disposed in an application. The method may comprise the steps of:
step 201: establishing network connection between an application program and a node;
step 202: receiving the node identification information sent by the application program;
step 203: calling an intelligent contract query transaction processing method of a first component according to the node identification information to acquire the node application program interface information;
step 204: and sending the node application program interface information to the application program, wherein the application program calls the node application program interface according to an interface implementation method contained in the node application program interface information.
Optionally, the method further comprises the steps of:
step 205: periodically acquiring the node application program interface information; updating the interface information required by the application program when the node application program interface information changes;
step 206: when the node application program interface information corresponds to a plurality of node identification information, the node identification information is received and sent to the application program, so that the application program can call the application program interface and the implementation method thereof through any node with the same application program interface.
The invention accesses the node application program by the way of the intelligent contract of the blockchain through the application program interface information of the node opening, and can acquire the available application program interface and the realization method thereof by acquiring the application program interface information of the corresponding node in the intelligent contract, thereby being convenient for integrating the application program and the blockchain system.
Example III
Fig. 5 is a schematic structural diagram of a block link point interface issuing and calling device 500 according to an embodiment of the present disclosure. Referring to fig. 5, in one embodiment, the block link point interface issuing calling device 500 includes:
a blockchain management module 501 for managing node identification information and node application program interface information stored on the blockchain;
an intelligent contract management module 502 for creating and deploying intelligent contracts to the blockchain.
The transaction processing method of the intelligent contract comprises at least one of issuing and inquiring the information of the application program interface. And deploying the compiled intelligent contracts to a blockchain to obtain addresses of all contract methods for issuing and calling node interface information.
The intelligent contract issuing transaction processing method comprises the following steps: receiving the node identification information and the application program interface information; when the block chain does not have the block which is completely the same as the corresponding block of the node application program interface information, the node identification information and the application program interface information are stored into the block chain; when the application program interface information which corresponds to the application program interface information is completely the same in the blockchain, the node identification information is associated with the existing application program interface information in the blockchain.
The query transaction processing method of the intelligent contract comprises the following steps: receiving the node identification information sent by the second component; inquiring the application program interface information corresponding to the node identification information in a block chain; transmitting the application program interface information to a second component; and when the obtained application program interface information is related to other node identification information in the block chain, sending the other node identification information to a second component.
A receiving module 503, configured to receive application program interface information sent by the node;
a sending module 504, configured to update the node application program interface information to the smart contract.
Fig. 6 is a schematic structural diagram of a blockchain node interface issuing and calling device 600 according to an embodiment of the present disclosure. Referring to fig. 6, in one embodiment, a block link point interface issuing calling device 600 includes:
a network management module 601, configured to establish a network connection between an application program and a node;
a receiving module 602, configured to periodically receive the node identification information sent by the application program, and receive result data of the transaction returned by the first component;
a sending module 603, configured to send the node identification information to the smart contract of the first component for performing a transaction, and send the node application program interface information to the application program.
It should be understood that the blockchain node interface issuing and calling device in the embodiments of the present disclosure may also execute the method executed by the blockchain node interface issuing and calling device (or apparatus) in fig. 1 to 4, and implement the functions of the blockchain node interface issuing and calling device (or apparatus) in the embodiments shown in fig. 1 to 4, which are not described herein.
Example IV
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present specification. Referring to fig. 7, at the hardware level, the electronic device includes a processor, and optionally an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory (non-volatile Memory), such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, network interface, and memory may be interconnected by an internal bus, which may be an ISA (Industry Standard Architecture ) bus, a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or EISA (Extended Industry Standard Architecture ) bus, among others. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 7, but not only one bus or type of bus.
And the memory is used for storing programs. In particular, the program may include program code including computer-operating instructions. The memory may include memory and non-volatile storage and provide instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs, and forms a shared resource access control device on a logic level. The processor is used for executing the programs stored in the memory and is specifically used for executing the following operations:
applied to a first component, comprising:
creating an intelligent contract and deploying the intelligent contract to a blockchain network, wherein the blockchain comprises at least 1 node capable of providing corresponding interfaces and interface methods for application programs;
receiving the identification information and the application program interface information sent by the node so as to enable the node identification information to be associated with the application program interface information;
and calling the intelligent contract to issue the node application program interface information to the blockchain.
Or,
applied to the second component, comprising:
establishing network connection between an application program and a node;
receiving the node identification information sent by the application program;
calling an intelligent contract query transaction processing method of a first component according to the node identification information to acquire the node application program interface information;
and sending the node application program interface information to the application program, wherein the application program calls the node application program interface according to an interface implementation method contained in the node application program interface information.
The node interface issuing calling method disclosed in the embodiment shown in fig. 1 to fig. 4 of the present specification can be applied to a processor or implemented by the processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The methods, steps and logic blocks disclosed in the embodiments of the present specification may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present specification may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method.
Of course, in addition to the software implementation, the electronic device of the embodiments of the present disclosure does not exclude other implementations, such as a logic device or a combination of software and hardware, that is, the execution subject of the following processing flow is not limited to each logic unit, but may also be hardware or a logic device.
Example five
The present description also proposes a computer-readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a portable electronic device comprising a plurality of application programs, enable the portable electronic device to perform the method of the embodiments shown in fig. 1-4, and in particular to perform the method of:
applied to a first component, comprising:
creating an intelligent contract and deploying the intelligent contract to a blockchain network, wherein the blockchain comprises at least 1 node capable of providing corresponding interfaces and interface methods for application programs;
receiving the identification information and the application program interface information sent by the node so as to enable the node identification information to be associated with the application program interface information;
and calling the intelligent contract to issue the node application program interface information to the blockchain.
Or,
applied to the second component, comprising:
establishing network connection between an application program and a node;
receiving the node identification information sent by the application program;
calling an intelligent contract query transaction processing method of a first component according to the node identification information to acquire the node application program interface information;
and sending the node application program interface information to the application program, wherein the application program calls the node application program interface according to an interface implementation method contained in the node application program interface information.
In summary, the foregoing description is only a preferred embodiment of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the protection scope of the present specification.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.

Claims (16)

1. A block link point interface issuing and calling method, applied to a first component, after an intelligent contract is created and deployed to a block chain, comprising:
initializing an intelligent contract according to node identification information of the blockchain, wherein the blockchain comprises at least 1 node capable of providing corresponding interfaces and interface methods for application programs;
receiving the node identification information and the application program interface information, and establishing association between the node identification information and the application program interface information hash thereof so as to ensure the one-to-one correspondence between the nodes and the application program interface information;
and calling the intelligent contract issuing node application program interface information to the blockchain.
2. The blockchain node interface issuing calling method of claim 1, wherein the intelligent contract transaction method includes at least one of issuing and querying application program interface information.
3. The method of claim 2, wherein the smart contract issuing transaction method comprises:
receiving the node identification information and the application program interface information;
and searching whether the application program interface information exists on the blockchain, and if not, storing the node identification information and the application program interface information into the blockchain.
4. The method of claim 3, wherein the smart contract issuing transaction method further comprises associating the node identification information with the existing application program interface information if the application program interface information is already present on the blockchain.
5. The method of claim 2, wherein the method of query transaction processing for the smart contract comprises:
receiving the node identification information sent by the second component;
inquiring the application program interface information corresponding to the node identification information in a block chain;
and sending the application program interface information to a second component.
6. The method of claim 5, wherein the method of querying transactions for a smart contract further comprises sending other node identification information to a second component when the application program interface information queried in a blockchain correlates to other node identification information.
7. A block link point interface issuing and calling device, comprising:
the block chain management module is used for managing node identification information and node application program interface information stored on the block chain;
an intelligent contract management module for creating and deploying intelligent contracts to the blockchain;
the receiving module is used for receiving the application program interface information sent by the node, and establishing the association between the node identification information and the application program interface information hash thereof so as to ensure the one-to-one correspondence between the node and the application program interface information;
and the sending module is used for updating the node application program interface information to the intelligent contract.
8. A block link point interface issuing and calling method, which is applied to a second component, comprising:
establishing network connection between an application program and a node;
receiving node identification information sent by the application program;
calling an intelligent contract query transaction processing method of a first component according to the node identification information to acquire node application program interface information, wherein the first component is used for establishing association between the node identification information and application program interface information hash thereof so as to ensure a one-to-one correspondence between the node and the application program interface information;
and sending the node application program interface information to the application program, wherein the application program calls the node application program interface according to an interface implementation method contained in the node application program interface information.
9. The method as recited in claim 8, further comprising: acquiring updated node application program interface information; and when the node application program interface information changes, updating the interface information required by the application program.
10. The method according to any one of claims 8 to 9, further comprising receiving a plurality of node identification information and transmitting the plurality of node identification information to the application program when the node application program interface information corresponds to the plurality of node identification information, so that the application program can call the application program interface and its implementation method through any one of the nodes having the same application program interface.
11. A block link point interface issuing and calling device, comprising:
the network management module is used for establishing network connection between the application program and the node;
the receiving module is used for periodically receiving node identification information sent by the application program and receiving transaction processing result data returned by a first component, and the first component is used for establishing association between the node identification information and application program interface information hash thereof so as to ensure one-to-one correspondence between the nodes and the application program interface information;
and the sending module is used for sending the node identification information to the intelligent contract of the first component for transaction processing and sending the node application program interface information to the application program.
12. A block chain link point interface issuing and calling system is characterized by comprising a first component and a second component, wherein,
the first component creates an intelligent contract and deploys the intelligent contract to a blockchain, acquires node identification information and node application program interface information, establishes association between the node identification information and application program interface information hash thereof to ensure one-to-one correspondence between the node and the application program interface information, and calls the intelligent contract to issue the node application program interface information to the blockchain; the second component is arranged in an application program, and network connection with a node is established to acquire the node application program interface information;
the blockchain receives the node identification information and the application program interface information sent by the first component; the plurality of second components request the node identification information and application program interface information from the blockchain.
13. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method of any of claims 1 to 6.
14. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method of any of claims 8 to 10.
15. A computer readable storage medium storing one or more programs, which when executed by an electronic device comprising a plurality of application programs, cause the electronic device to perform the method of any of claims 1-6.
16. A computer readable storage medium storing one or more programs, which when executed by an electronic device comprising a plurality of application programs, cause the electronic device to perform the method of any of claims 8-10.
CN202010448323.2A 2020-05-25 2020-05-25 Block chain node interface issuing and calling method and device Active CN111651467B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010448323.2A CN111651467B (en) 2020-05-25 2020-05-25 Block chain node interface issuing and calling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010448323.2A CN111651467B (en) 2020-05-25 2020-05-25 Block chain node interface issuing and calling method and device

Publications (2)

Publication Number Publication Date
CN111651467A CN111651467A (en) 2020-09-11
CN111651467B true CN111651467B (en) 2023-09-12

Family

ID=72346710

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010448323.2A Active CN111651467B (en) 2020-05-25 2020-05-25 Block chain node interface issuing and calling method and device

Country Status (1)

Country Link
CN (1) CN111651467B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112751713B (en) * 2020-12-30 2023-03-24 杭州趣链科技有限公司 Block chain-based link establishing method, device and storage medium
CN113110921B (en) * 2021-06-11 2021-10-22 北京百度网讯科技有限公司 Operation method, device, equipment and storage medium of block chain system
CN113268364A (en) * 2021-06-25 2021-08-17 中国银行股份有限公司 Application program interface offline method and device based on block chain
CN113254064B (en) * 2021-07-05 2021-11-02 支付宝(杭州)信息技术有限公司 API (application program interface) management method and system of block chain
CN115665228B (en) * 2022-09-20 2024-07-16 蚂蚁区块链科技(上海)有限公司 Cross-node service discovery method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018119638A1 (en) * 2016-12-27 2018-07-05 深圳前海达闼云端智能科技有限公司 Method, device, and electronic apparatus for recording application program configuration information
CN108270874A (en) * 2018-02-05 2018-07-10 武汉斗鱼网络科技有限公司 The update method and device of application program
CN109711162A (en) * 2018-12-24 2019-05-03 深圳供电局有限公司 Block chain-based security application method and system
CN110798535A (en) * 2019-11-12 2020-02-14 金蝶软件(中国)有限公司 Method for realizing P2P communication in block chain, block chain application system and related equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11409795B2 (en) * 2018-09-06 2022-08-09 International Business Machines Corporation Atomically executed application program interfaces

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018119638A1 (en) * 2016-12-27 2018-07-05 深圳前海达闼云端智能科技有限公司 Method, device, and electronic apparatus for recording application program configuration information
CN108270874A (en) * 2018-02-05 2018-07-10 武汉斗鱼网络科技有限公司 The update method and device of application program
CN109711162A (en) * 2018-12-24 2019-05-03 深圳供电局有限公司 Block chain-based security application method and system
CN110798535A (en) * 2019-11-12 2020-02-14 金蝶软件(中国)有限公司 Method for realizing P2P communication in block chain, block chain application system and related equipment

Also Published As

Publication number Publication date
CN111651467A (en) 2020-09-11

Similar Documents

Publication Publication Date Title
CN111651467B (en) Block chain node interface issuing and calling method and device
CN107450981B (en) Block chain consensus method and equipment
CN109658238B (en) Data processing method and device
CN111756550B (en) Block chain consensus method and device
CN109669709B (en) Data migration method and data migration system for block chain upgrading
CN111176668A (en) Predicter deployment method, device, electronic equipment and storage medium
CN110781192B (en) Verification method, device and equipment of block chain data
CN112380294A (en) Block chain cross-chain access method and device
CN113220717B (en) Block chain-based data verification method and device and electronic equipment
CN111523887B (en) Authority control method and device for intelligent contract read-only method and electronic equipment
CN111694639B (en) Updating method and device of process container address and electronic equipment
CN110992188A (en) Transaction processing method, device and equipment
CN111768303A (en) Transaction processing method, device, equipment and system
CN110334160A (en) Relationship binding method, device and equipment based on block chain
CN113222667A (en) Equity sharing processing method and device
CN114745133A (en) Method and device for identifying uniqueness of equipment
CN115002228A (en) Service cascade calling method and device, electronic equipment and storage medium
CN112751935B (en) Request processing method and device, electronic equipment and storage medium
CN108228248A (en) A kind of determining method and apparatus of dependence
CN113643030B (en) Transaction processing method, device and equipment
CN111651469B (en) Method and device for managing blockchain system contracts
CN111949297A (en) Block chain intelligent contract upgrading method and device and electronic equipment
CN108563514B (en) Method for accessing application configuration service, application and electronic equipment
CN113507432B (en) Alliance chain authority management method and device
CN111953773B (en) De-centralized address mapping method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant