CN111369338B - Data processing method and device based on block chain - Google Patents

Data processing method and device based on block chain Download PDF

Info

Publication number
CN111369338B
CN111369338B CN202010128991.7A CN202010128991A CN111369338B CN 111369338 B CN111369338 B CN 111369338B CN 202010128991 A CN202010128991 A CN 202010128991A CN 111369338 B CN111369338 B CN 111369338B
Authority
CN
China
Prior art keywords
service
node
bill
identifier
authorization information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010128991.7A
Other languages
Chinese (zh)
Other versions
CN111369338A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010128991.7A priority Critical patent/CN111369338B/en
Publication of CN111369338A publication Critical patent/CN111369338A/en
Application granted granted Critical
Publication of CN111369338B publication Critical patent/CN111369338B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/03Credit; Loans; Processing thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Abstract

The embodiment of the application discloses a data processing method and device based on a blockchain, wherein the method comprises the following steps: and receiving a service data application request and first signature information sent by a service application node, and if the service data application request is determined to be a legal request based on the first signature information, generating a bill acquisition request and sending the bill acquisition request to a bill service node. And acquiring a corresponding bill storage block from the block chain according to the received bill storage block identifier returned by the bill service node, and acquiring at least one travelling road section bill corresponding to the service application node identifier from the bill storage block. And determining a first total mileage according to the driving road section corresponding to each driving road section bill, and further determining the service data application limit of the service application node according to the first total mileage. By adopting the embodiment of the application, the authenticity of the information and the business handling efficiency can be improved.

Description

Data processing method and device based on block chain
Technical Field
The present disclosure relates to the field of blockchain technologies, and in particular, to a blockchain-based data processing method and apparatus.
Background
In recent years, with the rapid development and popularization of the internet, online business transaction has become a trend. Currently, online business processes generally require an enterprise or user to actively provide materials required for the business process and send the materials to a business process organization for manual review. However, this can cause problems with information auditing being not reasonably accurate, as there may be false situations in the material provided by the business or user for business transaction. In addition, with the increase of the number of business processes, the online submitting and offline auditing mode can increase labor cost and reduce the progress and efficiency of business auditing.
Disclosure of Invention
The embodiment of the application provides a data processing method and device based on a block chain, which can improve the authenticity of information and the business handling efficiency.
In a first aspect, an embodiment of the present application provides a data processing method based on a blockchain, including:
the service node receives a service data application request sent by a service application node and first signature information of the service data application request, wherein the service data application request comprises a service application node identifier, an authorization information storage block identifier and an authorization information hash value;
the business service node verifies the validity of the business data application request according to the first signature information, and if the business data application request is a legal request, a bill acquisition request is generated according to the authorization information storage block identifier and the authorization information hash value;
the business service node sends the bill obtaining request to the bill service node so that the bill service node obtains corresponding authorization information from a blockchain according to the authorization information storage block identifier and the authorization information hash value, and when the authorized party identifier included in the authorization information is identical to the bill service node identifier corresponding to the bill service node, the corresponding bill storage block identifier is determined according to the business application node identifier and the first time period included in the authorization information so as to return to the business service node;
The business service node acquires a corresponding bill storage block from a block chain according to the received bill storage block identifier so as to acquire at least one traveling road section bill corresponding to the business application node identifier from the bill storage block;
and the service node determines a first total mileage according to the driving road section corresponding to each driving road section bill, and determines the service data application limit of the service application node according to the first total mileage.
In a second aspect, embodiments of the present application provide a blockchain-based data processing device, the device including:
the data request acquisition module is used for receiving a service data application request sent by a service application node and first signature information of the service data application request, wherein the service data application request comprises a service application node identifier, an authorization information storage block identifier and an authorization information hash value;
the data request processing module is used for verifying the validity of the service data application request according to the first signature information, and generating a bill acquisition request according to the authorization information storage block identifier and the authorization information hash value if the service data application request is a legal request;
A bill acquisition request sending module, configured to send the bill acquisition request to a bill service node, so that the bill service node acquires corresponding authorization information from a blockchain according to the authorization information storage block identifier and the authorization information hash value, and when it is determined that an authorized party identifier included in the authorization information is the same as a bill service node identifier corresponding to the bill service node, determines a corresponding bill storage block identifier according to the service application node identifier included in the authorization information and a first time period, and returns the corresponding bill storage block identifier to the service node;
the bill acquisition module is used for acquiring a corresponding bill storage block from the block chain according to the received bill storage block identifier so as to acquire at least one traveling road section bill corresponding to the service application node identifier from the bill storage block;
and the bill processing module is used for determining a first total mileage according to the driving road section corresponding to each driving road section bill and determining the service data application limit of the service application node according to the first total mileage.
With reference to the second aspect, in one possible implementation manner, the data request processing module includes an identity verification unit and a ticket obtaining request sending unit, where the identity verification unit includes: :
A public key obtaining subunit, configured to obtain a public key of a service application node corresponding to the service application node from a public key storage block;
the signature decryption subunit is used for decrypting the first signature information based on the public key of the service application node to obtain a first hash value;
and the user identity determining unit is used for carrying out hash operation on the service data application request to obtain a second hash value, and determining that the service data application request is a legal request if the first hash value is the same as the second hash value.
With reference to the second aspect, in one possible implementation manner, the apparatus further includes a credit information processing module, where the credit information processing module includes:
the credit level determining unit is used for obtaining the credit level corresponding to the service application node identifier from the credit information storage block;
and the credit rating judging unit is used for executing the bill acquisition request according to the authorization information storage block identifier and the authorization information hash value if the credit rating is not smaller than a preset credit rating.
With reference to the second aspect, in one possible implementation manner, the authorization information carries second signature information of the service application node on the authorization information; the device further comprises:
The bill service node is used for acquiring a service application node public key corresponding to the service application node from the public key storage block, and decrypting the second signature information according to the service application node public key to obtain a third hash value;
and the bill service node is configured to perform hash operation on the authorization information to obtain a fourth hash value, and if the third hash value is the same as the fourth hash value and the authorized party identifier included in the authorization information is the same as the bill service node identifier corresponding to the bill service node, execute the corresponding bill storage block identifier according to the service application node identifier included in the authorization information and the first time period.
With reference to the second aspect, in a possible implementation manner, the apparatus further includes:
the bill service node is used for determining a block index table corresponding to the service application node according to the service application node identification;
and the bill service node is used for determining the corresponding bill storage block identifier from the block index table according to the first time period included in the authorization information.
With reference to the second aspect, in one possible implementation manner, the service data application request further includes a service order number in the first period; the bill acquisition module comprises a bill storage block determining unit and a driving road section bill determining unit, wherein the driving road section bill determining unit is specifically used for:
And acquiring at least one traveling road section bill corresponding to the service application node identifier and related to the service order corresponding to the service order number from the bill storage block according to the service application node identifier and the service order number.
With reference to the second aspect, in one possible implementation manner, the ticket processing module includes a total driving mileage determining unit, a service data application credit determining unit, and a service data application credit transferring unit, where the service data application credit determining unit is specifically configured to:
if the second driving total mileage is not greater than the first driving total mileage, determining a service data application limit of the service application node according to the second driving total mileage;
and if the second driving total mileage is greater than the first driving total mileage, determining the service data application limit of the service application node according to the first driving total mileage.
In a third aspect, embodiments of the present application provide a terminal device that includes a processor and a memory, where the processor and the memory are interconnected. The memory is configured to store a computer program supporting the terminal device to perform the method provided by the first aspect and/or any of the possible implementation manners of the first aspect, the computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method provided by the first aspect and/or any of the possible implementation manners of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method provided by the first aspect and/or any one of the possible implementations of the first aspect.
In this embodiment of the present application, the service node may receive a service data application request sent by the service application node, and first signature information of the service application node carried by the service data application request on the service data application request. The service data application request comprises a service application node identifier, an authorization information storage block identifier and an authorization information hash value. Here, the validity of the service data application request may be determined according to the first signature information, where if the service data application request is a legal request, the ticket obtaining request may be generated according to the authorization information storage block identifier and the authorization information hash value. It should be understood that when the service data application request is verified based on the first signature information, the validity of the service data application request is determined by verifying the identity validity of the user who sends the service data application request and whether the service data application request is tampered, so that the authenticity of the information is improved. The method comprises the steps of sending a bill obtaining request to a bill service node, so that the bill service node obtains corresponding authorization information from a blockchain according to an authorization information storage block identifier and an authorization information hash value, and when the authorized party identifier included in the authorization information is identical to the bill service node identifier corresponding to the bill service node, determining the corresponding bill storage block identifier according to a service application node identifier and a first time period included in the authorization information, so as to return to the service node. Further, the business service node can acquire the corresponding bill storage block from the block chain according to the received bill storage block identifier, and acquire at least one road section bill corresponding to the business application node identifier from the bill storage block. Here, by acquiring the driving section ticket from the blockchain, the authenticity of the acquired information can be further ensured. The service node can determine the first total mileage according to the driving road section corresponding to each driving road section bill. The service data application limit of the service application node can be determined according to the total mileage of the first train, and further the service handling efficiency can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a block chain system architecture diagram according to one embodiment of the present application;
FIG. 2 is a flow chart of a block chain based data processing method according to an embodiment of the present application;
FIG. 2a is a block chain and block diagram of an embodiment of the present application;
FIG. 2b is a schematic diagram of a process for verifying first signature information provided by an embodiment of the present application;
fig. 2c is a schematic diagram of an application scenario for determining a ticket storage block according to an embodiment of the present application;
FIG. 2d is a schematic diagram of a driving section ticket provided in an embodiment of the present application;
fig. 2e is a schematic diagram of a correspondence between a total driving mileage and a service data application credit provided in an embodiment of the present application;
FIG. 3 is another flow chart of a data processing method based on a blockchain according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a block chain based data processing apparatus according to an embodiment of the present application;
FIG. 5 is another block chain based data processing apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal device provided in an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a blockchain system according to an embodiment of the present application. As shown in FIG. 1, a blockchain system refers to a system for data sharing between blockchain nodes. Among them, various types of blockchain nodes may be included in the blockchain system, for example, a service node 1, a service node 2, a service node 3, a service application node 1, a ticket service node 1, and the like as shown in fig. 1. For convenience of description, the service node, the service application node, the bill service node and the like may be simply referred to as nodes, where each node has a connection relationship with other nodes. It will be appreciated that any node in the blockchain system may be any form of computing device, such as a server, terminal, etc., without limitation. It should be understood that terminals include, but are not limited to, cell phones, tablet computers, notebook computers, palm top computers, mobile internet devices (mobile internet device, MID), and the like, without limitation. Each node may receive input information while operating normally and maintain shared data within the blockchain system based on the received input information. Wherein the consensus process is controlled by pre-selected nodes (i.e., consensus nodes). In order to ensure the information intercommunication in the blockchain system, information connection can exist between every two nodes in the blockchain system, and the nodes can transmit information through the information connection. For example, when any blockchain node in the blockchain system receives input information, other blockchain nodes in the blockchain system acquire the input information according to a consensus algorithm, and store the input information as data in shared data, so that the data stored on all blockchain nodes in the blockchain system are consistent. It should be appreciated that the entire blockchain system is maintained in common by the various nodes, and that the consensus node may be a node that is predetermined from a plurality of nodes included in the blockchain system based on the consensus mechanism of the blockchain system. For example, the consensus node may be a service node 1, a service node 2, a service node 3, etc. as shown in fig. 1, without limitation.
Each blockchain node in the blockchain system has a blockchain node identifier corresponding to the blockchain node, and each blockchain node in the blockchain system can store the blockchain node identifiers of other blockchain nodes in the blockchain system so as to broadcast the generated blocks to other blockchain nodes in the blockchain system according to the blockchain node identifiers of other blockchain nodes. Each blockchain node may maintain a blockchain point identification list as shown in the following table, and the blockchain node name and the blockchain node identification are correspondingly stored in the blockchain point identification list. The blockchain node identifier may be an IP (Internet Protocol, protocol of interconnection between networks) address, and any other information that can be used to identify the blockchain node, and the IP address is only illustrated in table 1.
Blockchain node name Block link point identification
Blockchain node 1 117.114.151.174
Blockchain node 2 117.116.189.145
Block chain node N 119.123.789.258
TABLE 1
The data processing method based on the block chain can be widely applied to a block chain system. According to the method, the service node can receive the service data application request sent by the service application node and the first signature information of the service application node to the service data application request carried by the service data application request. The service data application request comprises a service application node identifier, an authorization information storage block identifier and an authorization information hash value. If the service data application request is determined to be a legal request based on the first signature information, a ticket acquisition request can be generated according to the authorization information storage block identifier and the authorization information hash value, and the ticket acquisition request is sent to the ticket service node, so that the ticket service node acquires corresponding authorization information from the blockchain according to the authorization information storage block identifier and the authorization information hash value, and when the authorized party identifier included in the authorization information is determined to be identical to the ticket service node identifier corresponding to the ticket service node, the corresponding ticket storage block identifier is determined according to the service application node identifier included in the authorization information and the first time period, and the corresponding ticket service node identifier is returned to the service node. Further, the business service node can acquire the corresponding bill storage block from the block chain according to the received bill storage block identifier, and acquire at least one road section bill corresponding to the business application node identifier from the bill storage block. The service node can determine a first total mileage according to the driving road section corresponding to each driving road section bill, wherein the service data application limit of the service application node can be determined according to the first total mileage, and the service data application limit is transferred to the service application node. By adopting the embodiment of the application, the authenticity of the information and the business handling efficiency can be improved.
The method and the related apparatus according to the embodiments of the present application will be described in detail below with reference to fig. 2 to 5, respectively. The method provided by the embodiment of the application can comprise data processing stages for acquiring a service data application request and first signature information, verifying the service data application request according to the first signature information, sending a bill acquisition request to a bill service node, acquiring a corresponding bill storage block based on a received bill storage block identifier, acquiring driving road section bills from the bill storage block, determining a service data application credit according to a first driving total mileage corresponding to each driving road section bill, and the like. The implementation of the above-mentioned data processing stages can be seen from the implementation shown in fig. 2 below.
Referring to fig. 2, fig. 2 is a flow chart of a data processing method based on blockchain according to an embodiment of the present application. The method provided by the embodiment of the application may include the following steps S201 to S205:
s201, receiving a service data application request sent by a service application node and first signature information of the service data application request.
In some possible embodiments, the service node may receive a service data application request sent by the service application node, and first signature information of the service application node on the service data application request. The contents of the service application node identifier, the authorization information storage block identifier, the authorization information hash value, the service order number in the first time period, the second total mileage and the like included in the service data application request are not limited herein. It should be appreciated that the business service node may be a node corresponding to an organization or department responsible for business handling. For example, the business service node may be a node corresponding to a bank or lending institution. The service application node may be a node corresponding to an enterprise or user having a service handling requirement. For example, the service application node may be a node corresponding to a logistics enterprise or a freight carrier. It will be appreciated that any of the above-described types of nodes may be any form of computing device, such as a server, terminal, etc., without limitation. It should be understood that terminals include, but are not limited to, cell phones, tablet computers, notebook computers, palm top computers, mobile internet devices (mobile internet device, MID), and the like, without limitation.
The service data application request can be a request for applying for service handling sent by an enterprise or a user based on a terminal. For example, the request for service data may be a request for loan service application, etc., without limitation. The service application node identifier may be a name of a service application node, an enterprise code, an IP address, or the like, which is not limited herein, and a service application node identifier may be used to uniquely mark a service application node. The authorization information storage block identifier can be used for uniquely marking one authorization information storage block in the blockchain, wherein the authorization information storage block comprises authorization information of a service application node. Generally, the authorization information storage blocks are generated by service application nodes and are commonly identified by common nodes in the blockchain system and then are uplink. The authorization information hash value is a hash value of the authorization information included in the authorization information storage block, where the authorization information hash value may be an index value of the authorization information.
It should be appreciated that each tile identity may be a unique identifier pre-defined for each tile, e.g., the identifier may be comprised of numbers, letters, and/or symbols, etc. in accordance with a certain arrangement rule. Alternatively, the tile identifier may be a tile height. Alternatively, the block identification may be a timestamp. Alternatively, the block identifier may be a 32-byte hash value obtained by performing a secondary hash calculation on the block header by using the SHA256 algorithm, i.e., a block hash value. It may also be commonly referred to as a chunk hash value because the data involved in the computation is only the data content encapsulated in the chunk. Specifically, the calculation formula of the block hash value may be defined as:
SHA256 (version+prev_hash+merkle_root+time+bits+x)) equation 1
Version represents the version number of the block, prev_hash is the hash value of the previous block, merkle_root is the merckle tree root of the block, time is the timestamp, bits is the difficulty value, and x is a random number. Based on the above formula 1, the secondary hash calculation is performed on the data content encapsulated in the block header, so as to obtain a 32-byte hash value, that is, a block hash value, where the representation form of the block hash value is typically 64 hexadecimal numbers.
It is to be understood that a block may be composed of a block header and a block body, where the block header encapsulates the version number of the block, the hash value of the previous block, the timestamp, the difficulty value, the random number, the merck root, and other data contents, and the block body includes complete service data. For ease of understanding, please refer to fig. 2a, fig. 2a is a schematic diagram of a blockchain and a block provided in an embodiment of the present application. The blockchain shown in fig. 2a may include at least a block N, a block n+1, and a block n+2 shown in fig. 2a, where N may be a positive integer. It should be understood that each block may be composed of a block header and a block body. The block head encapsulates the version number of the block, the hash value of the previous block, the timestamp, the difficulty value, the random number, the merck root and other data contents, and the block comprises complete transaction data. For example, transaction data 1, transaction data 2, …, transaction data m, etc., may be included in the zone block, where m is a positive integer. Further, as shown in fig. 2a, the block structure of the block n+1 is illustrated by taking the block n+1 as an example. Block n+1 may consist of a block header and a block body as shown in fig. 2a, where the block header may include a version number of a block, a hash value of a previous block (i.e., a hash value of block N as shown in fig. 2 a), a timestamp, a calculated difficulty value, a random number set for generating block n+1, and a merck root of the present block (here, block n+1). In addition, the block shown in fig. 2a may include transaction data 1, transaction data 2, transaction data 3, transaction data 4, etc. acquired and packaged from the transaction pool during the period of time before the generation of block n+1 and after the generation of block N, which are not limited herein.
S202, verifying the validity of a service data application request according to the first signature information, and if the service data application request is a legal request, generating a bill acquisition request according to the authorization information storage block identifier and the authorization information hash value.
In some possible embodiments, the service node may verify the validity of the received service data application request based on the first signature information. It is to be understood that the first signature information carried by the service data application request is signature information generated after the service application node encrypts the content of the service data application request. For example, the service application node encrypts the content included in the service data application request based on the service application node private key, and may generate first signature information, and further, after the service data application request and the first signature information are spliced, may send the service data application request and the first signature information to the service node. When the service node obtains a service data application request carrying first signature information, a service application node public key corresponding to the service application node can be obtained from a public key storage block of a block chain based on a service application node identity corresponding to the service application node, and then the first signature information is decrypted based on the service application node public key, so that a first hash value can be obtained. Further, the service node performs hash operation on the content in the service data application request based on the hash algorithm, so as to obtain a second hash value. It should be appreciated that by comparing the first hash value with the second hash value, it may be determined whether the user identity of the service application node that sent the service data application request is a legitimate identity. That is, by verifying the identity validity of the user who sent the service data application request, the validity of the sent service data application request can be determined, i.e. whether someone impersonates the service data application node to send the service data application request. Here, if the first hash value is the same as the second hash value, it may be determined that the service data application request is a legal request. Otherwise, if the first hash value is different from the second hash value, it can be determined that the service data application request is an illegal request, that is, a person impersonating the service application node sends the service data application request, so that the service data application request can be refused. In this embodiment of the present application, if the service data application request is a legal request, the service node may generate a ticket obtaining request according to the authorization information storage block identifier and the authorization information hash value.
It is to be understood that the hash algorithm is a one-way cryptosystem, that is, it is an irreversible mapping from plaintext to ciphertext, only has an encryption process and no decryption process, and at the same time, the hash algorithm can obtain a fixed-length output after any length of input data is changed, and if any character in the input data is changed, the hash value of the final output is different. The hash algorithm used in the embodiments of the present application includes, but is not limited to, MD series hash algorithm, SHA hash algorithm, SM3 hash algorithm, and the like, where the MD series hash algorithm includes MD2, MD4, MD5, and the like, and the SHA hash algorithm includes SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, and the like. For convenience of description, the hash algorithm mentioned in the embodiments of the present application is described by taking SHA-256 algorithm as an example.
For example, referring to fig. 2b, fig. 2b is a schematic diagram illustrating a process of verifying first signature information according to an embodiment of the present application. As shown in fig. 2b, when a service application node initiates a service data application request based on a user terminal, in order to ensure the validity and security of content included in the service data application request, the service application node performs hash operation on content to be transmitted (for example, service application node identifier and authorization information included in the service data application request) based on a hash algorithm, so as to obtain a corresponding hash value, and encrypts the generated hash value through a private key of the service application node, so as to obtain first signature information. Then, the service application node can send the data obtained after splicing to the service node in the blockchain system after splicing the service data application request and the first signature information. When the service node receives the data sent by the service application node, the received data is firstly analyzed to obtain a separated service data application request and first signature information. And then, the public key of the service application node corresponding to the service application node is obtained from the public key storage block of the blockchain, the first signature information can be decrypted based on the public key of the service application node to obtain a decrypted first hash value, and meanwhile, the hash algorithm is used for carrying out hash operation on the content included in the separated service data application request to obtain a second hash value. And finally, the service node can obtain a verification result of the service data application request by comparing and analyzing the first hash value and the second hash value.
S203, sending the bill acquisition request to the bill service node.
In some possible embodiments, if the service data application request is a legal request, the service node may generate a ticket obtaining request according to the authorization information storage block identifier and the authorization information hash value. Further, the generated ticket acquisition request may be sent to a ticket service node in the blockchain system. It should be understood that, when the bill service node in the blockchain system receives the bill acquisition request including the authorization information storage block identifier and the authorization information hash value, the authorization information storage block corresponding to the authorization information storage block identifier can be acquired from the blockchain according to the authorization information storage block identifier, and then, according to the authorization information hash value included in the bill acquisition request, the authorization information corresponding to the authorization information hash value can be acquired from the authorization information storage block. The authorization information may include, but is not limited to, an identifier of an authorized party, a first period of time, and the like. It should be appreciated that an authorized party identification may be used to uniquely tag an authorized party and an authorized party identification may be used to uniquely tag an authorized party. Here, the authorized party is the service application node, and the authorized party is the service node. Therefore, the authorizer identifier may be a service application node identifier corresponding to the service application node, and the authorizer identifier may be a service node identifier corresponding to the service node, and the like, which is not limited herein. It should be understood that, when the identifier of the authorized party included in the authorization information is the same as the identifier of the bill service node corresponding to the bill service node that receives the bill acquisition request, the corresponding identifier of the bill storage block may be determined according to the service application node identifier and the first time period included in the authorization information, and the determined identifier of the bill storage block may be returned to the service node.
Optionally, in some possible embodiments, the authorization information in the authorization information storage block may further carry signature information of the service application node on the authorization information, that is, the second signature information. That is, the authorization information storage block may store, in addition to the authorization information, signature information generated by the service node after encrypting the content in each authorization information based on its corresponding service node private key. It is to be understood that, when the ticket service node obtains the authorization information and the second signature information corresponding to the hash value of the authorization information from the authorization information storage block, the public key of the service application node corresponding to the service application node can be obtained from the public key storage block, and the second signature information is decrypted according to the public key of the service application node to obtain the third hash value. Further, the ticket service node performs hash operation on the authorization information to obtain a fourth hash value. If the third hash value is the same as the fourth hash value and the identifier of the authorized party included in the authorization information is the same as the identifier of the bill service node corresponding to the bill service node, determining the corresponding identifier of the bill storage block according to the service application node identifier and the first time period included in the authorization information can be executed.
In some possible embodiments, when determining the corresponding ticket storage block identifier according to the service application node identifier and the first period included in the authorization information, the ticket service node may first determine the block index table corresponding to the service application node according to the service application node identifier. Then, according to the first time period included in the authorization information, the corresponding bill storage block identification can be determined from the block index table. It should be appreciated that one ticket bucket identification can be used to uniquely tag one ticket bucket in a blockchain. Therefore, the bill service node sends the determined bill storage block identifier to the service node, so that after the service node receives the bill storage block identifier, the service node can acquire the bill storage block corresponding to the bill storage block identifier from the blockchain according to the bill storage block identifier. It should be appreciated that bill storage blocks are typically generated by bill service nodes and are commonly uplink through consensus nodes in the blockchain system.
For example, please refer to fig. 2c, fig. 2c is a schematic diagram of an application scenario for determining a ticket storage block according to an embodiment of the present application. Here, the ticket service node may store block index tables corresponding to different service application nodes, where each block index table includes block identifiers corresponding to blocks generated in different time periods, where one block identifier may be used to uniquely mark one block. As shown in fig. 2c, it is assumed that authorization information corresponding to the authorization information hash value obtained from the authorization information storage block is authorization information 1, where a service application node identifier included in the authorization information 1 is a service application node identifier 2, and the first time period is 2020.2.1 to 2020.4.30. Wherein, according to the service application node identifier 2, it can be determined that the block index table corresponding to the service application node identifier 2 is the block index table 2. As shown in fig. 2c, the block index table 2 includes block identifiers corresponding to the generated blocks within different block generation time ranges. Here, since the first period of time included in the authorization information 1 is 2020.2.1 to 2020.4.30, by referring to the tile index table 2, the tile identifications included in 2020.2.1 to 2020.4.30 are tile identification 2, tile identification 3, and tile identification 4, respectively. Therefore, the bill service node can send the block identifier 2, the block identifier 3 and the block identifier 4 to the service node, so that the service node can respectively acquire the corresponding bill storage blocks from the block chain according to the received block identifier 2, the block identifier 3 and the block identifier 4.
S204, acquiring a corresponding bill storage block from the blockchain according to the received bill storage block identifier so as to acquire at least one driving road section bill corresponding to the service application node identifier from the bill storage block.
In some possible embodiments, the service node receives the ticket storage block identifier sent by the ticket service node, and can obtain the ticket storage block corresponding to the ticket storage block identifier from the blockchain according to the ticket storage block identifier. It should be appreciated that the ticket storage block may include road section tickets acquired and packaged from the transaction pool over a period of time and associated with the service application node. Therefore, the service node can acquire at least one road section bill corresponding to the service application node identifier from the bill storage block according to the service application node identifier. Here, the driving road section bill is a bill corresponding to each driving road section. The bill of each driving road section can comprise bill identification, billing time, driving road section, data transfer quantity and the like. In embodiments of the present application, the driving section ticket may include an invoice and a financial ticket, and thus, the ticket type of the driving section ticket may include an invoice type and a financial ticket type. It will be appreciated that tickets of different ticket types are issued by different ticket service nodes and added to the blockchain. For example, invoices corresponding to invoice types are issued and uplink by tax office nodes, while financial tickets corresponding to financial ticket types are issued and added to the blockchain by financial hall nodes. For example, referring to fig. 2d, fig. 2d is a schematic diagram of a driving section ticket provided in an embodiment of the present application. As shown in fig. 2d, taking the driving section bill 1 as an example, the driving section bill 1 may include a bill type, a bill identification, a billing time, a driving section, a data transfer amount, and the like.
Optionally, in some possible embodiments, if the service data application request further includes a service order number in the first period, after the service node receives the ticket storage block identifier sent by the ticket service node and obtains the ticket storage block corresponding to the ticket storage block identifier from the block chain according to the ticket storage block identifier, the service node may further obtain at least one driving road section ticket corresponding to the service application node identifier and associated with the service order corresponding to the service order number from the ticket storage block according to the service application node identifier and the service order number.
S205, determining a first total mileage according to the driving road section corresponding to each driving road section bill, and determining the service data application limit of the service application node according to the first total mileage.
In some possible embodiments, the service node obtains the total driving mileage corresponding to each driving road section bill, that is, the first total driving mileage, by obtaining the driving road section included in each driving road section bill and summing the driving mileage corresponding to each driving road section bill. And determining the service data application limit of the service application node according to the first driving total mileage, and transferring the service data application limit to the service application node. Here, the service data application line may be a credit line of a service application node or the like, which is not limited herein. For example, the service data application limit corresponding to the first total mileage can be determined by querying the corresponding relation between the total mileage and the service data application limit. For example, please refer to fig. 2e, fig. 2e is a schematic diagram illustrating a correspondence between a total driving mileage and a service data application credit provided in an embodiment of the present application. As shown in fig. 2e, when the total mileage of the vehicle is below 50000 km, the service data application credit is 0; when the total mileage of the driving is 50000 km-55000 km, the service data application limit is 100000 yuan; when the total mileage of the driving is 55000 km to 60000 km, the service data application limit is 150000 yuan; when the total mileage of the driving is 60000 km-65000 km, the service data application limit is 200000 yuan. Therefore, assuming that the total mileage of the first driving is 52500 km, it may be determined that the service data application credit corresponding to the total mileage of the first driving is 150000 yuan.
Optionally, in some possible embodiments, if the service data application request further includes the second total driving mileage, the service data application credit of the service application node may be further determined according to the first total driving mileage and the second total driving mileage. Specifically, if the second driving total mileage is not greater than the first driving total mileage, that is, the second driving total mileage is less than or equal to the first driving total mileage, determining a service data application limit of the service application node according to the second driving total mileage. If the second driving total mileage is greater than the first driving total mileage, the service data application limit of the service application node can be determined according to the first driving total mileage. Here, the implementation manner of determining the service data application limit according to the first total mileage or the second total mileage may also be determined by querying the corresponding relationship between the total mileage and the service data application limit, which is not limited herein.
Optionally, in some possible embodiments, when determining the service data application amount of the service application node, besides determining the service data application amount according to the total mileage of the first vehicle, information such as a financial statement corresponding to the service application node and bank running water may be obtained from the blockchain as a reference dimension for determining the service data application amount, which is determined specifically according to an actual application scenario, and is not limited herein.
In this embodiment of the present application, the service node may receive a service data application request sent by the service application node, and first signature information of the service application node carried by the service data application request on the service data application request. The service data application request comprises a service application node identifier, an authorization information storage block identifier and an authorization information hash value. If the service data application request is determined to be a legal request based on the first signature information, a ticket acquisition request can be generated according to the authorization information storage block identifier and the authorization information hash value, and the ticket acquisition request is sent to the ticket service node, so that the ticket service node acquires corresponding authorization information from the blockchain according to the authorization information storage block identifier and the authorization information hash value, and when the authorized party identifier included in the authorization information is determined to be identical to the ticket service node identifier corresponding to the ticket service node, the corresponding ticket storage block identifier is determined according to the service application node identifier included in the authorization information and the first time period, and the corresponding ticket service node identifier is returned to the service node. Further, the business service node can acquire the corresponding bill storage block from the block chain according to the received bill storage block identifier, and acquire at least one road section bill corresponding to the business application node identifier from the bill storage block. The service node can determine the first total mileage according to the driving road section corresponding to each driving road section bill, wherein the service data application limit of the service application node can be determined according to the first total mileage. By adopting the embodiment of the application, the authenticity of the information and the business handling efficiency can be improved.
Referring to fig. 3, fig. 3 is another flow chart of a data processing method based on a blockchain according to an embodiment of the present application. The method provided by the embodiment of the application may include the following steps S301 to S306:
s301, receiving a service data application request sent by a service application node and first signature information of the service data application request.
S302, verifying the validity of the service data application request according to the first signature information.
The specific implementation manner of step S301 to step S302 may refer to the descriptions of step S201 to step S202 in the corresponding embodiment of fig. 2, and the description thereof will not be repeated here.
S303, if the service data application request is a legal request, acquiring a credit level corresponding to the service application node identifier from the credit information storage block, and if the credit level is not smaller than a preset credit level, generating a bill acquisition request according to the authorization information storage block identifier and the authorization information hash value.
In some possible embodiments, to further determine the service application qualification of the service application node, after the service node determines that the service data application request is a legal request based on the first signature information, the service node may further obtain a credit level corresponding to the service application node identifier from the credit information storage block. When the credit rating is not smaller than the preset credit rating, the bill obtaining request can be generated according to the authorization information storage block identification and the authorization information hash value.
S304, sending the bill acquisition request to the bill service node.
S305, acquiring a corresponding bill storage block from the blockchain according to the received bill storage block identifier so as to acquire at least one driving road section bill corresponding to the service application node identifier from the bill storage block.
S306, determining a first total mileage according to the driving road section corresponding to each driving road section bill, and determining the service data application limit of the service application node according to the first total mileage.
The specific implementation manner of step S304 to step S306 may refer to the descriptions of step S203 to step S205 in the corresponding embodiment of fig. 2, and the detailed description is omitted here.
S307, transferring the service data application limit to the service application node.
In some possible embodiments, if the service data application request further includes a data receiving account corresponding to the service application node, the service node may further transfer, from its own data storage account, a data amount corresponding to the service data application credit to the data receiving account, so as to respond to the service data application request.
Optionally, in some possible embodiments, the service node may further receive service data reception acknowledgement information sent by the service application node. The service node can generate a data application record according to the service data receiving confirmation information. And sending the data application record and the service data receiving confirmation information to the consensus nodes in the block chain system, so that the verification results of the data application record sent by the consensus nodes in the block chain system can be received, and the consensus results of the data application record can be determined according to the verification results. When it is determined that consensus is reached for the data application record, a data application record storage block including the data application record is added to the blockchain.
In this embodiment of the present application, the service node may receive a service data application request sent by the service application node, and first signature information of the service application node carried by the service data application request on the service data application request. The service data application request comprises a service application node identifier, an authorization information storage block identifier and an authorization information hash value. If the service data application request is determined to be a legal request based on the first signature information, a ticket acquisition request can be generated according to the authorization information storage block identifier and the authorization information hash value, and the ticket acquisition request is sent to the ticket service node, so that the ticket service node acquires corresponding authorization information from the blockchain according to the authorization information storage block identifier and the authorization information hash value, and when the authorized party identifier included in the authorization information is determined to be identical to the ticket service node identifier corresponding to the ticket service node, the corresponding ticket storage block identifier is determined according to the service application node identifier included in the authorization information and the first time period, and the corresponding ticket service node identifier is returned to the service node. Further, the business service node can acquire the corresponding bill storage block from the block chain according to the received bill storage block identifier, and acquire at least one road section bill corresponding to the business application node identifier from the bill storage block. The service node can determine a first total mileage according to the driving road section corresponding to each driving road section bill, wherein the service data application limit of the service application node can be determined according to the first total mileage, and the service data application limit is transferred to the service application node. By adopting the embodiment of the application, the authenticity of the information and the business handling efficiency can be improved.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a blockchain-based data processing device according to an embodiment of the present application. The data processing device based on the blockchain provided by the embodiment of the application comprises:
a data request obtaining module 41, configured to receive a service data application request sent by a service application node, and first signature information for the service data application request, where the service data application request includes a service application node identifier, an authorization information storage block identifier, and an authorization information hash value;
a data request processing module 42, configured to verify the validity of the service data application request according to the first signature information, and if the service data application request is a valid request, generate a ticket acquisition request according to the authorization information storage block identifier and the authorization information hash value;
a ticket obtaining request sending module 43, configured to send the ticket obtaining request to a ticket service node, so that the ticket service node obtains corresponding authorization information from a blockchain according to the authorization information storage block identifier and the authorization information hash value, and when determining that an authorized party identifier included in the authorization information is the same as a ticket service node identifier corresponding to the ticket service node, determines a corresponding ticket storage block identifier according to the service application node identifier included in the authorization information and a first time period, and returns the corresponding ticket storage block identifier to the service node;
A bill obtaining module 44, configured to obtain a corresponding bill storage block from the blockchain according to the received bill storage block identifier, so as to obtain at least one driving road section bill corresponding to the service application node identifier from the bill storage block;
the bill processing module 45 is configured to determine a first total driving mileage according to a driving road section corresponding to each driving road section bill, and determine a service data application credit of the service application node according to the first total driving mileage.
Referring to fig. 5, fig. 5 is another schematic structural diagram of a blockchain-based data processing device according to an embodiment of the present application. Wherein:
in some possible embodiments, the data request processing module 42 includes an authentication unit 421 and a ticket obtaining request sending unit 422, where the authentication unit 421 includes: :
a public key obtaining subunit 4211, configured to obtain a public key of the service application node corresponding to the service application node from the public key storage block;
a signature decryption subunit 4212, configured to decrypt the first signature information based on the public key of the service application node to obtain a first hash value;
the user identity determining unit 4213 is configured to perform a hash operation on the service data application request to obtain a second hash value, and determine that the service data application request is a legal request if the first hash value is the same as the second hash value.
In some possible embodiments, the apparatus further includes a credit information processing module 46, where the credit information processing module 46 includes:
a credit level determining unit 461, configured to obtain a credit level corresponding to the service application node identifier from the credit information storage block;
and a credit rating judging unit 462 for executing the ticket acquiring request according to the authorization information storage block identifier and the authorization information hash value if the credit rating is not less than a predetermined credit rating.
In some possible embodiments, the authorization information carries second signature information of the service application node on the authorization information; the device further comprises:
the bill service node is used for acquiring a service application node public key corresponding to the service application node from the public key storage block, and decrypting the second signature information according to the service application node public key to obtain a third hash value;
and the bill service node is configured to perform hash operation on the authorization information to obtain a fourth hash value, and if the third hash value is the same as the fourth hash value and the authorized party identifier included in the authorization information is the same as the bill service node identifier corresponding to the bill service node, execute the corresponding bill storage block identifier according to the service application node identifier included in the authorization information and the first time period.
In some possible embodiments, the apparatus further comprises:
the bill service node is used for determining a block index table corresponding to the service application node according to the service application node identification;
and the bill service node is used for determining the corresponding bill storage block identifier from the block index table according to the first time period included in the authorization information.
In some possible embodiments, the service data application request further includes a service order number in the first period; the bill acquisition module 44 includes a bill storage block determining unit 441 and a driving section bill determining unit 442, where the driving section bill determining unit 442 is specifically configured to:
and acquiring at least one traveling road section bill corresponding to the service application node identifier and related to the service order corresponding to the service order number from the bill storage block according to the service application node identifier and the service order number.
In some possible embodiments, the bill processing module 45 includes a total driving mileage determining unit 451, a service data application credit determining unit 452, and a service data application credit transferring unit 453, where the service data application credit determining unit 452 is specifically configured to:
If the second driving total mileage is not greater than the first driving total mileage, determining a service data application limit of the service application node according to the second driving total mileage;
and if the second driving total mileage is greater than the first driving total mileage, determining the service data application limit of the service application node according to the first driving total mileage.
In particular, the blockchain-based data processing device may execute the implementation provided in the steps of fig. 2 to 3 through each functional module built in the blockchain-based data processing device. For example, the data request obtaining module 41 may be configured to execute the implementation manner of receiving the service data application request and the first signature information carried by the service data application request in the above steps, and the detailed description of the implementation manner provided in the above steps will be omitted herein. The data request processing module 42 may be configured to perform the implementation manner described in the steps related to verifying the validity of the service data application request based on the first signature information, generating the ticket obtaining request according to the identification of the authorization information storage block and the hash value of the authorization information, and the like in the steps, and specifically, the implementation manner provided in the steps may be referred to and will not be described herein again. The above-mentioned implementation manner of sending the ticket obtaining request to the ticket service node by the ticket obtaining request sending module 43 in each step may be referred to specifically for the implementation manner provided in each step, and will not be described herein again. The bill obtaining module 44 may be configured to perform the implementation manners of receiving the bill storage block identifier sent by the bill service node in each step, determining the corresponding bill storage block according to the bill storage block identifier, and obtaining the driving road section bill from the bill storage block, which are specifically referred to the implementation manners provided in each step and are not described herein again. The bill processing module 45 may be configured to execute the implementation manners of determining the first total driving mileage according to the driving road section corresponding to the driving road section bill, determining the service data application credit according to the first total driving mileage, and transferring the service data application credit to the service application node in each step, and the implementation manners provided in each step may be referred to herein and will not be described in detail. The credit information processing module 46 may be configured to execute the implementation manners of acquiring the credit rating of the service application node in each step, determining whether to generate the ticket acquiring request according to the credit rating, and the like, and specifically refer to the implementation manners provided in each step, which are not described herein.
In this embodiment of the present application, the data processing device based on the blockchain may receive a service data application request sent by a service application node, and first signature information of the service application node carried by the service data application request on the service data application request. The service data application request comprises a service application node identifier, an authorization information storage block identifier and an authorization information hash value. If the service data application request is determined to be a legal request based on the first signature information, a ticket acquisition request can be generated according to the authorization information storage block identifier and the authorization information hash value, and the ticket acquisition request is sent to the ticket service node, so that the ticket service node acquires corresponding authorization information from the blockchain according to the authorization information storage block identifier and the authorization information hash value, and when the authorized party identifier included in the authorization information is determined to be identical to the ticket service node identifier corresponding to the ticket service node, the corresponding ticket storage block identifier is determined according to the service application node identifier included in the authorization information and the first time period. Further, by receiving the bill storage block identifier sent by the bill service node, a corresponding bill storage block can be obtained from the blockchain according to the bill storage block identifier, and at least one traveling road section bill corresponding to the service application node identifier can be obtained from the bill storage block. The first driving total mileage can be determined according to the driving road section corresponding to each driving road section bill, further the service data application limit of the service application node can be determined according to the first driving total mileage, and the service data application limit is transferred to the service application node. By adopting the embodiment of the application, the authenticity of the information and the business handling efficiency can be improved, the flexibility is high, and the application range is wide.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 6, the terminal device in this embodiment may include: one or more processors 501, memory 502, and a transceiver 503. The processor 501, the memory 502, and the transceiver 503 may be connected via a bus 504. In particular, the transceiver 503 may be a communication module, a transceiver circuit. In the embodiment of the present application, the transceiver 503 is configured to perform the operations of sending the data verification record and the verified confirmation information to the consensus node, receiving the verification result sent by the consensus node, and so on, which are related to the foregoing embodiments. The memory 502 is used for storing a computer program comprising program instructions, and the processor 501 is used for executing the program instructions stored in the memory 502.
It should be appreciated that in some possible embodiments, the processor 501 may be a central processing unit (central processing unit, CPU), which may also be other general purpose processors, digital signal processors (digital signal processor, DSP), application specific integrated circuits (application specific integrated circuit, ASIC), off-the-shelf programmable gate arrays (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The memory 502 may include read only memory and random access memory and provide instructions and data to the processor 501. A portion of memory 502 may also include non-volatile random access memory. For example, the memory 502 may also store information of device type.
In a specific implementation, the terminal device may execute, through each function module built in the terminal device, an implementation manner provided by each step in fig. 2 to 3, and specifically, the implementation manner provided by each step may be referred to, which is not described herein again.
In this embodiment of the present application, the terminal device may receive a service data application request sent by a service application node, and first signature information of the service application node carried by the service data application request on the service data application request. The service data application request comprises a service application node identifier, an authorization information storage block identifier and an authorization information hash value. If the service data application request is determined to be a legal request based on the first signature information, a ticket acquisition request can be generated according to the authorization information storage block identifier and the authorization information hash value, and the ticket acquisition request is sent to the ticket service node, so that the ticket service node acquires corresponding authorization information from the blockchain according to the authorization information storage block identifier and the authorization information hash value, and when the authorized party identifier included in the authorization information is determined to be identical to the ticket service node identifier corresponding to the ticket service node, the corresponding ticket storage block identifier is determined according to the service application node identifier included in the authorization information and the first time period. Further, by receiving the bill storage block identifier sent by the bill service node, a corresponding bill storage block can be obtained from the blockchain according to the bill storage block identifier, and at least one traveling road section bill corresponding to the service application node identifier can be obtained from the bill storage block. The first driving total mileage can be determined according to the driving road section corresponding to each driving road section bill, further the service data application limit of the service application node can be determined according to the first driving total mileage, and the service data application limit is transferred to the service application node. By adopting the embodiment of the application, the authenticity of the information and the business handling efficiency can be improved, the flexibility is high, and the application range is wide.
The embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium stores a computer program, where the computer program includes program instructions, and when the program instructions are executed by a processor, implement a blockchain-based data processing method provided in each step of fig. 2 to 3, and specifically, reference may be made to an implementation manner provided in each step, which is not described herein.
The computer readable storage medium may be a blockchain-based data processing apparatus provided in any of the foregoing embodiments or an internal storage unit of the terminal device, such as a hard disk or a memory of an electronic device. The computer readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash card (flash card) or the like, which are provided on the electronic device. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the electronic device. The computer-readable storage medium is used to store the computer program and other programs and data required by the electronic device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
The terms "first," "second," "third," "fourth," and the like in the claims and in the description and drawings of the present application, are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments. The term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations. Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The methods and related devices provided in the embodiments of the present application are described with reference to the method flowcharts and/or structure diagrams provided in the embodiments of the present application, and each flowchart and/or block of the method flowcharts and/or structure diagrams may be implemented by computer program instructions, and combinations of flowcharts and/or blocks in the flowchart and/or block diagrams. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or structural diagram block or blocks. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or structures.

Claims (10)

1. A method of blockchain-based data processing, the method comprising:
the service node receives a service data application request sent by a service application node and first signature information of the service data application request, wherein the service data application request comprises a service application node identifier, an authorization information storage block identifier and an authorization information hash value;
the service node verifies the validity of the service data application request according to the first signature information, and if the service data application request is a legal request, a bill acquisition request is generated according to the authorization information storage block identifier and the authorization information hash value;
the business service node sends the bill obtaining request to a bill service node so that the bill service node obtains corresponding authorization information from a block chain according to the authorization information storage block identifier and the authorization information hash value, and when the authorized party identifier included in the authorization information is identical to the bill service node identifier corresponding to the bill service node, the corresponding bill storage block identifier is determined according to the business application node identifier and the first time period included in the authorization information so as to return to the business service node;
The business service node acquires a corresponding bill storage block from a block chain according to the received bill storage block identifier so as to acquire at least one traveling road section bill corresponding to the business application node identifier from the bill storage block;
and the service node determines a first total mileage according to the driving road section corresponding to each driving road section bill, and determines the service data application limit of the service application node according to the first total mileage.
2. The method of claim 1, wherein verifying the legitimacy of the service data application request based on the first signature information comprises:
the service node obtains a service application node public key corresponding to the service application node from a public key storage block;
the service node decrypts the first signature information based on the service application node public key to obtain a first hash value;
and the service node performs hash operation on the service data application request to obtain a second hash value, and if the first hash value is the same as the second hash value, the service data application request is determined to be a legal request.
3. The method according to claim 1 or 2, wherein before generating a ticket acquisition request from the authorization information store identity and the authorization information hash value, the method further comprises:
and the service node acquires the credit grade corresponding to the service application node identifier from the credit information storage block, and if the credit grade is not smaller than a preset credit grade, the service node executes the bill acquisition request generated according to the authorization information storage block identifier and the authorization information hash value.
4. The method of claim 1, wherein the authorization information carries second signature information of the service application node on the authorization information; the method further comprises the steps of:
the bill service node obtains a service application node public key corresponding to the service application node from a public key storage block, and decrypts the second signature information according to the service application node public key to obtain a third hash value;
and the bill service node carries out hash operation on the authorization information to obtain a fourth hash value, and if the third hash value is the same as the fourth hash value and the authorized party identifier included in the authorization information is the same as the bill service node identifier corresponding to the bill service node, the corresponding bill storage block identifier is determined according to the service application node identifier and the first time period included in the authorization information.
5. The method according to claim 1 or 4, wherein the determining the corresponding ticket storage block identifier according to the service application node identifier and the first period of time included in the authorization information includes:
the bill service node determines a block index table corresponding to the service application node according to the service application node identifier;
and the bill service node determines the corresponding bill storage block identifier from the block index table according to the first time period included in the authorization information.
6. The method of claim 1, wherein the service data application request further includes a service order number in the first time period; the step of obtaining at least one driving road section bill corresponding to the service application node identifier from the bill storage block comprises the following steps:
and the service node acquires at least one driving road section bill which corresponds to the service application node identifier and is associated with the service order corresponding to the service order number from the bill storage block according to the service application node identifier and the service order number.
7. The method of claim 1, wherein the service data application request further includes a second total mileage; the determining the service data application limit of the service application node according to the first driving total mileage includes:
If the second driving total mileage is not greater than the first driving total mileage, determining a service data application limit of the service application node according to the second driving total mileage;
and if the second driving total mileage is greater than the first driving total mileage, determining the service data application limit of the service application node according to the first driving total mileage.
8. A blockchain-based data processing device, the device comprising:
the data request acquisition module is used for receiving a service data application request sent by a service application node and first signature information of the service data application request, wherein the service data application request comprises a service application node identifier, an authorization information storage block identifier and an authorization information hash value;
the data request processing module is used for verifying the validity of the service data application request according to the first signature information, and generating a bill acquisition request according to the authorization information storage block identifier and the authorization information hash value if the service data application request is a legal request;
the bill acquisition request sending module is used for sending the bill acquisition request to a bill service node so that the bill service node acquires corresponding authorization information from a blockchain according to the authorization information storage block identifier and the authorization information hash value, and when the authorized party identifier included in the authorization information is identical to the bill service node identifier corresponding to the bill service node, the corresponding bill storage block identifier is determined according to the service application node identifier included in the authorization information and a first time period so as to return to the service node;
The bill acquisition module is used for acquiring a corresponding bill storage block from a block chain according to the received bill storage block identifier so as to acquire at least one traveling road section bill corresponding to the service application node identifier from the bill storage block;
and the bill processing module is used for determining a first total mileage according to the driving road section corresponding to each driving road section bill and determining the service data application limit of the service application node according to the first total mileage.
9. A terminal device comprising a processor and a memory, said processor and memory being interconnected;
the memory is for storing a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of any of claims 1-7.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of any of claims 1-7.
CN202010128991.7A 2020-02-28 2020-02-28 Data processing method and device based on block chain Active CN111369338B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010128991.7A CN111369338B (en) 2020-02-28 2020-02-28 Data processing method and device based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010128991.7A CN111369338B (en) 2020-02-28 2020-02-28 Data processing method and device based on block chain

Publications (2)

Publication Number Publication Date
CN111369338A CN111369338A (en) 2020-07-03
CN111369338B true CN111369338B (en) 2023-12-19

Family

ID=71206605

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010128991.7A Active CN111369338B (en) 2020-02-28 2020-02-28 Data processing method and device based on block chain

Country Status (1)

Country Link
CN (1) CN111369338B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111738473B (en) * 2020-07-31 2020-12-18 支付宝(杭州)信息技术有限公司 Processing method, device, equipment and system for ticket booking service
CN112598488B (en) * 2020-09-29 2022-02-01 邓海 Tax data checking and storing method and device based on block chain and storage medium
CN112149077B (en) * 2020-10-12 2022-03-25 杭州云链趣链数字科技有限公司 Supply chain billing method, system and computer equipment based on block chain technology
CN112487462B (en) * 2020-12-11 2023-10-31 航天信息股份有限公司 Data authorization method and device based on block chain vehicle tax purchasing system
CN115277686B (en) * 2021-04-30 2024-04-19 中国移动通信集团辽宁有限公司 Data transmission method, device, equipment and computer storage medium
CN113300853B (en) * 2021-05-20 2023-07-25 广西大学 Financial credit information management method, device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019078623A1 (en) * 2017-10-17 2019-04-25 주식회사 코인플러그 Blockchain-based payment method, and payment server using same
CN110599266A (en) * 2019-09-16 2019-12-20 腾讯科技(深圳)有限公司 Electronic bill data processing method and device, computer equipment and storage medium
CN110599207A (en) * 2019-09-20 2019-12-20 腾讯科技(深圳)有限公司 Invoice verification method, invoice verification device, invoice verification server and storage medium
CN110633963A (en) * 2019-09-16 2019-12-31 腾讯科技(深圳)有限公司 Electronic bill processing method, electronic bill processing device, computer-readable storage medium and equipment
CN110659906A (en) * 2019-09-20 2020-01-07 腾讯科技(深圳)有限公司 Bill information processing method, related device and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019078623A1 (en) * 2017-10-17 2019-04-25 주식회사 코인플러그 Blockchain-based payment method, and payment server using same
CN110599266A (en) * 2019-09-16 2019-12-20 腾讯科技(深圳)有限公司 Electronic bill data processing method and device, computer equipment and storage medium
CN110633963A (en) * 2019-09-16 2019-12-31 腾讯科技(深圳)有限公司 Electronic bill processing method, electronic bill processing device, computer-readable storage medium and equipment
CN110599207A (en) * 2019-09-20 2019-12-20 腾讯科技(深圳)有限公司 Invoice verification method, invoice verification device, invoice verification server and storage medium
CN110659906A (en) * 2019-09-20 2020-01-07 腾讯科技(深圳)有限公司 Bill information processing method, related device and medium

Also Published As

Publication number Publication date
CN111369338A (en) 2020-07-03

Similar Documents

Publication Publication Date Title
CN111369338B (en) Data processing method and device based on block chain
KR102636102B1 (en) Computer-implemented methods and systems for validating tokens for blockchain-based cryptocurrencies
US10715336B2 (en) Personal device security using elliptic curve cryptography for secret sharing
US20200244470A1 (en) Issuing virtual documents in a block chain
KR100315991B1 (en) Digitally signing agreements from remotely located nodes
US7362869B2 (en) Method of distributing a public key
CN107146120B (en) Electronic invoice generation method and generation device
JP4036838B2 (en) Security device, information processing device, method executed by security device, method executed by information processing device, program executable for executing the method, and ticket system
US10237072B2 (en) Signatures for near field communications
CN111444273B (en) Data authorization method and device based on block chain
CN104836776A (en) Data interaction method and device
CN111476573B (en) Account data processing method, device, equipment and storage medium
CA2355928C (en) Method and system for implementing a digital signature
CN111311258B (en) Block chain-based trusted transaction method, device, system, equipment and medium
US20140368312A1 (en) Authentication method between a reader and a radio tag
CN108768975A (en) Support the data integrity verification method of key updating and third party's secret protection
CN111314066B (en) Block chain-based data transfer method, terminal and computer-readable storage medium
CN114760114B (en) Identity authentication method, device, equipment and medium
CN101369296A (en) Method and system for implementing off-line printing limitation
CN116015846A (en) Identity authentication method, identity authentication device, computer equipment and storage medium
CN111369332A (en) Data processing method and device based on block chain
CN117769707A (en) Method for transmitting tokens in an electronic transaction system and transaction system
CN101661573A (en) Method for producing electronic seal and method for using electronic seal
CN117063174A (en) Security module and method for inter-app trust through app-based identity
CN113327142A (en) Data processing method and device based on block chain

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