CN111813999B - Method for improving expansibility of intelligent contract field of Ethernet - Google Patents

Method for improving expansibility of intelligent contract field of Ethernet Download PDF

Info

Publication number
CN111813999B
CN111813999B CN202010813185.3A CN202010813185A CN111813999B CN 111813999 B CN111813999 B CN 111813999B CN 202010813185 A CN202010813185 A CN 202010813185A CN 111813999 B CN111813999 B CN 111813999B
Authority
CN
China
Prior art keywords
field
intelligent contract
fields
character string
blockchain
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
CN202010813185.3A
Other languages
Chinese (zh)
Other versions
CN111813999A (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.)
Guangzhou Kechuang Space Information Technology Co ltd
Original Assignee
Guangzhou Kechuang Space Information 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 Guangzhou Kechuang Space Information Technology Co ltd filed Critical Guangzhou Kechuang Space Information Technology Co ltd
Priority to CN202010813185.3A priority Critical patent/CN111813999B/en
Publication of CN111813999A publication Critical patent/CN111813999A/en
Application granted granted Critical
Publication of CN111813999B publication Critical patent/CN111813999B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/84Mapping; Conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/986Document structures and storage, e.g. HTML extensions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/03Protocol definition or specification 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method for improving the expansibility of an intelligent contract field of an Ethernet, which comprises the following steps: defining a field to be stored on a blockchain; classifying and integrating the fields needing to be uplink to extract similar fields; the front-end server integrates similar fields and performs Json formatting conversion so that an object or an array formed by a plurality of fields is converted into a character string of a single field; calling an intelligent contract Api interface on the blockchain to transmit a corresponding character string, and storing the character string into a field of the blockchain after the intelligent contract is verified; when the front-end server needs to acquire data, the character string needs to be subjected to Json analysis, so that an original storage field is obtained. The invention makes some standardized designs for the formats of the fields, and makes the multiple pieces of information converted according to a certain rule, thereby improving the data quantity stored in a single field, improving the expansibility of the fields and meeting the updating requirement of intelligent closing on business.

Description

Method for improving expansibility of intelligent contract field of Ethernet
Technical Field
The invention relates to the technical field of blockchains, in particular to a method for improving the expansibility of intelligent contract fields of an Ethernet.
Background
The stability is a broad, open programming language, and is mainly used for developing intelligent contracts in a blockchain system of an Ethernet bottom layer. Current blockchain technology is widely used in many areas of finance, food safety, medicine, real estate, and the like. And because the variable number of the stability language cannot exceed 16 during development and the updating of the underlying data contracts is excessively complicated, the cost of developing and modifying the underlying system of the Ethernet for a specific service is high, and the contract storage content is excessively large, thereby limiting the contract storage content.
Disclosure of Invention
The invention aims to provide a method for improving the expansibility of an intelligent contract field of an Ethernet, which is used for carrying out standardized design on the format of the field, improving the expansibility of the field, reducing the repeated construction of a system and ensuring the updating requirement on the business.
To achieve the purpose, the invention adopts the following technical scheme:
the method for improving the expansibility of the intelligent contract field of the Ethernet comprises the following steps:
s10, defining a field to be stored on a block chain;
s20, classifying and integrating the fields needing to be uplink to extract similar fields;
s30, the front-end server integrates the similar fields and performs Json formatting conversion so that an object or an array formed by a plurality of fields is converted into a character string of a single field;
s40, calling an intelligent contract Api interface on the blockchain to transmit the corresponding character string, and storing the character string into a field of the blockchain after the intelligent contract is verified;
s50, when the front-end server needs to acquire data, json analysis is needed to be carried out on the character string, and therefore an original storage field is obtained.
As a preferred scheme of the method for improving the extensibility of the ethernet intelligent contract field, in step S40, the front-end server accesses the intelligent contract Api interface in a Post manner according to the URL link provided by the interface through the HTTP network protocol.
As a preferred scheme of the method for improving the extensibility of the ethernet intelligent contract field, in step S40, the intelligent contract Api interface calls the corresponding intelligent contract after performing one-time transfer according to the URL link, the intelligent contract verifies the identity of the call, and executes the storage logic on the intelligent contract after the verification is passed, where the storage logic stores the request after the storage logic is confirmed by the consensus mechanism of the blockchain.
As a preferable scheme of the method for improving the expansibility of the intelligent contract field of the Ethernet, when the character string needs to be added with a new field, the new field is only needed to be added into the original field on the front-end server.
The invention has the beneficial effects that: the invention makes some standardization design to the format of the field, so as to make several pieces of information converted according to a certain rule, thereby improving the data quantity stored in a single field, improving the expansibility of the field, reducing the variable generated by storing in a single function, making the contract able to complete the service demand update under the limitation of the system, reducing the repeated construction of the system, reducing the required field for storing in the contract realization, and at the same time, as the setting of the storage field is character string size, when the data format before conversion needs to be added and deleted, it will not have any influence to the storage format, making the storage content more flexible, without modifying the underlying storage contract, increasing the flexibility of the contract storage structure.
Drawings
In order to more clearly illustrate the technical solution of the embodiments of the present invention, the drawings that are required to be used in the embodiments of the present invention will be briefly described below. It is evident that the drawings described below are only some embodiments of the present invention and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
Fig. 1 is a flowchart of a method for improving the extensibility of the ethernet intelligent contract field according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram (a) of a method for improving the extensibility of the intelligent contract field of the ethernet according to an embodiment of the present invention.
Fig. 3 is a schematic structural diagram (ii) of a method for improving the extensibility of the ethernet intelligent contract field according to an embodiment of the present invention.
Detailed Description
The technical scheme of the invention is further described below by the specific embodiments with reference to the accompanying drawings.
Wherein the drawings are for illustrative purposes only and are shown in schematic, non-physical, and not intended to be limiting of the present patent; for the purpose of better illustrating embodiments of the invention, certain elements of the drawings may be omitted, enlarged or reduced and do not represent the size of the actual product; it will be appreciated by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The same or similar reference numbers in the drawings of embodiments of the invention correspond to the same or similar components; in the description of the present invention, it should be understood that, if the terms "upper", "lower", "left", "right", "inner", "outer", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, only for convenience in describing the present invention and simplifying the description, rather than indicating or implying that the apparatus or elements being referred to must have a specific orientation, be constructed and operated in a specific orientation, so that the terms describing the positional relationships in the drawings are merely for exemplary illustration and should not be construed as limiting the present patent, and that the specific meaning of the terms described above may be understood by those of ordinary skill in the art according to specific circumstances.
In the description of the present invention, unless explicitly stated and limited otherwise, the term "coupled" or the like should be interpreted broadly, as it may be fixedly coupled, detachably coupled, or integrally formed, as indicating the relationship of components; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between the two parts or interaction relationship between the two parts. The specific meaning of the above terms in the present invention will be understood in specific cases by those of ordinary skill in the art.
As shown in fig. 1, the method for improving the extensibility of the intelligent contract field of the ethernet comprises the following steps:
s10, defining a field to be stored on a block chain;
s20, classifying and integrating the fields needing to be uplink to extract similar fields;
s30, the front-end server integrates similar fields and performs Json formatting conversion so that an object or an array formed by a plurality of fields is converted into a character string of a single field;
s40, calling an intelligent contract Api interface on the blockchain to transmit a corresponding character string, and storing the character string into a field of the blockchain after the intelligent contract is verified;
s50, when the front-end server needs to acquire data, the character string needs to be subjected to Json analysis, so that an original storage field is obtained.
According to the embodiment, through carrying out some standardized designs on the formats of the fields, a plurality of pieces of information are converted according to a certain rule, so that the data quantity stored in a single field is improved, the expansibility of the fields is improved, the variable generated by storing in a single function is reduced, the demand update on business of contracts can be completed under the limitation of a system, the repeated construction of the system is reduced, the fields required by storing are reduced on the contract realization, meanwhile, the size of a character string is set for the stored fields, when the data format before conversion needs to be added and deleted, no influence is exerted on the stored formats, the storage content is more flexible, the underlying storage contracts are not required to be modified, and the flexibility of the contract storage structure is improved.
In this embodiment, in step S40, the front-end server accesses the smart contract Api interface in a Post manner according to the URL link provided by the interface through the network protocol of HTTP.
In this embodiment, in step S40, the intelligent contract Api interface transfers the corresponding intelligent contract after transferring the URL link once, the intelligent contract verifies the identity of the transfer, and after the verification is passed, the storage logic on the intelligent contract is executed, and after the storage logic is confirmed by the common identification mechanism of the blockchain, the blockchain stores the request.
In this embodiment, when a new field needs to be added to the character string, the new field is only required to be added to the original field on the front-end server.
As shown in fig. 2 and 3, for example, the information required to be uplinked includes mailing destination, logistics company, logistics list number, on-chain user name and uplink time, the above information is classified and integrated according to defined fields, information under the same category, such as mailing destination, logistics company and logistics list number, is extracted, the front end server performs Json formatting conversion on the mailing destination, logistics company and logistics list number information into Json character strings, then the Json character strings, on-chain user name and uplink time and other character strings are transmitted into the intelligent contract Api interface on the blockchain together, the intelligent contract Api interface invokes the corresponding intelligent contract, the intelligent contract verifies the identity of the call, after verification, the storage logic on the contract is executed, and after the storage logic is confirmed by the consensus mechanism of the blockchain, the blockchain stores the request, so that a plurality of variables generated during execution of the intelligent contract are reduced to receive the information. When new fields need to be added to express information as in fig. 1, the new fields need to be added to be converted before the conversion of the front-end server, and the new fields are stored by one field on the chain, so that only one variable is needed to store when the information is received, and the field format of a storage contract does not need to be changed.
According to the embodiment, a plurality of pieces of information are recorded on a single string field through string types supported in a stability language, and are converted according to rules before being transmitted to storage, so that the data size stored in the single field is improved, the variables generated by storage in a single function are reduced, the problem that the single function exceeds 16 variables limited by the bottom layer is solved, the problem that the stack top error is caused by using too many variables is prevented, more variables can be used when logic in a contract is realized, and the realized effect is more flexible and more design ideas are provided.
Interpretation of proper nouns:
json: a lightweight data storage format independent of development language, full scale JavaScript Object Notation, a standard specification for data formats, originally derived from JavaScript, and later with widespread use, almost every development language has an Api that handles Json.
Intelligent contract Api interface: a set of Api interfaces which are in accordance with the Restful Api specification and are developed by the bottom layer expansion of the blockchain provides convenience for calling.
Restful Api specification: is a set of specifications for front-end and back-end separation.
Intelligent contract: is a computer protocol aimed at propagating, verifying or executing contracts in an informative manner, intelligent contracts allow trusted transactions to be made without third parties, which transactions are traceable and irreversible.
URL link: is a representation method for specifying information positions on a web service program of the internet.
HTTP network protocol: the method is a standard for request and response of a client and a server, and is mainly used for the client to initiate an HTTP request to a designated port in the server through a page browser or other tools, and the server returns corresponding response content after receiving the request.
Post mode: refers to one of the common basic methods of HTTP requests, mainly used as a request way to submit data to a server.
Consensus mechanism: refers to an algorithm in a blockchain, mainly to ensure the correctness of a transaction. In the blockchain, each time the uplink is performed, each user checks whether the operation meets the requirement, then all users vote on the operation, and finally consensus is achieved to determine whether the operation is wrong, and if so, the operation is recorded on the blockchain.
Solidity: is a high-level programming language for intelligent contracts that run on ethernet virtual machines.
Ethernet: ethernet is an open-source public blockchain platform with smart contract functionality that handles point-to-point contracts by providing a de-centralized ethernet virtual machine with its dedicated cryptocurrency, ethernet.
Ethernet virtual machine: the ethernet virtual machine is the running environment for the intelligent contracts on the ethernet. The ethernet virtual machine runs in a sandbox, which is completely separate from the blockchain backbone, the code runs in the ethernet virtual machine without a network, and the intelligent appointments of the file system or other processes are restricted from accessing other intelligent contracts.
"stack to deep" error: this error is due to the fact that the ethernet virtual machine limits the stack to get stack 15 at most, i.e. the 16 th stack element from the stack top down, which results in that if the number of parameters in the function, the return value, and the parameter in the function of a function method are greater than a certain amount, this error is likely to be triggered, and if the contract business logic is complex, a "stack to deep" error is likely to be triggered.
It should be understood that the above description is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be apparent to those skilled in the art that various modifications, equivalents, variations, and the like can be made to the present invention. However, such modifications are intended to fall within the scope of the present invention without departing from the spirit of the present invention. In addition, some terms used in the specification and claims of the present application are not limiting, but are merely for convenience of description.

Claims (4)

1. The method for improving the expansibility of the intelligent contract field of the Ethernet is characterized by comprising the following steps of:
s10, defining a field to be stored on a block chain;
s20, classifying and integrating the fields needing to be uplink to extract similar fields;
s30, the front-end server integrates the similar fields and performs Json formatting conversion so that an object or an array formed by a plurality of fields is converted into a character string of a single field;
s40, calling an intelligent contract Api interface on the blockchain to transmit the corresponding character string, and storing the character string into a field of the blockchain after the intelligent contract is verified;
s50, when the front-end server needs to acquire data, json analysis is needed to be carried out on the character string, and therefore an original storage field is obtained.
2. The method according to claim 1, wherein in step S40, the front-end server accesses the smart contract Api interface in Post mode according to URL link provided by interface through HTTP network protocol.
3. The method according to claim 2, wherein in the step S40, the intelligent contract Api interface transfers the corresponding intelligent contract after transferring the URL link once, the intelligent contract verifies the identity of the transferred intelligent contract, and after the verification is passed, the storage logic on the intelligent contract is executed, and after the storage logic is confirmed by the consensus mechanism of the blockchain, the blockchain stores the request.
4. The method for improving the extensibility of the intelligent contract field of the ethernet, as set forth in claim 3, wherein when a new field is required to be added to the character string, the new field is simply required to be added to the original field on the front-end server.
CN202010813185.3A 2020-08-13 2020-08-13 Method for improving expansibility of intelligent contract field of Ethernet Active CN111813999B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010813185.3A CN111813999B (en) 2020-08-13 2020-08-13 Method for improving expansibility of intelligent contract field of Ethernet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010813185.3A CN111813999B (en) 2020-08-13 2020-08-13 Method for improving expansibility of intelligent contract field of Ethernet

Publications (2)

Publication Number Publication Date
CN111813999A CN111813999A (en) 2020-10-23
CN111813999B true CN111813999B (en) 2024-01-05

Family

ID=72859835

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010813185.3A Active CN111813999B (en) 2020-08-13 2020-08-13 Method for improving expansibility of intelligent contract field of Ethernet

Country Status (1)

Country Link
CN (1) CN111813999B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112597140B (en) * 2020-12-24 2021-09-21 河南数权科技有限公司 Data registration and credible circulation system, method, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103077185A (en) * 2012-12-18 2013-05-01 厦门雅迅网络股份有限公司 Object-based user-defined information-expanding method
CN108694575A (en) * 2018-06-13 2018-10-23 深圳前海微众银行股份有限公司 Verification method of transferring accounts, device and storage medium based on block chain
CN109936569A (en) * 2019-02-21 2019-06-25 领信智链(北京)科技有限公司 A kind of decentralization digital identity login management system based on ether mill block chain
CN110650128A (en) * 2019-09-17 2020-01-03 西安电子科技大学 System and method for detecting digital currency stealing attack of Etheng
CN111190936A (en) * 2019-12-12 2020-05-22 中国科学院计算机网络信息中心 Trusted identification association relation query method based on block chain technology, corresponding storage medium and electronic device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11971874B2 (en) * 2019-01-31 2024-04-30 Salesforce, Inc. Systems, methods, and apparatuses for implementing efficient storage and validation of data and metadata within a blockchain using distributed ledger technology (DLT)

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103077185A (en) * 2012-12-18 2013-05-01 厦门雅迅网络股份有限公司 Object-based user-defined information-expanding method
CN108694575A (en) * 2018-06-13 2018-10-23 深圳前海微众银行股份有限公司 Verification method of transferring accounts, device and storage medium based on block chain
CN109936569A (en) * 2019-02-21 2019-06-25 领信智链(北京)科技有限公司 A kind of decentralization digital identity login management system based on ether mill block chain
CN110650128A (en) * 2019-09-17 2020-01-03 西安电子科技大学 System and method for detecting digital currency stealing attack of Etheng
CN111190936A (en) * 2019-12-12 2020-05-22 中国科学院计算机网络信息中心 Trusted identification association relation query method based on block chain technology, corresponding storage medium and electronic device

Also Published As

Publication number Publication date
CN111813999A (en) 2020-10-23

Similar Documents

Publication Publication Date Title
US9239705B2 (en) Method and apparatus for customized software development kit (SDK) generation
US11222168B2 (en) Electronic form automation
CN102426549B (en) Efficient Web form validation method and framework thereof
CN110162468A (en) A kind of test method, device and computer readable storage medium
CN101135989B (en) Automatization test method and device for Web applied system
CN113728341A (en) Insight into performance of robotic systems
CN106446228A (en) Collection analysis method and device for WEB page data
EP1852784A2 (en) Method and system of implementing recorded data for automating internet interactions
US7512976B2 (en) Method and apparatus for XSL/XML based authorization rules policy implementation
CN104700169A (en) Method and system for inspecting and managing invoices
US20140222662A1 (en) Intelligent automated online transaction system for automated interaction with online transaction web sites
BR102021010485A2 (en) SMART PAYMENT PROCESSING PLATFORM SYSTEM AND METHOD
US10698803B1 (en) Computer code test script generating tool using visual inputs
TWI729763B (en) System and method for collecting and validating web traffic data
JP2002528797A (en) Definition of documents for commerce and interfaces based on those documents in the trading partner network
US20100146414A1 (en) Method and system for dynamic insurance quotes
CN111782117B (en) Interface display method and device, storage medium and electronic device
CN111813999B (en) Method for improving expansibility of intelligent contract field of Ethernet
CN114219596B (en) Data processing method and related equipment based on decision tree model
CN103177156A (en) Designer system for enterprise application integration adapter and design method thereof
CN109412930A (en) A kind of jump method, device, storage medium and the terminal of IM landing page
CN116346660A (en) Data processing method, device, equipment and medium based on dependent replacement service
CN108052842A (en) Storage, verification method and the device of signed data
US20220138337A1 (en) Online software platform (osp) extracting data of client for improved on-boarding of the client onto the osp
CN108604337A (en) Electronic system for being route to marketing

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: 20231211

Address after: 510700 3rd Floor, No. 31 Guangshan Third Road, Lianhe Street, Huangpu District, Guangzhou City, Guangdong Province (Location: 30506)

Applicant after: Guangzhou Kechuang Space Information Technology Co.,Ltd.

Address before: 510700 No. 5, Nanyun 5th Road, Science City, high tech Industrial Development Zone, Guangzhou, Guangdong

Applicant before: GUANGZHOU TUNGKONG SECURITY PRINTING Co.,Ltd.

Applicant before: Guangzhou Kechuang Space Information Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant