CN111026982A - Intelligent contract processing method, computer equipment and storage medium - Google Patents

Intelligent contract processing method, computer equipment and storage medium Download PDF

Info

Publication number
CN111026982A
CN111026982A CN201910977369.0A CN201910977369A CN111026982A CN 111026982 A CN111026982 A CN 111026982A CN 201910977369 A CN201910977369 A CN 201910977369A CN 111026982 A CN111026982 A CN 111026982A
Authority
CN
China
Prior art keywords
intelligent contract
data
http request
http
processing method
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
CN201910977369.0A
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.)
OneConnect Smart Technology Co Ltd
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN201910977369.0A priority Critical patent/CN111026982A/en
Publication of CN111026982A publication Critical patent/CN111026982A/en
Priority to PCT/CN2020/105942 priority patent/WO2021073202A1/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/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Databases & Information Systems (AREA)
  • Finance (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides an intelligent contract processing method, which is applied to an http server of a block chain node and comprises the following steps: receiving an http request sent by a client; analyzing the URI identification in the http request; converting the URI identification into a smart contract URI identification; sending the http request to an http server of the intelligent contract corresponding to the intelligent contract URI identification; receiving intelligent contract data obtained by analyzing the http request sent by an http server of the intelligent contract; and sending the intelligent contract data to the client. The invention provides a computer device and a computer-readable storage medium. The invention enables the intelligent contract to have web access capability, does not need to acquire the data of the intelligent contract in a programming calling mode, reduces communication in the development process and improves production efficiency.

Description

Intelligent contract processing method, computer equipment and storage medium
Technical Field
The invention relates to the technical field of block chains, in particular to an intelligent contract processing method, computer equipment and a storage medium.
Background
With the development of computer technology, the application of blockchains is more and more extensive. Broadly, the blockchain technique is a completely new distributed infrastructure and computing approach that utilizes blockchain data structures to verify and store data, utilizes distributed node consensus algorithms to generate and update data, cryptographically secures data transmission and access, and utilizes intelligent contracts composed of automated script code to program and manipulate data.
At present, intelligent contract data in a Fabric blockchain structure can be accessed only by using sdk of Fabric and remotely calling in a programming mode, and is far away from the use habit of a common user; in a development scene, because the intelligent contract does not have visual expression capability, the complexity is increased for block chain development. Therefore, it is highly desirable to provide an intelligent contract access method, so that an intelligent contract has a web access capability, and thus any user can simply and conveniently access data of the intelligent contract by using a browser, thereby reducing the user access threshold and the use complexity.
Disclosure of Invention
In view of the above, there is a need for an intelligent contract processing method, a computer device, and a storage medium, which can enable the intelligent contract to have web access capability, so as to obtain data of the intelligent contract without a form called by programming, reduce communication during development, and improve production efficiency.
A first aspect of an embodiment of the present invention provides an intelligent contract processing method, which is applied to an http server of a block chain node, and the intelligent contract processing method includes:
receiving an http request sent by a client;
analyzing the URI identification in the http request;
converting the URI identification into a smart contract URI identification;
sending the http request to an http server of the intelligent contract corresponding to the intelligent contract URI identification;
receiving intelligent contract data obtained by analyzing the http request sent by an http server of the intelligent contract;
and sending the intelligent contract data to the client. Further, in the foregoing intelligent contract processing method provided in an embodiment of the present invention, the method further includes:
building an http server on the block chain node;
acquiring a server address and a port number of the http server;
and configuring the server address and the port number in the blockchain node, and taking the http server as a proxy server of the blockchain node.
Further, in the foregoing intelligent contract processing method provided in an embodiment of the present invention, before the step of converting the URI identifier into an intelligent contract URI identifier, the method further includes:
matching out verification information corresponding to the URI identification, wherein the verification information comprises one or more of a digital signature and user information;
verifying the URI identification according to the verification information;
and when the URI identification is verified to pass, converting the URI identification into an intelligent contract URI identification.
Further, in the foregoing intelligent contract processing method provided in an embodiment of the present invention, the step of converting the URI identifier into an intelligent contract URI identifier includes:
acquiring a keyword at a preset position in the URI identification;
matching a target intelligent contract corresponding to the keyword from an intelligent contract keyword library;
acquiring a target URI identification of the target intelligent contract;
and taking the target URI identification as the URI identification of the target intelligent contract.
Further, in the foregoing intelligent contract processing method provided in an embodiment of the present invention, before the sending the intelligent contract data to the client, the method further includes:
the embedded program code reads the intelligent contract data;
defining a data structure in an XML format;
and loading the intelligent contract data into a data structure in an XML format.
A second aspect of the embodiments of the present invention provides an intelligent contract processing method, which is applied to an http server of an intelligent contract, and the method includes:
receiving an http request sent by an http server of a blockchain node;
analyzing the http request to obtain intelligent contract data;
and sending the intelligent contract data to an http server of the blockchain node.
Further, in the intelligent contract processing method provided in the embodiment of the present invention, before the step of parsing the http request to obtain intelligent contract data, the method further includes:
acquiring characteristic information carried in the http request;
acquiring a sorting priority corresponding to the characteristic information;
and adjusting the processing sequence of the http request according to the sequencing priority.
Further, in the intelligent contract processing method provided in the embodiment of the present invention, the step of analyzing the http request to obtain the intelligent contract data includes:
analyzing the http request;
determining a function interface of the intelligent contract to be called according to the analysis result;
processing the service according to the intelligent contract on the function interface calling block chain of the intelligent contract to be called;
and acquiring intelligent contract data generated by performing service processing.
The third aspect of the embodiments of the present invention further provides a computer device, where the computer device includes a processor, and the processor is configured to implement the intelligent contract processing method according to any one of the above items when executing the computer program stored in the memory.
The fourth aspect of the embodiments of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the intelligent contract processing method according to any one of the above-mentioned methods.
The embodiment of the invention provides an intelligent contract processing method, computer equipment and a computer readable storage medium, which are applied to an http server of a block chain node and used for receiving an http request sent by a client; analyzing the URI identification in the http request; converting the URI identification into a smart contract URI identification; sending the http request to an http server of the intelligent contract corresponding to the intelligent contract URI identification; receiving intelligent contract data obtained by analyzing the http request sent by an http server of the intelligent contract; and sending the intelligent contract data to the client. By the embodiment of the invention, the intelligent contract has the web access capability, so that rich data display capability and interaction experience are provided; the user can intuitively browse the block chain data of the intelligent contract through the web browser without acquiring the data of the intelligent contract in a programming calling mode; according to the invention, the API of the system is displayed in a page form, so that the communication in the development process is reduced, and the production efficiency is improved; the invention combines the web application and the block chain technology, so that the web application becomes a part of chain ecology and does not need to build the web service by itself.
Drawings
Fig. 1 is a flowchart of an intelligent contract processing method according to a first embodiment of the present invention.
Fig. 2 is a flowchart of an intelligent contract processing method according to a second embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
FIG. 4 is an exemplary functional block diagram of the computer device shown in FIG. 3.
The following detailed description will further illustrate the invention in conjunction with the above-described figures.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a detailed description of the present invention will be given below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth to provide a thorough understanding of the present invention, and the described embodiments are a part, but not all, of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
Fig. 1 is a flowchart of an intelligent contract processing method according to a first embodiment of the present invention, which may be applied in an application scenario of a Fabric-based blockchain service platform. The application scene of the blockchain service platform based on the Fabric comprises a client, a server and a blockchain network. The client is used for acquiring different operation requests of a user and sending the operation requests to a server side in the service platform for processing; the server side is in communication connection with the block chain network; and the block chain network is used for responding to the operation request of the user and returning the response result of the user request to the client.
As shown in fig. 1, an embodiment of the present invention provides an intelligent contract processing method, which is applied to an http server of a blockchain node, where the intelligent contract processing method may include the following steps:
and S11, receiving the http request sent by the client.
In at least one embodiment of the present invention, the http request refers to a request message from a client to a server, and the http request may include a data query request, an operation and maintenance request, and the like.
And S12, analyzing the URI identification in the http request.
In at least one embodiment of the present invention, the http request includes a webpage identifier (URI) in a preset format for indicating an address of the requested webpage in the blockchain intelligent contract. The webpage identification is an expression of the position and the access method of the resource which can be obtained from the internet, is the address of the standard resource on the internet, and each resource file on the internet has a unique URI.
All http requests need to be processed from http request proxy to intelligent contracts through the block chain nodes, and therefore information of the intelligent contracts to be requested needs to be marked in the webpage identification in the preset format. The preset format of the webpage identifier is preset by system personnel, for example, the preset format of the webpage identifier may be: http: // nodeip/smartcontracename and http: // nodeip/smartcontractname/xxx. The smartontactname and the smartontactname/xxx are the information of the intelligent contract to be requested, which is marked.
When an http request sent by a client is received, the http request is sent to an http server of a blockchain node, and the blockchain node can provide web service by providing an http server service for the blockchain node, so that the blockchain node can proxy the http request. The http server of the blockchain node is used for sending an http request to the http server of the corresponding intelligent contract according to the URI information carried in the received http request; and the http server of the block chain node is also used for receiving http request response data sent by the http server of the intelligent contract and outputting the http request response data to the client.
In at least one embodiment of the invention, the method further comprises: building an http server on the block chain node; acquiring a server address and a port number of the http server; and configuring the server address and the port number in the blockchain node, and taking the http server as a proxy server of the blockchain node.
Optionally, the http server is built based on node. Js is a lightweight Javascript operating environment, and has the characteristics of light weight and high efficiency because the node uses an event-driven and non-blocking I/O model.
And placing the blockchain node and the http server in a network, and configuring a server address and a port number in the blockchain node. After the configuration is completed, the http server is used as a proxy server of the block chain node, when the block chain node sends a network request to the outside, the http server must send the network request to the outside by proxy of the block chain node, and the block chain node is proxied to receive a result returned by the outside according to the network request, so that the http server is essentially used as a medium for communication between the block chain node and the outside.
In at least one embodiment of the present invention, the step of parsing out the URI identifier in the http request includes: acquiring a request message of the http request; and analyzing the request message to obtain a request method, a URI (Uniform resource identifier) identifier, a domain name and file suffix name information of the http request.
And S13, converting the URI identification into the intelligent contract URI identification.
In at least one embodiment of the present invention, the client may output requests of different users, and the requests of users having rights may be responded to accordingly. Preferably, before the step of converting the URI identification into a smart contract URI identification, the method further comprises: matching out verification information corresponding to the URI identification, wherein the verification information comprises one or more of a digital signature and user information; verifying the URI identification according to the verification information; and when the URI identification is verified to pass, converting the URI identification into an intelligent contract URI identification. The digital signature is a digital signature of the client sending the http request on the URI identification through a preset digital signature algorithm, and the preset digital signature algorithm is an algorithm preset by a user.
It is to be understood that, when the verification information is a digital signature, the step of verifying the URI identification according to the verification information includes: carrying out digital signature on the received URI identification through a preset digital signature algorithm; comparing the obtained digital signature with the digital signature carried by the URI identification, and judging whether the comparison result is consistent; and if the judgment result is consistent, the URI identification passes signature verification.
When the verification information is blacklist verification, the step of verifying the URI identification according to the verification information comprises the following steps: traversing a pre-stored user information blacklist database according to the user information carried by the URI identification; judging whether the user information carried by the URI identification is a blacklist user; and if the judgment result is negative, the URI identification passes the blacklist verification.
Preferably, a label is added to the http request, and the label is used for recording a verification information verification process of the http request and a corresponding relationship between the http request and an http server-side interface of the intelligent contract.
In at least one embodiment of the invention, the step of converting the URI identification into a smart contract URI identification comprises: acquiring a keyword at a preset position in the URI identification; matching a target intelligent contract corresponding to the keyword from an intelligent contract keyword library; acquiring a target URI identification of the target intelligent contract; and taking the target URI identification as the URI identification of the target intelligent contract.
Specifically, since the format of the URI identifier is preset by system personnel, the preset position is a position indicating the intelligent contract information to be requested. For example, the format for the URI identifier is http: if the keyword at the corresponding preset position is smartontactname, the keyword is smartontactname.
For example, assume that there is an intelligent contract for querying the old list in the intelligent contract keyword library, and the keyword corresponding to the intelligent contract is oldaicontract. And the URI identification obtained by analyzing the http request through the http server of the block chain node is as follows: http:// nodeip/oldaicontract/, obtaining the keywords in the URI identification: and traversing an intelligent contract keyword library according to the keyword to match an intelligent contract corresponding to the keyword, which is called a target intelligent contract oldaicontract, so as to determine a URI (Uniform resource identifier) of the target intelligent contract, wherein the URI of the intelligent contract is as follows: http://127.0.0.1: 398213/.
And S14, sending the http request to an http server of the intelligent contract corresponding to the intelligent contract URI identification.
In at least one embodiment of the present invention, the smart contract (smartcontact) runs in a sandbox environment and is only capable of communicating with the block link point. And sending the http request to an http server of the intelligent contract corresponding to the intelligent contract URI identification through the http server of the block chain node. The intelligent contract runs in a block chain network, and the http server service is provided for the intelligent contract by redesigning the intelligent contract, so that the intelligent contract can support the web standard service, and a user can randomly access a self-defined page of the intelligent contract through a client.
Specifically, the method for providing the http server service for the intelligent contract comprises the following steps: setting up an http server on the intelligent contract; acquiring a server address and a port number of a built http server; and configuring the server address and the port number in the intelligent contract, and taking the http server as a proxy server of the intelligent contract. Since the method for providing the http server service for the intelligent contract has the same principle as the method for providing the http server service for the block link point, the description is omitted here.
And S15, receiving intelligent contract data obtained by analyzing the http request sent by the http server of the intelligent contract.
In at least one embodiment of the present invention, the http server of the blockchain node receives the intelligent contract data obtained by analyzing the http request sent by the http server of the intelligent contract. Preferably, before the http server of the intelligent contract parses the http request to obtain the intelligent contract data, the method further includes: receiving an http request sent by an http server of the block chain node, wherein the http request carries characteristic information; inquiring a sorting strategy according to the characteristic information to obtain a sorting priority corresponding to the characteristic information; and adjusting the processing sequence of the http request according to the sequencing priority.
Specifically, the sorting policy is used to record a corresponding relationship between feature information and sorting priority, where the feature information includes one or any combination of the following: user identification, data type, equipment type information, equipment IP address and skip page information. The method comprises the steps of determining the ordering priority of the data acquisition request according to the characteristic information carried by the data acquisition request, and adjusting the processing sequence of the data acquisition request according to the ordering priority, so that the processing sequence of the data acquisition request is more reasonable, the time for a part of users to wait for data response is effectively shortened, the configuration of internal resources of the system is optimized, and the user experience is effectively improved.
In at least one embodiment of the present invention, when the http server of the intelligent contract parses the http request to obtain the intelligent contract data, the method includes the following steps: analyzing the http request through an http server of the intelligent contract, and determining a function interface of the intelligent contract to be called according to an analysis result; processing the service according to the intelligent contract on the function interface calling block chain of the intelligent contract to be called; and acquiring intelligent contract data generated by performing service processing.
In particular, the data and logic of the intelligent contract are separate, i.e., the intelligent contract includes a data contract and a behavior contract. Wherein, the data contract specially stores data, and only carries out simple data acquisition and modification; behavior contracts describe the background business processing logic specifically. Each intelligent contract hides a contract address and compiled ABI (Application Binary Interface), and is encapsulated and hidden through nodes, and only uniform function interfaces are provided for the outside. And determining a function interface of the intelligent contract to be called according to the analysis result by using the encapsulated js encapsulation code through the ABI.
And S16, sending the intelligent contract data to the client.
In at least one embodiment of the present invention, the http server of the intelligent contract sends the intelligent contract data to the blockchain node, and the http server of the blockchain node sends the intelligent contract data to the client, and the client analyzes the intelligent contract data encapsulated in the XML format to obtain the intelligent contract data. And the http server of the block chain node encapsulates the acquired intelligent contract data into XML format data and sends the XML format intelligent contract data to the client. The step of encapsulating the intelligent contract data into XML format data comprises the following steps: the embedded program code reads the intelligent contract data; defining a data structure in an XML format; and loading the intelligent contract data into a data structure in an XML format.
The embodiment of the invention provides an intelligent contract processing method, which is applied to an http server of a block chain node and used for receiving an http request sent by a client; analyzing the URI identification in the http request; converting the URI identification into a smart contract URI identification; sending the http request to an http server of the intelligent contract corresponding to the intelligent contract URI identification; receiving intelligent contract data obtained by analyzing the http request sent by an http server of the intelligent contract; and sending the intelligent contract data to the client. By the embodiment of the invention, the intelligent contract has the web access capability, so that rich data display capability and interaction experience are provided; the user can intuitively browse the block chain data of the intelligent contract through the web browser without acquiring the data of the intelligent contract in a programming calling mode; according to the invention, the API of the system is displayed in a page form, so that the communication in the development process is reduced, and the production efficiency is improved; the invention combines the web application and the block chain technology, so that the web application becomes a part of chain ecology and does not need to build the web service by itself.
As shown in fig. 2, an embodiment of the present invention provides an intelligent contract processing method, which is applied to an http server of an intelligent contract, where the intelligent contract processing method includes:
and S21, receiving an http request sent by an http server of the blockchain node.
In at least one embodiment of the present invention, an http server of the intelligent contract receives an http request sent by an http server of the blockchain node.
And S22, analyzing the http request to obtain intelligent contract data.
In at least one embodiment of the present invention, before the step of parsing the http request to obtain smart contract data, the method further includes: acquiring characteristic information carried in the http request; acquiring a sorting priority corresponding to the characteristic information; and adjusting the processing sequence of the http request according to the sequencing priority.
Specifically, the sorting policy is used to record a corresponding relationship between feature information and sorting priority, where the feature information includes one or any combination of the following: user identification, data type, equipment type information, equipment IP address and skip page information. The method comprises the steps of determining the ordering priority of the data acquisition request according to the characteristic information carried by the data acquisition request, and adjusting the processing sequence of the data acquisition request according to the ordering priority, so that the processing sequence of the data acquisition request is more reasonable, the time for a part of users to wait for data response is effectively shortened, the configuration of internal resources of the system is optimized, and the user experience is effectively improved.
The step of analyzing the http request to obtain the intelligent contract data comprises the following steps: analyzing the http request; determining a function interface of the intelligent contract to be called according to the analysis result; processing the service according to the intelligent contract on the function interface calling block chain of the intelligent contract to be called; and acquiring intelligent contract data generated by performing service processing.
In particular, the data and logic of the intelligent contract are separate, i.e., the intelligent contract includes a data contract and a behavior contract. Wherein, the data contract specially stores data, and only carries out simple data acquisition and modification; behavior contracts describe the background business processing logic specifically. Each intelligent contract hides a contract address and compiled ABI (Application Binary Interface), and is encapsulated and hidden through nodes, and only uniform function interfaces are provided for the outside. And determining a function interface of the intelligent contract to be called according to the analysis result by using the encapsulated js encapsulation code through the ABI.
And S23, sending the intelligent contract data to an http server of the block chain node.
In at least one embodiment of the present invention, the intelligent contract data is sent to the http server of the blockchain node, and the intelligent contract data is sent to the client through the http server of the blockchain node. And the client analyzes the intelligent contract data packaged into the XML format to obtain the intelligent contract data.
The embodiment of the invention provides an intelligent contract processing method, which is applied to an http server of an intelligent contract and used for receiving an http request sent by the http server of a block chain node; analyzing the http request to obtain intelligent contract data; and sending the intelligent contract data to an http server of the blockchain node. By the embodiment of the invention, the intelligent contract has the web access capability, so that rich data display capability and interaction experience are provided; the user can intuitively browse the block chain data of the intelligent contract through the web browser without acquiring the data of the intelligent contract in a programming calling mode; according to the invention, the API of the system is displayed in a page form, so that the communication in the development process is reduced, and the production efficiency is improved; the invention combines the web application and the block chain technology, so that the web application becomes a part of chain ecology and does not need to build the web service by itself.
The above is a detailed description of the method provided by the embodiments of the present invention. The order of execution of the blocks in the flowcharts shown may be changed, and some blocks may be omitted, according to various needs.
Fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present invention, and as shown in fig. 3, the computer device 1 includes a memory 10, and the intelligent contract processing apparatus 100 is stored in the memory 10. When the intelligent contract processing apparatus 100 is applied to an http server of a blockchain node, the intelligent contract processing apparatus 100 may receive an http request sent by a client; analyzing the URI identification in the http request; converting the URI identification into a smart contract URI identification; sending the http request to an http server of the intelligent contract corresponding to the intelligent contract URI identification; receiving intelligent contract data obtained by analyzing the http request sent by an http server of the intelligent contract; and sending the intelligent contract data to the client. The intelligent contract processing device 100 may also be applied to an http server of an intelligent contract, and the intelligent contract processing device 100 may receive an http request sent by the http server of a block chain node; analyzing the http request to obtain intelligent contract data; and sending the intelligent contract data to an http server of the blockchain node. By the embodiment of the invention, the intelligent contract has the web access capability, so that rich data display capability and interaction experience are provided; the user can intuitively browse the block chain data of the intelligent contract through the web browser without acquiring the data of the intelligent contract in a programming calling mode; according to the invention, the API of the system is displayed in a page form, so that the communication in the development process is reduced, and the production efficiency is improved; the invention combines the web application and the block chain technology, so that the web application becomes a part of chain ecology and does not need to build the web service by itself.
In this embodiment, the computer device 1 may further include a display screen 20 and a processor 30. The memory 10 and the display screen 20 can be electrically connected with the processor 30 respectively.
The memory 10 may be of different types of memory devices for storing various types of data. For example, the memory and the internal memory of the computer device 1 may be used, and the memory Card may be a memory Card that is externally connected to the computer device 1, such as a flash memory, an SM Card (smart media Card), an SD Card (Secure Digital Card), and the like. Further, the memory 10 may include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other non-volatile solid state storage device. The memory 10 is used for storing various types of data, for example, various types of application programs (Applications) installed in the computer device 1, data set and acquired by applying the above-described intelligent contract processing method, and the like.
A display screen 20 is mounted to the computer apparatus 1 for displaying information.
The processor 30 is used for executing the intelligent contract processing method and various types of software installed in the computer device 1, such as an operating system and application display software. The processor 30 includes, but is not limited to, a Central Processing Unit (CPU), a Micro Controller Unit (MCU), and other devices for interpreting computer instructions and processing data in computer software.
The intelligent contract processing apparatus 100 may include one or more modules stored in the memory 10 of the computer device 1 and configured to be executed by one or more processors (in this embodiment, one processor 30) to implement the embodiment of the present invention. When the intelligent contract processing apparatus 100 is applied to an http server of a blockchain node, for example, referring to fig. 4, the intelligent contract processing apparatus 100 may include an http request receiving module 101, an http request parsing module 102, a URI identification conversion module 103, an http request sending module 104, a contract data obtaining module 105, and a contract data sending module 106. The modules referred to in the embodiments of the present invention may be program segments that perform a specific function, and are more suitable than programs for describing the execution process of software in the processor 30.
It is understood that, in correspondence with the embodiments of the intelligent contract processing method described above, the computer device 1 may include some or all of the functional modules shown in fig. 4, and the functions of the modules will be described in detail below. It should be noted that the same terms, related terms, and specific explanations thereof in the above embodiments of the intelligent contract processing method may also be applied to the following functional introduction of each module. For brevity and to avoid repetition, further description is omitted.
The http request receiving module 101 may be configured to receive an http request sent by a client.
The http request parsing module 102 may be configured to parse out the URI identifier in the http request.
The URI identification conversion module 103 may be configured to convert the URI identification into a smart contract URI identification.
The http request sending module 104 may send the http request to an http server of the intelligent contract corresponding to the intelligent contract URI identifier.
The contract data obtaining module 105 may be configured to receive intelligent contract data obtained by analyzing the http request and sent by an http server of the intelligent contract.
Contract data sending module 106 may be configured to send the intelligent contract data to the client.
When the intelligent contract processing apparatus 100 is applied to an http server of an intelligent contract, the http request receiving module 101 may also be configured to receive an http request sent by the http server of a blockchain node.
The http request parsing module 102 may be further configured to parse the http request to obtain the intelligent contract data.
The contract data sending module 106 may also be configured to send the intelligent contract data to an http server of the blockchain node.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by the processor 30, implements the steps of the intelligent contract processing method in any of the above embodiments.
The intelligent contract processing apparatus 100, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, all or part of the flow in the method according to the above embodiments may be implemented by a computer program, which may be stored in a computer readable storage medium and used by the processor 30 to implement the steps of the above method embodiments. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), or the like.
The Processor 30 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. The general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like, and the processor 30 is a control center of the intelligent contract processing apparatus 100/computer device 1, and various interfaces and lines are used to connect various parts of the whole intelligent contract processing apparatus 100/computer device 1.
The memory 10 is used for storing the computer programs and/or modules, and the processor 30 implements various functions of the intelligent contract processing apparatus 100/computer device 1 by running or executing the computer programs and/or modules stored in the memory 10 and calling data stored in the memory 10. The memory 10 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data) created according to the use of the computer apparatus 1, and the like.
In the several embodiments provided in the present invention, it should be understood that the disclosed computer apparatus and method may be implemented in other ways. For example, the system embodiments described above are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
It will be evident to those skilled in the art that the embodiments of the present invention are not limited to the details of the foregoing illustrative embodiments, and that the embodiments of the present invention are capable of being embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the embodiments being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Several of the units, modules or means recited in the system, apparatus or computer device claims may also be implemented by one and the same unit, module or means in software or hardware.
Although the embodiments of the present invention have been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that various changes may be made and equivalents may be substituted without departing from the spirit and scope of the embodiments of the present invention.

Claims (10)

1. An intelligent contract processing method is applied to an http server of a block chain node, and is characterized by comprising the following steps:
receiving an http request sent by a client;
analyzing the URI identification in the http request;
converting the URI identification into a smart contract URI identification;
sending the http request to an http server of the intelligent contract corresponding to the intelligent contract URI identification;
receiving intelligent contract data obtained by analyzing the http request sent by an http server of the intelligent contract;
and sending the intelligent contract data to the client.
2. The intelligent contract processing method according to claim 1, further comprising:
building an http server on the block chain node;
acquiring a server address and a port number of the http server;
and configuring the server address and the port number in the blockchain node, and taking the http server as a proxy server of the blockchain node.
3. The intelligent contract processing method according to claim 1, wherein prior to the step of converting the URI identification to an intelligent contract URI identification, the method further comprises:
matching out verification information corresponding to the URI identification, wherein the verification information comprises one or more of a digital signature and user information;
verifying the URI identification according to the verification information;
and when the URI identification is verified to pass, converting the URI identification into an intelligent contract URI identification.
4. The intelligent contract processing method of claim 1, wherein the step of converting the URI identification to an intelligent contract URI identification comprises:
acquiring a keyword at a preset position in the URI identification;
matching a target intelligent contract corresponding to the keyword from an intelligent contract keyword library;
acquiring a target URI identification of the target intelligent contract;
and taking the target URI identification as the URI identification of the target intelligent contract.
5. The intelligent contract processing method according to claim 1, wherein prior to said sending the intelligent contract data to the client, the method further comprises:
the embedded program code reads the intelligent contract data;
defining a data structure in an XML format;
and loading the intelligent contract data into a data structure in an XML format.
6. An intelligent contract processing method is applied to an http server of an intelligent contract, and is characterized by comprising the following steps:
receiving an http request sent by an http server of a blockchain node;
analyzing the http request to obtain intelligent contract data;
and sending the intelligent contract data to an http server of the blockchain node.
7. The intelligent contract processing method according to claim 6, wherein prior to said step of parsing the http request for intelligent contract data, the method further comprises:
acquiring characteristic information carried in the http request;
acquiring a sorting priority corresponding to the characteristic information;
and adjusting the processing sequence of the http request according to the sequencing priority.
8. The intelligent contract processing method of claim 6, wherein the step of parsing the http request to obtain intelligent contract data comprises:
analyzing the http request;
determining a function interface of the intelligent contract to be called according to the analysis result;
processing the service according to the intelligent contract on the function interface calling block chain of the intelligent contract to be called;
and acquiring intelligent contract data generated by performing service processing.
9. A computer device comprising a processor for implementing an intelligent contract processing method according to any one of claims 1 to 5 or an intelligent contract processing method according to any one of claims 6 to 8 when executing a computer program stored in a memory.
10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements an intelligent contract processing method according to any one of claims 1 to 5, or implements an intelligent contract processing method according to any one of claims 6 to 8.
CN201910977369.0A 2019-10-15 2019-10-15 Intelligent contract processing method, computer equipment and storage medium Pending CN111026982A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910977369.0A CN111026982A (en) 2019-10-15 2019-10-15 Intelligent contract processing method, computer equipment and storage medium
PCT/CN2020/105942 WO2021073202A1 (en) 2019-10-15 2020-07-30 Intelligent contract processing method, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910977369.0A CN111026982A (en) 2019-10-15 2019-10-15 Intelligent contract processing method, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111026982A true CN111026982A (en) 2020-04-17

