CN112131313A - A blockchain-based refueling data management system and method thereof - Google Patents
A blockchain-based refueling data management system and method thereof Download PDFInfo
- Publication number
- CN112131313A CN112131313A CN202010974021.9A CN202010974021A CN112131313A CN 112131313 A CN112131313 A CN 112131313A CN 202010974021 A CN202010974021 A CN 202010974021A CN 112131313 A CN112131313 A CN 112131313A
- Authority
- CN
- China
- Prior art keywords
- block
- refueling
- transaction information
- verification
- sending module
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/389—Keeping log of transactions for guaranteeing non-repudiation of a transaction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/06—Energy or water supply
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Accounting & Taxation (AREA)
- Databases & Information Systems (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Health & Medical Sciences (AREA)
- Economics (AREA)
- Water Supply & Treatment (AREA)
- Public Health (AREA)
- General Health & Medical Sciences (AREA)
- Human Resources & Organizations (AREA)
- Marketing (AREA)
- Primary Health Care (AREA)
- Tourism & Hospitality (AREA)
- Computing Systems (AREA)
- Finance (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Description
技术领域technical field
本发明涉及区块链技术领域,尤其涉及一种基于区块链的加油数据管理系统及其方法。The invention relates to the technical field of blockchain, in particular to a blockchain-based refueling data management system and method thereof.
背景技术Background technique
目前加油站交易使用的是POS机器,在人机交互界面中,车主选择加油升数之后进行加油,车主在加油完成并且确认POS上显示的加油信息和支付信息没有问题之后,由POS机器通过油卡进行扣款,扣款的流水(加油交易信息,包括交易时间,交易金额等信息)会通过加油站的网线被传输到该加油站的交换机,再通过交换机将数据分别进行分发,例如分发到该加油站的管控系统和该地区的加油站总控系统,用以记录加油机记录的交易流水;At present, POS machines are used for gas station transactions. In the human-computer interaction interface, the car owner selects the number of liters to refuel. After the car owner completes the refueling and confirms that the refueling information and payment information displayed on the POS are correct, the POS machine will pass the oil through the POS machine. The card is debited, and the deduction flow (gas transaction information, including transaction time, transaction amount, etc.) will be transmitted to the switch of the gas station through the network cable of the gas station, and then the data will be distributed separately through the switch. The management and control system of the gas station and the general control system of the gas station in the region are used to record the transaction flow recorded by the gas machine;
然而上述现有技术存在以下不足:However, the above-mentioned prior art has the following deficiencies:
所有数据均由单个数据库(对于当个加油站站点来说)进行管理,中心化明显,如果说加油站的管控系统出现问题之后,加油站的交易系统就出现了瘫痪,将会产生巨大的经济损失,并且数据安全性不够高。All data are managed by a single database (for a gas station site), and the centralization is obvious. If there is a problem with the gas station's management and control system, the gas station's transaction system will be paralyzed, which will produce huge economic loss, and data security is not high enough.
因此,为了解决中心化明显的问题可以采用区块链存储的方式。Therefore, in order to solve the obvious problem of centralization, blockchain storage can be adopted.
发明内容SUMMARY OF THE INVENTION
针对现有技术中存在的上述问题,现提供一种基于区块链的加油数据管理系统及其方法。In view of the above problems existing in the prior art, a block chain-based refueling data management system and method thereof are provided.
具体技术方案如下:The specific technical solutions are as follows:
一种基于区块链的加油数据管理系统,其中,包括:A blockchain-based refueling data management system, including:
多个客户端和服务器,每个客户端均通过服务器与区块链网络连接;Multiple clients and servers, each client is connected to the blockchain network through the server;
数据收集子系统,与服务器连接,并与外接的加油POS机连接,用于获取用户的加油交易信息,并上传至服务器,以使得服务器存储有包括加油交易信息的区块;The data collection subsystem is connected to the server and connected to an external refueling POS machine, and is used to obtain the user's refueling transaction information and upload it to the server, so that the server stores the block including the refueling transaction information;
客户端包括校验模块;The client includes a verification module;
服务器包括:The server includes:
第一发送模块,与数据收集子系统和每个客户端连接,用于将区块发送至对应的至少一个客户端,使得客户端中的校验模块对区块中的加油交易信息进行校验;The first sending module, connected with the data collection subsystem and each client, is used to send the block to at least one corresponding client, so that the verification module in the client verifies the fueling transaction information in the block ;
第二发送模块,与第一发送模块和区块链网络连接,于区块中的加油交易信息通过校验后,将区块发送至区块链网络进行存储。The second sending module is connected with the first sending module and the blockchain network, and after the refueling transaction information in the block is verified, the block is sent to the blockchain network for storage.
优选的,基于区块链的加油数据管理系统,其中,校验模块包括:Preferably, the block chain-based refueling data management system, wherein the verification module includes:
第一校验获取单元,用于获取第一发送模块发送前的区块;a first verification obtaining unit, used for obtaining the block before the first sending module sends;
第一解析单元,与第一校验获取单元连接,用于对第一发送模块发送前的区块进行解析,以得到第一发送模块发送前的区块中的加油交易信息;a first parsing unit, connected to the first verification obtaining unit, for parsing the block before sending by the first sending module, so as to obtain the refueling transaction information in the block before sending by the first sending module;
计算单元,与第一解析单元连接,用于对第一发送模块发送前的区块中的加油交易信息进行校验信息计算,得到校验信息,使得区块中的加油交易信息包括校验信息;The computing unit is connected to the first parsing unit, and is used to perform verification information calculation on the refueling transaction information in the block before being sent by the first sending module, and obtain the verification information, so that the refueling transaction information in the block includes the verification information ;
第二校验获取单元,用于获取第一发送模块发送后的区块;The second verification and acquisition unit is used to acquire the block sent by the first sending module;
第二解析单元,与第二校验获取单元连接,用于对第一发送模块发送后的区块进行解析,以得到区块中的加油交易信息中的校验数据;The second parsing unit is connected to the second verification obtaining unit, and is used for parsing the block sent by the first sending module, so as to obtain the verification data in the refueling transaction information in the block;
校验判断单元,分别与计算单元和第二解析单元连接,用于根据区块的区块头数据判断第一发送模块发送前的区块与第一发送模块发送后的区块是否为同一区块;The verification and judgment unit is respectively connected with the calculation unit and the second analysis unit, and is used for judging whether the block before sending by the first sending module and the block after sending by the first sending module are the same block according to the block header data of the block ;
校验单元,与校验判断单元连接,于第一发送模块发送前的区块与第一发送模块发送后的区块为同一区块时,将第一发送模块发送前的区块对应的校验信息与第一发送模块发送后的区块对应的校验信息进行对比,得到区块的校验结果。The verification unit is connected with the verification and judgment unit, and when the block before the first sending module sends and the block after the first sending module are the same block, the verification unit corresponding to the block before the first sending module sends The verification information is compared with the verification information corresponding to the block sent by the first sending module to obtain the verification result of the block.
优选的,基于区块链的加油数据管理系统,其中,数据收集子系统包括:Preferably, the blockchain-based refueling data management system, wherein the data collection subsystem includes:
第一获取模块,从外接的加油POS机上获取用户在的加油交易信息;The first acquisition module obtains the user's refueling transaction information from an external refueling POS machine;
第一上传模块,与第一获取模块连接,将加油交易信息上传至服务器,使得服务器将加油交易信息写入区块中。The first uploading module is connected with the first obtaining module, and uploads the refueling transaction information to the server, so that the server writes the refueling transaction information into the block.
优选的,基于区块链的加油数据管理系统,其中,数据收集子系统包括:Preferably, the blockchain-based refueling data management system, wherein the data collection subsystem includes:
第二获取模块,从外接的加油POS机上获取用户在的加油交易信息;The second acquisition module obtains the user's refueling transaction information from an external refueling POS machine;
写入区块模块,与第二获取模块连接,将加油交易信息写入区块中;Write the block module, connect with the second acquisition module, and write the refueling transaction information into the block;
第二上传模块,与写入区块模块连接,将区块上传至服务器。The second uploading module is connected to the block writing module, and uploads the block to the server.
优选的,基于区块链的加油数据管理系统,其中,第一发送模块包括:Preferably, the blockchain-based refueling data management system, wherein the first sending module includes:
识别单元,对区块中的加油交易信息进行识别,以确认对应的客户端;The identification unit identifies the refueling transaction information in the block to confirm the corresponding client;
第一发送单元,与识别单元连接,将区块发送至确认后的对应的客户端,使得对应的客户端对区块中的加油交易信息进行校验。The first sending unit is connected with the identification unit, and sends the block to the corresponding client after confirmation, so that the corresponding client verifies the fueling transaction information in the block.
优选的,基于区块链的加油数据管理系统,其中,第二发送模块包括:Preferably, the blockchain-based refueling data management system, wherein the second sending module includes:
判断单元,用于判断对应的每个客户端反馈的校验信息是否均为校验通过;A judging unit for judging whether the verification information fed back by each corresponding client is all verified;
若是,区块中的加油交易信息通过校验;If so, the refueling transaction information in the block is verified;
若否,区块中的加油交易信息未通过校验,并将校验结果返回给用户;If not, the refueling transaction information in the block has not passed the verification, and the verification result will be returned to the user;
第二发送单元,与判断单元连接,于区块中的加油交易信息通过校验后,将区块发送至区块链网络进行存储。The second sending unit is connected to the judging unit, and after the refueling transaction information in the block is verified, the block is sent to the blockchain network for storage.
优选的,基于区块链的加油数据管理系统,其中,加油交易信息包括:加油数据,交易数据,加油站数据;Preferably, the block chain-based refueling data management system, wherein the refueling transaction information includes: refueling data, transaction data, and gas station data;
加油数据包括:加油升数、加油单价和加油总价;Refueling data includes: refueling liters, refueling unit price and total refueling price;
交易数据包括:用户身份数据、支付形式和/或支付账号;Transaction data includes: user identity data, payment form and/or payment account number;
加油站数据包括:加油站身份信息和加油站地址。Gas station data includes: gas station identity information and gas station address.
还包括一种基于区块链的加油数据管理方法,其中,应用于上述任一基于区块链的加油数据管理系统中,加油数据管理方法包括以下步骤:It also includes a blockchain-based refueling data management method, wherein, applied to any of the above-mentioned blockchain-based refueling data management systems, the refueling data management method includes the following steps:
从外接的加油POS机上获取用户输入的加油交易信息,并上传至服务器,以使得服务器存储有包括加油交易信息的区块;Obtain the refueling transaction information input by the user from the external refueling POS machine, and upload it to the server, so that the server stores the block including the refueling transaction information;
将区块发送至对应的至少一个客户端,使得客户端中的校验模块对区块中的加油交易信息进行校验;Send the block to at least one corresponding client, so that the verification module in the client can verify the fueling transaction information in the block;
于区块中的加油交易信息通过校验后,将区块发送至区块链网络进行存储。After the refueling transaction information in the block is verified, the block is sent to the blockchain network for storage.
上述技术方案具有如下优点或有益效果:The above-mentioned technical scheme has the following advantages or beneficial effects:
第一、通过将加油交易信息写入区块中,并将区块上传至区块链网络中,从而实现对加油交易信息的去中心化,以降低现有技术采用的管控系统对加油站运行的影响,并且实现了对加油交易信息的分块化管理,进而利用区块链网络具有不可篡改的特性保障了加油交易信息的安全性;First, by writing the refueling transaction information into the block and uploading the block to the blockchain network, the decentralization of the refueling transaction information is realized, so as to reduce the operation of the gas station by the control system adopted by the existing technology. Influence, and realizes the block management of refueling transaction information, and then utilizes the non-tampering characteristics of the blockchain network to ensure the security of refueling transaction information;
第二、通过对应的客户端对将要上传至区块链网络的区块进行检验,并将通过校验的区块发送至区块链网络,从而减少了虚假数据或错误数据的上传;Second, check the blocks to be uploaded to the blockchain network through the corresponding client, and send the verified blocks to the blockchain network, thereby reducing the upload of false data or erroneous data;
第三、简化了对交易对应的加油交易信息上链存储时的复杂度。Third, it simplifies the complexity of uploading and storing the fueling transaction information corresponding to the transaction on the chain.
附图说明Description of drawings
参考所附附图,以更加充分的描述本发明的实施例。然而,所附附图仅用于说明和阐述,并不构成对本发明范围的限制。Embodiments of the present invention are described more fully with reference to the accompanying drawings. However, the accompanying drawings are for illustration and illustration only, and are not intended to limit the scope of the present invention.
图1为本发明基于区块链的加油数据管理系统的实施例的原理框图;Fig. 1 is the principle block diagram of the embodiment of the block chain-based refueling data management system of the present invention;
图2为本发明基于区块链的加油数据管理系统的实施例的校验模块的原理框图;Fig. 2 is the principle block diagram of the verification module of the embodiment of the blockchain-based refueling data management system of the present invention;
图3为本发明基于区块链的加油数据管理系统的实施例的数据收集子系统的原理框图一;Fig. 3 is the first principle block diagram of the data collection subsystem of the embodiment of the blockchain-based refueling data management system of the present invention;
图4为本发明基于区块链的加油数据管理系统的实施例的数据收集子系统的原理框图二;Fig. 4 is the second principle block diagram of the data collection subsystem of the embodiment of the blockchain-based refueling data management system of the present invention;
图5为本发明基于区块链的加油数据管理系统的实施例的第一发送模块的原理框图;5 is a schematic block diagram of a first sending module of an embodiment of the blockchain-based refueling data management system of the present invention;
图6为本发明基于区块链的加油数据管理系统的实施例的第二发送模块的原理框图。FIG. 6 is a schematic block diagram of a second sending module of an embodiment of the blockchain-based refueling data management system of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present invention.
需要说明的是,在不冲突的情况下,本发明中的实施例及实施例中的特征可以相互组合。It should be noted that the embodiments of the present invention and the features of the embodiments may be combined with each other under the condition of no conflict.
下面结合附图和具体实施例对本发明作进一步说明,但不作为本发明的限定。The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but it is not intended to limit the present invention.
本发明包括一种基于区块链的加油数据管理系统,如图1所示,包括:The present invention includes a blockchain-based refueling data management system, as shown in Figure 1, including:
多个客户端1和服务器2,每个客户端1均通过服务器2与区块链网络4连接;Multiple clients 1 and servers 2, each client 1 is connected to the
数据收集子系统3,与服务器2连接,并与外接的加油POS机5连接,用于获取用户的加油交易信息,并上传至服务器2,以使得服务器2存储有包括加油交易信息的区块;The
客户端1包括校验模块11;The client 1 includes a verification module 11;
服务器2包括:Server 2 includes:
第一发送模块21,与数据收集子系统3和每个客户端1连接,用于将区块发送至对应的至少一个客户端1,使得客户端1中的校验模块11对区块中的加油交易信息进行校验;The
第二发送模块22,与第一发送模块21和区块链网络4连接,于区块中的加油交易信息通过校验后,将区块发送至区块链网络4进行存储。The
在上述实施例中,通过将加油交易信息写入区块中,并将区块上传至区块链网络4中,从而实现对加油交易信息的去中心化,以降低现有技术采用的管控系统对加油站运行的影响,并且实现了对加油交易信息的分块化管理,进而利用区块链网络4具有不可篡改的特性保障了加油交易信息的安全性。In the above embodiment, by writing the refueling transaction information into the block and uploading the block to the
在上述实施例中,通过对应的客户端1对将要上传至区块链网络4的区块进行检验,并将通过校验的区块发送至区块链网络4,从而减少了虚假数据或错误数据的上传。In the above embodiment, the corresponding client 1 checks the blocks to be uploaded to the
在上述实施例中,通过服务器2得到新区块时能够同步至对应的至少一个客户端1,从而可以由该服务器2来作为中转设备,并且该服务器2不参与共识,在该服务器2通过新生成的区块检测到需要对新区块进行校验,则可以将新区块通过链下同步的方式同步至交易所涉及的客户端1,以让对应的客户端1对新区块中的加油交易信息进行校验,接收根据对应的客户端1反馈的校验结果来确定交易是否真实可靠,随后将真实可靠的交易对应的新区块上传至区块链网络4;整个流程大大简化了对交易对应的加油交易信息上链存储时的复杂度。In the above embodiment, when a new block is obtained through the server 2, it can be synchronized to the corresponding at least one client 1, so that the server 2 can be used as a relay device, and the server 2 does not participate in the consensus. It is detected that the new block needs to be verified, and the new block can be synchronized to the client 1 involved in the transaction through off-chain synchronization, so that the corresponding client 1 can verify the fueling transaction information in the new block. Verification, receiving the verification result fed back by the corresponding client 1 to determine whether the transaction is authentic and reliable, and then uploading the new block corresponding to the authentic and reliable transaction to the
在上述实施例中,数据收集子系统3可以为交换机。In the above embodiment, the
在上述实施例中,服务器2可以为BSN(Block-chain-based Service Network,区块链服务网络)区块链开发平台。In the above embodiment, the server 2 may be a BSN (Block-chain-based Service Network, block chain service network) block chain development platform.
在上述实施例中,客户端1可以包括:加油交易信息中的支付形式对应的支付终端(例如支付宝,微信支付,各个银行等),用户对应的客户端1(例如移动终端、电脑等),加油站平台等。In the above embodiment, the client terminal 1 may include: a payment terminal (such as Alipay, WeChat payment, various banks, etc.) corresponding to the payment form in the refueling transaction information, a client terminal 1 (such as a mobile terminal, a computer, etc.) corresponding to the user, Gas station platform, etc.
进一步地,在上述实施例中,如图2所示,校验模块11包括:Further, in the above embodiment, as shown in FIG. 2 , the verification module 11 includes:
第一校验获取单元111,用于获取第一发送模块21发送前的区块;The first
第一解析单元112,与第一校验获取单元111连接,用于对第一发送模块21发送前的区块进行解析,以得到第一发送模块21发送前的区块中的加油交易信息;The first parsing unit 112, connected to the first
计算单元113,与第一解析单元112连接,用于对第一发送模块21发送前的区块中的加油交易信息进行校验信息计算,得到校验信息,使得区块中的加油交易信息包括校验信息;The computing unit 113 is connected to the first parsing unit 112, and is used to perform verification information calculation on the refueling transaction information in the block before the
第二校验获取单元114,用于获取第一发送模块21发送后的区块;The second
第二解析单元115,与第二校验获取单元114连接,用于对第一发送模块21发送后的区块进行解析,以得到区块中的加油交易信息中的校验数据;The second parsing unit 115 is connected to the second
校验判断单元116,分别与计算单元113和第二解析单元115连接,用于根据区块的区块头数据判断第一发送模块21发送前的区块与第一发送模块21发送后的区块是否为同一区块;The verification and
校验单元117,与校验判断单元116连接,于第一发送模块21发送前的区块与第一发送模块21发送后的区块为同一区块时,将第一发送模块21发送前的区块对应的校验信息与第一发送模块21发送后的区块对应的校验信息进行对比,得到区块的校验结果。The
在上述实施例中,对于任一个客户端1来说,当其接收到第一发送模块21下发的校验请求时,客户端1可以采用校验模块11根据校验请求对加油交易信息进行校验,并将校验结果发送至第二发送模块22,使得第二发送模块22根据对应的客户端1发送的校验结果来判断区块中的加油交易信息是否通过校验。In the above embodiment, for any client 1, when it receives the verification request sent by the
在上述实施例中,校验模块11中的第一校验获取单元111可以直接获取服务器2中未发送至客户端的存储有包括加油交易信息的区块,即校验模块11中的第一校验获取单元111可以直接获取得到没有第一发送模块21发送前的区块;In the above-mentioned embodiment, the first
随后第一解析单元112对第一发送模块21发送前的区块进行解析,以得到第一发送模块21发送前的区块中的加油交易信息,并采用计算单元113对上述第一发送模块21发送前的区块中的加油交易信息进行校验信息计算,得到校验信息,并将该校验信息记为第一校验信息;Subsequently, the first parsing unit 112 parses the block before the
接着,第一发送模块21将区块发送至对应的至少一个客户端1,使得客户端1中的第二校验获取单元114获取第一发送模块21发送后的区块,并采用第二解析单元115对第一发送模块21发送后的区块进行解析,以得到区块中的加油交易信息中的校验数据,此时将该校验数据记为第二校验信息;Next, the
然后采用校验判断单元116根据区块的区块头数据判断第一发送模块21发送前的区块与第一发送模块21发送后的区块是否为同一区块;Then adopt the
最后校验单元117在第一发送模块21发送前的区块与第一发送模块21发送后的区块为同一区块时,将第一校验信息与第二校验信息进行对比,Finally, the
当第一校验信息与第二校验信息一致时,区块的校验结果为通过检验;When the first verification information is consistent with the second verification information, the verification result of the block is a passing verification;
当第一校验信息与第二校验信息不一致时,区块的校验结果为未通过检验。When the first verification information is inconsistent with the second verification information, the verification result of the block is that the verification fails.
在上述实施例中,当多条加油交易数据进行上传操作时,从而导致第一发送模块21发送前的区块存在多个,因此第一发送模块21发送后的区块也存在多个,因此可以通过校验判断单元116先根据区块头数据判断第一发送模块21发送前的区块与第一发送模块21发送后的区块是否为同一区块,随后再进行同一区块的校验操作,进而提高校验的准确性;In the above embodiment, when multiple pieces of refueling transaction data are uploaded, there are multiple blocks before the
在上述实施例中,由于加油交易数据进行上传操作时的操作语句可能存在间接因素,从而导致获取得到第一发送模块21发送前的区块的操作语句与第一发送模块21发送后的区块的操作语句不通,进而无法确认需要校验的第一发送模块21发送前的区块与第一发送模块21发送后的区块是否为同一区块,进一步降低了校验的准确性,因此可以采用校验判断单元116避免上述缺陷,并提高校验的准确性。In the above embodiment, since there may be indirect factors in the operation statement when the refueling transaction data is uploaded, the operation statement of the block before being sent by the
作为优选的实施方式,计算单元113对第一发送模块21发送前的区块中的加油交易信息进行校验信息计算的方式可以有很多种。例如,可以基于循环冗余校验(CyclicRedundancy Check,CRC)进行计算获取校验信息。例如,可以是基于CRC-16/IBM(一种CRC版本的计算方式)进行计算获取校验信息。As a preferred embodiment, the calculation unit 113 can perform verification information calculation on the refueling transaction information in the block before the
进一步地,作为优选的实施方式一,如图3所示,数据收集子系统3可以包括:Further, as a preferred embodiment 1, as shown in FIG. 3 , the
第一获取模块31,从外接的加油POS机5上获取用户在的加油交易信息;The
第一上传模块32,与第一获取模块31连接,将加油交易信息上传至服务器2,使得服务器2将加油交易信息写入区块中。The first uploading module 32, connected with the first obtaining
在上述优选的实施方式一中,数据收集子系统3只需要获取并将加油交易信息上传至服务器2中即可,不需要参与将加油交易信息写入区块的操作。从而减少数据收集子系统3的工作量。In the above-mentioned preferred embodiment 1, the
进一步地,作为优选的实施方式二,如图4所示,数据收集子系统3可以包括:Further, as a preferred second embodiment, as shown in FIG. 4 , the
第二获取模块33,从外接的加油POS机5上获取用户在的加油交易信息;The
写入区块模块34,与第二获取模块33连接,将加油交易信息写入区块中;The writing block module 34 is connected to the second obtaining
第二上传模块35,与写入区块模块34连接,将区块上传至服务器2。The
在上述优选的实施方式二中,数据收集子系统3可以获取并将加油交易信息写入区块,随后直接将整个区块上传至服务器2中。从而减少服务器2的工作量。In the above-mentioned preferred embodiment 2, the
在上述优选的实施方式一和实施方式二中,可以直接从外接的加油POS机5上获取用户在的加油交易信息,避免人工输入存在的输入错误等问题,同时也避免了从加油站平台调用数据存在的加油交易信息不及时的问题。In the above-mentioned preferred embodiment 1 and embodiment 2, the user's refueling transaction information can be directly obtained from the external
进一步地,在上述实施例中,加油交易信息包括:加油数据,交易数据,加油站数据;Further, in the above embodiment, the refueling transaction information includes: refueling data, transaction data, and gas station data;
加油数据包括:加油升数、加油单价和加油总价;Refueling data includes: refueling liters, refueling unit price and total refueling price;
交易数据包括:用户身份数据、支付形式和/或支付账号;Transaction data includes: user identity data, payment form and/or payment account number;
加油站数据包括:加油站身份信息和加油站地址。Gas station data includes: gas station identity information and gas station address.
在上述实施例中,加油站身份信息可以包括加油站位置信息、加油站地图、加油站电话、加油站邮箱以及用户对当前加油站的评价等;In the above embodiment, the gas station identity information may include gas station location information, a gas station map, a gas station phone number, a gas station mailbox, and a user's evaluation of the current gas station, etc.;
通过将加油交易信息以区块的形式上传至区块链中,从而实现对加油交易信息进行记录及公布,以便用户对加油站的信息了解得更透彻,从而提高对加油交易信息的安全性。By uploading the refueling transaction information to the blockchain in the form of blocks, the refueling transaction information can be recorded and published, so that users can understand the information of the gas station more thoroughly, thereby improving the security of the refueling transaction information.
进一步地,在上述实施例中,如图5所示,第一发送模块21包括:Further, in the above embodiment, as shown in FIG. 5 , the
识别单元211,对区块中的加油交易信息进行识别,以确认对应的客户端1;The
第一发送单元212,与识别单元211连接,将区块发送至确认后的对应的客户端1,使得对应的客户端1对区块中的加油交易信息进行校验。The
在上述实施例中,服务器2可以与一存储设备连接,上述存储设备中存储有每个客户端1对应的地址;In the above-mentioned embodiment, the server 2 may be connected with a storage device, and the address corresponding to each client 1 is stored in the above-mentioned storage device;
当第一发送模块21中的识别单元211对区块中的加油交易信息进行识别,以确认发送对象,即确认对应的客户端1,随后第一发送单元212获取发送对象的对应地址将区块进行发送。When the
作为优选的实施方式,用户上传的某一加油交易信息中涉及的交易对象包括:用户客户端和/或用户采用的支付形式对应的客户端1、用户进行交易的加油站客户端;As a preferred embodiment, the transaction objects involved in a certain fuel transaction information uploaded by the user include: the user client and/or the client 1 corresponding to the payment form adopted by the user, and the client of the gas station where the user conducts the transaction;
例如,当用户的支付形式为现金交易时,交易对象包括:用户客户端和用户进行交易的加油站客户端;识别单元211对区块中的加油交易信息进行识别,以得到涉及交易的用户客户端和加油站客户端,第一发送单元212将区块发送至用户客户端和加油站客户端,使得用户客户端和加油站客户端分别对区块中的加油交易信息进行校验;For example, when the user's payment form is cash transaction, the transaction object includes: the user client and the gas station client where the user conducts the transaction; the
例如,当用户的支付形式为支付宝交易时,交易对象包括:用户客户端、支付宝客户端和用户进行交易的加油站客户端;识别单元211对区块中的加油交易信息进行识别,以得到涉及交易的用户客户端、支付宝客户端和加油站客户端,第一发送单元212将区块发送至用户客户端、支付宝客户端和加油站客户端,使得用户客户端、支付宝客户端和加油站客户端分别对区块中的加油交易信息进行校验。For example, when the user's payment form is an Alipay transaction, the transaction objects include: the user client, the Alipay client and the gas station client where the user conducts the transaction; the
进一步地,在上述实施例中,如图6所示,第二发送模块22包括:Further, in the above embodiment, as shown in FIG. 6 , the
判断单元221,用于判断对应的每个客户端1反馈的校验信息是否均为校验通过;The
若是,区块中的加油交易信息通过校验;If so, the refueling transaction information in the block is verified;
若否,区块中的加油交易信息未通过校验,并将校验结果返回给用户;If not, the refueling transaction information in the block has not passed the verification, and the verification result will be returned to the user;
第二发送单元222,与判断单元221连接,于区块中的加油交易信息通过校验后,将区块发送至区块链网络4进行存储。The
在上述实施例中,只有每个对应的客户端1反馈的校验信息均为校验通过时,判断区块中的加油交易信息通过校验。In the above embodiment, only when the verification information fed back by each corresponding client 1 is verified, it is judged that the fueling transaction information in the block has passed the verification.
还包括一种基于区块链的加油数据管理方法,其中,应用于上述任一基于区块链的加油数据管理系统中,加油数据管理方法包括以下步骤:It also includes a blockchain-based refueling data management method, wherein, applied to any of the above-mentioned blockchain-based refueling data management systems, the refueling data management method includes the following steps:
从外接的加油POS机5上获取用户输入的加油交易信息,并上传至服务器2,以使得服务器2存储有包括加油交易信息的区块;Obtain the refueling transaction information input by the user from the external
将区块发送至对应的至少一个客户端1,使得客户端1中的校验模块11对区块中的加油交易信息进行校验;Send the block to the corresponding at least one client 1, so that the verification module 11 in the client 1 verifies the fueling transaction information in the block;
于区块中的加油交易信息通过校验后,将区块发送至区块链网络4进行存储。After the refueling transaction information in the block is verified, the block is sent to the
本发明基于区块链的加油数据管理方法的具体实施方式与上述基于区块链的加油数据管理系统各实施例基本相同,在此不再赘述。The specific implementations of the blockchain-based refueling data management method of the present invention are basically the same as the above-mentioned embodiments of the blockchain-based refueling data management system, and will not be repeated here.
以上所述仅为本发明较佳的实施例,并非因此限制本发明的实施方式及保护范围,对于本领域技术人员而言,应当能够意识到凡运用本发明说明书及图示内容所作出的等同替换和显而易见的变化所得到的方案,均应当包含在本发明的保护范围内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the embodiments and protection scope of the present invention. For those skilled in the art, they should be able to realize that all equivalents made by using the description and illustrations of the present invention The solutions obtained by substitutions and obvious changes shall all be included in the protection scope of the present invention.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010974021.9A CN112131313B (en) | 2020-09-16 | 2020-09-16 | A refueling data management system and method based on blockchain |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010974021.9A CN112131313B (en) | 2020-09-16 | 2020-09-16 | A refueling data management system and method based on blockchain |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112131313A true CN112131313A (en) | 2020-12-25 |
CN112131313B CN112131313B (en) | 2024-04-09 |
Family
ID=73845835
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010974021.9A Active CN112131313B (en) | 2020-09-16 | 2020-09-16 | A refueling data management system and method based on blockchain |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112131313B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114971525A (en) * | 2022-04-20 | 2022-08-30 | 西华大学 | Carbon neutralization management system and method based on block chain |
CN112131313B (en) * | 2020-09-16 | 2024-04-09 | 浙江工商大学 | A refueling data management system and method based on blockchain |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106503589A (en) * | 2016-10-26 | 2017-03-15 | 北京瑞卓喜投科技发展有限公司 | The method of calibration of block chain Transaction Information correctness, apparatus and system |
CN107317672A (en) * | 2017-05-10 | 2017-11-03 | 广东网金控股股份有限公司 | A kind of light weight terminating machine block catenary system |
CN108234470A (en) * | 2017-12-28 | 2018-06-29 | 江苏通付盾科技有限公司 | Block packaging method and system, electronic equipment, storage medium in block chain network |
WO2018177239A1 (en) * | 2017-03-28 | 2018-10-04 | 阿里巴巴集团控股有限公司 | Service processing and consensus method and device |
CN109615784A (en) * | 2019-01-22 | 2019-04-12 | 赫普科技发展(北京)有限公司 | A kind of Intelligent internet of things device and method adding hydrogen or oiling applied to automobile |
CN110472914A (en) * | 2019-08-15 | 2019-11-19 | 上海天地汇供应链科技有限公司 | A kind of invoice management method and system based on block chain |
CN110889762A (en) * | 2019-11-19 | 2020-03-17 | 腾讯科技(深圳)有限公司 | Data processing method, device and medium |
CN111047314A (en) * | 2018-10-12 | 2020-04-21 | 上海诺亚投资管理有限公司 | Financial data processing method and system based on block chain |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112131313B (en) * | 2020-09-16 | 2024-04-09 | 浙江工商大学 | A refueling data management system and method based on blockchain |
-
2020
- 2020-09-16 CN CN202010974021.9A patent/CN112131313B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106503589A (en) * | 2016-10-26 | 2017-03-15 | 北京瑞卓喜投科技发展有限公司 | The method of calibration of block chain Transaction Information correctness, apparatus and system |
WO2018177239A1 (en) * | 2017-03-28 | 2018-10-04 | 阿里巴巴集团控股有限公司 | Service processing and consensus method and device |
CN107317672A (en) * | 2017-05-10 | 2017-11-03 | 广东网金控股股份有限公司 | A kind of light weight terminating machine block catenary system |
CN108234470A (en) * | 2017-12-28 | 2018-06-29 | 江苏通付盾科技有限公司 | Block packaging method and system, electronic equipment, storage medium in block chain network |
CN111047314A (en) * | 2018-10-12 | 2020-04-21 | 上海诺亚投资管理有限公司 | Financial data processing method and system based on block chain |
CN109615784A (en) * | 2019-01-22 | 2019-04-12 | 赫普科技发展(北京)有限公司 | A kind of Intelligent internet of things device and method adding hydrogen or oiling applied to automobile |
CN110472914A (en) * | 2019-08-15 | 2019-11-19 | 上海天地汇供应链科技有限公司 | A kind of invoice management method and system based on block chain |
CN110889762A (en) * | 2019-11-19 | 2020-03-17 | 腾讯科技(深圳)有限公司 | Data processing method, device and medium |
Non-Patent Citations (2)
Title |
---|
ZHIQIN ZHU等: "Blockchain based consensus checking in decentralized cloud storage", SIMULATION MODELLING PRACTICE AND THEORY, 31 July 2020 (2020-07-31), pages 1 - 23 * |
吕建富等: "基于链上链下相结合的日志安全存储与检索", 计算机科学, 2 November 2019 (2019-11-02), pages 298 - 303 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112131313B (en) * | 2020-09-16 | 2024-04-09 | 浙江工商大学 | A refueling data management system and method based on blockchain |
CN114971525A (en) * | 2022-04-20 | 2022-08-30 | 西华大学 | Carbon neutralization management system and method based on block chain |
Also Published As
Publication number | Publication date |
---|---|
CN112131313B (en) | 2024-04-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112131313B (en) | A refueling data management system and method based on blockchain | |
WO2022142040A1 (en) | Billing data verification method and apparatus, computer device and storage medium | |
CN110674145B (en) | Data consistency detection method, device, computer equipment and storage medium | |
CN112668303A (en) | Data processing method, device, equipment and storage medium | |
CN113312649A (en) | Message processing method, device, equipment, system and storage medium | |
CN103870991B (en) | Self-aided terminal business emergency method and site server | |
CN110570293A (en) | method, device, server and storage medium for reimbursing collected invoices | |
CN112396420A (en) | System and method for automatically processing repeated payment | |
CN101964710B (en) | Digital signature and signature authenticating method | |
CN111949537A (en) | Interface test method, device, equipment and medium | |
CN109617755B (en) | Acceptance method and device of access system | |
CN110336791B (en) | Method, device and equipment for transmitting breakpoint data and computer storage medium | |
CN213814670U (en) | Refueling data management system based on block chain | |
CN106933888A (en) | Database configuration management system | |
CN116909844A (en) | Resource interaction information early warning method and device, computer equipment and storage medium | |
CN117218776A (en) | Interaction method and device based on bank self-service machine, bank self-service machine and medium | |
CN109165528A (en) | A kind of block chain data-storage system and method | |
CN107977284A (en) | A kind of data processing method, device, server and medium | |
CN114240464A (en) | Electronic invoice storage management method and device | |
US20080001959A1 (en) | System, Method and Computer Program Product for Performing Information Transfer Using a Virtual Operator | |
CN112466456A (en) | Intelligent medical fault processing method combining visit data transmission and cloud server | |
CN112070470A (en) | Annual report reporting method and device, electronic equipment and storage medium | |
CN112968912B (en) | Multi-mode security verification code method for long-link Internet service | |
CN109993323A (en) | A kind of maintenance engineering automatic settlement method, system and storage medium | |
CN111259361B (en) | Bridge engineering cost system |
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 | ||
TR01 | Transfer of patent right |
Effective date of registration: 20250527 Address after: 250000 1422, building n, Hengda City, No. 58, Gongye North Road, Licheng District, Jinan City, Shandong Province Patentee after: Jinan Weiyang Technology Co.,Ltd. Country or region after: China Address before: Hangzhou City, Zhejiang province 310018 Xiasha Higher Education Park is 18 street. Patentee before: ZHEJIANG GONGSHANG University Country or region before: China |
|
TR01 | Transfer of patent right |