CN112037053B - Universal transaction interpreter for blockchain and interpretation method thereof - Google Patents

Universal transaction interpreter for blockchain and interpretation method thereof Download PDF

Info

Publication number
CN112037053B
CN112037053B CN201910475272.XA CN201910475272A CN112037053B CN 112037053 B CN112037053 B CN 112037053B CN 201910475272 A CN201910475272 A CN 201910475272A CN 112037053 B CN112037053 B CN 112037053B
Authority
CN
China
Prior art keywords
transaction
manager
main body
management module
asset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910475272.XA
Other languages
Chinese (zh)
Other versions
CN112037053A (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.)
Benchainless Technology Shenzhen Co ltd
Original Assignee
Benchainless Technology Shenzhen Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Benchainless Technology Shenzhen Co ltd filed Critical Benchainless Technology Shenzhen Co ltd
Priority to CN201910475272.XA priority Critical patent/CN112037053B/en
Publication of CN112037053A publication Critical patent/CN112037053A/en
Application granted granted Critical
Publication of CN112037053B publication Critical patent/CN112037053B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • 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/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • 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/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Abstract

The invention discloses a general transaction interpreter for a blockchain, which comprises a main body manager, an operation manager, a content manager, an asset manager and an object manager, and also provides a general transaction interpretation method, wherein when the transaction interpreter receives the blockchain transaction, the interpreter decomposes the transaction, reads transaction main body information and judges the validity of the transaction main body; reading basic information of a transaction main body, and extracting operations and contents related to the transaction from the transaction main body; judging the type of operation according to the environment in which the operation instruction is acquired, and calling the corresponding operation type according to the operation type; when the specific type of object needs to be interpreted, executing part or all of the operation to which the object belongs; the method comprises the steps of collecting and summarizing the execution results operated, including error information in the execution process, submitting the error information to the application of the last layer, and solving the problems of transaction type expansion and service development limitation caused by the fact that the blockchain is limited in an actual service scene and cannot be modified by codes.

Description

Universal transaction interpreter for blockchain and interpretation method thereof
Technical Field
The invention relates to the technical field of blockchains, in particular to a universal transaction interpreter for blockchains and an interpretation method thereof.
Background
In a blockchain, transaction processing is the most core component of the blockchain, and the supported transaction types of the blockchain determine the capability range of the blockchain, in general, in order for the blockchain to support as many business scenes as possible, a plurality of transaction types are created as much as possible before the blockchain is on line, but in practical application, no matter how many transaction types are created, all business scenes are not covered after the blockchain is on line, the characteristics of the blockchain are not modified after the blockchain is on line, and if the blockchain is to be modified, the blockchain is bifurcated, so that the blockchain is in service deficiency in practical business application, and a user is given the feeling that the service of the blockchain is very chicken ribbed. Therefore, how to solve the problem of transaction type missing caused by continuous service extension in the blockchain, and avoid bifurcation becomes an urgent problem to be solved.
Disclosure of Invention
The invention aims to provide a universal transaction interpreter for a blockchain and an interpretation method thereof, which solve the problems that the blockchain can support more transaction types under the condition of not modifying a core code, and the transaction type is expanded and the service development is limited because the blockchain is limited in an actual service scene because the code cannot be modified.
A universal transaction interpreter for a blockchain, the interpreter comprising:
the main body manager: the main body manager reads the main body information of the transaction after the block link receives the transaction, checks whether the main body has the condition of operating the appointed object on the premise of ensuring the legal main body, if so, performs main body operation, and if not, discards the corresponding main body;
content manager: content for managing operations performed by the subject, returning processing results to the content manager when data is extracted from the content manager, the content manager managing the content including, but not limited to, fields of a database table, paths of recording fields, recording asset information, and corresponding value information;
operation manager: the method comprises the steps of managing operation types which are performed corresponding to a defined participation main body, wherein the operation types comprise but are not limited to 'newly added', 'destroyed', 'transferred', 'modified', different operation types are defined for different transaction environments, an execution environment is created according to the defined operation types, and after the execution results are collected, the execution environment is summarized and submitted to a previous layer of application;
asset manager: the system is used for managing assets related to a transaction main body, and defining attribution is carried out on the assets, wherein the asset management comprises asset information management, asset transfer management and asset destruction management;
object manager: the system comprises a transaction interpreter, a management system and a management system, wherein the transaction interpreter is used for managing objects which can be operated by the transaction interpreter, the composition of different types of objects and the necessary degree of information are fully described by defining the types of the objects supported by the transaction interpreter, and the object analysis is developed when the interpretation is required for specific transactions;
the subject manager, content manager, operations manager, asset manager, object manager are cross-meshed with each other.
Further, the body manager includes:
the main body list management module: the method comprises the steps of recording basic information of a participation subject in the transaction, wherein the basic information comprises, but is not limited to, the name of the participation subject, the participation time and the type;
the main body type management module: the method comprises the steps of defining the type of each main body in a main body list, and correspondingly expanding the main body types according to different block transaction scenes;
the main body signature management module: for creating a one-to-one key for each principal that is itself and that acts as a proof of identity in the transaction, serving as a proof of confirmation of participation in the transaction and an admission as to the principal;
the main body cooperative management module: the method is used for defining and confirming the effective mode of the transaction, takes the transaction at a defined time point when a plurality of participants are required to conduct signature confirmation, and the main cooperative management module verifies whether the content and the signature of the transaction meet the requirements according to the required counterpart.
Further, the content manager includes:
an input management module: the system is used for receiving external transaction input and performing basic validity and validity check on the transaction;
a queue management module: for queuing transactions and inserting newly added transactions into verified queue positions;
and an output management module: the method is used for collecting the execution results of the transaction, and further analyzing and summarizing the transaction results.
Further, the operation manager includes:
an operation definition management module: the method is used for judging the environment of the trade, and defining the mode of trade operation according to the environment, wherein the operation types include but are not limited to 'adding', 'destroying', 'transferring', 'modifying';
the operation execution management module: the method is used for creating a safe execution environment for the transaction, ensuring that the execution process of the transaction can only be carried out within the scope of a transaction participation main body, ensuring that the execution process is carried out strictly according to the operation defined in the definition management module, and strictly checking the pre-condition and the authority of each meta-operation to avoid out-of-range and authority overflow;
the result collection management module: and the system is used for collecting the results of the operation execution management module and summarizing and submitting the results to the application at the last layer.
Further, the asset manager includes:
asset information management module: basic information for managing assets, including but not limited to, information of names, asset types, operation types that can be used, whether divisible, minimum unit, initial total, minimum total, issuing subject, asset status, etc. expressing rights and assets;
asset transfer management module: the method comprises the steps of transferring ownership of an asset, and transferring all or part of the ownership to other subjects according to the partition attribute of the asset;
asset destruction management module: for destroying the asset.
Further, the object manager includes:
object type management module: for defining object types supported by the transaction interpreter, the object types being defined by an initial code, the initial defining object types including, but not limited to, processes, files, databases, collections, fields, data, sessions, assets, contracts;
object definition management module: the method is used for defining various types of objects in detail, and fully describing the composition of the various types of objects and the necessary degree of self-contained information;
an object interpretation module: for purposes of interpreting a particular type of object, interpreted operations include, but are not limited to, meta-operations in an operations manager, corresponding to some or all of a process, file, database, collection, field, data, session, asset, contract, respectively.
The invention also provides a general transaction interpretation method for the blockchain, which comprises the following steps:
s1, when a transaction interpreter receives a blockchain transaction, the interpreter decomposes the transaction, reads the information of a transaction main body through a main body manager and judges the validity of the transaction main body, and checks whether the transaction main body has the condition for operating a specified object or not, if the condition meets the validity and the condition, the transaction main body enters S2, and if any one of the validity and the condition is not met, the transaction main body is regarded as abandoned;
s2, the content manager reads basic information of a transaction main body, and extracts operation and content related to the transaction from the transaction main body;
s3, the operation manager judges the type of operation according to the environment where the operation instruction is acquired, and calls the corresponding operation type according to the operation type;
s4, the object manager defines and fills corresponding content according to the object processed by the operation, when the object of a specific type needs to be interpreted, part or all of the operation of the object is executed, and when the encountered object type is an asset, the transaction interpretation is correspondingly carried out by adopting the asset manager;
and S5, collecting and summarizing the execution result of the operation by the operation manager, including error information in the execution process, and submitting the error information to the application of the upper layer.
Further, the main body list management module records basic information of the main body participating in the transaction after receiving the blockchain transaction by the transaction interpreter, and records corresponding information of different transaction scenes, the main body type management module classifies the main body type management module according to the basic information of the main body, the classification mode carries out corresponding division according to different transaction scenes, and the main body collaborative management module starts to define when the transaction is in signature confirmation and confirms the main body qualification by using a key to which the main body belongs by the main body signature management module.
Further, the operation manager includes, during operation: the operation definition management module selects corresponding operation types according to different transaction environments, creates a safe execution environment for the transaction through the operation execution management module, strictly defines content according to the operation definition management module, checks the pre-condition and authority of each element operation, and when the operation execution management module finishes execution, the result collection management module collects results and collects and submits the results to the previous layer of application.
The invention solves the problems that under the condition of not modifying core codes, the blockchain can support more transaction types, and the expansion of the transaction types and the service development limitation caused by the fact that the blockchain is limited in an actual service scene and the codes cannot be modified are solved through the main body manager, the object manager, the asset manager, the operation manager and the content manager.
Drawings
FIG. 1 is a flow chart of a method for blockchain universal transaction interpretation in accordance with the present invention;
FIG. 2 is a block diagram of a subject manager for use in the blockchain universal transaction interpreter in accordance with the present invention;
FIG. 3 is a block diagram of an operations manager for use in the blockchain universal transaction interpreter of the present invention;
FIG. 4 is a block diagram of a content manager for use in the blockchain universal transaction interpreter in accordance with the present invention;
FIG. 5 is a block diagram of a capital manager for use in the blockchain universal transaction interpreter of the present invention;
FIG. 6 is a block diagram of an object manager for use in the blockchain universal transaction interpreter in accordance with the present invention;
FIG. 7 is a flow chart of a second embodiment of a method for blockchain universal transaction interpretation in accordance with the present invention;
figure 8 is a flow chart of the method for blockchain universal transaction interpretation in accordance with the present invention for looping execution of transaction subject operations,
wherein: 101 a main body list management module; 102 a main body type management module; 103 a body signature management module; 104, a main body collaborative management module; 201 operating a definition management module; 202 an operation execution management module; 203 a result collection management module; 301 input a management module; 302 a queue management module; 303 an output management module; a 401 asset information management module; 402 an asset transfer management module; 403 an asset destruction management module; 501 an object type management module; 502 an object definition management module; 503 object interpretation module
Detailed Description
The invention will be described in further detail with reference to the drawings and the specific examples. It should be noted that the technical features of the embodiments of the present invention described below may be combined with each other as long as they do not collide with each other.
Embodiment one:
as shown in fig. 1 to 6, the present invention proposes a general interpreter for a blockchain, including a main body manager, an operation manager, a content manager, an asset manager, and an object manager, in order to solve the above problems.
In the principal manager, the principal forms used to manage and define parties involved in a transaction include, but are not limited to, one-to-one, one-to-many, one-to-zero (one-to-zero in transfers is used to destroy traffic), many-to-many, many-to-one, many-to-zero, zero-to-one, zero-to-many. The types of subjects include, but are not limited to, individuals, organizations, communities, and subjects that may exist in language as subjects.
Preferably, the subject manager specifically includes a subject list management module 101, a subject type management module 102, a subject signature management module 103, and a subject collaboration management module 104.
In the main body list management module 101, the main body list management module is used for recording basic information of a main body involved in the transaction, account information is recorded in account scenes, and the recorded information of different scenes can be different; in the body type management module 102, the type of each body in the list is defined, and three types of bodies of "account", "person" and "organization" are preferably selected and defined in the present invention, and the service according to the service scenario can be expanded, so that the protection scope of the present patent is not limited to the listed scope. In the account type, the account type is an explicit operable main body, is in one-to-one relation, and is owned and operated by the user; in the character type, a one-to-many relationship is that a person can have a plurality of accounts, the person is possession of the account, and the account is an operation object; in the organization type, in addition to the management of people and accounts, organizations and people, there is a new role as manager, which can be the representative of all people of the organization, one organization can have multiple people, the organization itself can also have its own account, the owner of its own account is this organization, and the user in the organization can operate its own account within the authority of the manager.
In the principal signature management module 103, a one-to-one key belonging to the principal is created for the three types of principal correspondence of "account", "person", "institution" and functions as a proof identity in a transaction, serving as a confirmation of participation in the transaction and an admission as an important proof of the principal.
In the main cooperative management module 104, a mode of validating the transaction is defined and confirmed, when a plurality of participants are required to conduct signature confirmation for one transaction, the main cooperative management module 104 is defined, the main cooperative management module 104 is instructed to conduct participant confirmation participation or non-participation, and the main cooperative management module 104 can verify whether the content and the signature of the transaction meet requirements according to the required counterpart.
In the operation manager, the operation type is used for managing and defining the operation types which can be performed by the participating main body, the operation types are based on the atomic types of the transaction, the operation types determine the service scene range which can be covered by the transaction, and the higher the definition abstraction degree of the operation types is, the wider the coverage range is.
Preferably, the operation types include, but are not limited to, four types of "add", "destroy", "transfer", "modify". The new addition may be a new addition object, asset, information, structure, and the destruction may be a destruction object, asset, information, transaction. Transfer is used to transfer an asset, the definition of which is broad, and objects including ownership interests are all applicable within the scope of the asset, specifically including "money", property, domain name, collection interests, intellectual property rights. The modification includes modification of an object, including not only modification of a specific object, but also modification of an abstract object, specifically including modification of property information of a house, modification of a user name, and modification of a structure. The operation manager comprises an operation definition management module 201, an operation execution management module 202 and a result collection management module 203.
The operation definition management module 201 is the core of the whole operation manager, determines the quality and the application scope of the whole operation process, in the operation definition management module 201, four operation types of definition of "new addition", "destruction", "transfer" and "modification" are realized, four English words are respectively used for representing the operation process of the actual interpreter, and the selected words may be different in different programming environments, but this does not affect the realization of the invention. In the implementation, for the newly added operation, firstly judging the basic attribute of the newly added object, if the basic attribute is a specific field, checking whether the current execution main body has corresponding authority to carry out the new addition, and if the current execution main body has the corresponding authority to carry out the new addition, newly adding the field at the required position; if the newly added object is an abstract object, including but not limited to an asset, it is also determined whether the executing principal has the authority to add the asset, if so, the asset is added, and if not, the asset is relinquished. For destroying operation, similar to newly added operation, different authority and condition inspection are carried out for different operation objects, if so, whether the deleting authority and condition are provided or not is inspected, and if so, the deleting is carried out; if it is an abstract object such as an asset, it is checked whether the right and conditions for destruction are present, if so, destruction is performed, and if not, the destruction operation is aborted. For the transfer operation, the basic attribute of the transfer object needs to be judged, the transfer object is preferably an asset, if the transfer object is the asset, the transfer permission check is carried out, if the execution main body has the transfer permission and conditions, the transfer is started, and the transfer object is transferred to the other side according to the required transfer object and quantity. For the modification operation and the destruction operation, the same procedure is used, except that the finally performed operation is modified to the specified value.
The invention discloses whether to possess authority and condition, wherein the authority does not refer to the authority set by an administrator in an IT system, no authority is set by the administrator on a blockchain, the authority is fixed by codes in an operation manager, and preferably, the data modification is only possible by the creator and the owner of the data; likewise, the condition is also a code-fixed condition, rather than a condition set up between participants, which is already set up at the time of release of the blockchain, and which, of course, includes logic of "condition judgment" itself, but which does not affect the definition of the condition itself, which is not changeable.
In the operation execution management module 202, a secure execution environment is created for the transaction, so that the execution process of the transaction can only be performed within the scope of the transaction participation subject, and the execution process is guaranteed to be performed strictly according to the operation defined in the operation definition management module 201, and the preconditions and the authority of each meta-operation are strictly checked, so as to avoid out-of-range and authority overflow.
In the result collection management module 203, the result collection management module is configured to collect the result of the operation execution module, including the error information in the execution process, and submit the result to the application of the previous layer after summarizing, where the result collection management module mainly functions as a container and a repeater, and couples the execution with the result site understanding.
In the content manager, the content for managing the execution operation of the main body logically plays a role of a buffer area, the execution manager extracts data from the content manager and returns a processing result to the content manager, and the content manager is also an external gateway of the transaction interpreter and provides an external input and output function. The objects that the content manager may manage include a certain field of the database table, a path to record the field, and a virtual object, such as an asset, to record a certain portion of asset information and corresponding values. The content manager includes an input management module 301, a queue management module 302, and an output management module 303.
In the input management module 301, it is used to receive external transaction input and perform basic validity and validity check on the transaction.
In the queue management module 302, for queuing transactions and inserting newly added transactions into verified queue locations, the queue management module preferably handles transactions with high handling costs, queues transactions involving the stability of the blockchain itself in front of the queue, and moves transactions with longer queuing times in the queue to the front of the queue, while clearing transactions for the expiration date.
In the output management module 303, the analysis process includes analysis of the error information of the transaction and processing of the corresponding error within the authority range of the output management module, preferably, when the transaction fails due to insufficient memory, the release of the memory is notified, if the disk space is insufficient, the release of the disk is notified, and if the account is frozen, the clearing of all subsequent transactions of the person in the queue is notified.
In the asset manager, the transaction manager is used for managing the assets related to the transaction main body and fully and definitely ensuring that each asset has clear and full attribution. Preferably, the process of asset management principal accounting includes recording asset allocation status, historical changes for the corresponding principal, and providing support when transfers and changes are required. To achieve the foregoing objective, the asset manager includes an asset information management module 401, an asset transfer management module 402, and an asset destruction management module 403.
In the asset information management module 401, basic information for managing assets, including but not limited to information of names, asset types, operation types that can be used, whether divisible, minimum units, initial total, minimum total, issuing subjects, asset status, and the like, express rights and assets. Operations on asset information include, but are not limited to, adding, destroying, modifying. The newly added operation procedure includes checking whether conditions for asset release are met when the corresponding asset is to be released, and specific checking matters include whether the name is repeated, whether the initial total amount meets the requirement, and whether the release subject is qualified. The destroying operation process comprises the step of checking whether destroying conditions are met when the state of the corresponding asset is changed to be unavailable, wherein the destroying conditions comprise whether the state of the asset is destroyable, whether a destroyed main body is qualified, and whether the residual total amount during destroying meets the requirement. The modification procedure includes information changes to the corresponding asset, such as name modification, which normally does not allow direct modification of the initial total amount of information issued, except for special scenarios.
In the asset transfer management module 402, ownership of the asset is transferred to other principals, either in whole or in part, according to the split attributes of the asset. Preferably, in a monetary asset, which is equivalent to a transfer operation, the transfer of the asset will occur in the smallest divisible unit due to the divisible nature of the money. There must be a sufficient balance for the transfer of the asset. In a property type asset, which is equivalent to a transfer operation, each asset needs to be transferred in one whole and cannot be split. In the asset transfer process, only positive number shares can be transferred normally, and only negative numbers are allowed in special accounting applications, corresponding to the red-strike concept in accounting.
In the asset destruction management module 403, the syntax corresponding to the generic transaction interpreter is used to destroy the asset, including as no recipients when the asset is rolled out. The assets need to be all assets when destroyed.
In an object manager for managing objects that a transaction interpreter can operate, the assets managed by the asset manager are a special case of an operable object, and are processed in the asset manager by being listed singly because the assets are the core business portion of the blockchain, the objects managed in the object manager include assets, databases, collections, fields, data, and also include objects that are some abstraction, such as structured game characters, specifically defined houses. When an object is defined, the description can be directly the description of the object, the abstract description of the object, and the collective description of the object. In the implementation of the object manager, namely, the definition and interpreter of the object description are implemented, in order to achieve the foregoing objective, the object manager includes an object type management module 501, an object definition management module 502, and an object interpretation module 503.
In the object type management module 501, the object types are used to define supported object types, where the object types are defined in code initially and are determined before the blockchain is on line, and the abstract degree of the object definition determines the operable range of the whole interpreter and also determines the technical range that the whole transaction interpreter can cover. Preferably, object types are initially defined including, but not limited to: processes, files, databases, collections, fields, data, sessions, assets, contracts, once the object type is determined, cannot be modified after the blockchain is online.
In the object definition management module 502, the composition of each type of object and the necessary degree of information required for the type of object are fully described for defining each type of object in detail. In the definition of the process, the process needs to define a process number, a process initiator, a process name, a process executable file path, a process start command, a process output command, a process page change control, a process CPU control, a process memory control, a process network control, a process disk IO control and a process GPU control. In defining a file, the file needs to define a file number, a file path, a file type, a file name, a file size, a file creation time, a file last modification time, a creator of the file, and a hash of the file. In the definition of the database, the database needs to define a database number, a database name, a database login name, a database password, a database connection command, a database address, a database port, a database character set, a database type and an owner of the database. For the definition of a collection, the collection needs to define the number of the collection, the name of the collection, the owner of the collection, the creation time of the collection, and the last modification time of the collection. For the definition of a field, the field needs to define the number of the field, the field name, the field code, the owner of the field, the creation time of the field, and the last modification time of the field. In the definition of data, data needs to define a data number, a data type, a data length, a value of data, an owner of data, a creation time of data, and a last modification time of data. In the definition of the session, the session number, the session name, the session authorization number, the session state, the session data set, the initiator of the session, the receiver of the session, the type of the session, the concurrency control of the session, the flow control of the session, the command supported by the session, the owner of the session, the creation time of the session, and the last use time of the session are defined. In the definition of an asset, the asset is directly managed by the asset manager and no additional processing is performed separately. In definition of a contract, the contract needs to define the number of the contract, the name of the contract, the code block of the contract, the type of the contract, the maximum execution step number of the contract, the executed times of the contract, the influence range of the contract, the owner of the contract, the creation time of the contract, and the final execution time of the contract.
In the object interpretation module 503, for interpreting an object of a specific type, the interpreted operations include meta-operations in the operation manager, corresponding to part or all of the above several types, respectively. In the process, a new process is created and appointed according to the content defined by the object when the new adding and destroying operation is added, and the appointed process is ended or closed in the destroying operation. In the file, corresponding to the operations of adding, modifying, destroying and transferring; when a file is newly added, creating a new file on a designated path; when the file needs to be changed, the basic information of the file is changed into a designated new value; when destroying the file, deleting the file with a specified path, but checking whether the owner of the file is the main body; when transferring a file, the file is moved from a specified path to a specified location, or the owner of the file is transferred to another body. In the database operation, corresponding to the new adding, modifying and destroying operation; when the database is newly added, a database is created for the appointed main body; when the database is modified, the basic information of the database is modified; when destroying the database, deleting the appointed database; both the modification and destruction operations require checking whether the principal is in possession; in the set, corresponding to the operations of adding, modifying, destroying and transferring; when the set is newly added, a new set is created at a designated position; when the set is modified, the designated set is modified into designated information; when destroying the collection, deleting the appointed collection; checking the owners of the collection both when modifying and destroying the collection; when transferring a collection, the owner of the designated collection is assigned to the other principal. In the field, the new adding and destroying operation is correspondingly carried out; in the newly added field operation, a new field is created at a designated position; in the destroy field operation, the specified field is deleted. In the data, corresponding to the newly added and modified operation; in the newly added data, adding a specified value to a specified data storage area; in modifying the data, the data is modified to a specified value, and if the content of the data needs to be emptied, the data is modified to be empty. In the session, corresponding to the newly added and destroyed operation; when a new session is added, a new session is created according to the session type, which is a remote session or a local session; when destroying the session, the appointed session is ended or the session is forcedly destroyed, and when destroying, whether the current main body is the owner of the session needs to be checked. In the contract, corresponding to the newly added operation; when a contract is newly added, a specified code is placed in a specified area, the scope which can be influenced by the contract is limited according to the scope defined by the contract, the execution of the contract is finished within the scope of the maximum step defined by the contract, and once the contract is created, the contract cannot be modified, destroyed and deleted, and cannot be transferred.
Embodiment two:
7-8, to better explain the general transaction interpreter and its interpretation method, the present invention is described by taking the example that a block chain receives a host intermediary asset transfer transaction:
s1, when a transaction interpreter receives a blockchain transaction, the interpreter decomposes the transaction, reads transaction main body information through a main body manager, obtains three participants of the transaction main body, circularly reads the participant information for the three participants, and then judges the participant type;
1) When the participant is a common participant, then judging whether the current transaction contains the signature of the participant, whether the participant qualifies for participating in the transaction, and whether the participant owns enough assets;
2) When the participant is a participant of the mechanism, acquiring a manager of the mechanism, judging whether the current transaction has a signature of the manager, judging whether the mechanism has qualification of participating in the transaction, acquiring an asset account of the mechanism, and judging whether the mechanism has enough assets;
and returning the identity information and validity judgment of the participant after the completion of the judgment in both the above two cases, and if any one of the legitimacy and the condition is not satisfied, discarding the transaction.
S2, the content manager reads basic information of a transaction main body, and extracts operation and content related to the transaction from the transaction main body;
s3, extracting transaction main body description information and operation information by the operation manager, extracting each transaction main body cycle participating in the transaction, and then starting to read the operation information by an operation execution management module in the operation manager and judging whether the main body has corresponding operation qualification, if so, directly extracting an object of the corresponding operation;
s4, the object manager circularly extracts corresponding operation objects according to different main bodies, acquires operation object information, judges the validity of the object information, whether the operation has the operation condition of the object or not and the validity of the object information under the operation, if the operation meets the three conditions, the operation objects are put into the operation, and an operation list of the filled objects is summarized after the circular operation objects are ended;
the principal manager reads the minimum participating principal requirement for the transaction to take effect and determines whether the current transaction contains a participating principal signature that meets the minimum requirement, at least 2 signatures being required for 3 participants in the intervening transaction.
S5, the operation manager loops through each filling object of the operation list, and the steps of the loop comprise: firstly, the operation information of the object is read, the operation information is interpreted and executed through an operation execution management module, only transfer operation is listed, steps of the new, modified and destroyed operation are similar, then asset transfer operation is started to be executed, when the object is an asset, asset information is read by an asset manager, the asset manager is a special case of the object manager, and when the object is any object except the asset, the object manager is adopted;
the present embodiment preferably employs asset objects, the steps for processes, files, databases, collections, fields, data, sessions, contracts being similar to the operational steps of an asset;
the asset manager checks whether the asset can be transferred, if so, checks whether the principal has enough assets, if so, checks whether transfer data of the asset meets the minimum unit limit, if so, checks whether the holder of the asset is signed by the content manager, if so, checks whether the link is signed by the holder, the hosted party and the receiver signature are also valid, if the hosted party checks whether the hosted party or the receiver of the asset is signed by the intermediary, of course, the receiver can sign on his own name if the intermediary is not signed, after the above-mentioned link check is finished, the asset manager downloads the asset from the holder, then uploads the receiver of the asset, finally returns the asset transfer result, loops through other subjects and operation steps, finally the transaction summary subjects operate all the results and submit to the previous layer of application.
The invention solves the problems that under the condition of not modifying core codes, the blockchain can support more transaction types, and the expansion of the transaction types and the service development limitation caused by the fact that the blockchain is limited in an actual service scene and the codes cannot be modified are solved through the main body manager, the object manager, the asset manager, the operation manager and the content manager.
The above description is only of the preferred embodiments of the present invention, and should not be taken as limiting the technical scope of the present invention, but all changes and modifications that come within the scope of the invention as defined by the claims and the specification are to be embraced by the invention.

Claims (9)

1. A universal transaction interpreter for a blockchain, the interpreter comprising:
the main body manager: the method comprises the steps that each party of a main body for managing and defining a transaction is used for managing and participating in the transaction, after a block link receives the transaction, the main body manager reads the information of the transaction main body to obtain participants of the transaction main body, the participant information is circularly read, then the types of the participants are judged, on the premise that the legality of the participant main body is ensured, whether the main body has the condition of operating a specified object or not is checked, namely, when the participants are ordinary participants, whether the current transaction contains the signature of the participants or not is judged, whether the participants have the qualification of participating in the transaction or not, and whether the participants have enough assets or not; when the participant is a participant of the mechanism, acquiring a manager of the mechanism, judging whether the current transaction has a signature of the manager, judging whether the mechanism has qualification of participating in the transaction, acquiring an asset account of the mechanism, and judging whether the mechanism has enough assets; if the device is provided with the main body, the main body operation is carried out, and if the device is not provided with the main body operation, the corresponding main body is discarded;
content manager: content for managing operations performed by the subject, returning processing results to the content manager when data is extracted from the content manager, the content manager managing the content including, but not limited to, fields of a database table, paths of recording fields, recording asset information, and corresponding value information;
operation manager: the method comprises the steps of managing operation types which are performed corresponding to a defined participation main body, wherein the operation types comprise but are not limited to 'newly added', 'destroyed', 'transferred', 'modified', different operation types are defined for different transaction environments, an execution environment is created according to the defined operation types, and after the execution results are collected, the execution environment is summarized and submitted to a previous layer of application;
asset manager: the system is used for managing assets related to a transaction main body, and defining attribution is carried out on the assets, wherein the asset management comprises asset information management, asset transfer management and asset destruction management;
object manager: for managing objects that the transaction interpreter can operate, fully describing the composition of the different types of objects and the degree of necessity of containing information by defining the types of objects supported by the transaction interpreter, developing object resolution when interpretation is required for a particular transaction,
the subject manager, content manager, operations manager, asset manager, object manager are cross-meshed with each other.
2. A universal transaction interpreter for blockchains as in claim 1, wherein the subject manager comprises:
the main body list management module: the method comprises the steps of recording basic information of a participation subject in the transaction, wherein the basic information comprises, but is not limited to, the name of the participation subject, the participation time and the type;
the main body type management module: the method comprises the steps of defining the type of each main body in a main body list, and correspondingly expanding the main body types according to different block transaction scenes;
the main body signature management module: for creating a one-to-one key for each principal that is itself and that acts as a proof of identity in the transaction, serving as a proof of confirmation of participation in the transaction and an admission as to the principal;
the main body cooperative management module: the method is used for defining and confirming the effective mode of the transaction, takes the transaction at a defined time point when a plurality of participants are required to conduct signature confirmation, and the main cooperative management module verifies whether the content and the signature of the transaction meet the requirements according to the required counterpart.
3. A universal transaction interpreter for blockchains as defined in claim 1, wherein the content manager comprises:
an input management module: the system is used for receiving external transaction input and performing basic validity and validity check on the transaction;
a queue management module: for queuing transactions and inserting newly added transactions into verified queue positions;
and an output management module: the method is used for collecting the execution results of the transaction, and further analyzing and summarizing the transaction results.
4. A universal transaction interpreter for blockchains as in claim 1, wherein the operations manager comprises:
an operation definition management module: the method is used for judging the environment of the trade, and defining the mode of trade operation according to the environment, wherein the operation types include but are not limited to 'adding', 'destroying', 'transferring', 'modifying';
the operation execution management module: the method is used for creating a safe execution environment for the transaction, ensuring that the execution process of the transaction can only be carried out within the scope of a transaction participation main body, ensuring that the execution process is carried out strictly according to the operation defined in the definition management module, and strictly checking the pre-condition and the authority of each meta-operation to avoid out-of-range and authority overflow;
the result collection management module: and the system is used for collecting the results of the operation execution management module and summarizing and submitting the results to the application at the last layer.
5. A universal transaction interpreter for blockchains as in claim 1, wherein the asset manager comprises:
asset information management module: basic information for managing assets, including but not limited to information on names, asset types, operation types that can be used, whether divisible, minimum units, initial total, minimum total, issuing principals, asset status, and the like;
asset transfer management module: the method comprises the steps of transferring ownership of an asset, and transferring all or part of the ownership to other subjects according to the partition attribute of the asset;
asset destruction management module: for destroying the asset.
6. A universal transaction interpreter for blockchains as in claim 1, wherein the object manager comprises:
object type management module: for defining object types supported by the transaction interpreter, the object types being defined by an initial code, the initial defining object types including, but not limited to, processes, files, databases, collections, fields, data, sessions, assets, contracts;
object definition management module: the method is used for defining various types of objects in detail, and fully describing the composition of the various types of objects and the necessary degree of self-contained information;
an object interpretation module: for purposes of interpreting a specific type of object, interpreted operations include, but are not limited to, meta-operations in an operations manager, corresponding to some or all of a process, file, database, collection, field, data, session, asset, contract, respectively.
7. A universal transaction interpretation method for blockchains employing the transaction interpreter of claim 1, wherein the transaction interpretation method comprises:
s1, when a transaction interpreter receives a blockchain transaction, the interpreter decomposes the transaction, reads the information of a transaction main body through a main body manager and judges the validity of the transaction main body, and checks whether the transaction main body has the condition for operating a specified object or not, if the condition meets the validity and the condition, S2 is carried out, and if any one of the validity and the condition is not met, the transaction main body is regarded as abandoned;
s2, the content manager reads basic information of a transaction main body, and extracts operation and content related to the transaction from the transaction main body;
s3, the operation manager judges the type of operation according to the environment where the operation instruction is acquired, and calls the corresponding operation type according to the operation type;
s4, the object manager defines and fills corresponding content according to the object processed by the operation, when the object of a specific type needs to be interpreted, part or all of the operation of the object is executed, and when the encountered object type is an asset, the transaction interpretation is correspondingly carried out by adopting the asset manager;
and S5, collecting and summarizing the execution result of the operation by the operation manager, including error information in the execution process, and submitting the error information to the application of the upper layer.
8. The universal transaction interpretation method for blockchain as in claim 7, wherein the principal list management module records basic information of the principal involved in the transaction after the transaction interpreter receives the blockchain transaction, different transaction scenes record corresponding information, the principal type management module classifies the principal type management module according to the basic information of the principal, the classification mode performs corresponding classification according to the different transaction scenes, and the principal collaborative management module starts to define when the transaction is in signature confirmation and confirms the principal qualification by using a key to which the principal itself belongs through the principal signature management module.
9. The universal transaction interpretation method for blockchains as claimed in claim 7, wherein the operation manager includes, during operation: the operation definition management module selects corresponding operation types according to different transaction environments, creates a safe execution environment for the transaction through the operation execution management module, strictly defines content according to the operation definition management module and checks the preconditions and the authorities of each element operation, and after the operation execution management module finishes executing, the result collection management module collects the results and collects and submits the results to the previous layer of application.
CN201910475272.XA 2019-06-03 2019-06-03 Universal transaction interpreter for blockchain and interpretation method thereof Active CN112037053B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910475272.XA CN112037053B (en) 2019-06-03 2019-06-03 Universal transaction interpreter for blockchain and interpretation method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910475272.XA CN112037053B (en) 2019-06-03 2019-06-03 Universal transaction interpreter for blockchain and interpretation method thereof