Family

ID=70204818

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910977369.0A Pending CN111026982A (en) 2019-10-15 2019-10-15 Intelligent contract processing method, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN111026982A (en)
WO (1) WO2021073202A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111984245A (en) * 2020-08-31 2020-11-24 上海玳鸽信息技术有限公司 Block chain intelligent contract online integrated development environment system and implementation method
WO2021073202A1 (en) * 2019-10-15 2021-04-22 深圳壹账通智能科技有限公司 Intelligent contract processing method, computer device and storage medium
CN112819468A (en) * 2021-02-24 2021-05-18 浙江蓝景科技有限公司 Intelligent contract processing method and device and electronic equipment
CN114338036A (en) * 2021-12-23 2022-04-12 杭州趣链科技有限公司 Data communication method and device for block chain client
WO2022193530A1 (en) * 2021-03-17 2022-09-22 深圳壹账通智能科技有限公司 Blockchain protocol stack architecture development method and system, device, and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542405B (en) * 2021-07-14 2023-10-17 广东卓启云链科技有限公司 Block chain-based network communication system, method, equipment and storage medium
CN113792103A (en) * 2021-09-17 2021-12-14 北京安天网络安全技术有限公司 Management method and device of mobile storage equipment and electronic equipment
CN113822595B (en) * 2021-10-11 2024-03-19 中国平安人寿保险股份有限公司 Method, device, computer equipment and medium for configuring financial product incentive data
CN115277147B (en) * 2022-07-21 2024-06-11 深圳壹账通智能科技有限公司 File tracing verification method, electronic equipment and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108665372A (en) * 2018-04-28 2018-10-16 腾讯科技(深圳)有限公司 Information processing, inquiry, storage method based on block chain and device
CN108777698A (en) * 2018-04-13 2018-11-09 深圳市元征科技股份有限公司 Webpage storage method, system and block chain node device
CN109033406A (en) * 2018-08-03 2018-12-18 上海点融信息科技有限责任公司 For searching for the method, apparatus and storage medium of block chain data
US20190018947A1 (en) * 2017-07-14 2019-01-17 Alibaba Group Holding Limited Login information data processing
CN109376541A (en) * 2018-09-21 2019-02-22 上海点融信息科技有限责任公司 For running the method, apparatus and computer storage medium of intelligent contract
CN109683869A (en) * 2018-12-29 2019-04-26 北京阿斯特时代科技有限公司 The development approach and device of DAPP
CN109922077A (en) * 2019-03-27 2019-06-21 北京思源互联科技有限公司 A kind of identity identifying method and its system based on block chain

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108282339B (en) * 2018-01-25 2020-10-30 中国科学院合肥物质科学研究院 Digital identity retrieving method based on intelligent contracts and self-social media
CN108717431A (en) * 2018-05-11 2018-10-30 中国科学院软件研究所 A kind of electronic evidence based on block chain deposits card, verification method and system
CN109150904A (en) * 2018-09-25 2019-01-04 深圳市佰仟金融服务有限公司 Interface service call method and terminal device
CN111026982A (en) * 2019-10-15 2020-04-17 深圳壹账通智能科技有限公司 Intelligent contract processing method, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190018947A1 (en) * 2017-07-14 2019-01-17 Alibaba Group Holding Limited Login information data processing
CN108777698A (en) * 2018-04-13 2018-11-09 深圳市元征科技股份有限公司 Webpage storage method, system and block chain node device
CN108665372A (en) * 2018-04-28 2018-10-16 腾讯科技(深圳)有限公司 Information processing, inquiry, storage method based on block chain and device
CN109033406A (en) * 2018-08-03 2018-12-18 上海点融信息科技有限责任公司 For searching for the method, apparatus and storage medium of block chain data
CN109376541A (en) * 2018-09-21 2019-02-22 上海点融信息科技有限责任公司 For running the method, apparatus and computer storage medium of intelligent contract
CN109683869A (en) * 2018-12-29 2019-04-26 北京阿斯特时代科技有限公司 The development approach and device of DAPP
CN109922077A (en) * 2019-03-27 2019-06-21 北京思源互联科技有限公司 A kind of identity identifying method and its system based on block chain

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
王文明;施重阳;王英豪;危德健;: "基于区块链技术的交易及其安全性研究", 信息网络安全, no. 05, pages 1 - 9 *
贺海武;延安;陈泽华;: "基于区块链的智能合约技术与应用综述", 计算机研究与发展, no. 11, pages 2452 - 2466 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021073202A1 (en) * 2019-10-15 2021-04-22 深圳壹账通智能科技有限公司 Intelligent contract processing method, computer device and storage medium
CN111984245A (en) * 2020-08-31 2020-11-24 上海玳鸽信息技术有限公司 Block chain intelligent contract online integrated development environment system and implementation method
CN112819468A (en) * 2021-02-24 2021-05-18 浙江蓝景科技有限公司 Intelligent contract processing method and device and electronic equipment
WO2022193530A1 (en) * 2021-03-17 2022-09-22 深圳壹账通智能科技有限公司 Blockchain protocol stack architecture development method and system, device, and storage medium
CN114338036A (en) * 2021-12-23 2022-04-12 杭州趣链科技有限公司 Data communication method and device for block chain client

Also Published As

Publication number Publication date
WO2021073202A1 (en) 2021-04-22

Similar Documents

Publication Publication Date Title
CN111026982A (en) Intelligent contract processing method, computer equipment and storage medium
JP6754011B2 (en) Methods, devices and servers for providing voice services
CN112527528A (en) Data transmission method, device and storage medium based on message queue
US20140289366A1 (en) Service providing method and system for instance hosting
CN109327490B (en) Method and server for deploying cloud service component
CN107450899B (en) Method and device for generating terminal control script
US10397051B1 (en) Configuration and testing of network-based service platform resources using a service platform specific language
CN110297944B (en) Distributed XML data processing method and system
US11695623B2 (en) Method and apparatus for binding network card in multi-network card server, and electronic device and storage medium
CN107566477B (en) Method and device for acquiring files in distributed file system cluster
CN110781180B (en) Data screening method and data screening device
CN109104368B (en) Connection request method, device, server and computer readable storage medium
Dehury et al. CCoDaMiC: a framework for coherent coordination of data migration and computation platforms
CN102984218B (en) Browser and login method thereof and system
CN108932640B (en) Method and device for processing orders
CN108512889B (en) Application response pushing method based on HTTP and proxy server
CN112035402A (en) File storage method and device and terminal equipment
CN113778499B (en) Method, apparatus, device and computer readable medium for publishing services
CN109525550B (en) Data message processing method, device and system
CN111124858A (en) Embedded point-free plug-in data processing method and system, terminal device and storage medium
CN110780915A (en) Data processing method, device and storage medium
CN115758334A (en) Cloud application access method and device, electronic equipment and storage medium
CN114285774B (en) Flow recording method and device, electronic equipment and storage medium
CN114285859B (en) Data processing method, device, equipment and storage medium for middle layer block chain service
CN115795212A (en) Page display method and device, electronic equipment and storage medium

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