CN112804067A - Traffic data processing method, device, server and system - Google Patents

Traffic data processing method, device, server and system Download PDF

Info

Publication number
CN112804067A
CN112804067A CN202110123934.4A CN202110123934A CN112804067A CN 112804067 A CN112804067 A CN 112804067A CN 202110123934 A CN202110123934 A CN 202110123934A CN 112804067 A CN112804067 A CN 112804067A
Authority
CN
China
Prior art keywords
flow
traffic
query
server
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110123934.4A
Other languages
Chinese (zh)
Other versions
CN112804067B (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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202110123934.4A priority Critical patent/CN112804067B/en
Publication of CN112804067A publication Critical patent/CN112804067A/en
Application granted granted Critical
Publication of CN112804067B publication Critical patent/CN112804067B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0213Standardised network management protocols, e.g. simple network management protocol [SNMP]
    • 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 provides a traffic data processing method, a device, a server and a system, which are applied to a block chain server, wherein the method comprises the following steps: collecting flow data of network equipment, and storing the flow data into flow data blocks; receiving a flow query instruction sent by a flow charging server, acquiring all corresponding flow data blocks according to the flow query instruction, and determining a total query flow according to the total flow of all corresponding flow data blocks; and sending the total query flow to a flow charging server so that the flow charging server determines the flow charge according to the total query flow. The embodiment of the invention realizes the automatic and decentralized storage of the flow data by establishing the flow data processing system based on the block chain storage, so that the flow data collected by an operator is not easy to lose, and the consistency of the flow charge calculated by the operator and the flow charging data collected by the user owned system is ensured.

Description

Traffic data processing method, device, server and system
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a server, and a system for processing traffic data.
Background
In recent years, as the bandwidth of a private line (IDC) enters the ten-trillion era, how to accurately calculate the traffic of the private line becomes a main direction of research.
The existing flow charging mode comprises various modes such as average flow charging, peak flow charging and the like, flow data acquisition is carried out on ports rented by users every five minutes in a charging period, and calculation is carried out by adopting a contract charging mode according to the acquired flow data, so that the monthly flow charge of the users is finally calculated.
However, in the prior art, the data acquired is lost due to the error of data packet loss in the data acquisition process, so that the deviation between the traffic charge calculated by an operator and the traffic charging data acquired by the user's own system is large.
Disclosure of Invention
The invention aims to provide a flow data processing method, a flow data processing device, a server and a flow data processing system, which enable flow data collected by an operator not to be lost easily and ensure the consistency of flow charge calculated by the operator and flow charging data collected by a user owned system.
In a first aspect, the present invention provides a traffic data processing method, applied to a blockchain server, where the method includes:
collecting flow data of network equipment, and storing the flow data into flow data blocks;
receiving a flow query instruction sent by a flow charging server, acquiring all corresponding flow data blocks according to the flow query instruction, and determining a total query flow according to the total flow of all corresponding flow data blocks;
and sending the total query flow to a flow charging server so that the flow charging server determines flow charge according to the total query flow.
In one possible design, the collecting traffic data of the network device and storing the traffic data as a traffic data block includes:
acquiring flow data of network equipment according to a preset time interval, taking the acquisition time of acquiring the flow data in each time interval as a time identifier, and acquiring a flow data block according to the total flow of acquiring the flow data in each time interval;
storing the flow data block in an IPFS file system according to a storage API interface;
correspondingly, the obtaining all corresponding traffic data blocks according to the traffic query instruction, and determining a query traffic total amount according to the traffic total amount of all corresponding traffic data blocks includes:
acquiring all corresponding time identifications according to the query time nodes in the flow query instruction, and determining all corresponding flow data blocks according to all the corresponding time identifications;
and determining the total query flow according to the total flow contained in all the corresponding flow data blocks.
In one possible design, after the collecting traffic data of the network device, the method further includes:
screening the flow data according to a PBFT practical Byzantine fault-tolerant algorithm to obtain screened flow data;
accordingly, the storing the traffic data as a traffic data block comprises:
and storing the screened flow data into a flow data block.
In a possible design, after the sending the total amount of query traffic to the traffic charging server, further includes,
receiving a payment contract acquisition request sent by the flow charging server, and determining a preset payment contract according to a user identifier contained in the payment contract acquisition request, wherein the preset payment contract comprises payment account information and a payment date of a user;
and sending the preset payment contract to the flow charging server so that the flow charging server determines flow charge according to the preset payment contract and deducts the flow charge according to the payment account information and the payment date.
In a second aspect, the present invention provides a traffic data processing method, applied to a traffic charging server, where the method includes:
acquiring a flow query instruction, and sending the flow query instruction to a block chain server, so that the block chain server acquires all corresponding flow data blocks according to the flow query instruction, and determines a query flow total amount according to the flow total amount of all corresponding flow data blocks, wherein the flow data blocks are acquired by storing the block chain server according to acquired flow data of network equipment;
and receiving the total query flow sent by the flow charging server, and determining the flow charge according to the total query flow.
In one possible design, the determining the traffic cost according to the query traffic total further includes:
sending the acquired payment contract request to a blockchain server so that the blockchain server determines a preset payment contract according to a user identifier contained in the acquired payment contract request;
receiving a preset payment contract sent by the block chain server, and determining the flow fee according to the preset payment contract, wherein the preset payment contract comprises payment account information and a payment date of a user;
and deducting the flow fee according to the payment account information of the user and the payment date.
In a third aspect, the present invention provides a traffic data processing apparatus applied to a block chain server, including:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring flow data of network equipment and storing the flow data as a flow data block;
the determining module is used for receiving a flow query instruction sent by a flow charging server, obtaining all corresponding flow data blocks according to the flow query instruction, and determining a query flow total amount according to the flow total amount of all corresponding flow data blocks;
and the sending module is used for sending the total query flow amount to a flow charging server so that the flow charging server determines flow charge according to the total query flow amount.
In a fourth aspect, the present invention provides a traffic data processing apparatus, applied to a traffic charging server, including:
the acquisition module is used for acquiring a traffic query instruction and sending the traffic query instruction to a block chain server so that the block chain server acquires all corresponding traffic data blocks according to the traffic query instruction and determines a query traffic total amount according to the traffic total amount of all corresponding traffic data blocks, wherein the traffic data blocks are acquired by storing the block chain server according to acquired traffic data of the network equipment;
and the determining module is used for receiving the total query flow sent by the flow charging server and determining the flow charge according to the total query flow.
In a fifth aspect, the present invention provides a blockchain server comprising a memory and at least one processor;
the memory is used for storing computer execution instructions;
at least one processor configured to execute computer-executable instructions stored by the memory to cause the at least one processor to perform a method of traffic data processing as the first aspect and various possible designs of the first aspect.
In a sixth aspect, the present invention provides a traffic charging server, comprising a memory and at least one processor;
the memory is used for storing computer execution instructions;
at least one processor for executing computer-executable instructions stored by the memory, such that the at least one processor performs the traffic data processing method as variously contemplated by the second aspect and the second aspect.
In a seventh aspect, the present invention provides a traffic data processing system, which includes at least one blockchain server and a traffic charging server;
wherein a processor of the blockchain server executes the traffic data processing method according to the first aspect and various possible designs of the first aspect; the processor of the traffic charging server executes the traffic data processing method according to the second aspect and various possible designs of the second aspect.
In an eighth aspect, the present invention provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the method for processing flow data according to the first aspect and various possible designs of the first aspect is implemented.
In a ninth aspect, the present invention provides a computer-readable storage medium, which stores computer-executable instructions, and when a processor executes the computer-executable instructions, the method for processing flow data according to the second aspect and various possible designs of the second aspect is implemented.
In a tenth aspect, the invention provides a computer program product comprising a computer program which, when executed by a processor, implements a method of traffic data processing as described in the first aspect and various possible designs of the first aspect.
In an eleventh aspect, the present invention provides a computer program product comprising a computer program which, when executed by a processor, implements a method of traffic data processing as described in the second aspect and in various possible designs of the second aspect.
According to the traffic data processing method, the traffic data processing device, the traffic data processing server and the traffic data processing system, the traffic data of network equipment are collected through the block chain server, the traffic data are stored into traffic data blocks, a traffic query instruction sent by the traffic billing server is received, all corresponding traffic data blocks are obtained according to the traffic query instruction, query traffic total amount is determined according to the traffic total amount of all corresponding traffic data blocks, and the query traffic total amount is sent to the traffic billing server, so that the traffic billing server determines traffic cost according to the query traffic total amount. By utilizing the characteristics of safety, non-tamper property, transparency, openness, decentralization and the like of the block chain, a flow data processing system based on block chain storage is established, the automatic and decentralization storage of data is realized, the flow data collected by an operator is not easy to lose, and the consistency of the flow cost calculated by the operator and the flow charging data collected by a user owned system is ensured.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a schematic structural diagram of a traffic data processing system according to an embodiment of the present invention;
fig. 2 is a first flowchart of a flow data processing method according to an embodiment of the present invention;
fig. 3 is a flow chart of a flow data processing method according to an embodiment of the present invention;
fig. 4 is a flow chart of a flow data processing method according to an embodiment of the present invention;
fig. 5 is a flow chart of a flow data processing method according to a fourth embodiment of the present invention;
fig. 6 is a flow chart of a flow data processing method according to an embodiment of the present invention;
fig. 7 is a first schematic structural diagram of a traffic data processing apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a flow data processing apparatus according to an embodiment of the present invention;
fig. 9 is a block chain server structure diagram according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a traffic charging server according to an embodiment of the present invention.
Detailed Description
With the above figures, certain embodiments of the invention have been illustrated and described in more detail below. The drawings and the description are not intended to limit the scope of the inventive concept in any way, but rather to illustrate it by those skilled in the art with reference to specific embodiments.
In recent years, as an Internet Data Center (IDC) system enters a trillion times, how to accurately calculate the flow of a private loan becomes a main research direction. The existing flow charging mode comprises various modes such as average flow charging, peak flow charging and the like, flow data acquisition is carried out on ports rented by users every five minutes in a charging period, and calculation is carried out by adopting a contract charging mode according to the acquired flow data, so that the monthly flow charge of the users is finally calculated. Specifically, in the prior art, a three-layer framework is generally adopted to build an IDC traffic data processing system, a Simple Network Management Protocol (SNMP) Protocol is deployed on a Network device at a bottom layer, a server acquires port incoming/outgoing traffic of the Network device by using the SNMP Protocol, acquires the rate of each port every five minutes, and stores acquired traffic data in a database server, and port traffic data every five minutes is generally stored by using an oracle database cluster because of large data volume; and a user side of the flow data processing system generates a flow graph according to the original data stored in the database server, correspondingly calculates the flow value every five minutes according to a charging strategy, and finally generates a user flow charging bill monthly.
However, because the existing method for acquiring the traffic data of the network device port according to the SNMP protocol is directly transmitted from the network device to the server, the acquired data is lost due to data packet loss errors, and the problem that the deviation between the traffic cost calculated by an operator and the traffic charging data acquired by the user's own system is large is caused.
Aiming at the defect, the technical concept provided by the application is as follows: by utilizing the characteristics of safety, non-tamper property, transparency, openness, decentralization and the like of the block chain, a flow data processing system based on block chain storage is established, the automatic and decentralization storage of data is realized, the flow data collected by an operator is not easy to lose, and the consistency of the flow cost calculated by the operator and the flow charging data collected by a user owned system is ensured.
Fig. 1 is a schematic structural diagram of a traffic data processing system according to an embodiment of the present invention. As shown in fig. 1, an application scenario of the traffic data processing method includes: the system comprises a flow charging server 10 and at least one blockchain server 20, wherein the flow charging server 10 establishes network communication with each blockchain server 20, data communication is established between each blockchain server 20, and each blockchain server 20 is also connected with a network port of a network device. The flow charging server 10 is configured to provide a flow query client and a payment client for a user, and may also generate a flow graph and a flow charging bill according to a query command of the user. The blockchain server 20 is used to collect and store the traffic data of the network device, so that the traffic billing server 10 calculates the traffic fee according to the traffic data stored in the blockchain server 20. The method and the system realize the automatic and decentralized storage of the flow data, ensure the consistency and the safety of the data and avoid disputes between users and operators caused by the difference of the flow data.
Fig. 2 is a first flowchart of a traffic data processing method according to an embodiment of the present invention. As shown in fig. 2, an execution subject of the method of this embodiment may be the blockchain server in fig. 1, and the traffic data processing method provided by the embodiment of the present invention includes the following steps:
s201: and collecting the flow data of the network equipment, and storing the flow data into a flow data block.
In the embodiment of the present invention, the network device may be a router or a switch. The blockchain server may collect initial traffic data of the network device by using a simple network management protocol according to SNMP. The blockchain server can also read the port traffic of the network equipment in a remote login mode.
In the embodiment of the present invention, in order to improve the accuracy of acquiring the traffic data of the network device, optionally, the block chain server may screen the traffic data according to a PBFT practical byzantine fault-tolerant algorithm, obtain the screened traffic data, and store the screened traffic data as a traffic data block. Specifically, the traffic data of the network device is collected by setting the traffic data to a plurality of block chain servers in a period of 5 minutes. The number of the blockchain servers is not suitable to be excessive, the network speed is slowed down due to the excessive number of the blockchain servers, and the synchronization efficiency of the blocks can be improved due to the suitable number of the blockchain servers. A Practical Byzantine Fault Tolerance (PBFT) consensus mechanism is realized through multi-state mutually communicated block chain servers, flow data are screened according to a PBFT Practical Byzantine Fault Tolerance algorithm, and the screened flow data are obtained. Specifically, the PBFT algorithm requires that a state be maintained together, that all blockchain servers take action in concert, that after information is exchanged among blockchain servers, each blockchain server lists all the obtained information, and that most of the results are used as consensus decisions. For example, it is assumed that N blockchain servers read the same port traffic, and f blockchain servers fail to read, and traffic data is lost. N is the total number of the block chain servers, f is the total number of the block chain servers with data transmission problems, wherein N and f are positive integers, when N is larger than or equal to 3f +1, the acquired data are correct, and the PBFT enables the normally acquired flow to be added into a block chain database of the block chain servers; if N is less than or equal to 3f +1, the flow acquired by the f block chain servers can be discarded, and the accuracy of the data acquisition is ensured.
S202: receiving a flow query instruction sent by a flow charging server, obtaining all corresponding flow data blocks according to the flow query instruction, and determining a query flow total amount according to the flow total amount of all corresponding flow data blocks.
In the embodiment of the present invention, the traffic data block stored in the blockchain server includes the collection time and the total traffic amount of the traffic data. The flow charging server obtains a flow query instruction according to query time of a user or an appointed payment date, wherein the flow query instruction carries a timestamp for querying flow, the block chain server determines corresponding acquisition time and corresponding flow data blocks according to the timestamp, and determines the total amount of all flow data participating in charging according to all the flow data blocks.
S203: and sending the total query flow to a flow charging server so that the flow charging server determines the flow charge according to the total query flow.
In the embodiment of the invention, the block chain server sends the total query flow to the flow charging server, so that the flow charging server can determine the flow charge according to the total query flow. Specifically, if the total inquired flow amount is less than or equal to the upper flow limit specified in the flow service opening contract, determining the flow charge according to a first charging standard in the flow service opening contract; if the total inquired flow is larger than the upper limit of the flow specified in the flow service opening contract, determining the extra flow cost according to the basic cost, all extra flows exceeding the determined upper limit of the flow and the second charging standard, and determining the flow cost according to the basic flow cost and the extra flow cost, wherein the basic cost is determined by the first charging standard and the upper limit of the flow.
As can be seen from the above embodiments, the block chain server is configured to acquire traffic data of the network device, store the traffic data as traffic data blocks, receive a traffic query instruction sent by the traffic charging server, obtain all corresponding traffic data blocks according to the traffic query instruction, determine a total query traffic amount according to the traffic amount of all corresponding traffic data blocks, and send the total query traffic amount to the traffic charging server, so that the traffic charging server determines a traffic charge according to the total query traffic amount. The invention utilizes the characteristics of safety, non-tamper property, transparency, openness, decentralization and the like of the block chain to establish a flow data processing system based on block chain storage, realizes the automatic and decentralization storage of data, ensures that the flow data collected by an operator is not easy to lose, and ensures the consistency of the flow charge calculated by the operator and the flow charging data collected by a user self-owned system.
Fig. 3 is a flow chart of a flow data processing method according to an embodiment of the present invention. As shown in fig. 3, on the basis of the traffic data processing method provided in fig. 2, another traffic data processing method provided in the embodiment of the present invention further includes the following steps:
s301: the method comprises the steps of collecting flow data of network equipment according to a preset time interval, taking the collection time of the flow data collected in each time interval as a time identifier, obtaining a flow data block according to the total flow of the flow data collected in each time interval, and storing the flow data block in an interplanetary File System (IPFS) according to a storage API (application programming interface).
In the embodiment of the present invention, for example, the preset time interval is set to 5 minutes, the blockchain server collects traffic data of the network device every 5 minutes, and obtains a traffic data block according to a total amount of traffic collected in the time period, where the start time of collecting the traffic data is used as a time identifier of the traffic data collected in the time period.
In an embodiment of the present invention, after obtaining the traffic data block, the blockchain server may store the traffic data block in the IPFS file system according to the storage API interface. The IPFS is a distributed storage network, is similar to a set of a plurality of file protocols, and a massive network sharing a storage space is constructed by a plurality of participants using the protocols, so that the IPFS is a safe, low-cost and efficient technical platform for sharing hard disks. The existing block chain storage has the defects of low efficiency and high cost, in order to reduce the storage pressure of the block chain, the block chain server adopts a mode of cooperative work of IPFS and the block chain, can store the traffic data in the IPFS, and stores the time identifications corresponding to the traffic data blocks on the chain. After a flow data acquisition server of the network equipment reads flow data every 5 minutes, a storage API (application programming interface) is utilized to generate a time identifier corresponding to the flow data according to a timestamp of the acquired flow data, the flow data corresponding to a time value is packaged into a data block, a real flow data block is stored in an IPFS (Internet protocol file system), the time identifier of the flow data is stored in a block chain, and transaction data in an original block is replaced; when the flow acquisition system needs to read data, the flow data block corresponding to the IPFS is quickly extracted according to the time identification of the flow data in the block chain.
S302: acquiring all corresponding time identifications according to query time nodes in the flow query instruction, and determining all corresponding flow data blocks according to all corresponding time identifications; and determining the total query flow according to the total flow contained in all the corresponding flow data blocks.
In the embodiment of the invention, the block chain server obtains all corresponding time identifications according to the query time nodes carried in the flow query instruction. The time mark is the inspiration time of collecting the flow data, wherein the inquiry time node comprises the start time and the end time of inquiry, and the corresponding time mark belongs to all time nodes between the start time and the end time. And determining all corresponding traffic data blocks according to all corresponding time identifications, and finally determining the total query traffic according to the total traffic contained in all corresponding traffic data blocks.
It can be seen from the foregoing embodiments that, by setting the block chain server to store the traffic data block in the IPFS file system according to the storage API interface, a faster and safer data storage function is achieved, and while the security of data storage is ensured, it is not necessary to deploy a conventional hardware storage service array, which reduces the data storage burden of the traffic data processing system, and meets the requirement of the traffic data processing system on the security of data storage.
Fig. 4 is a flow chart of a flow data processing method provided in the embodiment of the present invention. As shown in fig. 4, on the basis of the traffic data processing method provided in the embodiment of fig. 2, after sending the total amount of query traffic to the traffic charging server in S203, the traffic data processing method provided in the embodiment of the present invention further includes the following steps:
s401: receiving a payment contract acquisition request sent by a flow charging server, and determining a preset payment contract according to a user identifier carried in the payment contract acquisition request, wherein the preset payment contract comprises payment account information and a payment date of a user.
In the embodiment of the invention, a preset payment contract signed when a user transacts the flow service is prestored in the blockchain server, and the preset payment contract comprises payment account information and payment date of the user. And after receiving the payment contract acquisition request sent by the flow charging server, the block chain server determines a preset payment contract which is transacted when the user transacts the service according to the user identification carried in the payment contract acquisition request.
S402: and sending the preset payment contract to a flow charging server so that the flow charging server determines the flow charge according to the preset payment contract and deducts the flow charge according to the payment account information and the payment date.
In the embodiment of the invention, the block chain server sends the preset payment contract to the flow charging server, so that the flow charging server determines the flow charge according to the preset payment contract and the query flow total amount, and specifically, if the query flow total amount is less than or equal to the flow upper limit specified in the flow service opening contract, the flow charge is determined according to a first charging standard in the flow service opening contract; if the total inquired flow is larger than the upper limit of the flow specified in the flow service opening contract, determining the extra flow cost according to the basic cost, all extra flows exceeding the determined upper limit of the flow and the second charging standard, and determining the flow cost according to the basic flow cost and the extra flow cost, wherein the basic cost is determined by the first charging standard and the upper limit of the flow. And the flow charging server deducts flow charge according to the payment account information and the payment date. According to the rules in the preset payment contract, the flow charging server can deduct the flow fee from the account registered in the payment account information of the client directly on the appointed payment date after the flow fee is determined. The flow charging server also generates a charging list, wherein the charging list also comprises the flow fee and the query flow total amount information, so that the user can query the deducted flow fee and the actually generated flow total amount. If the user disagrees with the traffic charge and the total query traffic information in the charging list, the operator can be contacted to acquire traffic data stored in the block chain server, and the traffic charge is recalculated.
It can be known from the foregoing embodiment that, by pre-storing the preset payment contract signed when the user transacts the traffic service in the blockchain server, the security and consistency of the preset payment contract are improved, and disputes caused by differences between the user and the operator due to the payment contract are avoided.
Fig. 5 is a fourth flowchart of a traffic data processing method according to an embodiment of the present invention. An execution main body of the method of this embodiment may be a traffic accounting server in fig. 1, as shown in fig. 5, the traffic data processing method provided in the embodiment of the present invention includes the following steps:
s501: and acquiring a flow query instruction, and sending the flow query instruction to a block chain server so that the block chain server acquires all corresponding flow data blocks according to the flow query instruction, and determines a query flow total amount according to the flow total amount of all corresponding flow data blocks, wherein the flow data blocks are acquired by storing the block chain server according to the acquired flow data of the network equipment.
S502: and receiving the total query flow sent by the flow charging server, and determining the flow charge according to the total query flow.
The methods of S501 to S502 are the same as the methods and effects of S201 to S203 in the embodiment of fig. 2, and are not repeated herein.
Fig. 6 is a flow chart of a flow data processing method according to an embodiment of the present invention. As shown in fig. 6, the traffic data processing method provided in the embodiment of the present invention includes the following steps:
s601: and the flow charging server acquires the flow query instruction.
S602: and the flow charging server sends the flow query instruction to the block chain server.
S603: the block chain server collects flow data of the network equipment, stores the flow data into flow data blocks, obtains all corresponding flow data blocks according to the flow query instruction, and determines query flow total amount according to the flow total amount of all corresponding flow data blocks.
S604: and the block chain server sends the total query flow to the flow charging server.
S605: and the flow charging server determines the flow charge according to the total query flow.
The methods of S601 to S605 are the same as the methods and effects of S201 to S203 in the embodiment of fig. 2, and are not repeated herein.
Fig. 7 is a first schematic structural diagram of a traffic data processing apparatus according to an embodiment of the present invention. As shown in fig. 7, the flow data processing device 70 includes: an acquisition module 701, a determination module 702 and a sending module 703; the acquisition module 701 is used for acquiring traffic data of the network equipment and storing the traffic data as traffic data blocks; a determining module 702, configured to receive a traffic query instruction sent by a traffic charging server, obtain all corresponding traffic data blocks according to the traffic query instruction, and determine a total query traffic amount according to a total traffic amount of all corresponding traffic data blocks; a sending module 703, configured to send the total amount of the query traffic to the traffic billing server, so that the traffic billing server determines the traffic fee according to the total amount of the query traffic.
In this embodiment, the traffic data processing apparatus 70 may adopt the method of the embodiments shown in fig. 2, fig. 3 and fig. 4, and the technical solutions and the technical effects thereof are similar and will not be described herein again.
In an embodiment of the present invention, the acquisition module 701 is specifically configured to: acquiring flow data of network equipment according to a preset time interval, taking the acquisition time of acquiring the flow data in each time interval as a time identifier, and acquiring a flow data block according to the total flow of acquiring the flow data in each time interval; and storing the flow data block in the IPFS file system according to the storage API interface. Correspondingly, the determining module 702 is specifically configured to obtain all corresponding time identifiers according to the query time node in the traffic query instruction, and determine all corresponding traffic data blocks according to all corresponding time identifiers; and determining the total query flow according to the total flow contained in all the corresponding flow data blocks.
In one embodiment of the present invention, the traffic data processing apparatus 70 further comprises a screening module, and the screening module is configured to: and screening the flow data according to a PBFT practical Byzantine fault-tolerant algorithm to obtain the screened flow data.
In an embodiment of the present invention, the traffic data processing apparatus 70 further includes a receiving module, where the receiving module is specifically configured to: receiving a payment contract acquisition request sent by a flow charging server, and determining a preset payment contract according to a user identifier carried in the payment contract acquisition request, wherein the preset payment contract comprises payment account information and a payment date of a user; and sending the preset payment contract to a flow charging server so that the flow charging server determines the flow charge according to the preset payment contract and deducts the flow charge according to the payment account information and the payment date.
The apparatus provided in this embodiment may be used to implement the technical solutions of the embodiments shown in fig. 2, fig. 3 and fig. 4, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 8 is a schematic structural diagram of a traffic data processing apparatus according to an embodiment of the present invention. As shown in fig. 8, the flow data processing device 80 includes: an acquisition module 801 and a determination module 802. The acquiring module 801 is configured to acquire a traffic query instruction, and send the traffic query instruction to the blockchain server, so that the blockchain server acquires all corresponding traffic data blocks according to the traffic query instruction, and determines a total query traffic amount according to the total traffic amount of all corresponding traffic data blocks, where the traffic data blocks are acquired by storing, by the blockchain server, traffic data of the acquired network device; the determining module 802 is configured to receive a total amount of query traffic sent by the traffic charging server, and determine a traffic fee according to the total amount of query traffic.
In this embodiment, the traffic data processing apparatus 80 may adopt the method of the embodiment shown in fig. 5, and the technical solution and the technical effect thereof are similar, which are not described herein again.
In an embodiment of the present invention, the acquisition module 801 is specifically configured to: acquiring flow data of network equipment according to a preset time interval, taking the acquisition time of acquiring the flow data in each time interval as a time identifier, and acquiring a flow data block according to the total flow of acquiring the flow data in each time interval; and storing the flow data block in the IPFS file system according to the storage API interface. Correspondingly, the determining module 802 is specifically configured to obtain all corresponding time identifiers according to the query time node in the traffic query instruction, and determine all corresponding traffic data blocks according to all corresponding time identifiers; and determining the total query flow according to the total flow contained in all the corresponding flow data blocks.
In an embodiment of the present invention, the traffic data processing apparatus 80 further includes a deduction module, and the deduction module is configured to: sending the acquired payment contract request to a block chain server so that the block chain server determines a preset payment contract according to a user identifier carried in the acquired payment contract request; receiving a preset payment contract sent by a block chain server, and determining flow rate cost according to the preset payment contract, wherein the preset payment contract comprises payment account information and payment date of a user; and deducting the flow fee according to the payment account information and the payment date of the user.
The apparatus provided in this embodiment may be used to implement the technical solutions of the embodiments shown in fig. 2, fig. 3 and fig. 4, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 9 is a block chain server structure diagram according to an embodiment of the present invention. As shown in fig. 9, the blockchain server of the present embodiment includes: a processor 901, a memory 902 and a computer program stored in the memory 902 and executable on the processor 901, the processor 901 implementing the following steps when executing the computer program: collecting flow data of network equipment, and storing the flow data into flow data blocks; receiving a flow query instruction sent by a flow charging server, acquiring all corresponding flow data blocks according to the flow query instruction, and determining a total query flow according to the total flow of all corresponding flow data blocks; and sending the total query flow to a flow charging server so that the flow charging server determines the flow charge according to the total query flow.
Reference may be made in particular to the description relating to the method embodiments described above.
In one possible design, the memory 902 may be separate or integrated with the processor 901.
When the memory 902 is separately provided, the blockchain server further includes a bus 903 for connecting the memory 902 and the processor 901.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer executing instruction is stored in the computer-readable storage medium, and when a processor executes the computer executing instruction, the method for processing traffic data according to the embodiments in fig. 2, fig. 3, and fig. 4 is implemented.
Fig. 10 is a schematic structural diagram of a traffic charging server according to an embodiment of the present invention. As shown in fig. 10, the traffic accounting server of this embodiment includes: a processor 1001, a memory 1002 and a computer program stored in the memory 1002 and executable on the processor 1001, the computer program being executed by the processor 1001 to implement the steps of: acquiring a flow query instruction, and sending the flow query instruction to a block chain server so that the block chain server acquires all corresponding flow data blocks according to the flow query instruction, and determines a query flow total amount according to the flow total amount of all corresponding flow data blocks, wherein the flow data blocks are acquired by storing the block chain server according to acquired flow data of network equipment; and receiving the total query flow sent by the flow charging server, and determining the flow charge according to the total query flow.
Reference may be made in particular to the description relating to the method embodiments described above.
In one possible design, the memory 1002 may be separate or integrated with the processor 1001.
When the memory 1002 is separately provided, the traffic accounting server further includes a bus 1003 for connecting the memory 1002 and the processor 1001.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer executing instruction is stored in the computer-readable storage medium, and when a processor executes the computer executing instruction, the method for processing traffic data according to the embodiment of fig. 5 is implemented.
An embodiment of the present invention further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the method for processing traffic data according to the embodiments in fig. 2, fig. 3, and fig. 4 is implemented.
An embodiment of the present invention further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the method for processing traffic data according to the embodiment of fig. 5 is implemented.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules is only one logical division, and other divisions may be realized in practice, for example, a plurality of modules may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to implement the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each module may exist alone physically, or two or more modules are integrated into one unit. The unit formed by the modules can be realized in a hardware form, and can also be realized in a form of hardware and a software functional unit.
The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute some steps of the methods described in the embodiments of the present application.
It should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile storage NVM, such as at least one disk memory, and may also be a usb disk, a removable hard disk, a read-only memory, a magnetic or optical disk, etc.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.
The storage medium may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the storage medium may reside as discrete components in an electronic device or host device.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (15)

1. A traffic data processing method is applied to a block chain server, and the method comprises the following steps:
collecting flow data of network equipment, and storing the flow data into flow data blocks;
receiving a flow query instruction sent by a flow charging server, acquiring all corresponding flow data blocks according to the flow query instruction, and determining a total query flow according to the total flow of all corresponding flow data blocks;
and sending the total query flow to a flow charging server so that the flow charging server determines flow charge according to the total query flow.
2. The method of claim 1, wherein collecting traffic data of a network device and storing the traffic data as a traffic data block comprises:
acquiring flow data of network equipment according to a preset time interval, taking the acquisition time of acquiring the flow data in each time interval as a time identifier, and acquiring a flow data block according to the total flow of acquiring the flow data in each time interval;
storing the flow data block in an IPFS file system according to a storage API interface;
correspondingly, the obtaining all corresponding traffic data blocks according to the traffic query instruction, and determining a query traffic total amount according to the traffic total amount of all corresponding traffic data blocks includes:
acquiring all corresponding time identifications according to the query time nodes in the flow query instruction, and determining all corresponding flow data blocks according to all the corresponding time identifications;
and determining the total query flow according to the total flow contained in all the corresponding flow data blocks.
3. The method of claim 1, after the collecting traffic data of the network device, further comprising:
screening the flow data according to a PBFT practical Byzantine fault-tolerant algorithm to obtain screened flow data;
accordingly, the storing the traffic data as a traffic data block comprises:
and storing the screened flow data into a flow data block.
4. The method of claim 1, further comprising, after the sending the query traffic volume to a traffic billing server,
receiving a payment contract acquisition request sent by the flow charging server, and determining a preset payment contract according to a user identifier carried in the payment contract acquisition request, wherein the preset payment contract comprises payment account information and a payment date of a user;
and sending the preset payment contract to the flow charging server so that the flow charging server determines flow charge according to the preset payment contract and deducts the flow charge according to the payment account information and the payment date.
5. A traffic data processing method is applied to a traffic charging server, and the method comprises the following steps:
acquiring a flow query instruction, and sending the flow query instruction to a block chain server, so that the block chain server acquires all corresponding flow data blocks according to the flow query instruction, and determines a query flow total amount according to the flow total amount of all corresponding flow data blocks, wherein the flow data blocks are acquired by storing the block chain server according to acquired flow data of network equipment;
and receiving the total query flow sent by the flow charging server, and determining the flow charge according to the total query flow.
6. The method of claim 5, wherein determining a traffic cost based on the queried traffic volume further comprises:
sending the acquired payment contract request to a blockchain server so that the blockchain server determines a preset payment contract according to a user identifier carried in the acquired payment contract request;
receiving a preset payment contract sent by the block chain server, and determining the flow fee according to the preset payment contract, wherein the preset payment contract comprises payment account information and a payment date of a user;
and deducting the flow fee according to the payment account information of the user and the payment date.
7. A traffic data processing device applied to a blockchain server comprises:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring flow data of network equipment and storing the flow data as a flow data block;
the determining module is used for receiving a flow query instruction sent by a flow charging server, obtaining all corresponding flow data blocks according to the flow query instruction, and determining a query flow total amount according to the flow total amount of all corresponding flow data blocks;
and the sending module is used for sending the total query flow amount to a flow charging server so that the flow charging server determines flow charge according to the total query flow amount.
8. A flow data processing device is applied to a flow charging server and comprises:
the acquisition module is used for acquiring a traffic query instruction and sending the traffic query instruction to a block chain server so that the block chain server acquires all corresponding traffic data blocks according to the traffic query instruction and determines a query traffic total amount according to the traffic total amount of all corresponding traffic data blocks, wherein the traffic data blocks are acquired by storing the block chain server according to acquired traffic data of the network equipment;
and the determining module is used for receiving the total query flow sent by the flow charging server and determining the flow charge according to the total query flow.
9. A blockchain server comprising a memory and at least one processor;
the memory is used for storing computer execution instructions;
at least one processor configured to execute computer-executable instructions stored by the memory to cause the at least one processor to perform the traffic data processing method of any of claims 1 to 4.
10. A traffic charging server comprising a memory and at least one processor;
the memory is used for storing computer execution instructions;
at least one processor configured to execute computer-executable instructions stored by the memory to cause the at least one processor to perform the traffic data processing method of claim 5 or 6.
11. A flow data processing system is characterized by comprising at least one block chain server and a flow charging server;
wherein the processor of the blockchain server executes the traffic data processing method according to any one of claims 1 to 4; the processor of the traffic charging server performs the traffic data processing method according to claim 5 or 6.
12. A computer-readable storage medium having stored thereon computer-executable instructions which, when executed by a processor, implement the flow data processing method according to any one of claims 1 to 4.
13. A computer-readable storage medium having stored thereon computer-executable instructions which, when executed by a processor, implement the flow data processing method of claim 5 or 6.
14. A computer program product comprising a computer program, characterized in that the computer program realizes the traffic data processing method of any of claims 1 to 4 when executed by a processor.
15. A computer program product comprising a computer program, characterized in that the computer program realizes the traffic data processing method of claim 5 or 6 when executed by a processor.
CN202110123934.4A 2021-01-29 2021-01-29 Traffic data processing method, device, server and system Active CN112804067B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110123934.4A CN112804067B (en) 2021-01-29 2021-01-29 Traffic data processing method, device, server and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110123934.4A CN112804067B (en) 2021-01-29 2021-01-29 Traffic data processing method, device, server and system

Publications (2)

Publication Number Publication Date
CN112804067A true CN112804067A (en) 2021-05-14
CN112804067B CN112804067B (en) 2023-09-26

Family

ID=75812736

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110123934.4A Active CN112804067B (en) 2021-01-29 2021-01-29 Traffic data processing method, device, server and system

Country Status (1)

Country Link
CN (1) CN112804067B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114401158A (en) * 2021-12-17 2022-04-26 中电信数智科技有限公司 Flow charging method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150363800A1 (en) * 2014-03-27 2015-12-17 Google Inc. Merchant performance evaluation in a computer networked environment
CN105959125A (en) * 2016-07-18 2016-09-21 北京首都在线科技股份有限公司 Network data traffic billing system and billing method
CN109586985A (en) * 2019-01-11 2019-04-05 青岛华制智能互联科技有限公司 A kind of elastic cloud systme supporting platform solution based on block chain
US20200133949A1 (en) * 2018-10-26 2020-04-30 Alibaba Group Holding Limited Data processing method, apparatus, and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150363800A1 (en) * 2014-03-27 2015-12-17 Google Inc. Merchant performance evaluation in a computer networked environment
CN105959125A (en) * 2016-07-18 2016-09-21 北京首都在线科技股份有限公司 Network data traffic billing system and billing method
US20200133949A1 (en) * 2018-10-26 2020-04-30 Alibaba Group Holding Limited Data processing method, apparatus, and device
CN109586985A (en) * 2019-01-11 2019-04-05 青岛华制智能互联科技有限公司 A kind of elastic cloud systme supporting platform solution based on block chain

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114401158A (en) * 2021-12-17 2022-04-26 中电信数智科技有限公司 Flow charging method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112804067B (en) 2023-09-26

Similar Documents

Publication Publication Date Title
CN107480990B (en) Block chain accounting method and device
CN107113203B (en) Apparatus, system and method for debugging network connectivity
US20230299984A1 (en) Blockchain-based data processing method, apparatus and device, and storage medium
CN111382456A (en) Proposal message processing method, device, equipment and storage medium
CN111612613A (en) Block chain network with centralized system
CN106484322A (en) A kind of method of carry file system, device and equipment
JP7003995B2 (en) Blockchain management device, blockchain management method and program
CN109166040B (en) Transaction auditing method, device, equipment and storage medium based on block chain
CN111683118B (en) Block chain-based consensus method and device, master node equipment and slave node equipment
JP6969664B2 (en) Blockchain management system, blockchain management device, information providing device and blockchain management method
CN108768672B (en) Data processing method, device and storage medium
CN106920382B (en) Method for controlling intelligent instrument to access network, master station and data centralized unit
CN112804067A (en) Traffic data processing method, device, server and system
CN108880934A (en) A kind of data flow statistic method and device based on block chain
CN109286506B (en) Method, system and device for charging flow
CN111651170A (en) Instance dynamic adjustment method and device and related equipment
CN111147323A (en) Speed measuring method and device
CN112565018B (en) Flow statistical method, device, gateway equipment and storage medium
CN113129002A (en) Data processing method and equipment
Steinhoff et al. BMS: Secure decentralized reconfiguration for blockchain and BFT systems
CN111343212B (en) Message processing method, device, equipment and storage medium
CN110290163A (en) A kind of data processing method and device
WO2023116790A1 (en) Method and apparatus for executing computing task, and storage medium and electronic apparatus
CN114268916B (en) Processing method, device, equipment and storage medium based on content charging data
US20190355053A1 (en) Method, a device and a system of a distributed financial flows auditing

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