CN113766034B - Business processing method and device based on block chain - Google Patents

Business processing method and device based on block chain Download PDF

Info

Publication number
CN113766034B
CN113766034B CN202111080373.0A CN202111080373A CN113766034B CN 113766034 B CN113766034 B CN 113766034B CN 202111080373 A CN202111080373 A CN 202111080373A CN 113766034 B CN113766034 B CN 113766034B
Authority
CN
China
Prior art keywords
uplink
service
interface
data
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
CN202111080373.0A
Other languages
Chinese (zh)
Other versions
CN113766034A (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.)
CCI China Co Ltd
Original Assignee
CCI China 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 CCI China Co Ltd filed Critical CCI China Co Ltd
Priority to CN202111080373.0A priority Critical patent/CN113766034B/en
Publication of CN113766034A publication Critical patent/CN113766034A/en
Application granted granted Critical
Publication of CN113766034B publication Critical patent/CN113766034B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways

Abstract

The application provides a business processing method and device based on a blockchain, wherein a certificate intelligent contract is built in a uplink gateway, and the method comprises the following steps: acquiring service definition content of uplink service input by a service system, distributing an identity for the service system, and generating a corresponding account address and an access key; deploying the certificate-storing intelligent contract for the uplink service and generating a contract address, wherein the certificate-storing intelligent contract automatically acquires the service definition content and acquires the uplink data to be stored from the service definition content to construct parameter information of an online API (application program interface); and creating an online API interface based on the parameter information, calling the online API interface, encrypting the uplink data to be stored through the access key, and then uploading the encrypted uplink data to a certificate. The method and the system can realize that the development work of data uplink certification and on-chain data query based on the blockchain platform can be completed by the chain application development side under the condition that the blockchain SDK is not accessed and the blockchain knowledge is not known.

Description

Business processing method and device based on block chain
Technical Field
The present disclosure relates to the field of blockchain data uplink, and in particular, to a method and apparatus for processing a block-chain-based service.
Background
With the development of the blockchain technology, more and more application systems access the blockchain platform, and use the blockchain technology to conduct data storage and tracing. In the process of accessing the blockchain, each application system needs to use the SDK provided by the blockchain platform for block link access development, data uplink development, data query development and intelligent contract development.
Most of the current blockchain-based data certification functions are based on specific blockchain SDKs and specific intelligent contract languages, resulting in a requirement for developers to master blockchain platform-related knowledge for applications that are to access the blockchain platform, such as: blockchain-related terms, consensus mechanisms, encryption mechanisms, smart contract execution engines, storage models, etc.; knowledge about the access of the blockchain platform is mastered, such as: SDK methods, intelligent contract languages, intelligent contract writing rules and the like provided by the blockchain platform. This puts forward higher technical level requirements on developers, and also increases the technical difficulty and access cost of the application system to access the blockchain platform.
Therefore, it is currently needed to invent a method and a device for processing services based on a blockchain, which can solve the problems of large difficulty and high access cost of the blockchain access technology caused by the fact that a developer needs to master the knowledge related to a blockchain platform in the prior art.
Disclosure of Invention
The embodiment of the application provides a business processing method and device based on a blockchain, which aim at the problems of large difficulty in blockchain access technology and high access cost caused by the fact that a developer needs to master knowledge related to a blockchain platform according to the technical requirement of accessing the blockchain, and can realize the development work of data uplink certification and on-chain data query based on the blockchain platform by a chain application development side under the condition that the SDK of the blockchain is not accessed and the knowledge of the blockchain is not known.
In a first aspect, an embodiment of the present application provides a method for processing a service based on a blockchain, which is applied to a uplink gateway, where an intelligent contract for storing certificates is built in the uplink gateway, and the method includes: acquiring service definition content of uplink service input by a service system, distributing an identity for the service system, and generating a corresponding account address and an access key; deploying the certificate-storing intelligent contract for the uplink service and generating a contract address, wherein the certificate-storing intelligent contract automatically acquires the service definition content and acquires the uplink data to be stored from the service definition content to construct parameter information of an online API (application program interface);
and creating an online API interface based on the parameter information, calling the online API interface, encrypting the uplink data to be stored through the access key, and then uploading the encrypted uplink data to a certificate.
In some embodiments, the authenticated smart contract has defined internally a contract send address, a contract receive address, contract authentication content, an uplink transaction hash, and a transaction time.
In some of these embodiments, an online interface document for the online API interface is generated from a built-in interface document template, the online interface document comprising: and calling address, calling mode, calling parameters and calling result return parameters, and carrying out calling development work on the online API according to the online interface document.
In some embodiments, the online API interface includes a chaining interface, where the chaining interface is configured to encrypt the uplink data to be stored by the access key and then to store the encrypted uplink data.
In some embodiments, the uplink port includes a synchronous uplink interface and an asynchronous uplink interface, where the synchronous uplink port is used for real-time uplink and returns a uplink transaction hash corresponding to the uplink service, and the asynchronous uplink port returns a digital number.
In some of these embodiments, the online API interface further comprises a uplink data query interface and a transaction hash query interface; the uplink data query interface is used for acquiring the uplink data according to the input uplink transaction hash; the transaction hash inquiry interface is used for acquiring the uplink transaction hash corresponding to the uplink service according to the input data number.
In some embodiments, the parameter information includes an interface address, an identity, uplink data, and a return parameter.
In some embodiments, the service definition content includes a service name, a service description, and a service uplink encryption type, wherein the access key is determined by the service uplink encryption type
In a second aspect, an embodiment of the present application provides a service processing apparatus based on a blockchain, including: the acquisition module is used for acquiring service definition content of uplink service input by a service system, distributing an identity for the service system and generating a corresponding account address and an access key; the configuration module is used for deploying the certificate-storing intelligent contract for the uplink service and generating a contract address, and the certificate-storing intelligent contract automatically acquires the service definition content and acquires the uplink data to be stored from the service definition content to construct parameter information of an online API interface; and the uplink module is used for creating an online API interface based on the parameter information, calling the online API interface and uploading the uplink data to be stored through the access key encryption and then the certificate.
In a third aspect, embodiments of the present application provide an electronic device comprising a memory having a computer program stored therein and a processor configured to run the computer program to perform the blockchain-based business processing method of any of the first aspects.
In a fourth aspect, embodiments of the present application provide a computer program product comprising software code portions for performing the blockchain-based business processing method according to any of the first aspects when the computer program product is run on a computer.
In a fifth aspect, embodiments of the present application provide a readable storage medium having stored therein a computer program comprising program code for controlling a process to perform a process comprising the blockchain-based business processing method according to any of the first aspects.
The main contributions and innovation points of the embodiments of the present application are as follows:
according to the embodiment of the application, the intelligent certificate storing contract is arranged in the uplink gateway, the intelligent certificate storing contract can automatically input the uplink data to be stored from the service definition content in the uplink gateway through the service system, the uplink data is used as the body parameter for constructing the online API interface, so that the online API interface is constructed, the SDK does not need to be accessed by the chain application development side, the service definition content is input into the uplink gateway only according to the service template required to be read by the intelligent certificate storing contract, and the data uplink and the subsequent data query are completed through calling the online API interface. By the method and the device, development difficulty of a block chain uplink technology is greatly reduced, and efficiency of data access to the block chain nodes is improved.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more thorough understanding of the other features, objects, and advantages of the application.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
FIG. 1 is a flow chart of a blockchain-based business processing method in accordance with an embodiment of the present application;
fig. 2 is a flowchart of an application scenario of a uplink gateway system according to an embodiment of the present application;
FIG. 3 is a flow chart of invoking a uplink interface according to an embodiment of the present application;
FIG. 4 is a block diagram of a block chain based traffic processing apparatus according to an embodiment of the present application;
fig. 5 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of the present specification. Rather, they are merely examples of apparatus and methods consistent with aspects of one or more embodiments of the present description as detailed in the accompanying claims.
It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than described in this specification. Furthermore, individual steps described in this specification, in other embodiments, may be described as being split into multiple steps; while various steps described in this specification may be combined into a single step in other embodiments.
Example 1
A block chain based service processing method applied to a uplink gateway, wherein a certificate-preserving intelligent contract is built in the uplink gateway, and referring to fig. 1, the method comprises the following steps:
step S101, acquiring service definition content of uplink service input by a service system, distributing an identity for the service system, and generating a corresponding account address and an access key.
In the step, after the service system performs service definition in the uplink gateway, the uplink gateway does not distribute an account address and an access key to the service system after acquiring service definition content, wherein the account address is used for indicating an object needing to perform uplink service, namely, the uplink gateway can obtain an object storing uplink data through inquiring the account address; the access key refers to a private key that encrypts the uplink data. In the step, a service definition template is created in the uplink gateway, and service definition contents are recorded, so that the follow-up certificate-storing intelligent contract can automatically acquire data required by the service definition contents.
Step S102, deploying the certificate-storing intelligent contract for the uplink service and generating a contract address, wherein the certificate-storing intelligent contract automatically acquires the service definition content and acquires the uplink data to be stored from the service definition content to construct parameter information of an online API interface.
In the step, the up-link gateway is internally provided with a certificate-storing intelligent contract and can automatically deploy up-link data for a service system. Specifically, a contract address, an account address, an access key and the like related to the certificate storing intelligent contract are built-in parameters of the uplink system. When the service system wants to store data as chain nodes of the blockchain, the blockchain allocates account addresses for the service system, and the data is stored in a storage position when being uplinked, wherein the storage position refers to a contract address. The intelligent contract can automatically acquire the uplink data to be stored from service definition content, and takes the uplink data as a body parameter for constructing an online API interface, wherein the body parameter of the interface is data which is input when a service system defines and is used for telling an uplink gateway to be stored on a link node.
The difference of the steps is that the certificate storing intelligent contract is built in the uplink gateway, when a service system needs to initiate uplink service, the chain application development side does not need to access the SDK, and only needs to input service definition content into the uplink gateway according to a service template which is required to be read by the certificate storing intelligent contract. What the upstream gateway builds from the acquired service definition content is the rules of the interface itself, such as the HTTP protocol, which can be invoked using a variety of development languages. Compared with the block chain SDK which is needed to be used in the block chain technology, the block chain SDK initialization and the verification intelligent contract knowledge are carried out, the block chain SDK is directly shielded, the block chain SDK initialization and the block chain SDK integration and the verification intelligent contract knowledge are carried out, and therefore the access difficulty is greatly reduced.
And step S103, creating an online API interface based on the parameter information, calling the online API interface, and uploading the uplink data to be stored through the access key encryption and then the certificate.
In this step, the parameters configuring the online API interface include: the system comprises an interface address, an interface header parameter, an interface body parameter and a return parameter, wherein the interface address and the interface header parameter are fixed, a plurality of interfaces can be used in common, the interface body parameter is recorded by a service system when a service is defined, and the interface body parameter comprises uplink data which need to be stored and is used for telling a uplink gateway of the content to be uplink of the current uplink service.
As shown in fig. 2, in the technical scheme of the invention, the uplink gateway system shields the blockchain access development, the data uplink development, the data query development, the intelligent contract development and the like related to the data uplink process, converts the development processes into the common HTTP interface development, and the link application end can complete the blockchain access only by carrying out the service data configuration on the uplink gateway and complete the data uplink and the subsequent data query through calling the interface.
Aiming at the steps S101 to S103, in the embodiment of the application, the certificate intelligent contract is built in the uplink gateway, the certificate intelligent contract is automatically configured for the service when the uplink service is acquired, the parameter information required by the interface is acquired to develop an online API interface, and the certificate of the required stored data is linked up by calling the interface, so that the difficulty of block link-in is reduced.
In other embodiments, the authenticated smart contract has defined internally a contract send address, a contract receive address, contract authentication content, an uplink transaction hash, and a transaction time.
In this embodiment, the parameter information related to the certificate storing intelligent contract is built in the uplink gateway, and the sending address and the receiving address of the contract can be automatically obtained by calling the certificate storing intelligent contract, so that the certificate storing content, the uplink transaction hash and the transaction time, that is, the uplink gateway automatically processes the required stored data in the data uplink process. The uplink gateway acquires service definition content input by the link application end, an interface for data uplink is automatically created, and the link application end can complete a service uplink process only by calling a corresponding online API interface.
In some embodiments, the service definition content includes a service name, a service description, and a service uplink encryption type, wherein the access key is determined by the service uplink encryption type.
In this embodiment, the encryption type may be determined according to the blockchain platform, for example, the encryption type is not encryption, national encryption 2, national encryption 3, national encryption 4, and so on. And the uplink gateway generates an access key according to the service uplink encryption type selected by the service system.
In some of these embodiments, the method further includes generating an online interface document of the online API interface from a built-in interface document template, the online interface document comprising: and calling address, calling mode, calling parameters and calling result return parameters, and carrying out calling development work on the online API according to the online interface document.
In this embodiment, the HTTP call parameter includes an identity parameter, a service data field, and a field data type, where the identity refers to appid, appsecret and a service number uuid that are automatically allocated to the uplink service after the uplink gateway enables the service definition content, and the identity is used to perform authentication when calling the online API interface. And extracting the interface appid, appsecret, comparing and verifying the service number uuid with the stored information during verification, and processing the service request passing verification by the online API interface to return the data required by the service.
In some of these embodiments, the online API interface comprises a ul interface; and the uplink port is used for encrypting the uplink data to be stored through the access key and then uploading the encrypted authentication.
In this embodiment, the data structure of the acquired uplink data is as follows:
{ "app id": "identity id",
"appsecret": an "identification key",
"business_name": "service name",
"business_desc": "service description",
"stats": "status",
"secret_type": "encryption type",
"uuid": "service number",
"Account": "contract Account",
"contact_address": "contract address",
"data_definition":[{
"data_name": "field name",
"data_type": "data type",
"data_length": "data length",
"data_descriptor" data description "
},{
"data_name": "field name",
"data_type": "data type",
"data_length": "data length",
"data_descriptor" data description "
}]
}
After encryption by the access key, the final certificate uplink data structure is formed as follows:
{"appid":"LKeuGr84",
"appsecret":"65a4964eb7b68347bae3a9b7da85c7e30f1aa576",
"business_name": system operation Log uplink ",
"stats": enable ",
"secret_type":"SM2",
"uuid":"b03a4669-8e5a-479c-8371-90c42c9c1a24",
"account":"{"address":"8722fe1213e9239fa68e76db4be48566635b00c5","encrypted":"9354d5de4b341e7d81c543371dc33d1eee80b50dbef604ed494aafa7f32cc245","version":"2.0","algo":"0x03"}",
"contract_address":"0xfaf899c36c72c9d3b5710f2575c9256b86bcc27d",
"data_definition":[{
"data_name":"username",
"data_type":"string",
"data_length":"50",
"data_descriptor" operation user name "
},{
"data_name":"operators",
"data_type":"string",
"data_length":"100",
"data_descriptor" operation function name "
},{
"data_name":"operator_time",
"data_type":"string",
"data_length":"50",
"data_descriptor" operation time yyyy-MM-dd HH: MM: ss "
}]
}
The uplink gateway constructs a uplink interface according to the data interface parameter information, wherein an interface address of the uplink interface is composed of an interface fixed address and a service number, for example, a request fixed path is/blockchain/gateway/api, a request service number { uuid }, and the obtained interface address is/blockchain/gateway/api/{ uuid }. The request header parameters of the ul interface include appid, appsecret. The request body parameter information of the uplink interface comprises field name attribute of each data object in the extracted service definition content, and the field name attribute is respectively constructed into request parameters in form and request parameters in JSON format.
In addition, two business demands of synchronous uplink and asynchronous uplink are provided in the uplink gateway, the synchronous uplink is a real-time uplink, the synchronous uplink directly returns the uplink transaction hash to the business system, the asynchronous uplink does not return the uplink transaction hash, only the uplink data number is returned, and the business system can inquire the uplink transaction hash according to the acquired data number after the uplink is completed.
Specifically, as shown in fig. 3, the uplink port includes a synchronous uplink interface and an asynchronous uplink interface, where the synchronous uplink port is used for real-time uplink and returning to the uplink transaction hash corresponding to the uplink service, and the asynchronous uplink port returns a digital number.
In this embodiment, the specific steps of adopting the synchronous uplink port data uplink are as follows: when a service system initiates a data uplink call, the uplink gateway firstly performs interface authentication verification, extracts interface appid, appsecret and service number uuid parameters for comparison verification, obtains service definition content according to the service number uuid after verification, sequentially extracts the service definition content from request body parameters according to a data structure of the service definition, generates a data number for the data submitted by the call to mark the submitted uplink data, obtains uplink account information and intelligent contract information from the service definition according to the uplink service number, constructs block chain transaction information, invokes a block chain transmission transaction method, transmits the transaction information to a block chain platform, receives a return result, analyzes transaction hash in the result and returns the data number and the uplink transaction hash. The method adopts the specific steps of asynchronous uplink port data uplink as follows: after the authentication and verification are passed, the extracted data, service definition and data number are packaged together and put into a buffer queue for processing by an interface data uplink and generating a data number for the data submitted by the call to mark the uplink data submitted this time, only the data number is returned, the service system needs to record the data number returned by the step, and a transaction hash inquiry interface is additionally adopted to inquire the uplink transaction hash.
In some of these embodiments, the online API interface further comprises a uplink data query interface and a transaction hash query interface; the uplink data query interface is used for acquiring the uplink data according to the input uplink transaction hash; the transaction hash inquiry interface is used for acquiring the uplink transaction hash corresponding to the uplink service according to the input data number.
In this embodiment, the uplink gateway may also automatically create a uplink query interface and a transaction hash query interface, when the asynchronous interface is invoked, the interface only returns a data number to the service system, at this time, the service system may query the transaction hash by invoking the query interface and inputting parameters such as the data number, the service number, appid, appsecret, etc., the uplink gateway will perform interface authentication verification, extract the interface appid, appsecret and the service number uuid parameters to perform comparison verification, and query the uplink transaction hash according to the data number through the verified request, and the service system records the queried uplink transaction hash. The uplink query interface inputs the uplink port hash, and inputs the service number and appid, appsecret for comparison and verification. And the verification is that the back uplink gateway invokes the blockchain query interface to initiate a query request to the blockchain platform and returns a query result, wherein the query result comprises block-containing hash, block height, transaction information, transaction address, transaction time and the like.
In summary, in order to solve the problem that the current application system needs to use a blockchain SDK, an intelligent contract language and an access technology difficulty brought by an intelligent contract writing rule at a time chain application development side (a service system) of an access blockchain platform of the application system, the intelligent contract is stored in a linking gateway, a contract sending address, a contract receiving address, a contract storing content, a transaction hash and a transaction time are defined in the intelligent contract, and the linking gateway can automatically generate a blockchain account address and an encryption key for the service system and automatically deploy the intelligent contract storing and generate a contract address for the service system. The intelligent contract and the block chain automatic processing are realized by the built-in certificate, so that the service system can realize the technology of data uplink and data query only by calling an interface. Compared with the prior art, the chain application development side does not need to access the SDK, does not need to know the blockchain, only needs to know how to call the HTTP Restful interface, and records the data number returned by the uplink data and the transaction hash at the same time, thereby reducing the development difficulty and simplifying the complexity of accessing the blockchain platform.
Example two
Based on the same conception, referring to fig. 4, the present application also proposes a service processing device based on a blockchain, including:
the acquiring module 401 is configured to acquire service definition content of an uplink service entered by a service system, allocate an identity for the service system, and generate a corresponding account address and an access key;
a configuration module 402, configured to deploy the certificate-storing intelligent contract for the uplink service and generate a contract address, where the certificate-storing intelligent contract automatically obtains the service definition content and obtains uplink data to be stored from the service definition content to construct parameter information of an online API interface;
and the uplink module 403 is configured to create an online API interface based on the parameter information, call the online API interface, and encrypt the uplink data to be stored with the access key and then upload the encrypted memory card.
Example III
The present embodiment also provides an electronic device, referring to fig. 5, comprising a memory 504 and a processor 502, the memory 504 having stored therein a computer program, the processor 502 being arranged to run the computer program to perform the steps of any of the method embodiments described above.
In particular, the processor 502 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured to implement one or more integrated circuits of embodiments of the present application.
Wherein the memory 504 may include mass storage 504 for data or instructions. By way of example, and not limitation, memory 504 may comprise a Hard Disk Drive (HDD), floppy disk drive, solid State Drive (SSD), flash memory, optical disk, magneto-optical disk, tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. The memory 504 may include removable or non-removable (or fixed) media, where appropriate. The memory 504 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 504 is a Non-Volatile (Non-Volatile) memory. In particular embodiments, memory 504 includes Read-only memory (ROM) and Random Access Memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), an electrically rewritable ROM (EAROM) or FLASH memory (FLASH) or a combination of two or more of these. The RAM may be Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM) where appropriate, and the DRAM may be fast page mode dynamic random access memory 504 (FPMDRAM), extended Data Output Dynamic Random Access Memory (EDODRAM), synchronous Dynamic Random Access Memory (SDRAM), or the like.
Memory 504 may be used to store or cache various data files that need to be processed and/or used for communication, as well as possible computer program instructions for execution by processor 502.
The processor 502 implements any of the blockchain-based business processing methods of the above embodiments by reading and executing computer program instructions stored in the memory 504.
Optionally, the electronic apparatus may further include a transmission device 506 and an input/output device 508, where the transmission device 506 is connected to the processor 502 and the input/output device 508 is connected to the processor 502.
The transmission device 506 may be used to receive or transmit data via a network. Specific examples of the network described above may include a wired or wireless network provided by a communication provider of the electronic device. In one example, the transmission device includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through the base station to communicate with the internet. In one example, the transmission device 506 may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
The input-output device 508 is used to input or output information. In this embodiment, the input information may be service definition performed by the acquired service system in the uplink gateway, and the output information may be data returned by the interface, and the like.
Alternatively, in this embodiment, the processor 502 may be configured to execute the following steps by a computer program:
s101, acquiring service definition content of uplink service input by a service system, distributing an identity for the service system, and generating a corresponding account address and an access key.
S102, deploying the certificate-storing intelligent contract for the uplink service and generating a contract address, wherein the certificate-storing intelligent contract automatically acquires the service definition content and acquires the uplink data to be stored from the service definition content to construct parameter information of an online API interface.
S103, an online API interface is created based on the parameter information, and the online API interface is called to encrypt the uplink data to be stored through the access key and then to upload the stored certificate.
It should be noted that, specific examples in this embodiment may refer to examples described in the foregoing embodiments and alternative implementations, and this embodiment is not repeated herein.
In general, the various embodiments may be implemented in hardware or special purpose circuits, software, logic or any combination thereof. Some aspects of the invention may be implemented in hardware, while other aspects may be implemented in firmware or software which may be executed by a controller, microprocessor or other computing device, although the invention is not limited thereto. While various aspects of the invention may be illustrated and described as block diagrams, flow charts, or using some other pictorial representation, it is well understood that these blocks, apparatus, systems, techniques or methods described herein may be implemented in, as non-limiting examples, hardware, software, firmware, special purpose circuits or logic, general purpose hardware or controller or other computing devices, or some combination thereof.
Embodiments of the invention may be implemented by computer software executable by a data processor of a mobile device, such as in a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets, and/or macros can be stored in any apparatus-readable data storage medium and they include program instructions for performing particular tasks. The computer program product may include one or more computer-executable components configured to perform embodiments when the program is run. The one or more computer-executable components may be at least one software code or a portion thereof. In addition, in this regard, it should be noted that any blocks of the logic flows as illustrated may represent program steps, or interconnected logic circuits, blocks and functions, or a combination of program steps and logic circuits, blocks and functions. The software may be stored on a physical medium such as a memory chip or memory block implemented within a processor, a magnetic medium such as a hard disk or floppy disk, and an optical medium such as, for example, a DVD and its data variants, a CD, etc. The physical medium is a non-transitory medium.
It should be understood by those skilled in the art that the technical features of the above embodiments may be combined in any manner, and for brevity, all of the possible combinations of the technical features of the above embodiments are not described, however, they should be considered as being within the scope of the description provided herein, as long as there is no contradiction between the combinations of the technical features.
The foregoing examples merely represent several embodiments of the present application, the description of which is more specific and detailed and which should not be construed as limiting the scope of the present application in any way. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. The block chain-based service processing method is characterized by being applied to a uplink gateway, wherein a certificate-storing intelligent contract is built in the uplink gateway, and the method comprises the following steps:
acquiring service definition content of uplink service input by a service system, distributing an identity for the service system, and generating a corresponding account address and an access key;
deploying the certificate-storing intelligent contract for the uplink service and generating a contract address, wherein the certificate-storing intelligent contract automatically acquires the service definition content and acquires the uplink data to be stored from the service definition content to construct parameter information of an online API (application program interface);
the parameter information comprises an interface address, an identity, uplink data and a return parameter;
and creating an online API interface based on the parameter information, calling the online API interface, encrypting the uplink data to be stored through the access key, and then uploading the encrypted uplink data to a certificate.
2. The blockchain-based transaction processing method of claim 1, wherein the authenticated intelligent contract has defined internally a contract send address, a contract receive address, contract authentication content, an uplink transaction hash, and transaction time.
3. The blockchain-based business processing method of claim 1, wherein the online interface document of the online API interface is generated according to a built-in interface document template, the online interface document comprising: and calling address, calling mode, calling parameters and calling result return parameters, and carrying out calling development work on the online API according to the online interface document.
4. The blockchain-based service processing method of claim 1, wherein the online API interface includes a chaining interface for encrypting the stored uplink data with the access key and then authenticating the uplink.
5. The blockchain-based service processing method of claim 4, wherein the uplink port includes a synchronous uplink interface and an asynchronous uplink interface, wherein the synchronous uplink port is used for real-time uplink and returns a uplink transaction hash corresponding to the uplink service, and the asynchronous uplink port returns a digital number.
6. The blockchain-based business processing method of claim 5, wherein the online API interface further comprises a uplink data query interface and a transaction hash query interface; wherein,
the uplink data query interface is used for acquiring the uplink data according to the input uplink transaction hash;
the transaction hash inquiry interface is used for acquiring the uplink transaction hash corresponding to the uplink service according to the input digital number.
7. The blockchain-based service processing method of claim 1, wherein the service definition content includes a service name, a service description, a service uplink encryption type, wherein the access key is determined by the service uplink encryption type.
8. A blockchain-based service processing device, comprising:
the acquisition module is used for acquiring service definition content of uplink service input by a service system, distributing an identity for the service system and generating a corresponding account address and an access key;
the configuration module is used for deploying a certification-preserving intelligent contract for the uplink service and generating a contract address, and the certification-preserving intelligent contract automatically acquires the service definition content and acquires the uplink data to be stored from the service definition content to construct parameter information of an online API interface;
the parameter information comprises an interface address, an identity, uplink data and a return parameter;
and the uplink module is used for creating an online API interface based on the parameter information, calling the online API interface and uploading the uplink data to be stored through the access key encryption and then the certificate.
9. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the blockchain-based business processing method of any of claims 1 to 7.
10. A readable storage medium, characterized in that the readable storage medium has stored therein a computer program comprising program code for controlling a process to execute a process comprising the blockchain-based service processing method according to any of claims 1 to 7.
CN202111080373.0A 2021-09-15 2021-09-15 Business processing method and device based on block chain Active CN113766034B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111080373.0A CN113766034B (en) 2021-09-15 2021-09-15 Business processing method and device based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111080373.0A CN113766034B (en) 2021-09-15 2021-09-15 Business processing method and device based on block chain

Publications (2)

Publication Number Publication Date
CN113766034A CN113766034A (en) 2021-12-07
CN113766034B true CN113766034B (en) 2024-02-02

Family

ID=78795737

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111080373.0A Active CN113766034B (en) 2021-09-15 2021-09-15 Business processing method and device based on block chain

Country Status (1)

Country Link
CN (1) CN113766034B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115208956B (en) * 2022-06-23 2023-06-02 北京链道科技有限公司 Implementation method of block chain gateway
CN115473669A (en) * 2022-07-26 2022-12-13 国网北京市电力公司 Visual display method for block chain
CN115809863B (en) * 2023-02-08 2023-05-16 广东远景信息科技有限公司 Work management method and system based on block chain
CN116595024B (en) * 2023-07-17 2023-09-26 中博信息技术研究院有限公司 Processing method and device for massive data blockchain application

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109493042A (en) * 2018-10-24 2019-03-19 南京邮电大学 A kind of intelligent contract possessing access control function is credible to deposit card method and system
CN110555296A (en) * 2019-08-01 2019-12-10 阿里巴巴集团控股有限公司 identity verification method, device and equipment based on block chain
CN111488615A (en) * 2020-04-08 2020-08-04 北京瑞策科技有限公司 Cross-link realization method and device for service data block chain
WO2020233631A1 (en) * 2019-05-20 2020-11-26 创新先进技术有限公司 Transaction type-based receipt storage method and node
CN112380219A (en) * 2020-11-18 2021-02-19 南威软件股份有限公司 Method for defining block chain cochain data service stipulation and application service stipulation
CN113098876A (en) * 2021-04-02 2021-07-09 中南大学 Product data chaining method and medium based on block chain and intelligent contract
CN113162848A (en) * 2020-01-22 2021-07-23 北京百度网讯科技有限公司 Method, device, gateway and medium for realizing block chain gateway

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111885024B (en) * 2017-07-14 2022-11-18 创新先进技术有限公司 Login information processing method and equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109493042A (en) * 2018-10-24 2019-03-19 南京邮电大学 A kind of intelligent contract possessing access control function is credible to deposit card method and system
WO2020233631A1 (en) * 2019-05-20 2020-11-26 创新先进技术有限公司 Transaction type-based receipt storage method and node
CN110555296A (en) * 2019-08-01 2019-12-10 阿里巴巴集团控股有限公司 identity verification method, device and equipment based on block chain
CN113162848A (en) * 2020-01-22 2021-07-23 北京百度网讯科技有限公司 Method, device, gateway and medium for realizing block chain gateway
CN111488615A (en) * 2020-04-08 2020-08-04 北京瑞策科技有限公司 Cross-link realization method and device for service data block chain
CN112380219A (en) * 2020-11-18 2021-02-19 南威软件股份有限公司 Method for defining block chain cochain data service stipulation and application service stipulation
CN113098876A (en) * 2021-04-02 2021-07-09 中南大学 Product data chaining method and medium based on block chain and intelligent contract

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
R. Finlayson ; LIVE.COM ; .An Abstract API for Multicast Address Allocation.IETF rfc2771.2000,全文. *
张召 ; 田继鑫 ; 金澈清.链上存证、链下传输的可信数据共享平台 .大数据.2020,全文. *

Also Published As

Publication number Publication date
CN113766034A (en) 2021-12-07

Similar Documents

Publication Publication Date Title
CN113766034B (en) Business processing method and device based on block chain
US10733603B2 (en) Method and apparatus for facilitating electronic payments using a wearable device
EP3333744B1 (en) Authorization code flow for in-browser applications
EP3337219B1 (en) Carrier configuration processing method, device and system, and computer storage medium
CN105025005B (en) The method and apparatus of network credentials is provided
KR20170134631A (en) User authentication method and apparatus, and wearable device registration method and apparatus
US20170280324A1 (en) Methods and apparatus for sim-based authentication of non-sim devices
WO2019052411A1 (en) A binding method, device and system for smart apparatus, and telecommunications system
CN111915019A (en) Federal learning method, system, computer device, and storage medium
CN114281573A (en) Workflow data interaction method and device, electronic device and readable storage medium
US11588791B2 (en) Method and apparatus for trusted service management
CN104935435A (en) Login methods, terminal and application server
Urien Cloud of secure elements: An infrastructure for the trust of mobile NFC services
CN111259364B (en) Method, device, equipment and storage medium for using national secret encryption card
CN113766496B (en) Cross-platform binding method and system for intelligent equipment and related equipment
Klee et al. {NFCGate}: Opening the Door for {NFC} Security Research with a {Smartphone-Based} Toolkit
CN111427860B (en) Distributed storage system and data processing method thereof
CN113301537B (en) Method, device, electronic equipment and storage medium for establishing communication connection
CN112187921A (en) Object file downloading method, device, system, server and storage medium
CN110866240A (en) Intelligent password key calling method and system
CN110880965A (en) Outgoing electronic document encryption method, system, terminal and storage medium
CN111147430A (en) Encryption method and device applied to intelligent home gateway
CN113918423A (en) Cloud platform monitoring method and device and application thereof
TWI441534B (en) A method of the data transmission of the mobile phone and the system therefore
RU2633186C1 (en) Personal device for authentication and data protection

Legal Events

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