CN110163572A - A kind of chain code function processing method, device and equipment - Google Patents

A kind of chain code function processing method, device and equipment Download PDF

Info

Publication number
CN110163572A
CN110163572A CN201910425593.9A CN201910425593A CN110163572A CN 110163572 A CN110163572 A CN 110163572A CN 201910425593 A CN201910425593 A CN 201910425593A CN 110163572 A CN110163572 A CN 110163572A
Authority
CN
China
Prior art keywords
function
chain code
business function
flow
sub
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.)
Granted
Application number
CN201910425593.9A
Other languages
Chinese (zh)
Other versions
CN110163572B (en
Inventor
李洪
孟健
金铸
何光宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Neusoft Corp
Original Assignee
Neusoft Corp
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 Neusoft Corp filed Critical Neusoft Corp
Priority to CN201910425593.9A priority Critical patent/CN110163572B/en
Publication of CN110163572A publication Critical patent/CN110163572A/en
Application granted granted Critical
Publication of CN110163572B publication Critical patent/CN110163572B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • G06F9/4484Executing subprograms
    • 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
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/389Keeping log of transactions for guaranteeing non-repudiation of a transaction

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Human Resources & Organizations (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Finance (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a kind of chain code function processing method, device and equipment, this method is applied to block chain network, block chain network is made of block chain node, this method comprises: the user in response to block chain node requests for the process invocation of business function triggering, corresponding flow definition information is obtained;Flow definition information includes the execution ordinal relation between flow nodes and each flow nodes;The corresponding chain code function of each flow nodes or sub-process for including from flow definition information determining in database;Be stored in the database reusable chain code function and or sub-process;Based on the execution ordinal relation between each flow nodes, the corresponding chain code function of each flow nodes or sub-process are called, to realize business function.Due in database chain code function and sub-process have the characteristics that reusable, when different business functions needs to call the same chain code function or sub-process, do not need corresponding to realize more parts of chain codes.

Description

A kind of chain code function processing method, device and equipment
Technical field
This application involves data processing fields, and in particular to a kind of chain code function processing method, device and equipment.
Background technique
Chain code refers to and runs in block chain network, the code usually safeguarded jointly by multiple network nodes.Chain code function Write by developer, and the participant by trading is deployed in block chain network after the approval, call chain code function when it is usual It needs by endorsement, sequence, verifying, submission.
Currently, what the chain code run in block chain network was mutually isolated, this leads to chain code function in complicated business Reusability is poor.It is introduced by taking Fig. 1 as an example, 2 (the block chain nodes 2) of tissue 1 (block chain node 1) and tissue in Fig. 1 Between transaction be related to chain code function A and chain code function B, meanwhile, tissue 2 and organize 3 (block chain nodes 3) between transaction It is related to chain code function B and chain code function C, with implementation mutually isolated between current chain code, needs to design two sets of chains Code, a set of chain code include chain code function A and chain code function B, and another set of chain code includes chain code function B and chain code function C, it is clear that chain The code of code function B and corresponding data are isolated in two sets of chain codes, are not reusable.This means that if will be to chain code Function B modifies, then needs to modify all chain codes comprising chain code function B, it is clear that processing is more many and diverse, and is easy error.
Summary of the invention
In view of this, this application provides a kind of chain code function processing method, device and equipment, can be realized chain code can Multiplexing.
In a first aspect, for achieving the above object, this application provides a kind of chain code function processing method, the methods Applied to block chain network, the block chain network is made of block chain node, which comprises
It is requested in response to the user of either block chain node for the process invocation of any business function triggering, described in acquisition The corresponding flow definition information of business function;Wherein, the flow definition information includes flow nodes and each flow nodes Between execution ordinal relation;
The corresponding chain code function of each flow nodes for including from the flow definition information determining in database Or sub-process;Wherein, the sub-process is made of multiple chain code functions, and reusable chain code letter is stored in the database Number and or sub-process;
Based on the execution ordinal relation between each flow nodes, chain corresponding to each flow nodes Code function or sub-process are called, to realize the business function.
In a kind of optional implementation, it is described obtain the corresponding flow definition information of the business function before, also wrap It includes:
The flow chart for business function design is received, and generates the structuring of the business function according to the flow chart Document;
Based on the structured document, the corresponding flow definition information of the business function is determined.
In a kind of optional implementation, the execution ordinal relation based between each flow nodes, to institute It states the corresponding chain code function of each flow nodes or sub-process is called, before realizing the business function, also Include:
The related data being related to the business function backs up.
In a kind of optional implementation, the execution ordinal relation based between each flow nodes, to institute It states the corresponding chain code function of each flow nodes or sub-process is called, before realizing the business function, also Include:
The related data that the business function is related to is locked, and controls the dependency number being related to the business function Enter wait state according to the thread for carrying out write operation;
Correspondingly, the execution ordinal relation based between each flow nodes, to each flow nodes Corresponding chain code function or sub-process are called, after realizing the business function, further includes:
The related data that the business function is related to is unlocked, and controls the thread and executes according to Queue sequence to the industry The write operation for the related data that business function is related to.
In a kind of optional implementation, the user in response to either block chain node touches for any business function The process invocation of hair is requested, before obtaining the corresponding flow definition information of the business function, further includes:
The flow chart for business function design is received, and according to the company between each flow nodes in the flow chart Line determines the execution ordinal relation between each flow nodes.
Second aspect, this application provides a kind of chain code function processing unit, described device is applied to block chain network, institute It states block chain network to be made of block chain node, described device includes:
Module is obtained, the process invocation of any business function triggering is directed to for the user in response to either block chain node Request, obtains the corresponding process configuration information of the business function;Wherein, the process configuration information includes stream predetermined Execution ordinal relation between Cheng Jiedian and each flow nodes;
Determining module, each flow nodes for including from the process configuration information determining in database are right respectively The chain code function or sub-process answered;Wherein, the sub-process is made of multiple chain code functions, and being stored in the database can The chain code function of multiplexing and or sub-process;
Calling module, for based on the execution ordinal relation between each flow nodes, to each process section The corresponding chain code function of point or sub-process are called, to realize the business function.
In a kind of optional implementation, described device further include:
Receiving module, for receiving the flow chart for being directed to business function design;
Generation module, for generating the structured document of the business function according to the flow chart;
Import modul obtains the corresponding process of the business function with confidence after importing the structured document Breath.
In a kind of optional implementation, described device further include:
Backup module, the related data for being related to the business function back up.
In a kind of optional implementation, described device further include:
Locking module, the related data for the business function to be related to lock, and control to the business function The thread that the related data that can relate to carries out write operation enters wait state;
Unlocked state, the related data being related to for unlocking the business function, and it is suitable according to being lined up to control the thread Sequence executes the write operation for the related data being related to the business function.
The third aspect, present invention also provides a kind of computer readable storage medium, the computer readable storage medium In be stored with instruction, when described instruction is run on the terminal device so that the terminal device execute any of the above-described described in Method.
Fourth aspect, present invention also provides a kind of chain code function processing equipments, comprising: memory, processor, and storage On the memory and the computer program that can run on the processor, the processor execute the computer program When, realize method described in any of the above embodiments.
In chain code function processing method provided by the embodiments of the present application, each business function is defined using flow definition information Can, after user is for any business function trigger flow call request, the corresponding flow definition information of the business function is obtained, And according to the execution ordinal relation between the flow nodes and each flow nodes for including in the flow definition information, from database It is middle to call corresponding chain code function or sub-process, finally realize the business function.Due to the chain code function and subflow in database Journey has the characteristics that reusable, therefore, when different business functions needs to call the same chain code function or sub-process, is not required to It corresponds to and realizes more parts of chain codes.In addition, being stored in a more new database when above-mentioned business function needs to update reusable Chain code function and sub-process update simple and not easy to make mistakes.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, the drawings in the following description are only some examples of the present application, for For those of ordinary skill in the art, without any creative labor, it can also be obtained according to these attached drawings His attached drawing.
Fig. 1 is the schematic diagram that a kind of chain code is realized;
Fig. 2 is a kind of application architecture figure of chain code function processing method provided by the embodiments of the present application;
Fig. 3 is a kind of flow chart of chain code function processing method provided by the embodiments of the present application;
Fig. 4 is a kind of stream of the chain code function processing method applied to bank credit card business provided by the embodiments of the present application Cheng Tu;
Fig. 5 is the flow chart of credit card deposit provided by the embodiments of the present application;
Fig. 6 is the flow chart that credit card provided by the embodiments of the present application is entered an item of expenditure in the accounts;
Fig. 7 is a kind of structure chart of chain code function processing unit provided by the embodiments of the present application;
Fig. 8 is a kind of structure chart of chain code function processing equipment provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.
It is a kind of application architecture figure of chain code function processing method provided by the embodiments of the present application, wherein chain with reference to Fig. 2 Code function processing method can be applied to chain code flow system, chain code flow system by process between tissue 1 and tissue 2, Chain code function involved in business function between tissue 2 and tissue 3, sub-process are defined, and in chain code flow system Each reusable chain code function and sub-process are write in database in advance, so as to when needing to realize some business function, energy It is enough according to the definition in process in database reusable chain code function and sub-process be called.As it can be seen that the application is real The reusable of chain code function and sub-process that example can be realized in block chain network is applied, so that needing in chain code function and sub-process The reusable chain code function and sub-process stored in more new database when update, updates simple and not easy to make mistakes.
Specifically, the embodiment of the present application provides a kind of chain code function processing method, it is the embodiment of the present application with reference to Fig. 3 There is provided a kind of chain code function processing method flow chart, wherein this method be applied to block chain network, the block chain network by Block chain node is constituted, and this method specifically includes:
S301: it requests, obtains for the process invocation of any business function triggering in response to the user of either block chain node Take the corresponding flow definition information of the business function;Wherein, the flow definition information includes flow nodes and each stream Execution ordinal relation between Cheng Jiedian.
In the embodiment of the present application, business function is by flow definition, specifically, passing through the process for including in flow definition information Execution ordinal relation between node and each flow nodes realizes the definition to business function, subsequent fixed according to the process The business function may be implemented to the definition of business function in adopted information.
In practical application, the corresponding flow definition information of each business function is predefined, and in block chain node User triggered for a certain business function when requesting the process invocation of the business function, obtain corresponding with the business function Flow definition information.In a kind of optional embodiment, the process identification of the business function can be carried in process invocation request, According to the available corresponding flow definition information of the process identification.
In a kind of optional implementation, flow definition information, which can be, to be determined based on the flow chart of business function.Tool Body, firstly, system receives the flow chart that developer is directed to the design of any business function, and the industry is generated according to the flow chart The structured document for function of being engaged in;Wherein, structured document can be the document of the formats such as xml, json, protobuf.Then, base In the structured document, the corresponding flow definition information of the business function is determined.Specifically, can be carried out to the structured document Parsing, and the data that parsing is obtained import in corresponding default disposition list, obtain the corresponding flow definition letter of the business function Breath.For example, default disposition list may include flow definition table, flow instance table etc., specifically default disposition list type is not limited It is fixed.In practical application, the flow definition data guiding flow parsed to structured document can be defined in table, by process In example guiding flow example table etc..
S302: the corresponding chain code of each flow nodes for including from the flow definition information determining in database Function or sub-process;Wherein, the sub-process is made of multiple chain code functions, and reusable chain is stored in the database Code function and or sub-process.
In the embodiment of the present application, each flow nodes for including in flow definition information respectively correspond chain code function or subflow Journey, wherein sub-process is made of multiple chain code functions, and each chain code function and sub-process are previously-completed and write and be stored in To call in database.Specifically, chain code function can be the function of the various functions of realization, such as realizing arbitration functions Function etc..
In a kind of optional embodiment, each flow nodes in flow definition file can be chain code function or subflow The mark of journey, such as function name, sub-process name determine corresponding chain code function or subflow according to each mark from database Journey.
Due to each chain code function and sub-process that are stored in database have the characteristics that it is reusable, so, when different When business function needs to call the same chain code function or sub-process, more parts of chain codes of corresponding realization are not needed, but to database In reusable chain code function or sub-process be called.
In addition, the execution ordinal relation between each flow nodes for including in flow definition information can be each by defining The corresponding input and output parameter of a flow nodes is realized.For example, the output parameter and second procedure of first pass node The input parameter of node is same parameters, then can determine triggering second procedure node after the completion of first pass node executes It executes.
S303: right respectively to each flow nodes based on the execution ordinal relation between each flow nodes The chain code function or sub-process answered are called, to realize the business function.
It also include the execution ordinal relation between each flow nodes in the embodiment of the present application, in flow definition information, According to the execution ordinal relation, system can be adjusted the corresponding chain code function of each flow nodes or sub-process With finally realizing the business function.
In addition, the embodiment of the present application is to business function in order to enable the chain code in block chain network to support rolling back action Before the chain code function or sub-process of energy are called, the related data being related to first to the business function is backed up, so as to Rolling back action is executed when occurring abnormal in program operation process, realizes the atomicity of affairs.Wherein, business function is related to Related data may include intermediate data, the final result etc. that generate in the chain code function and sub-process operational process of business function Related data.
In addition, the embodiment of the present application is in the chain code function or subflow to business function in order to avoid data collision in network Before journey is called, the related data which can be related to is locked, and is controlled and be related to the business function Related data carry out write operation thread enter wait state, after realizing the business function, unlock the business function and be related to Related data, and control thread and execute the write operation of related data being related to the business function according to Queue sequence.Pass through The waiting list of process for using in concurrent environment can be reduced fundamentally since what data collision caused reports an error, be protected simultaneously The consistency of affairs is demonstrate,proved.
In chain code function processing method provided by the embodiments of the present application, each business function is defined using flow definition information Can, after user is for any business function trigger flow call request, the corresponding flow definition information of the business function is obtained, And according to the execution ordinal relation between the flow nodes and each flow nodes for including in the flow definition information, from database It is middle to call corresponding chain code function or sub-process, finally realize the business function.Due to the chain code function and subflow in database Journey has the characteristics that reusable, therefore, when different business functions needs to call the same chain code function or sub-process, is not required to It corresponds to and realizes more parts of chain codes.In addition, being stored in a more new database when above-mentioned business function needs to update reusable Chain code function and sub-process update simple and not easy to make mistakes.
For the ease of further understanding that the embodiment of the present application mentions to chain code function processing method provided by the present application A kind of application scenarios embodiment is supplied, specifically, the embodiment of the present application provides a kind of chain applied to bank credit card business Code function processing method.Under the application scenarios, by realize credit card deposit and credit card enter an item of expenditure in the accounts for two kinds of business functions into Row is introduced.It is a kind of chain code function processing method applied to bank credit card business provided by the embodiments of the present application with reference to Fig. 4 Flow chart, this method specifically includes:
S401: it receives developer and enters an item of expenditure in the accounts the flow chart separately designed for credit card deposit and credit card.
As shown in Figure 5,6, the respectively flow chart entered an item of expenditure in the accounts of credit card deposit and credit card, wherein credit card deposit and letter It include " writing off " this flow nodes with card two kinds of business functions of entering an item of expenditure in the accounts, that is to say, that credit card deposit and credit card are entered an item of expenditure in the accounts Two kinds of business functions need to call the same chain code function for realizing " writing off ".
In practical application, chain code is planned in advance according to business function, specifically, realizing Fig. 5 in advance in the database, in 6 The corresponding chain code function of each flow nodes or sub-process, it is notable that include for the two business functions " writing off " this flow nodes, the embodiment of the present application only needs to realize a reusable chain code function in the database i.e. It can.
S402: credit card deposit and credit card are generated according to flow chart and entered an item of expenditure in the accounts corresponding structured document.
It, can will be in Fig. 5,6 by the dom4j or similar functions program assembly of java in a kind of optional implementation Flow chart is saved into structured document, specifically, the format of structured document can be the formats such as xml, json, protobuf.
S403: being based on structured document, determines that credit card deposit and credit card are entered an item of expenditure in the accounts corresponding flow definition information.
In the embodiment of the present application, structured document is parsed, the data that parsing is obtained import corresponding default portion It affixes one's name in table, finally obtains credit card deposit and credit card is entered an item of expenditure in the accounts the corresponding flow definition information of two kinds of business functions.
S404: it after the user of either block chain node is directed to the trigger flow call request of credit card deposit business function, obtains Take the corresponding flow definition information of the business function.
S405: the corresponding chain code function of each flow nodes for including from flow definition information determining in database Or sub-process;Wherein, the sub-process is made of multiple chain code functions, and reusable chain code letter is stored in the database Number and or sub-process;
S406: based on the execution ordinal relation between each flow nodes, chain code corresponding to each flow nodes Function or sub-process are called, to realize the business function.
In practical application, if user triggers the corresponding process invocation request of credit card deposit business, system is first The corresponding flow definition information of the business function is obtained, and according to the flow nodes in flow definition information, from database really Then fixed corresponding chain code function and sub-process are closed according to the execution sequence between each flow nodes in flow definition information System, calls each chain code function and sub-process, final to realize credit card deposit business function.
Since S404-S406 is similar to above-mentioned S301-S303, it can refer to above content and S404-S406 managed Solution, details are not described herein.
In addition, in the chain code function to credit card deposit business function or before sub-process is called, first to this The data that the needs such as the billing data and account book of credit card deposit user update back up, to hold when process invocation fails Row rolling back action.
In addition, in the chain code function to credit card deposit business function or before sub-process is called, it is also necessary to will The related data that credit card deposit user is related to credit card deposit business function locks, if the user deposits again Then corresponding thread enters wait state for operation, terminates until currently depositing process execution, to ensure that the consistency of affairs.
In chain code function processing method provided by the embodiments of the present application, credit card deposit and credit card are entered an item of expenditure in the accounts two kinds of business function It can realize the multiplexing to " writing off " this chain code function, not need more parts of chain codes of corresponding realization, update simple not easy to make mistakes.
The chain code function processing method provided based on the above embodiment, the embodiment of the present application also provides a kind of chain code functions Processing unit is a kind of structure chart of chain code function processing unit provided by the embodiments of the present application with reference to Fig. 7, and described device is answered For block chain network, the block chain network is made of block chain node, and described device includes:
Module 701 is obtained, the process of any business function triggering is directed to for the user in response to either block chain node Call request obtains the corresponding process configuration information of the business function;Wherein, the process configuration information includes pre-defined Flow nodes and each flow nodes between execution ordinal relation;
Determining module 702, each flow nodes point for including from the process configuration information determining in database Not corresponding chain code function or sub-process;Wherein, the sub-process is made of multiple chain code functions, is stored in the database Have reusable chain code function and or sub-process;
Calling module 703, for based on the execution ordinal relation between each flow nodes, to each process The corresponding chain code function of node or sub-process are called, to realize the business function.
In a kind of optional embodiment, described device further include:
Receiving module, for receiving the flow chart for being directed to business function design;
Generation module, for generating the structured document of the business function according to the flow chart;
Import modul obtains the corresponding process of the business function with confidence after importing the structured document Breath.
In order to realize the data rewind function in block chain network, described device further include:
Backup module, the related data for being related to the business function back up.
In order to guarantee the consistency of affairs, described device further include:
Locking module, the related data for the business function to be related to lock, and control to the business function The thread that the related data that can relate to carries out write operation enters wait state;
Unlocked state, the related data being related to for unlocking the business function, and it is suitable according to being lined up to control the thread Sequence executes the write operation for the related data being related to the business function.
In chain code function processing unit provided by the embodiments of the present application, each business function is defined using flow definition information Can, after user is for any business function trigger flow call request, the corresponding flow definition information of the business function is obtained, And according to the execution ordinal relation between the flow nodes and each flow nodes for including in the flow definition information, from database It is middle to call corresponding chain code function or sub-process, finally realize the business function.Due to the chain code function and subflow in database Journey has the characteristics that reusable, therefore, when different business functions needs to call the same chain code function or sub-process, is not required to It corresponds to and realizes more parts of chain codes.In addition, being stored in a more new database when above-mentioned business function needs to update reusable Chain code function and sub-process update simple and not easy to make mistakes.
In addition, the embodiment of the present application also provides a kind of chain code function processing equipment, it is shown in Figure 8, may include:
Processor 801, memory 802, input unit 803 and output device 804.Processing in chain code function processing equipment The quantity of device 801 can be one or more, take a processor as an example in Fig. 8.In some embodiments of the invention, processor 801, memory 802, input unit 803 and output device 804 can be connected by bus or other means, wherein with logical in Fig. 8 It crosses for bus connection.
Memory 802 can be used for storing software program and module, and processor 801 is stored in memory 802 by operation Software program and module, thereby executing the various function application and data processing of chain code function processing equipment.Memory 802 can mainly include storing program area and storage data area, wherein storing program area can storage program area, at least one function Application program needed for energy etc..In addition, memory 802 may include high-speed random access memory, it can also include non-volatile Property memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.Input unit 803 can be used for receiving the number or character information of input, and generate the user setting and function with chain code function processing equipment It can control related signal input.
Specifically in the present embodiment, processor 801 can be according to following instruction, by one or more application program The corresponding executable file of process be loaded into memory 302, and run and be stored in memory 802 by processor 801 Application program, to realize the various functions in above-mentioned chain code function processing method.
In addition, being deposited in the computer readable storage medium present invention also provides a kind of computer readable storage medium Instruction is contained, when described instruction is run on the terminal device, so that the terminal device executes above-mentioned chain code function processing Method.
It is understood that for device embodiment, since it corresponds essentially to embodiment of the method, so correlation Place illustrates referring to the part of embodiment of the method.The apparatus embodiments described above are merely exemplary, wherein described Unit may or may not be physically separated as illustrated by the separation member, and component shown as a unit can be with It is or may not be physical unit, it can it is in one place, or may be distributed over multiple network units.It can It is achieved the purpose of the solution of this embodiment with selecting some or all of the modules therein according to the actual needs.This field is common Technical staff can understand and implement without creative efforts.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Detailed Jie has been carried out to a kind of chain code function processing method, device and equipment provided by the embodiment of the present application above It continues, specific examples are used herein to illustrate the principle and implementation manner of the present application, and the explanation of above embodiments is only It is to be used to help understand the method for this application and its core ideas;At the same time, for those skilled in the art, according to this Shen Thought please, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification should not manage Solution is the limitation to the application.

Claims (10)

1. a kind of chain code function processing method, which is characterized in that the method is applied to block chain network, the block chain network It is made of block chain node, which comprises
It is requested in response to the user of either block chain node for the process invocation of any business function triggering, obtains the business The corresponding flow definition information of function;Wherein, the flow definition information includes between flow nodes and each flow nodes Execution ordinal relation;
From determined in database the corresponding chain code function of each flow nodes for including in the flow definition information or Sub-process;Wherein, the sub-process is made of multiple chain code functions, and reusable chain code function is stored in the database With or sub-process;
Based on the execution ordinal relation between each flow nodes, chain code letter corresponding to each flow nodes Several or sub-process is called, to realize the business function.
2. the method according to claim 1, wherein described obtain the corresponding flow definition letter of the business function Before breath, further includes:
The flow chart for business function design is received, and generates the structuring text of the business function according to the flow chart Shelves;
Based on the structured document, the corresponding flow definition information of the business function is determined.
3. method according to claim 1 or 2, which is characterized in that described based on holding between each flow nodes Row ordinal relation is called the corresponding chain code function of each flow nodes or sub-process, described in realizing Before business function, further includes:
The related data being related to the business function backs up.
4. method according to claim 1 or 2, which is characterized in that described based on holding between each flow nodes Row ordinal relation is called the corresponding chain code function of each flow nodes or sub-process, described in realizing Before business function, further includes:
The related data that the business function is related to is locked, and control related data that the business function is related into The thread of row write operation enters wait state;
Correspondingly, the execution ordinal relation based between each flow nodes, distinguishes each flow nodes Corresponding chain code function or sub-process are called, after realizing the business function, further includes:
The related data that the business function is related to is unlocked, and controls the thread and executes according to Queue sequence to the business function The write operation for the related data that can relate to.
5. appointing the method according to claim 1, wherein the user in response to either block chain node is directed to The process invocation request of one business function triggering, before obtaining the corresponding flow definition information of the business function, further includes:
The flow chart for business function design is received, and according to the line between each flow nodes in the flow chart, Determine the execution ordinal relation between each flow nodes.
6. a kind of chain code function processing unit, which is characterized in that described device is applied to block chain network, the block chain network It is made of block chain node, described device includes:
Module is obtained, is asked for the user in response to either block chain node for the process invocation of any business function triggering It asks, obtains the corresponding process configuration information of the business function;Wherein, the process configuration information includes process predetermined Execution ordinal relation between node and each flow nodes;
Determining module, each flow nodes for including from the process configuration information determining in database are corresponding Chain code function or sub-process;Wherein, the sub-process is made of multiple chain code functions, is stored with reusable in the database Chain code function and or sub-process;
Calling module, for dividing each flow nodes based on the execution ordinal relation between each flow nodes Not corresponding chain code function or sub-process are called, to realize the business function.
7. device according to claim 6, which is characterized in that described device further include:
Receiving module, for receiving the flow chart for being directed to business function design;
Generation module, for generating the structured document of the business function according to the flow chart;
Import modul obtains the corresponding process configuration information of the business function after importing the structured document.
8. device according to claim 6 or 7, which is characterized in that described device further include:
Backup module, the related data for being related to the business function back up.
9. a kind of computer readable storage medium, which is characterized in that instruction is stored in the computer readable storage medium, when When described instruction is run on the terminal device, so that the terminal device executes the method according to claim 1 to 5.
10. a kind of chain code function processing equipment characterized by comprising memory, processor, and it is stored in the memory Computer program that is upper and can running on the processor, when the processor executes the computer program, is realized as weighed Benefit requires the described in any item methods of 1-5.
CN201910425593.9A 2019-05-21 2019-05-21 Chain code function processing method, device and equipment Active CN110163572B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910425593.9A CN110163572B (en) 2019-05-21 2019-05-21 Chain code function processing method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910425593.9A CN110163572B (en) 2019-05-21 2019-05-21 Chain code function processing method, device and equipment

Publications (2)

Publication Number Publication Date
CN110163572A true CN110163572A (en) 2019-08-23
CN110163572B CN110163572B (en) 2022-04-15

Family

ID=67631901

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910425593.9A Active CN110163572B (en) 2019-05-21 2019-05-21 Chain code function processing method, device and equipment

Country Status (1)

Country Link
CN (1) CN110163572B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110599341A (en) * 2019-09-20 2019-12-20 中国银行股份有限公司 Transaction calling method and system
CN112817714A (en) * 2021-01-27 2021-05-18 深圳力维智联技术有限公司 Data processing method, device and system and computer readable storage medium
CN113128942A (en) * 2019-12-30 2021-07-16 北京国双科技有限公司 Visual workflow processing method and device
CN113449166A (en) * 2021-05-25 2021-09-28 杭州慧康物联网科技有限公司 Data acquisition method, device, equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030191869A1 (en) * 2002-04-04 2003-10-09 International Business Machines Corp. C-API instrumentation for HDL models
CN107239479A (en) * 2017-03-28 2017-10-10 阿里巴巴集团控股有限公司 A kind of method and device of data storage and inquiry based on block chain
CN108256988A (en) * 2016-12-30 2018-07-06 深圳壹账通智能科技有限公司 The data processing method and device of alliance of credit information service
CN108965468A (en) * 2018-08-16 2018-12-07 北京京东尚科信息技术有限公司 Block chain network service platform and its chain code installation method, storage medium
CN109191132A (en) * 2018-08-20 2019-01-11 众安信息技术服务有限公司 Dispose the mthods, systems and devices of intelligent contract
CN109214785A (en) * 2018-10-23 2019-01-15 北京奇艺世纪科技有限公司 Implementation method, server and the system of workflow
CN109359949A (en) * 2018-10-30 2019-02-19 中国建设银行股份有限公司 Process methods of exhibiting and device
US20190102423A1 (en) * 2017-09-29 2019-04-04 Oracle International Corporation System and method for providing an interface for a blockchain cloud service
CN109614093A (en) * 2018-11-01 2019-04-12 播金信息科技(上海)有限公司 The processing method of visual intelligent contract system and intelligent contract

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030191869A1 (en) * 2002-04-04 2003-10-09 International Business Machines Corp. C-API instrumentation for HDL models
CN108256988A (en) * 2016-12-30 2018-07-06 深圳壹账通智能科技有限公司 The data processing method and device of alliance of credit information service
CN107239479A (en) * 2017-03-28 2017-10-10 阿里巴巴集团控股有限公司 A kind of method and device of data storage and inquiry based on block chain
US20190102423A1 (en) * 2017-09-29 2019-04-04 Oracle International Corporation System and method for providing an interface for a blockchain cloud service
CN108965468A (en) * 2018-08-16 2018-12-07 北京京东尚科信息技术有限公司 Block chain network service platform and its chain code installation method, storage medium
CN109191132A (en) * 2018-08-20 2019-01-11 众安信息技术服务有限公司 Dispose the mthods, systems and devices of intelligent contract
CN109214785A (en) * 2018-10-23 2019-01-15 北京奇艺世纪科技有限公司 Implementation method, server and the system of workflow
CN109359949A (en) * 2018-10-30 2019-02-19 中国建设银行股份有限公司 Process methods of exhibiting and device
CN109614093A (en) * 2018-11-01 2019-04-12 播金信息科技(上海)有限公司 The processing method of visual intelligent contract system and intelligent contract

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HIBLOCK: "区块链100讲:Hyperledger Fabric 中的链码(智能合约)", 《HTTPS://MY.OSCHINA.NET/U/3782027/BLOG/2965940》 *
刘心德等: "链码校准方法的探讨", 《计量装置及应用》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110599341A (en) * 2019-09-20 2019-12-20 中国银行股份有限公司 Transaction calling method and system
CN113128942A (en) * 2019-12-30 2021-07-16 北京国双科技有限公司 Visual workflow processing method and device
CN112817714A (en) * 2021-01-27 2021-05-18 深圳力维智联技术有限公司 Data processing method, device and system and computer readable storage medium
CN113449166A (en) * 2021-05-25 2021-09-28 杭州慧康物联网科技有限公司 Data acquisition method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN110163572B (en) 2022-04-15

Similar Documents

Publication Publication Date Title
CN110163572A (en) A kind of chain code function processing method, device and equipment
US8549065B2 (en) Method and device for client/server communication according to the standard protocol OPC UA
CN107423046B (en) Method, system, and computer-readable medium for processing graph-based computations
US20210019849A1 (en) Method for External Data-Based Constructing Various Triggering Mechanisms to Execute Smart Contract in Blockchain Network and System Thereof
CN110032599B (en) Data structure reading and updating method and device, and electronic equipment
US8572056B2 (en) System with multiple conditional commit databases
CN103544153B (en) A kind of data-updating method based on data base and system
CN101390055B (en) Anticipatory changes to resources managed by locks
US9697042B2 (en) Extensibility of business process and application logic
CN110532025A (en) Data processing method, device, equipment and storage medium based on micro services framework
EP1906308B1 (en) Method and system for managing by a controller a generic data lock to a data object
CN111324425B (en) Data access method, device, equipment and storage medium
CN108415758B (en) Distributed transaction coordination method and device
CN111415146A (en) Resource data processing method, device and equipment
CN110458538B (en) State machine maintenance method and device based on block chain, electronic equipment and storage medium
CN112565369B (en) Intelligent contract implementation method, application service node, storage medium and system
CN111143041B (en) Data consistency method, distributed coordinator and central coordinator
CN113760386A (en) Access control system, access control method and storage medium
CN109901933A (en) The operating method and device of operation system, storage medium, electronic device
CN116126481B (en) Distributed long transaction processing method and device
EP1988461A1 (en) Alternating processing method, system, and computer program product
CN113792051B (en) Data processing method, system, equipment and storage medium based on multi-mode lock
Březina Taxi service back-end
CN109542629A (en) A kind of processing method and processing device of the data based on distributed system
MÜHLEGGER Development of a cloud-based mobile app

Legal Events

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