Publications (2)

Publication Number Publication Date
CN112037053A CN112037053A (en) 2020-12-04
CN112037053B true CN112037053B (en) 2023-12-22

Family

ID=73575806

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910475272.XA Active CN112037053B (en) 2019-06-03 2019-06-03 Universal transaction interpreter for blockchain and interpretation method thereof

Country Status (1)

Country Link
CN (1) CN112037053B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113537990A (en) * 2021-08-09 2021-10-22 泸州发展智汇科技有限公司 National house asset management system based on block chain

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150102527A (en) * 2014-02-28 2015-09-07 주식회사 에버건설 Asset management system using the ubiquitous one day, and its operating method
CN107018125A (en) * 2017-02-17 2017-08-04 阿里巴巴集团控股有限公司 A kind of block catenary system, date storage method and device
CN108282474A (en) * 2018-01-18 2018-07-13 山东大学 The maintaining method of digital asset trade identity based on block chain
CN109218079A (en) * 2018-08-16 2019-01-15 北京京东尚科信息技术有限公司 A kind of block chain network, dispositions method and storage medium
CN109615517A (en) * 2018-12-07 2019-04-12 北京瑞卓喜投科技发展有限公司 A kind of intelligence contract execution method and intelligent contract execute system
CN109710384A (en) * 2018-12-29 2019-05-03 杭州趣链科技有限公司 A kind of safe Java intelligence contract explanation enforcement engine and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150102527A (en) * 2014-02-28 2015-09-07 주식회사 에버건설 Asset management system using the ubiquitous one day, and its operating method
CN107018125A (en) * 2017-02-17 2017-08-04 阿里巴巴集团控股有限公司 A kind of block catenary system, date storage method and device
CN108282474A (en) * 2018-01-18 2018-07-13 山东大学 The maintaining method of digital asset trade identity based on block chain
CN109218079A (en) * 2018-08-16 2019-01-15 北京京东尚科信息技术有限公司 A kind of block chain network, dispositions method and storage medium
CN109615517A (en) * 2018-12-07 2019-04-12 北京瑞卓喜投科技发展有限公司 A kind of intelligence contract execution method and intelligent contract execute system
CN109710384A (en) * 2018-12-29 2019-05-03 杭州趣链科技有限公司 A kind of safe Java intelligence contract explanation enforcement engine and method

Also Published As

Publication number Publication date
CN112037053A (en) 2020-12-04

Similar Documents

Publication Publication Date Title
JP7377312B2 (en) Systems and methods realized by blockchain
EP3777093A2 (en) Blockchain-based service rental method, apparatus, and system, and electronic device
KR20200067116A (en) Blockchain smart contract update using decentralized decision
US11593321B2 (en) Systems and methods of self-administered protocols on a blockchain platform
CN114723447A (en) Agent-based graph-based transaction-intensive integrated feedback within blockchain systems
CN107679045A (en) Copyright authorization management method and system
CN109614209A (en) A kind of task processing method, application server and system
CN112632629B (en) Voting management method, device, medium and electronic equipment based on block chain
US20220156837A1 (en) Distributed ledger implementation for entity formation and monitoring system
KR101876674B1 (en) Method of managing common account using block chain and system performing the same
CN109003185A (en) A kind of method for building up, device, calculating equipment and the storage medium of intelligence contract
US11627122B2 (en) Inter-system linking method and node
Cano et al. Distributed framework for electronic democracy in smart cities
CN109493224A (en) A kind of block chain picture social intercourse system
CN111340628A (en) Asset information management method and device based on block chain
KR20200081735A (en) System for Evaluating a Proposal Based Block Chain and Method for Storing Data
CN114363352A (en) Block chain-based Internet of things system cross-chain interaction method
CN112037053B (en) Universal transaction interpreter for blockchain and interpretation method thereof
TW201837871A (en) Online voting and ballot counting system based on blockchain and method thereof
KR102139551B1 (en) Method and server for managing testament
CN103065027B (en) Message leaving method and device provided for third-party social network site (SNS) web game
CN111177171A (en) Service data authentication and management method and system based on block chain
CN110213160A (en) A kind of message back management method and system
CN110557394B (en) Parallel chain management method, equipment and storage medium
Antal et al. Distributed Ledger Technology Review and Decentralized Applications Development Guidelines. Future Internet 2021, 13, 62

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210401

Address after: Room 2201, 703c, Desai science and technology building, 9789 Shennan Avenue, high tech Zone community, Yuehai street, Nanshan District, Shenzhen, Guangdong 518000

Applicant after: Benchainless Technology (Shenzhen) Co.,Ltd.

Address before: 361006 unit 202, No.50, anling 2nd Road, Huli District, Xiamen City, Fujian Province

Applicant before: XIAMEN INSTINCT BLOCKCHAIN TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant