CN112037053A - Universal transaction interpreter for block chain and interpreting method thereof - Google Patents

Universal transaction interpreter for block chain and interpreting method thereof Download PDF

Info

Publication number
CN112037053A
CN112037053A CN201910475272.XA CN201910475272A CN112037053A CN 112037053 A CN112037053 A CN 112037053A CN 201910475272 A CN201910475272 A CN 201910475272A CN 112037053 A CN112037053 A CN 112037053A
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.)
Granted
Application number
CN201910475272.XA
Other languages
Chinese (zh)
Other versions
CN112037053B (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
Xiamen Instinct Blockchain Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Instinct Blockchain Technology Co ltd filed Critical Xiamen Instinct Blockchain Technology 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

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • 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

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • General Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a universal transaction interpreter for a block chain, which comprises a main body manager, an operation manager, a content manager, an asset manager and an object manager, and also provides a universal transaction interpretation method, wherein when the transaction interpreter receives a block chain transaction, the interpreter decomposes the transaction, reads information of a transaction main body and judges the legality of the transaction main body; reading basic information of a transaction main body, and extracting operation and content related to the transaction from the transaction main body; judging the type of operation according to the environment where the operation instruction is obtained, 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 operations to which the object belongs; the execution results of the operation are collected and gathered, including error information in the execution process, and the operation results are submitted to the upper layer application, so that the problems of transaction type expansion and limited service development caused by the fact that a block chain is limited in an actual service scene and cannot be modified by codes are solved.

Description

Universal transaction interpreter for block chain and interpreting method thereof
Technical Field
The invention relates to the technical field of block chains, in particular to a universal transaction interpreter for a block chain and an interpreting method thereof.
Background
In a blockchain, transaction processing is the most core component of the blockchain, and the transaction types supported by the blockchain determine the capability range of the blockchain, generally, in order to enable the blockchain to support as many service scenes as possible, people create as many transaction types as possible before the blockchain is on line, but in practical application, no matter how many transaction types are created, no all service scenes are covered after the blockchain is on line, the characteristics of the blockchain are that modification cannot be performed after the blockchain is on line, and if modification is performed, divergence is caused, so that the service of the blockchain in practical service application is incomplete, and a user can be provided with a sense that the service of the blockchain is very good. Therefore, how to solve the problem of transaction type loss caused by continuous extension of services in the block chain and avoid forking becomes a problem which needs to be solved urgently.
Disclosure of Invention
The invention aims to provide a universal transaction interpreter for a block chain and an interpreting method thereof, which solve the problems that the block chain can support more transaction types under the condition of not modifying a core code, and the block chain is limited by the expansion of the transaction types and the limitation of service development caused by the incapability of modifying codes in an actual service scene.
A universal transaction interpreter for a blockchain, the interpreter comprising:
a subject manager: the system comprises a main body manager, a block link, a main body management module and a block management module, wherein the main body manager is used for managing and defining each main body participating in a transaction, reading transaction main body information by the main body manager after the transaction is received by the block link, checking whether the main body has the condition of operating a specified object on the premise of ensuring the validity of the participating main body, if so, performing main body operation, and if not, discarding the corresponding main body;
a content manager: the content management system is used for managing the content of the operation executed by the main body, and returning the processing result to the content manager after extracting data from the content manager, wherein the content manager manages the content and comprises but is not limited to fields of a database table, paths of recording fields, recording asset information and corresponding value information;
an operation manager: the method comprises the steps of managing operation types corresponding to defined participation subjects, wherein the operation types include but are not limited to 'adding', 'destroying', 'transferring' and 'modifying', different operation types are defined for different transaction environments, execution environments are created according to the defined operation types, and after execution results are collected, the execution environments are collected and submitted to upper-layer application;
an asset manager: the system is used for managing the assets related to a transaction main body and defining attribution to the assets, wherein the asset management comprises asset information management, asset transfer management and asset destruction management;
an object manager: the system comprises objects used for managing the operation of a transaction interpreter, and is characterized in that the system sufficiently describes the composition of different types of objects and the necessary degree of contained information by defining the types of the objects supported by the transaction interpreter, and develops object analysis when the specific transaction needs to be explained;
the main body manager, the content manager, the operation manager, the asset manager and the object manager are connected with each other in a cross mesh mode.
Further, the agent manager includes:
a main body list management module: the basic information is used for recording the basic information participating in the main body in the transaction, and the basic information comprises but is not limited to the name, participation time and type of the participating main body;
a subject type management module: the system comprises a main body list, a database and a database, wherein the main body list is used for defining the type of each main body in the main body list, and the type of the main body is correspondingly expanded according to different block transaction scenes;
a subject signature management module: the system is used for creating a one-to-one key belonging to the system for each subject, and plays a role of proving identity in the transaction, and plays a role of confirming participation in the transaction and acknowledging as an important proof of the subject;
a main body collaborative management module: the main body cooperation management module is used for defining and confirming a transaction validation mode, taking the transaction as a defined time point when a plurality of participants need to carry out signature confirmation, and verifying the transaction content and whether the signature meets 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 carrying out basic validity and validity check on the transaction;
a queue management module: the queue management system is used for arranging the transactions according to the queue and inserting the newly added transactions into the verified queue position;
an output management module: the system is used for collecting the execution result of the transaction and further analyzing and summarizing the transaction result.
Further, the operation manager includes:
an operation definition management module: the method is used for judging the environment of a trading place, and defining the mode of trading 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 system is used for establishing a safe execution environment for the transaction, ensuring that the execution process of the transaction can only be carried out within the range of a transaction participation subject, ensuring that the execution process is carried out strictly according to the operation defined in the definition management module, strictly checking the precondition and the authority of each element operation and avoiding border crossing and authority overflow;
a 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 upper-layer application.
Further, the asset manager comprises:
the asset information management module: basic information for managing assets, including but not limited to, information on the asset and the name, asset type, operation type that can be used, divisible or not, minimum unit, initial total amount, minimum total amount, issuing principal, asset status, etc. expression rights;
an asset transfer management module: the system is used for transferring ownership of the assets and transferring all or part of the ownership to other subjects according to the partition attributes of the assets;
an asset destruction management module: for destroying assets.
Further, the object manager includes:
an object type management module: for defining object types supported by the transaction interpreter, the object types being defined by initial code, the initial defined object types including but not limited to processes, files, databases, collections, fields, data, sessions, assets, contracts;
an object definition management module: the system is used for defining each type of object in detail, and fully describing the composition of each type of object and the necessary degree of information contained in the object;
the object interpretation module: for interpreting objects of a specific type, the interpreted operations include, but are not limited to, meta-operations in an operations manager, corresponding to some or all operations in a process, file, database, collection, field, data, session, asset, contract, respectively.
The invention also provides a general transaction interpretation method for the block chain, which comprises the following steps:
s1 when the block chain transaction is received by the transaction interpreter, the interpreter decomposes the transaction, reads the information of the transaction subject through the subject manager and judges the legality of the transaction subject, checks whether the transaction subject has the conditions for operating the designated object, if yes, the operation enters S2, and if no, the transaction is considered to be abandoned;
s2, the content manager reads the basic information of the transaction body and extracts the operation and content related to the transaction from the transaction body;
s3, the operation manager judges the operation type according to the environment when the operation instruction is obtained, 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 operation, when the object of specific type needs to be explained, executes the partial or whole operation of the object, when the object type is asset, the asset manager is adopted to do transaction explanation;
s5 the operation manager collects and summarizes the operation result, including error information in the process of execution, and submits the result to the upper layer application.
Further, the main body list management module records basic information of a main body involved in the transaction after the transaction interpreter receives the blockchain transaction, and records corresponding information in different transaction scenes, the main body type management module classifies according to the basic information of the main body, the classification mode correspondingly divides according to different transaction scenes, and the main body cooperation management module starts to define when the transaction is in signature confirmation and confirms the qualification of the main body by using a key to which the main body belongs through the main body signature management module.
Further, the operation manager comprises, during operation: the operation definition management module selects corresponding operation types according to different judged transaction environments, creates a safe execution environment for the transaction through the operation execution management module, defines contents strictly according to the operation definition management module and checks the precondition and the authority of each element operation, and after the operation execution management module finishes executing, the result collection management module collects results and summarizes the results and submits the results to the upper-layer application.
The invention solves the problem that the block chain can support more transaction types under the condition of not modifying the core code through the main body manager, the object manager, the asset manager, the operation manager and the content manager, and solves the problems of transaction type expansion and limited service development caused by the fact that the block chain is limited by the code that can not be modified in the actual service scene.
Drawings
FIG. 1 is a flow chart of a method for explaining blockchain universal transactions according to the present invention;
FIG. 2 is a block diagram of a principal manager for use in a blockchain universal transaction interpreter according to the present invention;
FIG. 3 is a block diagram of the operation manager for use in the blockchain universal transaction interpreter according to the present invention;
FIG. 4 is a block diagram of a content manager for use in a blockchain universal transaction interpreter according to the present invention;
FIG. 5 is a block diagram of a capital manager for use in a blockchain universal trade interpreter as referred to in the present invention;
FIG. 6 is a block diagram of the object manager used in the blockchain universal transaction interpreter according to the present invention;
FIG. 7 is a flowchart illustrating a second exemplary embodiment of a method for interpreting universal block-chain transactions according to the present invention;
FIG. 8 is a flowchart illustrating the operation of the transaction body executed in a loop by the blockchain universal transaction interpretation method according to the present invention,
wherein: 101 a main body list management module; 102 a subject type management module; 103 a subject signature management module; 104 a main body cooperation management module; 201 operating a definition management module; 202 operating an execution management module; 203 result collection management module; 301 input management module; 302 a queue management module; 303 an output management module; 401 asset information management module; 402 an asset transfer management module; 403 asset destruction management module; 501 object type management module; 502 an object definition management module; 503 object interpretation module
Detailed Description
The invention is described in further detail below with reference to the figures and specific examples. It should be noted that the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
The first embodiment is as follows:
in order to solve the above problems, the present invention provides a general interpreter for a blockchain, which includes a main body manager, an operation manager, a content manager, an asset manager, and an object manager, as shown in fig. 1 to 6.
In the principal manager, for managing and defining the principal of parties involved in the transaction, the principal forms 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. Types of subjects include, but are not limited to, individuals, organizations, groups, and subjects that can be linguistically present as subjects.
Preferably, the agent manager specifically includes an agent list management module 101, an agent type management module 102, an agent signature management module 103, and an agent cooperation management module 104.
In the main body list management module 101, the main body list management module is used for recording basic information participating in the main body in the transaction, and for account type scenes, the recorded information is account information, and the recorded information of different scenes may be different; in the subject type management module 102, the type of each subject in the list is defined, and in the invention, three types of subjects of "account", "person" and "organization" are preferably selected and defined, which can be expanded according to the business of the business scenario, and the protection scope of the patent is not limited to the listed range. In the account type, the account is a definite operable subject and is in a one-to-one relationship, and the account is owned by the account and an operator; in the character type, the relationship is one-to-many, one person can have a plurality of accounts, the person is owned by the account, and the account is an operation object; in the organization type, besides the management of people and accounts and organizations and people, a new role is a manager, the manager can be used as a representative of all people of the organization, one organization can have a plurality of people, the organization can also have own account, the owner of the own account of the organization is the organization, and users in the organization can operate the own account within the authorization range of the manager.
In the principal signature management module 103, the system is used for correspondingly creating one-to-one keys belonging to the system for the three types of principal, namely "account", "person" and "institution", and plays a role in proving identity in the transaction, and plays a role in confirming participation in the transaction and acknowledging as an important proof of principal.
In the principal cooperation management module 104, the transaction validation mode is defined and confirmed, when a transaction requires signature confirmation by a plurality of participants, the principal cooperation management module 104 defines and instructs the principal cooperation management module 104 to confirm participation or non-participation of the participants, and the principal cooperation management module 104 verifies whether the transaction content and the signature meet the requirements according to the required counterpart.
The operation manager is used for managing and defining the operation types which can be carried out by the participating subjects, the operation types are based on the atomic types of the transaction, the operation types determine the range of the business scenes which can be covered by the transaction, and the higher the abstraction degree of the definition 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", and "modify". The new addition can be an object, asset, information and structure, and the destruction can be an object, asset, information and transaction. The transfer is used for transferring assets, the definition of the assets is wide, and objects including owner rights are applicable to the inclusion range of the assets, specifically including money, real estate, domain names, collection rights and intellectual property rights. The modification includes modifying an object, including not only a specific object, but also an abstract object, specifically including modifying property information of a house, modifying a user name, and modifying 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 range of the whole operation process, and in the operation definition management module 201, the definitions of four operation types, namely 'newly adding', 'destroying', 'transferring', 'modifying', are realized, and in the operation process of the actual interpreter, the four English words are respectively used for representation, and the selected words in different programming environments may be different, but the realization of the invention is not influenced. In the implementation, for the new adding operation, firstly, the basic attribute of the new added object is judged, if the basic attribute is a specific field, whether the current execution main body has the corresponding authority to be added is checked, and if the current execution main body has the corresponding authority to be added, the field is added at the required position; if the new object is an abstract object including but not limited to an asset, whether the executed subject has the authority to add the asset is also judged, if so, the asset is added, and if not, the asset addition is abandoned. For the destruction operation, similar to the addition operation, different authority and condition checks are carried out on different operation objects, if the operation objects are fields, whether the operation objects have the deleted authority and condition is checked, and if the operation objects have the authority, the operation objects are deleted; if the object is an abstract object such as an asset, whether the object has the right and the condition for destroying is checked, if so, the object is destroyed, and if not, the operation of destroying is abandoned. For the transfer operation, the basic attribute of the transfer object is needed to be judged, the transfer object is preferably an asset, if the transfer object is an asset, the authority check of the transfer is carried out, if the execution subject has the authority and the conditions of the transfer, the transfer is started, and the transfer is carried out to the other side according to the required transfer object and the required number. The same procedure is used for the modify operation and the destroy operation, except that the final operation is modified to the specified value.
Whether the system has the authority and the conditions or not is determined, the authority does not refer to the authority set by an administrator in the IT system, the authority is not set by the administrator on the block chain, the authority is fixed by codes in an operation manager, and preferably, only a creator and an owner of the data can modify the data; similarly, the condition is also a condition fixed by the code, not a condition proposed between participants, the condition is already set at the time of release of the blockchain, and all nodes on the blockchain need to abide by, of course, the condition itself contains logic of "condition judgment", but it does not affect the definition of the condition itself, which is not changeable.
The operation execution management module 202 is configured to create a secure execution environment for the transaction, ensure that the execution process of the transaction can only be performed within the scope of the transaction participating subject, ensure that the execution process is performed strictly according to the operations defined in the operation definition management module 201, and strictly check the preconditions and permissions of each meta-operation, thereby avoiding border crossing and permission overflow.
The result collection management module 203 is configured to collect results of the operation execution module, including error information during execution, and submit the results to the upper layer application after gathering, and the result collection management module mainly functions as a container and a repeater, and decouples execution from result processing.
In the content manager, the content manager is used for managing the content of the execution operation of the main body, logically acts as a buffer zone, the execution manager extracts data from the content manager and returns the processing result to the content manager, and the content manager is also an external access of the transaction interpreter and provides external input and output functions. Objects that the content manager can manage include a field of a database table, a path of a record field, and a virtual object, such as an asset, a portion of record asset information, and a corresponding value. The content manager includes an input management module 301, a queue management module 302, and an output management module 303.
The input management module 301 is configured 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 the verified queue position, preferably, the queue management module preferentially processes transactions with high handling fees, queues transactions related to stability of the blockchain itself in front of the queue, and moves transactions queued in the queue for a longer time to the front of the queue while clearing the valid period of the transaction.
In the output management module 303, the system is configured to collect the execution result of the transaction, and further analyze and summarize the transaction result, where the analysis process includes analyzing the error information of the transaction, and performing processing on the corresponding error within the authority range of the output management module, preferably, when the transaction fails to be processed due to insufficient memory, the system notifies to release the memory, and if the disk space is insufficient, the system notifies to release the disk, and if the account is frozen, the system notifies to clear all subsequent transactions of the person in the queue.
In the asset manager, the system is used for managing the assets related to the transaction body and ensuring that each asset has clear and sufficient attribution. Preferably, the process of accounting for the asset management entity includes recording asset taken-position, historical changes for the corresponding entity and providing support when transfers and changes are required. In order to achieve the above object, 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 includes, but is not limited to, names, asset types, operation types that can be used, divisible or not, minimum units, initial total amount, minimum total amount, issuing subject, asset status, etc. information expressing rights and assets. Operations on asset information include, but are not limited to, addition, destruction, modification. The adding operation process comprises the steps of checking whether the condition for issuing the assets is met or not when the corresponding assets are to be issued, wherein the specific checking items comprise whether names are repeated or not, whether the initial total amount meets the requirement or not and whether the issuing subject is qualified or not. The destroying operation process comprises the step of checking whether destroying conditions are met or not when the state of the corresponding asset is changed into unavailable, wherein the destroying conditions comprise whether the asset state is destructible or not, whether a destroyed main body is qualified or not and whether the residual total amount meets the requirements or not during destroying. The modification operation process includes information change of corresponding assets, such as name modification, and normally does not allow direct modification of the information of the initial total amount issued except for special scenes.
In the asset transfer management module 402, it is used to transfer ownership of an asset to other principals, and to transfer all or part of the ownership to other principals according to the partition property of the asset. Preferably, in a money-like asset, the transfer operation is equivalent to a transfer operation, and due to the divisible nature of money, the transfer will be performed in the smallest divisible unit when the asset is transferred. An adequate balance must be available for asset transfer. In the property type assets, which correspond to transfer operations, each asset needs to be transferred in its entirety and cannot be divided. In the asset transfer process, only positive numbers can be transferred under normal conditions, and only negative numbers are allowed in special accounting applications, so that the red flushing concept in accounting is corresponded.
In the asset destruction management module 403, it is used to destroy the asset, corresponding to the syntax of the universal transaction interpreter, including that there is no receiver when the asset is rolled out. The assets need to be all assets when destroyed.
In the object manager, for managing the objects which can be operated by the transaction interpreter, the assets managed by the asset manager are a special case of the operable objects, and are processed in the asset manager because the assets are the core business part of the block chain, and the objects managed by the object manager comprise the assets, databases, collections, fields and data, and also comprise the objects which are abstracted, such as structured game characters and specifically defined houses. When defining an object, the object may be directly described, or may be an abstract description of the object, or may be a set description of the object. In the implementation of the object manager, that is, 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 type is defined, and the object type is initially defined by code and needs to be determined before the blockchain is on-line, and the abstraction level of the object definition determines the operable range of the whole interpreter and determines the technical range that the whole transaction interpreter can cover. Preferably, the initial definition includes, but is not limited to, object types: processes, files, databases, collections, fields, data, sessions, assets, contracts, the object type, once determined, cannot be modified any more after the blockchain comes online.
In the object definition management module 502, it is used to define each type of object in detail, fully describe the composition of each type of object, and the necessary degree of information required by the type of object. In the process definition, a process number, a process initiator, a process name, a process executable file path, a process starting command, a process output command, process page changing number control, process CPU control, process memory control, process network control, process disk IO control and process GPU control are defined in the process. In the definition of the file, the file needs to define a file number, a file path, a file type, a file name, a file size, file creation time, file last modification time, a file creator, 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. In the definition of a set, the number of the set, the name of the set, the owner of the set, the creation time of the set, and the last modification time of the set are defined for the set. In the definition of the 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, the data needs to define a data number, a data type, a data length, a data value, a data owner, a data creation time, and a data last modification time. In the definition of the session, the session needs to define a session number, a session name, a session authorization number, a session state, a session data set, an initiator of the session, a receiver of the session, a type of the session, concurrency control of the session, flow control of the session, commands supported by the session, an owner of the session, creation time of the session, and last usage time of the session. In the definition of assets, the assets are directly managed by the asset manager without additional processing separately. In the 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 number of execution steps of the contract, the number of times the contract is executed, the contract influence range, the owner of the contract, the creation time of the contract, and the last execution time of the contract.
In the object interpretation module 503, it is used to interpret the object of a specific type, and the interpreted operation includes a meta-operation in the operation manager, which corresponds to part or all of the above several types, respectively. In the process, when the corresponding adding and destroying operations are added, a specified new process is created according to the content defined by the object, and the specified 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, a new file is created in the specified path; when a file needs to be changed, basic information of the file is changed into a specified new value; when the file is destroyed, deleting the file with the 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 other subjects. In the database operation, corresponding to the operations of adding, modifying and destroying; when a new database is added, a database is established for the specified main body; when modifying the database, modifying the basic information of the database; when the database is destroyed, deleting the specified database; both the modification and destruction operations require checking whether the subject is in possession; in the set, corresponding to the operations of adding, modifying, destroying and transferring; when a new set is added, a new set is established at a specified position; when modifying the set, modifying the specified set into the specified information; when the set is destroyed, deleting the appointed set; both modifying and destroying a collection requires checking the owner of the collection; when transferring a set, the owner of the specified set is transferred to other principals. In the field, corresponding to the operations of adding and destroying; in the operation of adding a new field, a new field is created at a specified position; in the destroy field operation, the specified field is deleted. In the data, corresponding to new adding and modifying operations; in the newly added data, adding the specified value to the specified data storage area; in the data modification, the data is modified into a specified value, and if the content of the data needs to be emptied, the data is modified into empty. In the conversation, corresponding to the operations of adding and destroying; when a new session is added, a new session, which may be a remote session or a local session, is created according to the session type; when destroying the session, ending the designated session or forcibly destroying the session, and when destroying the session, checking whether the current main body is the owner of the session. In the contract, corresponding to the new operation; when a contract is newly added, a specified code is put into a specified area, the range which can be influenced by the contract is limited according to the range defined by the contract, the execution of the contract is finished within the maximum step range defined by the contract, and once the contract is created, the contract cannot be modified, cannot be destroyed and deleted, and cannot be transferred.
Example two:
7-8, for better explanation of the universal transaction interpreter and its method of interpretation, the present invention is described by taking as an example that a blockchain receives a escrow intermediary asset transfer transaction:
s1 when the transaction interpreter receives the blockchain transaction, the interpreter decomposes the transaction, reads the transaction subject information through the subject manager, obtains that the transaction subject has three participants, 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 has the qualification of participating in the transaction and whether the participant has enough assets;
2) when the participant is a mechanism participant, acquiring a manager of the mechanism, judging whether the current transaction has the signature of the manager, judging whether the mechanism has the qualification of participating in the transaction, acquiring the 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 two conditions are judged, and if the validity and the condition are not met, determining that the transaction is abandoned.
S2, the content manager reads the basic information of the transaction body and extracts the operation and content related to the transaction from the transaction body;
s3 the operation manager extracts the description information and operation information of the transaction body, extracts each transaction body that participates in the transaction circularly, then the operation execution management module in the operation manager starts to read the operation information and judges whether the body has the corresponding operation qualification, if yes, the operation manager directly extracts the object of the corresponding operation;
s4 the object manager circularly extracts corresponding operation objects according to different subjects, obtains operation object information and determines validity of the object information, whether the operation has the operation condition of the object, and validity of the object information under the operation, if the three conditions are met, puts the operation object into the operation, and lists the operation list of the filled object after the operation object is circularly circulated;
the principal manager reads the transaction validation minimum participating principal requirement and determines whether the current transaction contains a participating principal signature meeting the minimum requirement, at least 2 signatures being required from 3 participants in the intermediary transaction.
S5 the operation manager loops through each of the populated objects of the list of operations, the step of looping including: firstly reading the operation information of the object, interpreting and executing the operation information through an operation execution management module, wherein only the transfer operation is enumerated, the steps of the addition, modification and destruction operation are similar, then the asset transfer operation is started, when the object is an asset, an asset manager is adopted to read the asset information, wherein 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 embodiment preferably employs asset objects, and the steps for processes, files, databases, collections, fields, data, sessions, contracts are similar to the operation steps of assets;
the asset manager checks whether the asset can be transferred, if so, checks whether the main body has enough assets, if so, checks whether transfer data of the asset meets the minimum unit limit, if so, checks whether a target receiver has an asset receiving condition, if so, checks whether a holder of the asset is signed by the content manager, the check of the link is not necessary, the signatures of a host and a receiver can also be effective, if so, checks whether the host or the receiver of the asset is signed, of course, if the intermediary does not sign, the receiver can sign on its own name, after the link is checked, the asset manager bills the asset from the holder, then bills the receiver of the asset, finally, returns an asset transfer result, and executes other main bodies and operation steps in a circulating way, and finally, summarizing all the results of the operation of the transaction main body and submitting the results to the upper-layer application.
The invention solves the problem that the block chain can support more transaction types under the condition of not modifying the core code through the main body manager, the object manager, the asset manager, the operation manager and the content manager, and solves the problems of transaction type expansion and limited service development caused by the fact that the block chain is limited by the code that can not be modified in the actual service scene.
The above-mentioned embodiments are only preferred embodiments of the present invention, and do not limit the technical scope of the present invention, so that the changes and modifications made by the claims and the specification of the present invention should fall within the scope of the present invention.

Claims (9)

1. A universal transaction interpreter for a blockchain, the interpreter comprising:
a subject manager: the system comprises a main body manager, a block link, a main body management module and a block management module, wherein the main body manager is used for managing and defining each main body participating in a transaction, reading transaction main body information by the main body manager after the transaction is received by the block link, checking whether the main body has the condition of operating a specified object on the premise of ensuring the validity of the participating main body, if so, performing main body operation, and if not, discarding the corresponding main body;
a content manager: the content management system is used for managing the content of the operation executed by the main body, and returning the processing result to the content manager after extracting data from the content manager, wherein the content manager manages the content and comprises but is not limited to fields of a database table, paths of recording fields, recording asset information and corresponding value information;
an operation manager: the method comprises the steps of managing operation types corresponding to defined participation subjects, wherein the operation types include but are not limited to 'adding', 'destroying', 'transferring' and 'modifying', different operation types are defined for different transaction environments, execution environments are created according to the defined operation types, and after execution results are collected, the execution environments are collected and submitted to upper-layer application;
an asset manager: the system is used for managing the assets related to a transaction main body and defining attribution to the assets, wherein the asset management comprises asset information management, asset transfer management and asset destruction management;
an object manager: for managing objects that the transaction interpreter can operate upon, by defining the types of objects that the transaction interpreter supports, adequately describing the composition of different types of objects and the necessary degree of information contained, developing object parsing when needed to interpret for a particular transaction,
the main body manager, the content manager, the operation manager, the asset manager and the object manager are connected with each other in a cross mesh mode.
2. A universal transaction interpreter for a blockchain according to claim 1, wherein said principal manager includes:
a main body list management module: the basic information is used for recording the basic information participating in the main body in the transaction, and the basic information comprises but is not limited to the name, participation time and type of the participating main body;
a subject type management module: the system comprises a main body list, a database and a database, wherein the main body list is used for defining the type of each main body in the main body list, and the type of the main body is correspondingly expanded according to different block transaction scenes;
a subject signature management module: the system is used for creating a one-to-one key belonging to the system for each subject, and plays a role of proving identity in the transaction, and plays a role of confirming participation in the transaction and acknowledging as an important proof of the subject;
a main body collaborative management module: the main body cooperation management module is used for defining and confirming a transaction validation mode, taking the transaction as a defined time point when a plurality of participants need to carry out signature confirmation, and verifying the transaction content and whether the signature meets the requirements according to the required counterpart.
3. A universal transaction interpreter for a blockchain according to claim 1, wherein said content manager includes:
an input management module: the system is used for receiving external transaction input and carrying out basic validity and validity check on the transaction;
a queue management module: the queue management system is used for arranging the transactions according to the queue and inserting the newly added transactions into the verified queue position;
an output management module: the system is used for collecting the execution result of the transaction and further analyzing and summarizing the transaction result.
4. A universal transaction interpreter for a blockchain according to claim 1, wherein said operations manager includes:
an operation definition management module: the method is used for judging the environment of a trading place, and defining the mode of trading 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 system is used for establishing a safe execution environment for the transaction, ensuring that the execution process of the transaction can only be carried out within the range of a transaction participation subject, ensuring that the execution process is carried out strictly according to the operation defined in the definition management module, strictly checking the precondition and the authority of each element operation and avoiding border crossing and authority overflow;
a 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 upper-layer application.
5. A universal transaction interpreter for a blockchain according to claim 1, wherein said asset manager includes:
the asset information management module: basic information for managing assets, including but not limited to, information on the asset and the name, asset type, operation type that can be used, divisible or not, minimum unit, initial total amount, minimum total amount, issuing principal, asset status, etc. expression rights;
an asset transfer management module: the system is used for transferring ownership of the assets and transferring all or part of the ownership to other subjects according to the partition attributes of the assets;
an asset destruction management module: for destroying assets.
6. A universal transaction interpreter for a blockchain according to claim 1, wherein said object manager includes:
an object type management module: for defining object types supported by the transaction interpreter, the object types being defined by initial code, the initial defined object types including but not limited to processes, files, databases, collections, fields, data, sessions, assets, contracts;
an object definition management module: the system is used for defining each type of object in detail, and fully describing the composition of each type of object and the necessary degree of information contained in the object;
the object interpretation module: for interpreting objects of a specific type, the interpreted operations include, but are not limited to, meta-operations in an operations manager, corresponding to some or all operations in a process, file, database, collection, field, data, session, asset, contract, respectively.
7. A universal transaction interpretation method for blockchains, the transaction interpretation method comprising:
s1 when the block chain transaction is received by the transaction interpreter, the interpreter decomposes the transaction, reads the information of the transaction subject through the subject manager and judges the legality of the transaction subject, checks whether the transaction subject has the conditions for operating the designated object, if yes, the operation enters S2, and if no, the transaction is considered to be abandoned;
s2, the content manager reads the basic information of the transaction body and extracts the operation and content related to the transaction from the transaction body;
s3, the operation manager judges the operation type according to the environment when the operation instruction is obtained, 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 operation, when the object of specific type needs to be explained, executes the partial or whole operation of the object, when the object type is asset, the asset manager is adopted to do transaction explanation;
s5 the operation manager collects and summarizes the operation result, including error information in the process of execution, and submits the result to the upper layer application.
8. The general transaction interpretation method for the blockchain according to claim 7, wherein the main body list management module records basic information of a subject involved in the transaction after the transaction interpreter receives the blockchain transaction, and records corresponding information in different transaction scenarios, the main body type management module performs classification according to the basic information of the subject, the classification manner performs corresponding division according to different transaction scenarios, and the main body cooperation management module starts to define when the transaction is signature confirmation and confirms the qualification of the subject by using a key to which the main body itself belongs through the main body signature management module.
9. The method of claim 7, wherein the operation manager comprises, during the operation: the operation definition management module selects corresponding operation types according to different judged transaction environments, creates a safe execution environment for the transaction through the operation execution management module, defines contents strictly according to the operation definition management module and checks the precondition and the authority of each element operation, and after the operation execution management module finishes executing, the result collection management module collects results and summarizes the results and submits the results to the upper-layer 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 true CN112037053A (en) 2020-12-04
CN112037053B 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)

Cited By (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

Cited By (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

Also Published As

Publication number Publication date
CN112037053B (en) 2023-12-22

Similar Documents

Publication Publication Date Title
CN109074563B (en) Agent-based graph-based transaction-intensive integrated feedback within blockchain systems
EP1394706B1 (en) Network-based information management
US9569473B1 (en) Method of controlling whether an uncompleted transaction applied against a database goes forward using either synchronous or asynchronous replication, or using either encrypted replication or unencrypted replication
Yadav Blockchain Security
KR101876674B1 (en) Method of managing common account using block chain and system performing the same
Solaiman et al. Implementation and evaluation of smart contracts using a hybrid on‐and off‐blockchain architecture
US11627122B2 (en) Inter-system linking method and node
CN109003185A (en) A kind of method for building up, device, calculating equipment and the storage medium of intelligence contract
US20060184995A1 (en) Creating a privacy policy from a process model and verifying the compliance
US20200134719A1 (en) Distributed ledger implementation for entity formation and monitoring system
CN114363352B (en) Cross-chain interaction method of Internet of things system based on block chain
Bao et al. A survey of blockchain consensus safety and security: State-of-the-art, challenges, and future work
Verdian et al. Quant overledger whitepaper
KR20200081735A (en) System for Evaluating a Proposal Based Block Chain and Method for Storing Data
CN111340628A (en) Asset information management method and device based on block chain
US10296759B1 (en) Method of controlling whether an uncompleted transaction applied against a database goes forward or is aborted, and for modifying the uncompleted transaction so that it can go forward
US10176243B1 (en) Method and apparatus for logging non-durable attributes of an uncompleted transaction so as to make such attributes durable
CN112037053A (en) Universal transaction interpreter for block chain and interpreting method thereof
KR102139551B1 (en) Method and server for managing testament
Dong et al. A blockchain-based decentralized booking system
CN106775499A (en) It is a kind of that public memory space is carried out to rationalize exposed method, exposure control system and a kind of cloud storage system
Antal et al. Distributed Ledger Technology Review and Decentralized Applications Development Guidelines. Future Internet 2021, 13, 62
Liu et al. BGRA: A reference architecture for blockchain governance
WO2024078109A1 (en) Multi-blockchain data processing method and apparatus, and device, system and medium
CN118057797A (en) Multi-block chain based data processing method, related equipment, medium and product

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

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.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant