CN111478780A - Flow charging system based on block chain technology and charging method thereof - Google Patents

Flow charging system based on block chain technology and charging method thereof Download PDF

Info

Publication number
CN111478780A
CN111478780A CN202010256220.6A CN202010256220A CN111478780A CN 111478780 A CN111478780 A CN 111478780A CN 202010256220 A CN202010256220 A CN 202010256220A CN 111478780 A CN111478780 A CN 111478780A
Authority
CN
China
Prior art keywords
data
user signature
signature data
option
length
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.)
Pending
Application number
CN202010256220.6A
Other languages
Chinese (zh)
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.)
Guojin Blockchain Technology Hangzhou Co ltd
Original Assignee
Guojin Blockchain Technology Hangzhou 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 Guojin Blockchain Technology Hangzhou Co ltd filed Critical Guojin Blockchain Technology Hangzhou Co ltd
Priority to CN202010256220.6A priority Critical patent/CN111478780A/en
Publication of CN111478780A publication Critical patent/CN111478780A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • H04L12/1403Architecture for metering, charging or billing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • H04L12/1432Metric aspects
    • H04L12/1435Metric aspects volume-based
    • 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

Abstract

The invention discloses a flow charging method based on a block chain technology, which is characterized in that in order to minimize the influence on an application layer protocol, user signature data is put in a network layer; the user signature data is any data which accords with a block chain protocol; the user signature data comprises transaction or intelligent contract and the like; the network layer equipment directly analyzes the user signature data and sends the user signature data to the block chain; the maximum length of the ip header in the network layer is 60 bytes, wherein the maximum length of options is 40 bytes, so that the user signature data can only be put in payload. In order to minimize the option length, the user signature data is placed at the beginning of the payload. The invention provides a flow charging system based on a block chain technology; the payment processing function can be provided directly through an intermediate device such as a router in the future on the basis of minimally modifying the existing protocol by modifying the network layer protocol to enable the traffic fee to be paid by using the pass certificate.

Description

Flow charging system based on block chain technology and charging method thereof
Technical Field
The invention relates to the technical field of flow charging, in particular to a flow charging system based on a block chain technology and a charging method thereof.
Background
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm.
The block chain (Blockchain) is an important concept of the bitcoin, is essentially a decentralized database, and is used as a bottom-layer technology of the bitcoin, namely a series of data blocks which are generated by correlation by using a cryptographic method, wherein each data block contains information of a batch of bitcoin network transactions and is used for verifying the validity (anti-counterfeiting) of the information and generating a next block; in a narrow sense, the blockchain is a distributed account book which is a chain data structure formed by combining data blocks in a sequential connection mode according to a time sequence and is guaranteed in a cryptographic mode and cannot be tampered and forged.
Broadly, the blockchain technique is a completely new distributed infrastructure and computing approach that utilizes blockchain data structures to verify and store data, utilizes distributed node consensus algorithms to generate and update data, utilizes cryptography to secure data transmission and access, and utilizes intelligent contracts composed of automated script code to program and manipulate data.
At present, most of user signature data is placed in an application layer to influence service efficiency, and therefore, the inventor provides a flow charging system based on a block chain technology and a charging method thereof by integrating various factors.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a traffic charging system based on block chain technology and a charging method thereof, so as to solve the problems proposed in the background art.
In order to solve the technical problems, the technical scheme of the invention is as follows:
A traffic charging method based on block chain technology, in order to minimize the impact on application layer agreement, put the user's signature data in the network layer; the user signature data is any data that conforms to the blockchain protocol.
As a further scheme of the invention: the user signature data comprises transaction or intelligent contract and the like;
As a further scheme of the invention: the network layer device directly parses the user signature data and sends it to the blockchain.
As a further scheme of the invention, the maximum length of the ip header in the network layer is 60 bytes, wherein the maximum length of options is 40 bytes, so that only user signature data can be placed in the payload.
As a further scheme of the invention: the ip header option comprises 3 parts; option-type, which is subdivided into copied flag/class/number fields; option-length, length of the whole option; option-data option structure and data are as follows:
Figure BDA0002437419930000021
the total length of the option is 3 bytes, the data is 1 byte, the data L entry represents the length of the user signature data (maximum 255bytes), i.e. the initial data L entry byte of the payload is the user signature data, wherein the tagged flag is 0, which means that if the ip packet is fragmented, the first ip fragment must contain all the user signature data, i.e. the minimum MTU in the whole transmission path is 315 bytes (60+ 255).
As a further scheme of the invention: the complete ip packet is as follows (the first ip packet fragment):
Figure BDA0002437419930000022
The ip layer needs to verify whether the user signature data is valid when receiving the data packet, and discards the data packet if the verification fails.
As a further scheme of the invention: when a data packet is sent, an ip layer is needed to provide an interface for an upper layer protocol to set the ip header and user signature data, similarly to manually assembling an ip packet through a linux raw socket, pseudo codes are as follows:
1.char buffer[8192];
2.struct iphdr*ip=(struct iphdr*)buffer;
3.int enabled=1;
4.const int*optVal=&enabled;
5.int sd=socket(PF_INET,SOCK_RAW,IPPROTO_TCP);
6.setsockopt(sd,IPPROTO_IP,IP_HDRINCL,optVal,sizeof(enabled);//setIP_HDRINCL options;
7.ip->ihl=...;
8.ip->version=...;
9.ip[40..]=//option&user signed data;
Compared with the prior art, the invention has the following beneficial effects:
The invention provides a flow charging system based on a block chain technology; the payment processing function can be provided directly through an intermediate device such as a router in the future on the basis of minimally modifying the existing protocol by modifying the network layer protocol to enable the traffic fee to be paid by using the pass certificate.
Drawings
Fig. 1 is a block diagram illustrating the operation of a traffic charging system based on the blockchain technique.
Detailed Description
The following further describes embodiments of the present invention with reference to the drawings. It should be noted that the description of the embodiments is provided to help understanding of the present invention, but the present invention is not limited thereto. In addition, 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.
Referring to fig. 1, in order to minimize the impact on the application layer protocol, user signature data is placed at the network layer. The user signature data may be any data that conforms to the blockchain protocol, such as transaction or smart contract. The network layer device may parse the user signature data directly and send it to the blockchain.
the maximum length of the ip header is 60 bytes, wherein the length of options is 40 bytes at most, so that the user signature data can only be placed in the payload, in order to reduce the length of the options as much as possible, the user signature data is placed at the starting position of the payload.
The ip header option contains 3 parts:
option-type, which is subdivided into coded flag/class/number fields
option-length the length of the entire option
option-data option data
The option structure and data are as follows:
Figure BDA0002437419930000041
the total length of the option is 3 bytes, the data is 1 byte, the data L entry represents the length of the user signature data (maximum 255bytes), i.e. the initial data L entry byte of the payload is the user signature data, wherein the tagged flag is 0, which means that if the ip packet is fragmented, the first ip fragment must contain all the user signature data, i.e. the minimum MTU in the whole transmission path is 315 bytes (60+ 255).
The complete ip packet is as follows (first ip packet fragment):
Figure BDA0002437419930000042
The ip layer needs to verify whether the user signature data is valid when receiving the data packet, and discards the data packet if the verification fails. When a data packet is sent, an ip layer is needed to provide an interface for an upper layer protocol to set the ip header and user signature data, and similar to the manual assembly of an ip packet through a linux raw socket, pseudo codes are as follows:
char buffer[8192];
struct iphdr*ip=(struct iphdr*)buffer;
int enabled=1;
const int*optVal=&enabled;
int sd=socket(PF_INET,SOCK_RAW,IPPROTO_TCP);
setsockopt(sd,IPPROTO_IP,IP_HDRINCL,optVal,sizeof(enabled);//set IP_HDRINCL options
ip->ihl=...;
ip->version=...;
ip[40..]=//option&user signed data。
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. It will be apparent to those skilled in the art that various changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, and the scope of protection is still within the scope of the invention.

Claims (8)

1. A traffic charging method based on block chain technology is characterized in that in order to minimize the influence on an application layer protocol, user signature data is put in a network layer; the user signature data is any data that conforms to the blockchain protocol.
2. A method for traffic charging based on blockchain technology according to claim 1, wherein said user signature data includes transaction or smart contracts.
3. A method for traffic charging based on blockchain technique according to claim 2, characterized in that the network layer device directly parses the user signature data and sends it to the blockchain.
4. the method of claim 3, wherein the maximum length of the ip header in the network layer is 60 bytes, and the options length is 40 bytes, the user signature data is placed in the payload, the user signature data is placed at the start position of the payload in order to minimize the option length, when the ip packet is parsed, if the option exists, the first data L length byte of the payload is deserialized into the user signature data, and the payload offset is calculated from the IH L field in the ip header.
5. The method as claimed in claim 4, wherein the iphead option comprises 3 parts; option-type: wherein, the field is subdivided into a copied flag/class/number field; option-length: the length of the entire option; option-data: the option data option structure and data are as follows:
Figure FDA0002437419920000011
the total length of the option is 3 bytes, the data is 1 byte, the data L entry represents the length of the user signature data (maximum 255bytes), i.e. the initial data L entry byte of the payload is the user signature data, wherein the tagged flag is 0, which means that if the ip packet is fragmented, the first ip fragment must contain all the user signature data, i.e. the minimum MTU in the whole transmission path is 315 bytes.
6. The method of claim 5, wherein the complete ippacket is as follows:
Figure FDA0002437419920000012
Figure FDA0002437419920000021
The ip layer needs to verify whether the user signature data is valid when receiving the data packet, and discards the data packet if the verification fails.
7. The method according to claim 6, wherein an ip layer is required to provide an interface for an upper layer protocol to set the ip header and the user signature data when sending the data packet, and similar to manually assembling an ip packet through a linux socket, the pseudo code is as follows:
When a data packet is sent, an ip layer is needed to provide an interface for an upper layer protocol to set the ip header and user signature data, similarly to manually assembling an ip packet through a linux raw socket, pseudo codes are as follows:
1.char buffer[8192];
2.struct iphdr*ip=(struct iphdr*)buffer;
3.int enabled=1;
4.const int*optVal=&enabled;
5.int sd=socket(PF_INET,SOCK_RAW,IPPROTO_TCP);
6.setsockopt(sd,IPPROTO_IP,IP_HDRINCL,optVal,sizeof(enabled);//set IP_HDRINCL options
7.ip->ihl=...;
8.ip->version=...;
9.ip[40..]=//option&user signed data。
8. A traffic charging system using the method for traffic charging based on blockchain technology according to any one of claims 1 to 7.
CN202010256220.6A 2020-04-02 2020-04-02 Flow charging system based on block chain technology and charging method thereof Pending CN111478780A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010256220.6A CN111478780A (en) 2020-04-02 2020-04-02 Flow charging system based on block chain technology and charging method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010256220.6A CN111478780A (en) 2020-04-02 2020-04-02 Flow charging system based on block chain technology and charging method thereof

Publications (1)

Publication Number Publication Date
CN111478780A true CN111478780A (en) 2020-07-31

Family

ID=71750426

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010256220.6A Pending CN111478780A (en) 2020-04-02 2020-04-02 Flow charging system based on block chain technology and charging method thereof

Country Status (1)

Country Link
CN (1) CN111478780A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105743649A (en) * 2014-12-11 2016-07-06 中兴通讯股份有限公司 User signature and user signature decryption method, device and system
CN109711192A (en) * 2018-12-24 2019-05-03 众安信息技术服务有限公司 Method of commerce and system between block catenary system construction method, node

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105743649A (en) * 2014-12-11 2016-07-06 中兴通讯股份有限公司 User signature and user signature decryption method, device and system
CN109711192A (en) * 2018-12-24 2019-05-03 众安信息技术服务有限公司 Method of commerce and system between block catenary system construction method, node

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
徐沉: "区块链下的会计信息系统――一个分析框架", 《当代会计》 *
朱建明等: "基于许可链的SWIFT系统分布式架构", 《软件学报》 *

Similar Documents

Publication Publication Date Title
CN108833081B (en) Block chain-based equipment networking authentication method
US8874921B2 (en) System and method for generating keyless digital multi-signatures
US20180330073A1 (en) Authentication device and system
AU2003226286B2 (en) Processing a packet using multiple pipelined processing modules
AU708404B2 (en) Billing procedure and system for data-transmission networks
CN111309711A (en) Cross-block-chain data migration method, device, equipment and storage medium
CN106357396A (en) Digital signature method, digital signature system and quantum key card
CN101043454B (en) Methods, apparatus and systems for improving security while transmitting a data packet
CN102422617A (en) Negotiated secure fast table lookups for protocols with bidirectional identifiers
CN101632086A (en) Authentication device and method
CN111211905A (en) Identity management method for Fabric alliance chain members based on certificate-free authentication
CN102377783A (en) Dynamic password generation and authentication method and dynamic password generation and authentication system
CN114567643B (en) Cross-blockchain data transfer method, device and related equipment
CN113328997A (en) Alliance chain cross-chain system and method
KR102179160B1 (en) System and method to prove message for communication between blockchains
CN110177001A (en) A kind of NFC circle deposit method, system and storage medium based on soft certificate
CN109104476A (en) A kind of security information for power system system based on block chain
CN109921908A (en) A kind of CAN bus identity identifying method and identity authorization system
CN113592476A (en) Cross-chain asset transfer method, computer device, and storage medium
CN111478780A (en) Flow charging system based on block chain technology and charging method thereof
Lim Secure code dissemination and remote image management using short-lived signatures in WSNs
CN112529550A (en) Anonymous transfer method and device based on block chain and electronic equipment
CN112491777B (en) Cross-block chain identity authentication method, computer equipment and readable storage medium
CN114065302A (en) Data processing method, device, equipment, medium and block chain network
CN113626842A (en) Block chain system for realizing password service based on password card and storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200731

RJ01 Rejection of invention patent application after publication