CN114581241A - Intelligent contract processing method and device, processor and electronic equipment - Google Patents

Intelligent contract processing method and device, processor and electronic equipment Download PDF

Info

Publication number
CN114581241A
CN114581241A CN202210240967.1A CN202210240967A CN114581241A CN 114581241 A CN114581241 A CN 114581241A CN 202210240967 A CN202210240967 A CN 202210240967A CN 114581241 A CN114581241 A CN 114581241A
Authority
CN
China
Prior art keywords
intelligent contract
target
transaction
analysis component
configuration file
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
CN202210240967.1A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210240967.1A priority Critical patent/CN114581241A/en
Publication of CN114581241A publication Critical patent/CN114581241A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database

Abstract

The application discloses a processing method and device of an intelligent contract, a processor and electronic equipment, and relates to the technical field of block chains. The method comprises the following steps: acquiring a target intelligent contract analysis component; acquiring a target transaction configuration file of a target service according to a target intelligent contract analysis rule; processing the target transaction configuration file through a first device of the block chain node to obtain a target service intelligent contract; acquiring a first transaction message of a target service according to a target transaction configuration file; and analyzing the first transaction message according to the target intelligent contract analysis component and the target transaction configuration file to obtain a second transaction message, and processing the second transaction message according to the target service intelligent contract to execute the target service. By the method and the device, the problem of low efficiency caused by the fact that the service intelligent contract compiled based on the service processing rule in the related technology is deployed on the block chain node to execute the service is solved.

Description

Intelligent contract processing method and device, processor and electronic equipment
Technical Field
The application relates to the technical field of block chains, in particular to a processing method and device of an intelligent contract, a processor and electronic equipment.
Background
The blockchain network is a solution for realizing peer-to-peer communication by using a P2P communication technology, realizing accounting legality by using a consensus mechanism and realizing joint accounting by using a chain structure to store data. When the block chain service scene falls to the ground, deploying a service intelligent contract compiled based on a service rule to each block chain node in the block chain system, and performing transaction consensus, transaction execution and data persistence on each block chain node after receiving a transaction request of the service system. According to the change requirement of the service scene, when the service rule is changed or a service logic processing interface is newly added, an intelligent contract is required to be changed or newly added on the block chain system to meet the latest service rule. The problem of low service execution efficiency exists when a service intelligent contract compiled based on a service rule is deployed on a block chain node.
Aiming at the problem of low efficiency caused by the fact that a service intelligent contract compiled based on a service processing rule in the related technology is deployed on a block chain node to execute a service, an effective solution is not provided at present.
Disclosure of Invention
The application mainly aims to provide a processing method and device of an intelligent contract, a processor and electronic equipment, so as to solve the problem that the efficiency is low due to the fact that a business intelligent contract is compiled based on business processing rules in the related technology and the business intelligent contract is deployed on a block chain node to execute business.
In order to achieve the above object, according to one aspect of the present application, a method for processing an intelligent contract is provided. The method comprises the following steps: acquiring a target intelligent contract analysis component, wherein the target intelligent contract analysis component is an intelligent contract analysis component corresponding to a target intelligent contract analysis rule in a plurality of intelligent contract analysis components in a block chain node, and the target intelligent contract analysis rule is an analysis rule meeting the logic requirement of a target service; acquiring a target transaction configuration file of the target service according to the target intelligent contract analysis rule; processing the target transaction configuration file through the first device of the block chain node to obtain a target service intelligent contract; acquiring a first transaction message of the target service according to the target transaction configuration file, wherein the first transaction message at least comprises: the ID of the target service intelligent contract, the name of the target transaction configuration file and the ID of the target intelligent contract analysis component; and analyzing the first transaction message according to the target intelligent contract analysis component and the target transaction configuration file to obtain a second transaction message, and processing the second transaction message according to the target service intelligent contract to execute the target service.
Further, the processing the target transaction configuration file through the first device of the block chain node to obtain a target service intelligent contract includes: initiating an uploading request I of the target transaction configuration file; the first device is used for commonly recognizing the first uploading request; if the consensus passes, the transaction configuration file is stored in a transaction file storage device of the block chain node; and instantiating the target transaction configuration file to obtain the target service intelligent contract.
Further, the consensus on the first upload request by the first device includes: checking the first uploading request through an instruction checking module of the first device; if the verification is passed, generating a first block consensus message corresponding to the first uploading request through the instruction verification module, and sending the first block consensus message to each block chain node in a block chain; and performing three-stage consensus on the first uploading request through a preset algorithm.
Further, before analyzing the first transaction message according to the target intelligent contract analysis component and the target transaction configuration file to obtain a second transaction message, the method further includes: initiating a second uploading request of the first transaction message; the second device of the block chain node is used for commonly recognizing the second uploading request; and if the consensus passes, analyzing the first transaction message according to the target intelligent contract analysis component and the target transaction configuration file to obtain a second transaction message.
Further, before obtaining the target intelligent contract parsing component, the method further comprises: initializing and configuring the block chain nodes to generate an initialization configuration file, wherein the initialization configuration file is used for maintaining the intelligent contract analysis component; and loading the existing transaction configuration file and the intelligent contract analysis component to the block chain node, and adding the description information of the intelligent contract analysis component to a world state data inventory table of the first device.
Further, obtaining the target intelligent contract parsing component comprises: judging whether an intelligent contract analysis rule corresponding to an intelligent contract analysis component on the block chain node meets the logic requirement of the target service; and if the intelligent contract analysis rule corresponding to the intelligent contract analysis component meets the logic requirement of the target service, taking the intelligent contract analysis component corresponding to the target intelligent contract analysis rule meeting the logic requirement of the target service as the target intelligent contract analysis component.
Further, the method further comprises: if the intelligent contract analysis rule corresponding to the intelligent contract analysis component cannot meet the logic requirement of the target service, compiling the target intelligent contract analysis rule according to the logic requirement of the target service, and generating a target intelligent contract analysis component corresponding to the target intelligent contract analysis rule; uploading the target intelligent contract parsing component to the blockchain node; adopting a first device of the block chain node to identify the target intelligent contract analysis component; if the consensus passes, configuring an ID for the target intelligent contract analysis component through the first device, and storing the target intelligent contract analysis component to a rule analysis device of the block chain node; and adding the description information of the target intelligent contract analysis component into the world state data list table.
Further, after saving the target intelligent contract parsing component to the rule parsing device of the blockchain node, the method further comprises: if the updating operation of the target intelligent contract analysis component in the rule analysis device is detected; responding to the updating operation, updating the target intelligent contract analysis component to obtain an updated target intelligent contract analysis component; and storing the updated target intelligent contract analysis component into the rule analysis device.
In order to achieve the above object, according to another aspect of the present application, there is provided a processing apparatus for an intelligent contract. The device includes: the system comprises a first obtaining unit, a second obtaining unit and a third obtaining unit, wherein the first obtaining unit is used for obtaining a target intelligent contract analysis component, the target intelligent contract analysis component is an intelligent contract analysis component corresponding to a target intelligent contract analysis rule in a plurality of intelligent contract analysis components in a block chain node, and the target intelligent contract analysis rule is an analysis rule meeting the logic requirement of a target service; the second acquisition unit is used for acquiring a target transaction configuration file of the target service according to the target intelligent contract analysis rule; the first processing unit is used for processing the target transaction configuration file through a first device of the block chain node to obtain a target service intelligent contract; a third obtaining unit, configured to obtain a first transaction packet of the target service according to the target transaction configuration file, where the first transaction packet at least includes: the ID of the target service intelligent contract, the name of the target transaction configuration file and the ID of the target intelligent contract analysis component; and the second processing unit is used for analyzing and processing the first transaction message according to the target intelligent contract analysis component and the target transaction configuration file to obtain a second transaction message, and processing the second transaction message according to the target service intelligent contract to execute the target service.
Further, the first processing unit includes: the initiating module is used for initiating an uploading request I of the target transaction configuration file; the consensus module is used for performing consensus on the first uploading request through the first device; the storage module is used for storing the transaction configuration file to a transaction file storage device of the block chain node if the consensus passes; and the first processing module is used for instantiating the target transaction configuration file to obtain the target service intelligent contract.
Further, the consensus module comprises: the verification submodule is used for verifying the first uploading request through an instruction verification module of the first device; the generation submodule is used for generating a first block consensus message corresponding to the first uploading request through the instruction checking module if the checking is passed, and sending the first block consensus message to each block chain node in the block chain; and the consensus submodule is used for performing three-stage consensus on the first uploading request through a preset algorithm.
Further, the apparatus further comprises: the initiating unit is used for initiating a second uploading request of the first transaction message before analyzing the first transaction message according to the target intelligent contract analyzing component and the target transaction configuration file to obtain a second transaction message; a first consensus unit, configured to perform consensus on the second upload request through a second device of the blockchain node; and the third processing unit is used for analyzing and processing the first transaction message according to the target intelligent contract analysis component and the target transaction configuration file if the consensus passes, so as to obtain the second transaction message.
Further, the apparatus further comprises: the generating unit is used for performing initialization configuration on the block chain nodes before acquiring a target intelligent contract analysis component and generating an initialization configuration file, wherein the initialization configuration file is used for maintaining the intelligent contract analysis component; and the loading unit is used for loading the existing transaction configuration file and the intelligent contract analysis component to the block chain node and adding the description information of the intelligent contract analysis component to the world state data inventory table of the first device.
Further, the first acquisition unit includes: the judging module is used for judging whether an intelligent contract analysis rule corresponding to an intelligent contract analysis component on the block chain node meets the logic requirement of the target service; and the determining module is used for taking the intelligent contract analysis component corresponding to the target intelligent contract analysis rule meeting the logic requirement of the target service as the target intelligent contract analysis component if the intelligent contract analysis rule corresponding to the intelligent contract analysis component meets the logic requirement of the target service.
Further, the apparatus further comprises: the compiling unit is used for compiling the target intelligent contract analysis rule according to the logic requirement of the target service and generating a target intelligent contract analysis component corresponding to the target intelligent contract analysis rule if the intelligent contract analysis rule corresponding to the intelligent contract analysis component cannot meet the logic requirement of the target service; the uploading unit is used for uploading the target intelligent contract analysis component to the block chain node; the second consensus unit is used for adopting the first device of the block chain node to perform consensus on the target intelligent contract analysis component; a configuration unit, configured to configure, if the consensus passes, an ID for the target intelligent contract analysis component by the first device, and store the target intelligent contract analysis component to the rule analysis device of the block chain node; and the adding unit is used for adding the description information of the target intelligent contract analysis component into the world state data inventory table.
Further, the apparatus further comprises: the detection unit is used for storing the target intelligent contract analysis component to a rule analysis device of the block chain node, and if the update operation of the target intelligent contract analysis component in the rule analysis device is detected; the updating unit is used for responding to the updating operation and updating the target intelligent contract analysis component to obtain an updated target intelligent contract analysis component; and the storage unit is used for storing the updated target intelligent contract analysis component into the rule analysis device.
In order to achieve the above object, according to one aspect of the present application, there is provided a processor configured to execute a program, where the program executes a processing method of an intelligent contract according to any one of the above items.
To achieve the above object, according to one aspect of the present application, there is provided an electronic device including one or more processors and a memory, the memory storing processing methods for the one or more processors to implement the intelligent contracts of any one of the above.
Through the application, the following steps are adopted: acquiring a target intelligent contract analysis component; acquiring a target transaction configuration file of a target service according to a target intelligent contract analysis rule; processing the target transaction configuration file through a first device of the block chain node to obtain a target service intelligent contract; acquiring a first transaction message of a target service according to a target transaction configuration file; the method comprises the steps of analyzing and processing a first transaction message according to a target intelligent contract analysis component and a target transaction configuration file to obtain a second transaction message, and processing the second transaction message according to a target service intelligent contract to execute a target service, so that the problem of low efficiency caused by the fact that a service intelligent contract compiled based on a service processing rule in the related technology is deployed on a block chain node to execute the service is solved. The target transaction configuration file aiming at the target service is obtained through the target intelligent contract analysis rule, the target transaction configuration file is processed through the first device of the block chain node to obtain the target service intelligent contract, then the target service intelligent contract executes the target service according to the target intelligent contract analysis component and the target transaction configuration file, the service intelligent contract compiled based on the service processing rule is avoided, and the effect of improving the efficiency is achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, are included to provide a further understanding of the application, and the description of the exemplary embodiments of the application are intended to be illustrative of the application and are not intended to limit the application. In the drawings:
FIG. 1 is a flow chart of a method for processing an intelligent contract according to an embodiment of the application;
FIG. 2 is a flow chart of an alternative method for processing intelligent contracts provided according to an embodiment of the application;
FIG. 3 is a schematic diagram of a processing system for an optional intelligent contract provided according to an embodiment of the present application;
fig. 4 is a schematic diagram of an alternative blockchain node provided in accordance with an embodiment of the present application;
FIG. 5 is a schematic diagram of processing apparatus for an intelligent contract provided according to an embodiment of the present application;
fig. 6 is a schematic diagram of an electronic device provided according to an embodiment of the present application.
Detailed Description
It should be noted that, in the present application, the embodiments and features of the embodiments may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. 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 application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The present invention is described below with reference to preferred implementation steps, and fig. 1 is a flowchart of a processing method of an intelligent contract according to an embodiment of the present application, as shown in fig. 1, the method includes the following steps:
step S101, a target intelligent contract analysis component is obtained, wherein the target intelligent contract analysis component is an intelligent contract analysis component corresponding to a target intelligent contract analysis rule in a plurality of intelligent contract analysis components in a block chain node, and the target intelligent contract analysis rule is an analysis rule meeting the logic requirement of a target service.
Specifically, a business chain is established aiming at a target business to be executed, the business chain is composed of a plurality of block chain nodes, a plurality of intelligent contract analysis components and a plurality of transaction configuration files are deployed on the block chain nodes, the target intelligent contract components are obtained in the intelligent contract analysis components, analysis rules corresponding to the target intelligent contract analysis components are target intelligent contract analysis rules, and the target intelligent contract analysis rules can meet the logic requirements of the target business. The storage format of the intelligent contract rule analysis component is as follows: component ID component name component update time component description configuration examples. For example:
module000001 numAdd 20211015 numeric type add "module 000001 interface field";
module000002 numSub 20211015 numeric type minus "module 000002 interface field";
the module000005 strAppend 20211015 string type accumulates "module 000005 interface field".
And step S102, acquiring a target transaction configuration file of the target service according to the target intelligent contract analysis rule.
Specifically, a target transaction configuration file for the target service is obtained according to the target intelligent contract analysis rule. The target transaction configuration file can be an existing transaction configuration file on a block chain node, and if the existing transaction configuration file on the block chain node cannot realize a target service, a new transaction configuration file can be compiled according to a target intelligent contract analysis rule. The target transaction configuration file comprises the ID of the target intelligent contract analysis component, the transaction type, the transaction amount, account information of both transaction parties and the like.
And step S103, processing the target transaction configuration file through the first device of the block link node to obtain a target service intelligent contract.
Specifically, a first device (e.g., a system contract consensus and execution device) of the blockchain node is used for consensus and instantiation of a target transaction configuration file, so that a service intelligent contract for a target service is obtained.
Step S104, acquiring a first transaction message of the target service according to the target transaction configuration file, wherein the first transaction message at least comprises: an ID of the target business intelligence contract, a name of the target transaction profile, and an ID of the target intelligence contract parsing component.
Specifically, a first transaction message of the target service is assembled according to the target intelligent contract transaction configuration file. For example, if the balance of the 3 rd-quarter work party fund withdrawal of an account is increased by 10 ten thousand yuan, the content of the first transaction message is as follows: { "dsrName": "lucusaCCount (name of target transaction Profile)"
“module0”:{
"module ID": module000005 (target Intelligent contract parsing component ID) ";
“fildName”:“communication”;
"filmvalue": 3 quarterly workshop fund "};
“module1”:{
"module ID": module000001 (target Intelligent contract parsing component ID) ";
"filename" account (account name) ";
"filmvalue": 100000 (transaction amount) };
“module2”:{
"module ID": module000002 (target Intelligent contract parsing component ID) ";
"filename" account (account name) ";
“fildValue”:0}
}。
and step S105, analyzing the first transaction message according to the target intelligent contract analysis component and the target transaction configuration file to obtain a second transaction message, and processing the second transaction message according to the target service intelligent contract to execute the target service.
Specifically, according to the target intelligent contract analysis component and the target transaction configuration file, the first transaction message is analyzed and processed to obtain a second transaction message which can be processed by the target service intelligent contract, and the second transaction message is processed through the target service intelligent contract to execute the target service.
In summary, a target transaction configuration file for a target service is obtained through a target intelligent contract analysis rule, the target transaction configuration file is processed through a first device of a block chain node to obtain a target service intelligent contract, and then the target service intelligent contract executes the target service according to a target intelligent contract analysis component and the target transaction configuration file, so that a service intelligent contract compiled based on a service processing rule is avoided, service intelligent contract upgrading can be realized only by updating the transaction configuration file or adding an intelligent contract analysis component, and the service processing efficiency is improved.
Optionally, in the method for processing an intelligent contract provided in the embodiment of the present application, the processing a target transaction configuration file through a first device of a blockchain node to obtain a target service intelligent contract includes: initiating an uploading request I of a target transaction configuration file; the first device is used for commonly recognizing the first uploading request; if the common identification passes, the transaction configuration file is stored in a transaction file storage device of the block link point; and instantiating the target transaction configuration file to obtain the target service intelligent contract.
Specifically, an upload request for a target transaction profile may be initiated by the operation and maintenance management system, the upload request for the target transaction profile may be agreed upon by a first device (e.g., a system contract agreement and execution device) on the blockchain, if the agreement passes, the target transaction profile may be saved to a transaction profile storage device at a blockchain link point, and the target transaction profile name may be updated to the world state data for subsequent use. The block link node instantiates the target transaction profile as a corresponding target business intelligence contract. Through the steps, the block chain node can be ensured to smoothly execute the target service.
Optionally, in the method for processing an intelligent contract provided in the embodiment of the present application, consensus is performed on a first upload request by a first device, where the consensus includes: verifying the first uploading request through an instruction verification module of the first device; if the verification is passed, generating a first block consensus message corresponding to the uploading request through the instruction verification module, and sending the first block consensus message to each block chain node in the block chain; and performing three-stage consensus on the first uploading request through a preset algorithm.
Specifically, the consensus on the upload request includes: the method comprises the steps of performing parameter verification on an upload request through an instruction verification module of a first device (for example, a system contract consensus and execution device), generating a first block consensus message corresponding to the upload request after the parameter verification is passed, sending the first block consensus message to each block chain node in a block chain to realize consensus work, performing three consensus processes on the first upload request by using a Byzantine consensus algorithm (namely the preset algorithm), wherein the first stage is pre-match consensus, the second stage is prefix consensus, the third stage is commit consensus, the three stages are sequentially executed, after consistency confirmation messages of 2f +1 other block chain nodes are cumulatively received in the current stage, the consensus in the current stage is completed and enters the next stage, and after all the consensus in the three stages is completed, the request is legal. Wherein, f represents the number of the supportable fault-tolerant nodes, and the minimum value is 1. Through the operation, the legality and the safety of the uploading request are ensured.
Optionally, in the method for processing an intelligent contract provided in this embodiment of the present application, before analyzing and processing the first transaction packet according to the target intelligent contract analysis component and the target transaction configuration file to obtain the second transaction packet, the method further includes: initiating a second uploading request of the first transaction message; the second device of the block chain node identifies the second uploading request; and if the consensus passes, analyzing the first transaction message according to the target intelligent contract analysis component and the target transaction configuration file to obtain a second transaction message.
Specifically, the service system may initiate an upload request of the first transaction packet, the upload request of the first transaction packet also needs to be processed by consensus, the operation request and the service request can be executed only if the consensus passes, and the execution result can be used as legal data and persisted. Therefore, the second device (for example, a service contract consensus and execution device) of the blockchain node performs consensus on the second upload request, and the second transaction message is obtained by analyzing and processing the first transaction message after the consensus is passed. Through the analysis and processing of the first transaction message, the target service intelligent contract can successfully execute the target service.
Optionally, in the method for processing an intelligent contract provided in the embodiment of the present application, before obtaining the target intelligent contract parsing component, the method further includes: initializing and configuring the block link points to generate an initialization configuration file, wherein the initialization configuration file is used for maintaining an intelligent contract analysis component; and loading the existing transaction configuration file and the intelligent contract analysis component to the block link points, and adding the description information of the intelligent contract analysis component to the world state data inventory table of the first device.
Specifically, each block chain node performs initialization configuration to obtain an initialization configuration file. And then loading the existing transaction configuration file and the information of the intelligent contract analysis component to a block chain node, and adding the description information of the intelligent contract analysis component to a world state data inventory table. Through the operation, when the target service needs to be executed, the existing intelligent contract analysis rule can be inquired, and the target transaction configuration file can be conveniently acquired subsequently.
Optionally, in the method for processing an intelligent contract provided in the embodiment of the present application, acquiring a target intelligent contract parsing component includes: judging whether an intelligent contract analysis rule corresponding to an intelligent contract analysis component on a block chain node meets the logic requirement of the target service; and if the intelligent contract analysis rule corresponding to the intelligent contract analysis component meets the logic requirement of the target service, taking the intelligent contract analysis component corresponding to the target intelligent contract analysis rule meeting the logic requirement of the target service as the target intelligent contract analysis component.
Specifically, it is first determined whether an intelligent contract parsing rule corresponding to an existing intelligent contract parsing component can meet a logic requirement of a target service to be executed. And if the logic requirements of the target service can be met, directly taking the intelligent contract analysis component corresponding to the target intelligent contract analysis rule meeting the logic requirements of the target service as the target intelligent contract analysis component. Through the steps, the existing intelligent contract analysis component can be directly called, the workload of a user is reduced, and the execution efficiency of the task is improved.
Optionally, in the method for processing an intelligent contract provided in the embodiment of the present application, the method further includes: if the intelligent contract analysis rule corresponding to the intelligent contract analysis component cannot meet the logic requirement of the target service, writing the target intelligent contract analysis rule according to the logic requirement of the target service, and generating a target intelligent contract analysis component corresponding to the target intelligent contract analysis rule; uploading a target intelligent contract analysis component to a block chain node; adopting a first device of a block chain node to carry out consensus on a target intelligent contract analysis component; if the consensus passes, configuring an ID for the target intelligent contract analysis component through the first device, and storing the target intelligent contract analysis component to a rule analysis device of the block link point; and adding the description information of the target intelligent contract analysis component into the world state data list table.
Specifically, when the current intelligent contract analysis rule corresponding to the existing intelligent contract analysis component cannot meet the logic requirement of the target service to be executed, the target intelligent contract analysis rule is written according to the logic requirement of the target service, and the target intelligent contract analysis component corresponding to the target intelligent contract analysis rule is generated. Then uploading the target intelligent contract analysis component to a block chain node, wherein a first device (for example, a system contract consensus and execution device) of the block chain node performs consensus on the target intelligent contract analysis component, and generates a unique ID of the target intelligent contract analysis component after the consensus passes; and finally, storing the target intelligent contract analysis component in the rule analysis device and adding the description information of the target intelligent contract analysis component into the world state data list table. Through the steps, the situation that the target service cannot be executed when the existing intelligent contract analysis rule cannot meet the logic requirement of the target service to be executed is avoided.
Optionally, in the processing method of an intelligent contract provided in the embodiment of the present application, after saving the target intelligent contract parsing component to the rule parsing device of the block link point, the method further includes: if the updating operation of the target intelligent contract analysis component in the rule analysis device is detected; responding to the updating operation, and updating the target intelligent contract analysis component to obtain an updated target intelligent contract analysis component; and storing the updated target intelligent contract analysis component into the rule analysis device.
Specifically, when only the type of some data is changed, it is troublesome to reconstruct the intelligent contract analysis component, and then an update operation may be performed on the target intelligent contract analysis component, and the updated target intelligent contract analysis component is saved in the rule analysis device.
According to the intelligent contract processing method provided by the embodiment of the application, a target intelligent contract analysis component is obtained; acquiring a target transaction configuration file of a target service according to a target intelligent contract analysis rule; processing the target transaction configuration file through a first device of the block chain node to obtain a target service intelligent contract; acquiring a first transaction message of a target service according to a target transaction configuration file; the method comprises the steps of analyzing and processing a first transaction message according to a target intelligent contract analysis component and a target transaction configuration file to obtain a second transaction message, and processing the second transaction message according to a target service intelligent contract to execute a target service, so that the problem of low efficiency caused by the fact that a service intelligent contract compiled based on a service processing rule in the related technology is deployed on a block chain node to execute the service is solved. The target transaction configuration file aiming at the target service is obtained through the target intelligent contract analysis rule, the target transaction configuration file is processed through the first device of the block chain node to obtain the target service intelligent contract, then the target service intelligent contract executes the target service according to the target intelligent contract analysis component and the target transaction configuration file, the service intelligent contract compiled based on the service processing rule is avoided, and the effect of improving the efficiency is achieved.
As shown in fig. 2, according to the flowchart of the optional intelligent contract processing method provided in the embodiment of the present application, in S201, a service chain is established according to a target service requirement, a block chain node is initialized after being started, an initial configuration file is generated, an existing transaction configuration file and intelligent contract parsing component information are loaded in the block chain node, and it is determined whether an intelligent contract parsing rule can meet a logic requirement of the target service. S202A, when the existing intelligent contract analysis rule meets the logic requirement of the target service, the intelligent contract transaction configuration file is compiled according to the intelligent contract analysis rule, and a transaction configuration file uploading request is initiated. S202B, when the existing intelligent contract analysis rule can not meet the logic requirement of the target service, writing a new intelligent contract analysis rule according to the logic requirement of the target service, acquiring a corresponding intelligent contract analysis component, and initiating an intelligent contract analysis component uploading request. And S203, the system contract consensus and execution device performs consensus on the intelligent contract analysis component uploading request, configures a unique ID for the intelligent contract analysis component after the consensus passes, and stores the intelligent contract analysis component in the rule analysis device. Then writing an intelligent contract transaction configuration file and initiating an uploading request of the transaction configuration file. And S204, the system contract consensus and the execution device perform consensus on the uploading request of the transaction configuration file, the name of the transaction configuration file is updated to the world state data after the consensus is passed, and the transaction configuration file is stored in the transaction file storage device. S205, according to the intelligent contract transaction configuration file, a first transaction message is obtained, and the first transaction message is uploaded to the block link point. And S206, loading the transaction configuration file from the transaction file storage device according to the ID of the transaction configuration file in the first transaction message, and loading the corresponding intelligent contract analysis component according to the ID of the intelligent contract analysis component in the first transaction message. And S207, analyzing and processing the first transaction message according to the transaction configuration file and the intelligent contract analysis component to obtain a second transaction message, and processing the second transaction message through the service intelligent contract to execute the target service.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the present application further provides a processing apparatus for an intelligent contract, and it should be noted that the processing apparatus for an intelligent contract according to the embodiment of the present application may be used to execute the processing method for an intelligent contract provided in the embodiment of the present application. The following describes a processing apparatus for an intelligent contract provided in an embodiment of the present application.
Fig. 3 is a schematic diagram of a processing device of an intelligent contract according to an embodiment of the present application. As shown in fig. 3, the apparatus includes: a first acquisition unit 301, a second acquisition unit 302, a first processing unit 303, a third acquisition unit 304, and a second processing unit 305.
The first obtaining unit 301 is configured to obtain a target intelligent contract analysis component, where the target intelligent contract analysis component is an intelligent contract analysis component corresponding to a target intelligent contract analysis rule in multiple intelligent contract analysis components in a block link node, and the target intelligent contract analysis rule is an analysis rule that meets a logic requirement of a target service.
The second obtaining unit 302 is configured to obtain a target transaction configuration file of a target service according to a target intelligent contract parsing rule.
The first processing unit 303 is configured to process the target transaction configuration file through the first device of the blockchain node to obtain the target service intelligent contract.
A third obtaining unit 304, configured to obtain a first transaction message of a target service according to a target transaction configuration file, where the first transaction message at least includes: an ID of the target business intelligence contract, a name of the target transaction profile, and an ID of the target intelligence contract parsing component.
The second processing unit 305 is configured to analyze the first transaction message according to the target intelligent contract analysis component and the target transaction configuration file to obtain a second transaction message, and process the second transaction message according to the target service intelligent contract to execute the target service.
The processing device of the intelligent contract provided by the embodiment of the application acquires a target intelligent contract analysis component through the first acquisition unit 301, wherein the target intelligent contract analysis component is an intelligent contract analysis component corresponding to a target intelligent contract analysis rule in a plurality of intelligent contract analysis components in a block chain node, and the target intelligent contract analysis rule is an analysis rule meeting the logic requirement of a target service; the second obtaining unit 302 obtains a target transaction configuration file of a target service according to the target intelligent contract analysis rule; the first processing unit 303 processes the target transaction configuration file through the first device of the block link node to obtain a target service intelligent contract; the third obtaining unit 304 obtains a first transaction message of the target service according to the target transaction configuration file, where the first transaction message at least includes: the ID of the target service intelligent contract, the name of the target transaction configuration file and the ID of the target intelligent contract analysis component; the second processing unit 305 parses the first transaction message according to the target intelligent contract parsing component and the target transaction configuration file to obtain a second transaction message, and processes the second transaction message according to the target service intelligent contract to execute the target service, thereby solving the problem of low efficiency caused by the fact that the service intelligent contract is compiled based on the service processing rule in the related art and the service intelligent contract is deployed on the block chain node to execute the service. The target transaction configuration file aiming at the target service is obtained through the target intelligent contract analysis rule, the target transaction configuration file is processed through the first device of the block chain node to obtain the target service intelligent contract, then the target service intelligent contract executes the target service according to the target intelligent contract analysis component and the target transaction configuration file, the service intelligent contract compiled based on the service processing rule is avoided, and the effect of improving the efficiency is achieved.
Optionally, in the processing apparatus of the intelligent contract provided in the embodiment of the present application, the first processing unit 302 includes: the system comprises an initiating module, a processing module and a processing module, wherein the initiating module is used for initiating an uploading request I of a target transaction configuration file; the consensus module is used for performing consensus on the first uploading request through the first device; the storage module is used for storing the transaction configuration file to a transaction file storage device of the block link point if the consensus passes; and the first processing module is used for instantiating the target transaction configuration file to obtain the target service intelligent contract.
Optionally, in the processing apparatus of an intelligent contract provided in an embodiment of the present application, the consensus module includes: the verification submodule is used for verifying the first uploading request through an instruction verification module of the first device; the generation submodule is used for generating a first block consensus message corresponding to the first uploading request through the instruction verification module if the verification is passed, and sending the first block consensus message to each block chain node in the block chain; and the consensus submodule is used for performing three-stage consensus on the first uploading request through a preset algorithm.
Optionally, in the apparatus for processing an intelligent contract provided in this embodiment of the present application, the apparatus further includes: the initiating unit is used for initiating a second uploading request of the first transaction message before analyzing the first transaction message according to the target intelligent contract analysis component and the target transaction configuration file to obtain a second transaction message; the first consensus unit is used for performing consensus on the second uploading request through a second device of the block chain node; and the third processing unit is used for analyzing and processing the first transaction message according to the target intelligent contract analysis component and the target transaction configuration file if the consensus passes, so as to obtain a second transaction message.
Optionally, in the apparatus for processing an intelligent contract provided in this embodiment of the present application, the apparatus further includes: the generating unit is used for performing initialization configuration on the block link points before acquiring the target intelligent contract analysis component to generate an initialization configuration file, wherein the initialization configuration file is used for maintaining the intelligent contract analysis component; and the loading unit is used for loading the existing transaction configuration file and the intelligent contract analysis component to the block link point and adding the description information of the intelligent contract analysis component to the world state data inventory table of the first device.
Optionally, in the apparatus for processing an intelligent contract provided in the embodiment of the present application, the first obtaining unit 301 includes: the judging module is used for judging whether the intelligent contract analysis rule corresponding to the intelligent contract analysis component on the block link point meets the logic requirement of the target service; and the determining module is used for taking the intelligent contract analysis component corresponding to the target intelligent contract analysis rule meeting the logic requirement of the target service as the target intelligent contract analysis component if the intelligent contract analysis rule corresponding to the intelligent contract analysis component meets the logic requirement of the target service.
Optionally, in the apparatus for processing an intelligent contract provided in an embodiment of the present application, the apparatus further includes: the compiling unit is used for compiling the target intelligent contract analysis rule according to the logic requirement of the target service and generating the target intelligent contract analysis component corresponding to the target intelligent contract analysis rule if the intelligent contract analysis rule corresponding to the intelligent contract analysis component cannot meet the logic requirement of the target service; the uploading unit is used for uploading the target intelligent contract analysis component to the block chain node; the second consensus unit is used for adopting the first device of the block chain node to perform consensus on the target intelligent contract analysis component; the configuration unit is used for configuring the ID for the target intelligent contract analysis component through the first device if the consensus passes, and storing the target intelligent contract analysis component to the rule analysis device of the block link point; and the adding unit is used for adding the description information of the target intelligent contract analysis component into the world state data list table.
Optionally, in the apparatus for processing an intelligent contract provided in an embodiment of the present application, the apparatus further includes: the detection unit is used for storing the target intelligent contract analysis component to the rule analysis device of the block chain node point, and if the update operation of the target intelligent contract analysis component in the rule analysis device is detected; the updating unit is used for responding to the updating operation and updating the target intelligent contract analysis component to obtain an updated target intelligent contract analysis component; and the storage unit is used for storing the updated target intelligent contract analysis component into the rule analysis device.
The processing device of the smart contract comprises a processor and a memory, wherein the first acquiring unit 301, the second acquiring unit 302, the first processing unit 303, the third acquiring unit 304, the second processing unit 305 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more, and the deployment of the business intelligent contract is realized by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
Fig. 4 is a schematic diagram of a processing system for an optional intelligent contract provided according to an embodiment of the present application. Fig. 5 is a schematic diagram of an optional blockchain node provided according to an embodiment of the present application. The processing system and the blockchain node of the intelligent contract can be used for executing the processing method for the intelligent contract provided by the embodiment of the application. The processing system comprises a service chain 1, a block chain node 2, an operation and maintenance management system 3 and a service system 4. The block chain node comprises a transaction routing device 11, a system contract consensus and execution device 12, a service contract consensus and execution device 13, a rule analysis device 14 and a transaction file storage device 15. The transaction routing device 11 is responsible for receiving an intelligent contract analysis component initiated by the operation and maintenance management system 3, an upload request of a transaction configuration file, and a service execution request initiated by the service system 4. The transaction routing device 11 forwards an intelligent contract analysis component operation request and a transaction configuration file operation request initiated by the operation and maintenance management system 3 to the system contract consensus and execution device 12; the transaction routing means 11 forwards the service request initiated by the service system 4 to the service contract consensus and enforcement means 13.
The system contract consensus and execution device 12 is responsible for performing work such as maintenance of the intelligent contract analysis component, operation of the intelligent contract analysis component, and updating of the intelligent contract transaction configuration file. The system contract consensus and execution device 12 comprises an instruction checking module 121, an instruction consensus module 122 and a persistence module 123. The instruction checking module 121 and the instruction consensus module 122 complete checking and consensus of the operation requests, and the persistence module 123 performs final execution processing on the operation requests that pass the consensus.
The service contract consensus and execution device 13 is responsible for performing validity check on the service request initiated by the service system 4 and invoking the transaction configuration file and the intelligent contract analysis component to execute the service according to the requirement. The service contract consensus and execution device 13 includes a transaction verification module 131, a transaction consensus module 132, and a persistence module 133. The transaction checking module 131 and the transaction consensus module 132 complete the checking and consensus of the service request, and the persistence module 133 performs final execution processing on the service request passing the consensus.
The embodiment of the invention provides a processor, which is used for running a program, wherein the processing method of the intelligent contract is executed when the program runs.
As shown in fig. 6, an embodiment of the present invention provides an electronic device, where the device includes a processor, a memory, and a program stored in the memory and executable on the processor, and the processor executes the program to implement the following steps: acquiring a target intelligent contract analysis component, wherein the target intelligent contract analysis component is an intelligent contract analysis component corresponding to a target intelligent contract analysis rule in a plurality of intelligent contract analysis components in a block chain node, and the target intelligent contract analysis rule is an analysis rule meeting the logic requirement of a target service; acquiring a target transaction configuration file of a target service according to a target intelligent contract analysis rule; processing the target transaction configuration file through a first device of the block chain node to obtain a target service intelligent contract; acquiring a first transaction message of a target service according to a target transaction configuration file, wherein the first transaction message at least comprises: the ID of the target service intelligent contract, the name of the target transaction configuration file and the ID of the target intelligent contract analysis component; and analyzing the first transaction message according to the target intelligent contract analysis component and the target transaction configuration file to obtain a second transaction message, and processing the second transaction message according to the target service intelligent contract to execute the target service.
Optionally, the processing the target transaction configuration file by the first device of the blockchain node to obtain the target service intelligent contract includes: initiating an uploading request I of a target transaction configuration file; the first device is used for commonly recognizing the first uploading request; if the common identification passes, the transaction configuration file is stored in a transaction file storage device of the block link point; and instantiating the target transaction configuration file to obtain the target service intelligent contract.
Optionally, the consensus on the upload request one by the first device includes: verifying the first uploading request through an instruction verification module of the first device; if the verification is passed, generating a first block consensus message corresponding to the uploading request through the instruction verification module, and sending the first block consensus message to each block chain node in the block chain; and performing three-stage consensus on the first uploading request through a preset algorithm.
Optionally, before analyzing the first transaction message according to the target intelligent contract analysis component and the target transaction configuration file to obtain a second transaction message, the method further includes: initiating a second uploading request of the first transaction message; the second device of the block chain node identifies the second uploading request; and if the consensus passes, analyzing the first transaction message according to the target intelligent contract analysis component and the target transaction configuration file to obtain a second transaction message.
Optionally, before obtaining the target intelligent contract parsing component, the method further comprises: initializing and configuring the block link points to generate an initialization configuration file, wherein the initialization configuration file is used for maintaining an intelligent contract analysis component; and loading the existing transaction configuration file and the intelligent contract analysis component to the block link points, and adding the description information of the intelligent contract analysis component to the world state data inventory table of the first device.
Optionally, the obtaining a target intelligent contract parsing component comprises: judging whether an intelligent contract analysis rule corresponding to an intelligent contract analysis component on a block chain node meets the logic requirement of the target service; and if the intelligent contract analysis rule corresponding to the intelligent contract analysis component meets the logic requirement of the target service, taking the intelligent contract analysis component corresponding to the target intelligent contract analysis rule meeting the logic requirement of the target service as the target intelligent contract analysis component.
Optionally, the method further comprises: if the intelligent contract analysis rule corresponding to the intelligent contract analysis component cannot meet the logic requirement of the target service, writing the target intelligent contract analysis rule according to the logic requirement of the target service, and generating a target intelligent contract analysis component corresponding to the target intelligent contract analysis rule; uploading a target intelligent contract analysis component to a block chain node; adopting a first device of a block chain node to carry out consensus on a target intelligent contract analysis component; if the consensus passes, configuring an ID for the target intelligent contract analysis component through the first device, and storing the target intelligent contract analysis component to a rule analysis device of the block link point; and adding the description information of the target intelligent contract analysis component into the world state data list table.
Optionally, after saving the target intelligent contract parsing component to the rule parsing device of the block link point, the method further comprises: if the updating operation of the target intelligent contract analysis component in the rule analysis device is detected; responding to the updating operation, and updating the target intelligent contract analysis component to obtain an updated target intelligent contract analysis component; and storing the updated target intelligent contract analysis component into the rule analysis device. The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: acquiring a target intelligent contract analysis component, wherein the target intelligent contract analysis component is an intelligent contract analysis component corresponding to a target intelligent contract analysis rule in a plurality of intelligent contract analysis components in a block chain node, and the target intelligent contract analysis rule is an analysis rule meeting the logic requirement of a target service; acquiring a target transaction configuration file of a target service according to a target intelligent contract analysis rule; processing the target transaction configuration file through a first device of the block chain node to obtain a target service intelligent contract; acquiring a first transaction message of a target service according to a target transaction configuration file, wherein the first transaction message at least comprises: the ID of the target service intelligent contract, the name of the target transaction configuration file and the ID of the target intelligent contract analysis component; and analyzing the first transaction message according to the target intelligent contract analysis component and the target transaction configuration file to obtain a second transaction message, and processing the second transaction message according to the target service intelligent contract to execute the target service.
Optionally, the processing the target transaction configuration file by the first device of the blockchain node to obtain the target service intelligent contract includes: initiating an uploading request I of a target transaction configuration file; the first device is used for commonly recognizing the first uploading request; if the common identification passes, the transaction configuration file is stored in a transaction file storage device of the block link point; and instantiating the target transaction configuration file to obtain the target service intelligent contract.
Optionally, the consensus on the upload request one by the first device includes: verifying the first uploading request through an instruction verification module of the first device; if the verification is passed, generating a first block consensus message corresponding to the uploading request through the instruction verification module, and sending the first block consensus message to each block chain node in the block chain; and performing three-stage consensus on the first uploading request through a preset algorithm.
Optionally, before analyzing the first transaction message according to the target intelligent contract analysis component and the target transaction configuration file to obtain a second transaction message, the method further includes: initiating a second uploading request of the first transaction message; the second device of the block chain node identifies the second uploading request; and if the consensus passes, analyzing the first transaction message according to the target intelligent contract analysis component and the target transaction configuration file to obtain a second transaction message.
Optionally, before obtaining the target intelligent contract parsing component, the method further comprises: initializing and configuring the block link points to generate an initialization configuration file, wherein the initialization configuration file is used for maintaining an intelligent contract analysis component; and loading the existing transaction configuration file and the intelligent contract analysis component to the block link points, and adding the description information of the intelligent contract analysis component to the world state data inventory table of the first device.
Optionally, the obtaining a target intelligent contract parsing component comprises: judging whether an intelligent contract analysis rule corresponding to an intelligent contract analysis component on a block chain node meets the logic requirement of the target service; and if the intelligent contract analysis rule corresponding to the intelligent contract analysis component meets the logic requirement of the target service, taking the intelligent contract analysis component corresponding to the target intelligent contract analysis rule meeting the logic requirement of the target service as the target intelligent contract analysis component.
Optionally, the method further comprises: if the intelligent contract analysis rule corresponding to the intelligent contract analysis component cannot meet the logic requirement of the target service, compiling the target intelligent contract analysis rule according to the logic requirement of the target service, and generating a target intelligent contract analysis component corresponding to the target intelligent contract analysis rule; uploading a target intelligent contract analysis component to a block chain node; adopting a first device of a block chain node to carry out consensus on a target intelligent contract analysis component; if the consensus passes, configuring an ID for the target intelligent contract analysis component through the first device, and storing the target intelligent contract analysis component to a rule analysis device of the block link point; and adding the description information of the target intelligent contract analysis component into the world state data list table.
Optionally, after saving the target intelligent contract parsing component to the rule parsing device of the block link point, the method further comprises: if the updating operation of the target intelligent contract analysis component in the rule analysis device is detected; responding to the updating operation, and updating the target intelligent contract analysis component to obtain an updated target intelligent contract analysis component; and storing the updated target intelligent contract analysis component into the rule analysis device.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
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 computer storage media 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 that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
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 an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (11)

1. A method for processing an intelligent contract, comprising:
acquiring a target intelligent contract analysis component, wherein the target intelligent contract analysis component is an intelligent contract analysis component corresponding to a target intelligent contract analysis rule in a plurality of intelligent contract analysis components in a block chain node, and the target intelligent contract analysis rule is an analysis rule meeting the logic requirement of a target service;
acquiring a target transaction configuration file of the target service according to the target intelligent contract analysis rule;
processing the target transaction configuration file through the first device of the block link node to obtain a target service intelligent contract;
acquiring a first transaction message of the target service according to the target transaction configuration file, wherein the first transaction message at least comprises: the ID of the target service intelligent contract, the name of the target transaction configuration file and the ID of the target intelligent contract analysis component;
and analyzing the first transaction message according to the target intelligent contract analysis component and the target transaction configuration file to obtain a second transaction message, and processing the second transaction message according to the target service intelligent contract to execute the target service.
2. The method of claim 1, wherein processing the target transaction profile by the first device of the blockchain node to obtain a target business intelligence contract comprises:
initiating an uploading request I of the target transaction configuration file;
the first device is used for carrying out consensus on the first uploading request;
if the consensus passes, the transaction configuration file is stored in a transaction file storage device of the block chain node;
and instantiating the target transaction configuration file to obtain the target service intelligent contract.
3. The method of claim 2, wherein the consensus on the upload request-one by the first device comprises:
verifying the first uploading request through an instruction verification module of the first device;
if the verification is passed, generating a first block consensus message corresponding to the first uploading request by the instruction verification module, and sending the first block consensus message to each block chain node in a block chain;
and performing three-stage consensus on the first uploading request through a preset algorithm.
4. The method of claim 1, wherein before parsing the first transaction message according to the target intelligent contract parsing component and the target transaction configuration file to obtain a second transaction message, the method further comprises:
initiating a second uploading request of the first transaction message;
the second device of the block chain node is used for commonly recognizing the second uploading request;
and if the consensus passes, analyzing the first transaction message according to the target intelligent contract analysis component and the target transaction configuration file to obtain a second transaction message.
5. The method of claim 1, wherein prior to obtaining the target smart contract parsing component, the method further comprises:
initializing and configuring the block chain nodes to generate an initialization configuration file, wherein the initialization configuration file is used for maintaining the intelligent contract analysis component;
and loading the existing transaction configuration file and the intelligent contract analysis component to the block chain node, and adding the description information of the intelligent contract analysis component to a world state data inventory table of the first device.
6. The method of claim 5, wherein obtaining the target intelligent contract parsing component comprises:
judging whether an intelligent contract analysis rule corresponding to an intelligent contract analysis component on the block chain node meets the logic requirement of the target service;
and if the intelligent contract analysis rule corresponding to the intelligent contract analysis component meets the logic requirement of the target service, taking the intelligent contract analysis component corresponding to the target intelligent contract analysis rule meeting the logic requirement of the target service as the target intelligent contract analysis component.
7. The method of claim 6, further comprising:
if the intelligent contract analysis rule corresponding to the intelligent contract analysis component cannot meet the logic requirement of the target service, compiling the target intelligent contract analysis rule according to the logic requirement of the target service, and generating a target intelligent contract analysis component corresponding to the target intelligent contract analysis rule;
uploading the target intelligent contract parsing component to the blockchain node;
adopting a first device of the block chain node to identify the target intelligent contract analysis component;
if the consensus passes, configuring an ID for the target intelligent contract analysis component through the first device, and storing the target intelligent contract analysis component to a rule analysis device of the block chain node;
and adding the description information of the target intelligent contract analysis component into the world state data inventory table.
8. The method of claim 7, wherein after saving the target intelligent contract parsing component to the rule parsing means of the blockchain node, the method further comprises:
if the updating operation of the target intelligent contract analysis component in the rule analysis device is detected;
responding to the updating operation, updating the target intelligent contract analysis component to obtain an updated target intelligent contract analysis component;
and storing the updated target intelligent contract analysis component into the rule analysis device.
9. An apparatus for processing smart contracts, comprising:
the system comprises a first obtaining unit, a second obtaining unit and a third obtaining unit, wherein the first obtaining unit is used for obtaining a target intelligent contract analysis component, the target intelligent contract analysis component is an intelligent contract analysis component corresponding to a target intelligent contract analysis rule in a plurality of intelligent contract analysis components in a block chain node, and the target intelligent contract analysis rule is an analysis rule meeting the logic requirement of a target service;
the second acquisition unit is used for acquiring a target transaction configuration file of the target service according to the target intelligent contract analysis rule;
the first processing unit is used for processing the target transaction configuration file through a first device of the block chain node to obtain a target service intelligent contract;
a third obtaining unit, configured to obtain a first transaction packet of the target service according to the target transaction configuration file, where the first transaction packet at least includes: the ID of the target service intelligent contract, the name of the target transaction configuration file and the ID of the target intelligent contract analysis component;
and the second processing unit is used for analyzing and processing the first transaction message according to the target intelligent contract analysis component and the target transaction configuration file to obtain a second transaction message, and processing the second transaction message according to the target service intelligent contract to execute the target service.
10. A processor configured to execute a program, wherein the program executes a method for processing an intelligent contract according to any one of claims 1 to 8.
11. An electronic device comprising one or more processors and memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of processing for smart contracts of any of claims 1-8.
CN202210240967.1A 2022-03-10 2022-03-10 Intelligent contract processing method and device, processor and electronic equipment Pending CN114581241A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210240967.1A CN114581241A (en) 2022-03-10 2022-03-10 Intelligent contract processing method and device, processor and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210240967.1A CN114581241A (en) 2022-03-10 2022-03-10 Intelligent contract processing method and device, processor and electronic equipment

Publications (1)

Publication Number Publication Date
CN114581241A true CN114581241A (en) 2022-06-03

Family

ID=81779798

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210240967.1A Pending CN114581241A (en) 2022-03-10 2022-03-10 Intelligent contract processing method and device, processor and electronic equipment

Country Status (1)

Country Link
CN (1) CN114581241A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116204201A (en) * 2023-04-26 2023-06-02 烽台科技(北京)有限公司 Service processing method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116204201A (en) * 2023-04-26 2023-06-02 烽台科技(北京)有限公司 Service processing method and device

Similar Documents

Publication Publication Date Title
US10860339B2 (en) Autonomous creation of new microservices and modification of existing microservices
CN107025559B (en) Service processing method and device
US10678522B1 (en) Compiler and method for compiling business rules for a serverless runtime environment
US20180121320A1 (en) Analysis to check web api code usage and specification
CN111209005B (en) Method and apparatus for compiling program file, and computer-readable storage medium
CN111399840B (en) Module development method and device
CN110599183B (en) Intelligent contract calling method and device and storage medium
CN110780870A (en) Service execution method, device, equipment and storage medium
CN111858727A (en) Multi-data-source data export system and method based on template configuration
US10057331B2 (en) Automatic abstraction of flow of control in a distributed virtualization platform
CN111651140A (en) Service method and device based on workflow
CN114581241A (en) Intelligent contract processing method and device, processor and electronic equipment
CN110955434A (en) Software development kit processing method and device, computer equipment and storage medium
CN112579099A (en) Code deployment method and device, storage medium and electronic equipment
CN111198677A (en) Equipment object generation method, device and equipment
CN112712125A (en) Event stream pattern matching method and device, storage medium and processor
CN106951288B (en) Development and application method and device of hot upgrade resource
CN114860204A (en) Program processing method, program operating device, terminal, smart card and storage medium
CN115480775A (en) Cloud and primary container platform integration method and system
CN108733377B (en) JS interaction method for webpage end and mobile phone end in App
CN111988429A (en) Algorithm scheduling method and system
CN113741868A (en) Business calculation task processing method and device, computer equipment and storage medium
CN114253595A (en) Code warehouse management method and device, computer equipment and storage medium
US20230176837A1 (en) Automated generation of additional versions of microservices
CN116719627B (en) Data processing method, device, 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