A data processing method, apparatus, device, and storage medium
By enabling the first and second nodes in the blockchain network to work together, the enterprise risk status is generated and updated in real time, solving the problem of delay in risk control in the blockchain electronic bill system, realizing real-time changes in risk status and timely transmission of transaction data, and improving the real-time performance of risk control.
Patent Information
- Application Number
- CN202210510165.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-11
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2042-05-11
AI Technical Summary
In blockchain-based electronic invoice systems, the determination of a company's risk status is delayed due to the statistical cycle of scheduled tasks, resulting in insufficient real-time risk management.
By having the first and second nodes in the blockchain network work together, the risk status of business objects is generated and updated in real time. Management contracts and bill contracts are used to realize real-time changes in risk status and transmission of transaction data, ensuring that the tax bureau's management terminal can adjust the risk status in a timely manner.
It improves the real-time nature of risk management, enabling timely interception of potential risk events and reduction of losses.
Smart Images

Figure CN117114903B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and in particular to a data processing method, apparatus, device, and storage medium. Background Technology
[0002] Because blockchain-based electronic invoices lack restrictions on the quantity and amount of invoices that can be issued, there is a risk of fraudulent invoicing. Therefore, tax authorities need to implement risk control measures for the invoicing requests of business entities (e.g., enterprises). Currently, blockchain nodes running invoice data synchronization programs (e.g., invoicing agents) can poll the on-chain block data according to scheduled tasks (e.g., every hour) to calculate the total number of invoices issued by each enterprise and determine whether the enterprise is considered a risky entity. For example, if an invoicing agent detects that an enterprise (e.g., enterprise A) is risk-free at a certain detection timestamp (e.g., 10:00 AM), and the agent's next detection timestamp is 11:00 AM, this means that if enterprise A's risk status changes between 10:00 and 11:00 AM, the agent will still execute invoicing for enterprise A, potentially causing incalculable losses. In other words, the determination of an enterprise's risk status will have a delay related to the statistical period of the scheduled task, which reduces the real-time nature of risk management. Summary of the Invention
[0003] This application provides a data processing method, apparatus, device, and storage medium that can improve the real-time performance of risk management.
[0004] This application provides a data processing method, executed by a first node in a blockchain network, comprising:
[0005] When a business object's invoicing request is received, the invoicing transaction corresponding to the business invoicing request is sent to the second node in the blockchain network. This allows the second node to generate an invoicing result notification to be returned to the first node based on the business object's risk status. The object's risk status is stored in the blockchain ledger of the blockchain network.
[0006] If the invoicing result notification is an invoicing success notification, the management contract deployed on the first node is triggered. Based on the management contract, the transaction data associated with the invoicing success notification is forwarded to the tax bureau management terminal. The invoicing success notification is generated by the second node when the object's risk status is in the first risk status. The tax bureau management terminal is used to send a status change request to the second node when it determines that the object's risk status is a second risk status, which is different from the first risk status, based on the transaction data and the object information of the business object. The status change request is used to instruct the second node to change the object's risk status from the first risk status to the second risk status. The second risk status is used to indicate that the second node failed to issue the invoice.
[0007] One embodiment of this application provides a data processing method, which is executed by a second node in a blockchain network, including:
[0008] Retrieve the invoicing transaction sent by the first node in the blockchain network; the invoicing transaction is generated by the first node based on the business invoicing request of the business object;
[0009] The system retrieves the object risk status of a business object from the blockchain ledger of the blockchain network. Based on the object risk status, it generates an invoice result notification to be returned to the first node. When the invoice result notification is an invoice success notification, the first node forwards the transaction data associated with the invoice success notification to the tax bureau management terminal based on the management contract deployed on the first node. When the tax bureau management terminal determines that the object risk status is a second risk status different from the first risk status based on the transaction data and the object information of the business object, it generates a status change request.
[0010] Upon receiving a status change request from the tax authority's management terminal, the risk status of the object is changed from the first risk status to the second risk status in the blockchain ledger; the second risk status is used to indicate that the second node failed to issue an invoice.
[0011] One embodiment of this application provides a data processing apparatus, including:
[0012] The invoicing transaction sending module is used to send the invoicing transaction corresponding to the business invoicing request to the second node in the blockchain network when a business invoicing request is received. This allows the second node to generate an invoicing result notification to be returned to the first node based on the object risk status of the business object. The object risk status is stored in the blockchain ledger of the blockchain network.
[0013] The transaction data forwarding module is used to trigger the management contract deployed on the first node if the invoicing result notification is an invoicing success notification. Based on the management contract, the transaction data associated with the invoicing success notification is forwarded to the tax bureau management terminal. The invoicing success notification is generated by the second node when the object's risk status is in the first risk status. The tax bureau management terminal is used to send a status change request to the second node when it determines that the object's risk status is a second risk status, which is different from the first risk status, based on the transaction data and the object information of the business object. The status change request is used to instruct the second node to change the object's risk status from the first risk status to the second risk status. The second risk status is used to indicate that the second node's invoicing has failed.
[0014] The invoice transaction sending module includes:
[0015] The invoice request acquisition unit is used to acquire the business invoice request of the business object; the business invoice request includes information to be signed and object signature information; the object signature information is obtained by signing the information to be signed based on the object private key of the business object; the information to be signed includes the invoice information determined by the business object;
[0016] The signature verification unit is used to obtain the public key of the business object from the blockchain ledger, verify the signature information of the object based on the public key, and obtain the signature verification result.
[0017] The parameter verification unit is used to perform parameter verification on the ticket information in the signature information if the verification result indicates that the verification is successful, and obtain the parameter verification result.
[0018] The invoice transaction sending unit is used to send the invoice transaction corresponding to the business invoice request to the second node in the blockchain network if the parameter verification result indicates that the verification is successful.
[0019] The parameter verification unit includes:
[0020] The registration information acquisition subunit is used to retrieve the object registration information of the business object from the blockchain ledger if the signature verification result indicates successful verification.
[0021] The information comparison subunit is used to compare the object registration information and the invoice information to obtain the comparison result;
[0022] The successful verification result generation subunit is used to generate a parameter verification result indicating successful verification if the comparison result indicates that the registration information of the object matches the invoice information.
[0023] The parameter verification unit also includes:
[0024] The verification failure result generation subunit is used to generate a parameter verification result indicating verification failure if the comparison result indicates that the registration information of the object is inconsistent with the ticket information, and to generate a first prompt message to instruct the business object to modify the information.
[0025] The prompt message sending subunit is used to send the first prompt message to the object terminal corresponding to the business object, so that the object terminal returns the modified ticket information.
[0026] The invoice transaction sending unit includes:
[0027] The invoice transaction generation subunit is used to execute a transaction for the business object based on the business invoice request if the parameter verification result indicates that the verification is successful, and to generate an invoice transaction based on the transaction execution result of the transaction.
[0028] The encryption processing subunit is used to obtain the node public key of the second node in the blockchain network from the blockchain ledger, and to encrypt the invoicing transaction based on the node public key to obtain encrypted transaction data.
[0029] The encrypted data sending subunit is used to send the encrypted transaction data to the second node, so that the second node can decrypt the encrypted transaction data based on the second node's private key to obtain the invoice transaction.
[0030] The device also includes:
[0031] The first generation module is used to generate a second prompt message to instruct the business object to adjust the data volume if the invoicing result notification is an invoicing failure notification and the invoicing failure notification indicates that the cumulative invoicing data volume of the business object within the invoicing statistical period has reached the data volume threshold.
[0032] The first sending module is used to send the invoicing failure notification and the second prompt information to the object terminal corresponding to the business object, so that the object terminal generates a data volume adjustment request based on the second prompt information.
[0033] The data volume adjustment request receiving module is used to receive data volume adjustment requests returned by the target terminal and send the data volume adjustment requests to the tax bureau management terminal so that the tax bureau management terminal can adjust the data volume threshold of the business object.
[0034] The device also includes:
[0035] The second generation module is used to generate a third prompt message to instruct the business object to file a risk appeal if the invoicing result notification is an invoicing failure notification and the invoicing failure notification indicates that the business object has an abnormal risk.
[0036] The second sending module is used to send the invoicing failure notification and the third prompt information to the target terminal corresponding to the business object, so that the target terminal can make a risk appeal based on the third prompt information.
[0037] The device also includes:
[0038] The change information acquisition module is used to acquire status change notification information sent by the second node; the status change notification information is generated by the second node when the object's risk status changes from the first risk status to the second risk status;
[0039] The contact information acquisition module is used to obtain related objects that are associated with the business object from the blockchain ledger, and to obtain the contact information of the related objects;
[0040] The change information sending module is used to send status change notification information to the associated terminal corresponding to the associated object based on contact information.
[0041] One embodiment of this application provides a data processing apparatus, including:
[0042] The invoice transaction acquisition module is used to acquire invoice transactions sent by the first node in the blockchain network; the invoice transaction is generated by the first node based on the business invoice request of the business object;
[0043] The risk status acquisition module is used to obtain the object risk status of the business object from the blockchain ledger of the blockchain network, and generate an invoicing result notification to be returned to the first node based on the object risk status. When the invoicing result notification is an invoicing success notification, the first node forwards the transaction data associated with the invoicing success notification to the tax bureau management terminal based on the management contract deployed on the first node. When the tax bureau management terminal determines that the object risk status is a second risk status different from the first risk status based on the transaction data and the object information of the business object, it generates a status change request.
[0044] The risk status change module is used to receive status change requests sent by the tax bureau management terminal and change the risk status of the object from the first risk status to the second risk status in the blockchain ledger; the second risk status is used to indicate that the second node failed to issue an invoice.
[0045] The blockchain ledger includes information registration blocks;
[0046] The device also includes:
[0047] The registration request acquisition module is used to acquire object information registration requests sent by the tax bureau management terminal; the object information registration request carries the object registration information of the business object;
[0048] The registration information packaging module is used to package the registration information of objects to obtain the unverified blocks to be written into the blockchain ledger;
[0049] The block broadcasting module is used to broadcast the block to be verified to the third node in the blockchain network, so that the third node can reach a consensus on the block to be verified and obtain a consensus result to be returned to the second node.
[0050] The information registration block writing module is used to determine that the blockchain nodes in the blockchain network have reached a consensus if there is a consensus result in the consensus result that exceeds the consensus threshold, indicating that the consensus is successful. Then, the unverified block is written into the blockchain ledger as an information registration block.
[0051] The risk status acquisition module includes:
[0052] The risk status acquisition unit is used to call the bill contract deployed on the second node, and based on the bill contract, obtain the object risk status of the business object from the blockchain ledger of the blockchain network;
[0053] The success notification generation unit is used to generate an invoice success notification when the invoice transaction is successfully written into the blockchain ledger if the object's risk status is the first risk status.
[0054] The failure notification generation unit is used to generate an invoicing failure notification if the risk status of the object is the second risk status.
[0055] The result notification determination unit is used to use the invoice issuance success notification or invoice issuance failure notification as the invoice issuance result notification to be returned to the first node.
[0056] The risk status change module includes:
[0057] The status change request receiving unit is used to receive status change requests sent by the tax administration terminal and generate status change transactions associated with business objects based on the status change requests.
[0058] The initial tree determination unit is used to obtain the initial block with the largest generation timestamp from the blockchain ledger and determine the initial state tree in the initial block; the object risk state of the business object in the initial state tree is the first risk state;
[0059] The target tree determination unit is used to change the first risk state in the initial state tree to the second risk state, determine the changed initial state tree as the target state tree, and determine the state snapshot corresponding to the target state tree.
[0060] The block hash value determination unit is used to determine the transaction hash value of the state change transaction and determine the block hash value of the target block to be generated based on the transaction hash value.
[0061] The target block generation unit is used to package the block hash value of the initial block, the state snapshot corresponding to the target state tree, and the block hash value of the target block to obtain the target block;
[0062] The target block writing unit is used to make the target block the next block after the initial block when the blockchain nodes in the blockchain network reach a consensus on the target block; the generation timestamp in the target block is used to update the maximum generation timestamp on the blockchain ledger.
[0063] One embodiment of this application provides a computer device, including: a processor and a memory;
[0064] The processor is connected to a memory, which stores a computer program. When the computer program is executed by the processor, it causes the computer device to perform the method provided in the embodiments of this application.
[0065] One aspect of this application provides a computer-readable storage medium storing a computer program adapted to be loaded and executed by a processor, so that a computer device having the processor performs the method provided in this application.
[0066] One aspect of this application provides a computer program product, which includes a computer program stored in a computer-readable storage medium; a processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the method described in this application.
[0067] In this embodiment, the first node in the blockchain network can receive the invoicing result notification returned by the second node in the blockchain network. When the invoicing result notification is a successful invoicing notification, the transaction data associated with the successful invoicing notification can be sent to the tax bureau management terminal in real time based on the locally deployed management contract. Once the tax bureau management terminal detects that the object risk status of the business object needs to be changed, it can send a status change request to the second node so that the second node can update the object risk status of the business object to the second risk status in real time on the blockchain ledger. Since the second risk status is used to indicate invoicing failure, this means that when the business object has a subsequent invoicing requirement, the second node can quickly intercept the new invoicing requirement based on the object risk status (i.e., the second risk status) of the business object stored in the blockchain ledger, thereby improving the real-time performance of risk control. Attached Figure Description
[0068] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0069] Figure 1 This is a schematic diagram of the structure of a blockchain node system provided in an embodiment of this application;
[0070] Figure 2 This is a schematic diagram of a data interaction scenario provided in an embodiment of this application;
[0071] Figure 3 This is a flowchart illustrating a data processing method provided in an embodiment of this application;
[0072] Figure 4 This is a schematic diagram illustrating a scenario where object registration information is uploaded to the blockchain, as provided in an embodiment of this application.
[0073] Figure 5 This is a schematic diagram illustrating a scenario for verifying information in a business invoicing request, provided in an embodiment of this application.
[0074] Figure 6 This is a flowchart illustrating a data processing method provided in an embodiment of this application;
[0075] Figure 7 This is a schematic diagram of an architecture for implementing real-time risk control of blockchain electronic invoices, provided in an embodiment of this application.
[0076] Figure 8 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0077] Figure 9 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0078] Figure 10 This is a schematic diagram of a computer device provided in an embodiment of this application;
[0079] Figure 11 This is a schematic diagram of the structure of a data processing system provided in an embodiment of this application. Detailed Implementation
[0080] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0081] It should be understood that this application proposes a real-time risk control scheme for invoices based on blockchain. Here, blockchain can be a series of interconnected text records (also known as blocks) that are cryptographically linked and protected. This includes a series of blocks sequentially generated in chronological order. Once a new block is added to the blockchain, it will not be removed. Each block may include the cryptographic hash of the previous block (i.e., the parent block hash value), a timestamp, and transaction data (usually represented by a hash value calculated using a Merkle tree algorithm). This design makes the block content difficult to tamper with. A distributed ledger linked by blockchain technology allows two parties to effectively record transactions and permanently verify them. In this application, the blockchain used to store business transactions (e.g., information registration transactions, invoicing transactions, status change transactions, etc.) associated with business objects (e.g., enterprise objects, individual objects, etc.) can be referred to as a blockchain ledger.
[0082] A smart contract is an application or program that runs on a blockchain node. Typically, it is a set of digital protocols with specific rules that can be enforced. These rules are predefined by computer source code, which is copied and executed by all network nodes. In this application, the smart contract deployed on a consensus node in the blockchain network and used to execute a smart contract associated with a blockchain electronic ticket can be called a ticket contract, while the smart contract deployed locally on a light blockchain node can be called a management contract.
[0083] Please see Figure 1 , Figure 1 This is a schematic diagram of the structure of a blockchain node system provided in an embodiment of this application. For example... Figure 1 As shown, the blockchain node system in this application embodiment (e.g., Figure 1 The blockchain node system 1X shown can be a distributed system formed by multiple blockchain nodes connected through network communication. The blockchain network corresponding to this blockchain system 1X is a peer-to-peer (P2P) network, which is a distributed application architecture that distributes tasks and workloads among users. It is a network form of peer-to-peer computing model at the application layer. This blockchain node system can include, but is not limited to, blockchain systems corresponding to consortium blockchains. A consortium blockchain is a form of blockchain. Compared to public blockchains where data is publicly available and nodes can freely join and leave, consortium blockchains restrict participation to members within the consortium. Read / write permissions and participation in accounting are determined according to consortium rules. That is, consortium members can have relevant permissions to access data, and nodes need permission to join the network. This makes it more suitable for regulation and faster transaction speeds, and it allows for the establishment of multiple independent ledgers.
[0084] in, Figure 1The blockchain system 1X shown may include multiple blockchain nodes, specifically nodes 10A, 10B, 10C, ..., 10N. These blockchain nodes in system 1X can be any type of computer device connected to the blockchain network. For example, they can be terminal devices or servers connected to the blockchain network; the specific form of the blockchain node is not limited. Terminal devices connected to the blockchain network can include smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, in-vehicle terminals, smart TVs, and other smart terminals with data processing capabilities. Servers connected to the blockchain network can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing cloud computing services.
[0085] in, Figure 1 The blockchain nodes in the illustrated blockchain network primarily have the following functions: wallet, blockchain database, and network routing. Each node possesses routing capabilities, but not all other functions are necessarily present. Generally, consensus nodes in a blockchain network (e.g., ...) Figure 1 The node 10B shown will include four functions. Such a consensus node can participate in verifying and broadcasting transaction data and block information, and will discover and maintain connections with other nodes. This consensus node will contain the complete blockchain database, including all transaction data; such a node containing all functions is also called a Full Node. Other nodes do not need to synchronize massive amounts of block data, but rather synchronize a portion of the blockchain database. For example, these nodes can synchronize block header data and transaction data associated with their own node, without needing to synchronize block bodies and state data. They will complete transaction verification through "Simplified Payment Verification (SPV)." Such nodes can be called Lightweight Nodes or SPV nodes.
[0086] For ease of understanding, this embodiment of the application can select a blockchain node (e.g., node 10A) as the first node in the blockchain network. This first node can have the authority to process invoices for business objects in a certain region (e.g., district, city, province), and can locally deploy a smart contract (i.e., management contract) associated with the blockchain electronic invoice. This first node can be a light node or a full node in the blockchain network; the node type is not limited here. Of course, to reduce the waste of storage space for the first node, this embodiment can use a light node as an example. This first node can synchronize block header data in the blockchain ledger and obtain the required block header data and partially authorized visible block data (e.g., transaction data associated with the first node itself) through data interaction with full nodes (e.g., the second node) in the blockchain network. The second node can deploy a smart contract (i.e., invoice contract) associated with the blockchain electronic invoice.
[0087] like Figure 1 As shown, node 10A can be connected to... Figure 1 The terminal devices in the terminal device cluster 1Y shown are connected to a network so that each terminal device can interact with node 10A via this network connection. The network connection method is not limited; it can be a direct or indirect connection via wired communication, a direct or indirect connection via wireless communication, or other methods. This application does not impose any restrictions on this method. Figure 1 As shown, the terminal device cluster 1Y can include multiple terminal devices, which can specifically include terminal device 100a, terminal device 100b, terminal device 100c, ..., terminal device 100n.
[0088] Among them, node 10A can also be connected with Figure 1 The tax bureau management terminal 1000G shown has a network connection, enabling it to perform real-time statistics on the cumulative invoicing data of each terminal device's corresponding business object based on invoicing statistics services, thereby monitoring the risk status of each business object. Furthermore, the tax bureau management terminal 1000G can also connect to… Figure 1The second node in the blockchain network shown (i.e., any consensus node in the blockchain network, for example, node 10B) has a network connection so that when the tax administration terminal 1000G detects a risk in a certain business object (e.g., an enterprise object), it sends a state change request to node 10B, so that node 10B changes the risk status of this risky business object from a first risk status (e.g., "risk-free status") to a second risk status (e.g., "risky status"). The risk status of the business object can be stored in... Figure 1 In the blockchain ledger of the blockchain network shown, since the second risk state can be used to indicate that node 10B has failed to issue an invoice, this means that once the risk state of a business object on the blockchain ledger is the second risk state, when the business object has a new business invoicing requirement, node 10B will intercept the invoicing transaction corresponding to this new business invoicing requirement, thereby causing the business object to fail to issue an invoice, thus improving the real-time performance of risk control.
[0089] For better understanding, please refer to [link / reference]. Figure 2 , Figure 2 This is a schematic diagram illustrating a data interaction scenario provided in an embodiment of this application. For example... Figure 2 As shown, node 20A in this embodiment can be a blockchain light node with a management contract deployed, and node 20A can be the aforementioned Figure 1 The corresponding node 10A in the embodiment; the node 20B in this application embodiment can be a consensus node with a bill contract deployed, and the node 20B can be the aforementioned Figure 1 The corresponding node 20B in the embodiment; the object terminal 200Z in this application embodiment can be a terminal device used by a business object (e.g., an enterprise object), and the object terminal 200Z can be the aforementioned Figure 1 The corresponding embodiment can be any one of the terminal devices in the terminal device cluster, for example, terminal device 100a; the tax bureau management terminal 2000G in this application embodiment can be a computer device with invoicing and statistics service functions, and the tax bureau management terminal 2000G can be the aforementioned Figure 1 The corresponding embodiment is the tax bureau management terminal 1000G.
[0090] It should be understood that Figure 2When a business object, as shown, needs to apply for an electronic invoice based on business requirements (e.g., business procurement), it can perform an invoicing operation on the object terminal 200Z. This allows the object terminal 200Z to respond to the invoicing operation and generate a business invoicing request. The invoicing operation here can refer to a triggering operation for executing the invoicing business, including contact operations such as clicking and long-pressing, as well as contactless operations such as voice and gestures; there are no limitations on this. The business invoicing request can carry invoice information, such as basic information of the reimbursement recipient (buyer's name, address, and contact information), basic information of the invoicing recipient (seller's name, address, and contact information), and basic information related to the business procurement (e.g., unit price, quantity, amount). This invoice information is obtained with user authorization, and the acquisition of this invoice information must comply with the relevant laws, regulations, and standards of the relevant countries and regions.
[0091] Further, the terminal 200Z executes step S21, sending the invoicing request for the service to node 20A. When generating the invoicing transaction corresponding to the invoicing request, node 20A can execute step S22, sending the invoicing transaction to node 20B in the blockchain network, so that node 20B can generate an invoicing result notification based on the object risk status of the service object. Here, the object risk status can be stored in... Figure 2 In the blockchain ledger 2Q, the blockchain ledger 2Q can be the blockchain ledger in the blockchain network where node 20A and node 20B are located.
[0092] Understandably, if node 20B obtains a second-risk status (e.g., "risky status") from the blockchain ledger 2Q, then node 20B can determine that the business object has a security risk. In this case, node 20B can generate an invoice issuance notification (i.e., invoice issuance failure notification) to indicate that the invoice issuance has failed. Optionally, if node 20B obtains a first-risk status (e.g., "risk-free status") from the blockchain ledger 2Q, then node 20B can determine that the business object does not have a security risk. In this case, node 20B can verify the invoice transaction, and upon successful verification, generate an invoice issuance notification (i.e., invoice issuance success notification) to indicate that the invoice issuance has succeeded. This verification may include the legality verification of node 20A (e.g., whether it is an illegal node) and the legality verification of the invoice information (e.g., signature verification, parameter verification, etc.).
[0093] Further, node 20B can execute step S23, returning the generated invoicing result notification to node 20A. If the invoicing result notification received by node 20A is an invoicing success notification, then node 20A can execute step S24, based on the management contract deployed locally on node 20A, to... Figure 2 The tax management terminal 2000G shown sends transaction data associated with the successful invoicing notification. At this time, the tax management terminal 2000G can execute step S25, determining the object risk status of the business object based on the received transaction data and the object information of the business object stored in the tax management terminal 200G. The object information here may include the cumulative invoicing data volume, invoicing frequency, and invoicing credibility of the business object within the invoicing statistical period (e.g., 10 days, one month, half a year, one year, etc.). If the tax management terminal 2000G determines that the object risk status of the business object is a second risk status different from the first risk status, then the tax management terminal 2000G can execute step S26 in real time, sending a status change request to node 20B. It can be understood that when node 20B receives the status change request associated with the business object, node 20B can execute step S27, changing the object risk status of the business object from the original first risk status to the second risk status based on the blockchain ledger 2Q.
[0094] Therefore, in this embodiment, when node 20A (i.e., the first node) receives the invoice success notification, it can send the transaction data associated with the invoice success notification to the tax management terminal 2000G in real time based on the locally deployed management contract, so that the tax management terminal 2000G can reconfirm the object risk status of the business object. Once the tax management terminal 2000G detects that the object risk status of the business object needs to be changed, it can send a status change request to node 20B, so that node 20B can update the object risk status of the business object in real time on the blockchain ledger 2Q. This can effectively intercept subsequent business invoice requests for the business object, thereby improving the real-time performance of risk control, enabling risk managers to take various measures and methods in a very timely manner to eliminate or reduce the possibility of risk events, or reduce the losses caused by risk events.
[0095] In this embodiment, the real-time risk control of blockchain electronic invoices is achieved through data interaction between the tax bureau management terminal, the first node (i.e., the blockchain light node with the management contract deployed), and the second node (i.e., the consensus node with the invoice contract deployed) in the blockchain network. The specific implementation method can be found below. Figures 3-7 The corresponding implementation examples.
[0096] Further, please see Figure 3 , Figure 3This is a flowchart illustrating a data processing method provided in an embodiment of this application. Figure 3 As shown, this method can be executed by a first node in the blockchain network. The first node can have the authority to process invoices for business objects in a specific region (e.g., district, city, province), and this first node can locally deploy a smart contract (i.e., a management contract) associated with the blockchain electronic invoice. The first node can be the aforementioned... Figure 1 For example, node 10A, a light node in the blockchain network shown, the method may include at least the following steps S101-S102:
[0097] Step S101: When a business invoicing request for a business object is obtained, the invoicing transaction corresponding to the business invoicing request is sent to the second node in the blockchain network, so that the second node generates an invoicing result notification to be returned to the first node based on the object risk status of the business object.
[0098] The risk status of an object can be stored in the blockchain ledger of the blockchain network. Specifically, when a business object needs to apply for a blockchain electronic invoice based on business requirements, it can use an object terminal to perform an invoicing operation (e.g., a triggering operation for inputting invoice information). When responding to this invoicing operation, the object terminal can generate a business invoicing request for the business object, and then send the business invoicing request to the first node in the blockchain network, so that the first node can verify the information of the business invoicing request (including signature verification, parameter verification, etc.). The business invoicing request can include information to be signed and object signature information. The object signature information is obtained by the object terminal after signing the information to be signed based on the business object's object private key. The information to be signed can include the invoice information determined by the business object. Further, the first node can obtain the object public key corresponding to the business object from the blockchain ledger, and then verify the object signature information based on the object public key to obtain the verification result. If the verification result indicates verification failure, the first node can directly generate a prompt message indicating invoicing failure and then return the prompt message to the object terminal. Optionally, if the signature verification result indicates successful verification, the first node needs to further verify the parameters of the invoice information in the information to be signed to obtain the parameter verification result. If the parameter verification result indicates successful verification, the first node can generate the invoicing transaction corresponding to the business invoicing request and then send the invoicing transaction to the second node in the blockchain network. The second node then generates an invoicing result notification to be returned to the first node based on the object risk status of the business object. Optionally, if the parameter verification result indicates failed verification, the first node does not need to generate the invoicing transaction corresponding to the business invoicing request, nor does it need to interact with the second node in the blockchain network.
[0099] In this context, it can be understood that the blockchain ledger of a blockchain network may include information registration blocks, which can be used to store object registration information of business objects. For example, when a tax authority management terminal obtains the object registration information of a business object, it can generate an object information registration request and then send this request to a second node in the blockchain network. This object registration information is obtained after authorization by the business object, and the acquisition of object registration information must comply with the relevant laws, regulations, and standards of the relevant countries and regions. When the second node verifies that the object information registration request is legitimate, it can package the object registration information of the business object, thereby obtaining a block to be verified and written into the blockchain ledger. Furthermore, the second node can broadcast the block to be verified to a third node (other consensus nodes besides the second node) in the blockchain network, so that the third node can reach a consensus on the obtained block and obtain a consensus result to be returned to the second node. If a consensus result exceeding the consensus threshold indicates successful consensus, the second node can determine that the blockchain nodes in the blockchain network have reached a consensus and write the block to be verified as an information registration block into the blockchain ledger.
[0100] For better understanding, please refer to [link / reference]. Figure 4 , Figure 4 This is a schematic diagram illustrating a scenario where object registration information is uploaded to the blockchain, as provided in an embodiment of this application. For example... Figure 4 As shown, the tax bureau management terminal 4000G in this embodiment can be a terminal device with object registration management services, and the tax bureau management terminal 4000G can be the aforementioned Figure 1 The corresponding embodiment uses the tax bureau management terminal 1000G. In this application embodiment, node 40B (i.e., the second node) can be any consensus node in the blockchain network; for example, node 40B can be one of the aforementioned... Figure 1 The corresponding node 10B in the embodiment. Figure 4 Each consensus node 410g and node 40B in the consensus network shown belongs to the same blockchain network.
[0101] in, Figure 4 The blockchain ledger 4Q shown is a shared blockchain among all consensus nodes in the blockchain network to which node 40B belongs. Each consensus node can access the information stored in each block of blockchain ledger 4Q. This blockchain ledger 4Q includes blocks 40a, 40b, ..., 40n, and an information registration block. Block 40a can be considered the genesis block of blockchain ledger 4Q. The information registration block in blockchain ledger 4Q contains the object registration information of the business objects.
[0102] It is understandable that when the tax bureau management terminal 4000G obtains the object registration information (e.g., contact information, address, size, area, registered assets, business operations, and partner companies) of a business object (e.g., enterprise A), it can generate... Figure 4 The object information registration request 40q shown can be sent to node 40B. Node 40B can generate a business transaction (i.e., an information registration transaction) to write the object registration information into the blockchain ledger 4Q based on the object registration information carried in the object information registration request 40q. Further, node 40B can obtain the block 40n with the largest generation timestamp from the blockchain ledger 4Q, and then package the information registration transaction to obtain a block to be verified and written into the blockchain ledger 4Q. At this point, node 40B can broadcast the block to be verified to other consensus nodes on the blockchain network (e.g., consensus node 410g) so that consensus node 410g can reach a consensus on the obtained block to be verified and obtain a consensus result.
[0103] If the consensus results returned by consensus node 410g exceed the consensus threshold (e.g., 1 / 2), indicating successful consensus, then node 40B can determine that the blockchain nodes in the blockchain network have reached a consensus. It can then write the block to be verified as an information registration block into the aforementioned blockchain ledger 4Q, making it the next block after block 40n. The maximum generation timestamp of this information registration block is used to update the maximum generation timestamp on the blockchain ledger 4Q. Due to the immutability of the blockchain ledger 4Q, this effectively improves the security of object registration information storage.
[0104] It should be understood that when the first node verifies information (including signature verification, parameter verification, etc.) in a business invoicing request, it can first verify the object signature information in the business invoicing request. After the signature verification result indicates success, it can then verify the invoice information in the pending signature information carried in the business invoicing request. For example, when the signature verification result obtained by the first node indicates successful verification, the first node can obtain the object registration information of the business object from the blockchain ledger. For example, since the first node is a light node in the blockchain network, the blockchain ledger stored locally by the first node does not contain the complete blockchain database. Therefore, the first node can send a registration information retrieval request to the second node in the blockchain network in real time, so that the second node can obtain the complete blockchain ledger (e.g., ...). Figure 4The system queries the object registration information of the business object in the information registration block shown, and then returns the object registration information to the first node. Optionally, to improve verification efficiency, the first node can also synchronize the object registration information of the business object to the local database in advance, so that the first node can obtain the object registration information more quickly when performing parameter verification.
[0105] Furthermore, the first node can compare the acquired object registration information and invoice information to obtain a comparison result. If the comparison result indicates that the object registration information and invoice information are inconsistent, the first node can generate a parameter verification result to indicate verification failure, and generate a first prompt message to instruct the business object to modify the information. This first prompt message can then be sent to the corresponding object terminal, causing the object terminal to return the modified invoice information. For example, the first prompt message could be a text message such as "The invoice information you submitted is incorrect. Please go to xxx website to modify it."
[0106] Optionally, if the comparison result indicates that the registration information of the object is consistent with the invoice information, the first node can generate a parameter verification result to indicate that the verification is successful, and then execute a transaction business for the business object based on the business invoicing request, and generate an invoicing transaction according to the transaction execution result of the transaction business.
[0107] For better understanding, please refer to [link / reference]. Figure 5 , Figure 5 This is a schematic diagram illustrating a scenario for verifying information in a business invoicing request, provided in an embodiment of this application. For example... Figure 5 As shown, in this embodiment of the application, the object terminal 500Z can be an object terminal used by a business object, and the object terminal 500Z can be the one described above. Figure 1 Any terminal device in the terminal device cluster in the corresponding embodiment, for example, terminal device 100a. Node 50A (i.e., the first node) in this application embodiment can be a light node in the blockchain network; for example, node 50A can be one of the aforementioned... Figure 1 Node 10A in the corresponding embodiment.
[0108] like Figure 5 As shown, when the terminal 500Z responds to the invoicing operation of the business object, it can obtain the invoice information input by the business object, and then determine the invoice based on the invoice information. Figure 5The information to be signed is shown as 51k. At this time, the object terminal 500Z can perform signature processing on the information to be signed 51k based on the object private key of the business object, obtaining the object signature information 52k corresponding to the information to be signed 51k. It can be understood that the object terminal 500Z can obtain the hash calculation rule for the information to be signed 51k, which can be a digest algorithm pre-agreed between the object terminal 500Z and other blockchain nodes in the blockchain network (e.g., node 50A). Therefore, the object terminal 500Z can perform hash calculation on the information to be signed 51k based on the hash calculation rule to obtain the digest information (e.g., digest information h) of the information to be signed 51k. In this embodiment, the digest information h of the information to be signed 51k determined by the object terminal 500Z can be referred to as the first digest information. Further, the object terminal 500Z can perform signature processing on the first digest information based on the object private key of the business object, thereby obtaining... Figure 5 The object signature information shown is 52k.
[0109] Furthermore, the object terminal 500Z can generate, based on the information to be signed 51k and the object signature information 52k, Figure 5 The business invoicing request 50q shown can be sent to node 50A, so that node 50A can verify the object signature information 52k based on the object public key corresponding to the object private key (i.e., the object public key of the business object) and obtain the verification result. It can be understood that node 50A can obtain the object public key of the business object from the blockchain ledger in the blockchain network, and then verify the object signature information 52k based on the object public key to obtain the first digest information of the information to be signed 51k. Simultaneously, node 50A can also obtain the same hash calculation rule as object terminal 500Z and perform hash calculation on the information to be signed 51k to obtain the digest information (e.g., digest information H) of the information to be signed 51k determined by node 50A. In this embodiment, the digest information H of the information to be signed 51k determined by node 50A can be referred to as the second digest information.
[0110] At this point, node 50A can compare the first digest information with the second digest information to obtain the signature verification result, thereby determining whether the information to be signed 51k has been tampered with. Understandably, if the first digest information and the second digest information are different, node 50A can determine that the signature verification result indicates verification failure. In this case, node 50A can determine that the target terminal 500Z is an illegal terminal and identify the received business invoicing request 50q as an illegal request. Then, node 50A can directly generate a prompt message indicating invoicing failure and return this prompt message to the target terminal 500Z.
[0111] Optionally, if the first digest information is the same as the second digest information, then node 50A can determine that the signature verification result indicates successful verification. This means that the information to be signed 51k has not been tampered with, and the information to be signed 51k was indeed sent by the object terminal 500Z. At this time, node 50A can determine that the object terminal 500Z is a legitimate terminal, and determine that the received business invoicing request 50q is a legitimate request. It is understandable that when node 50A determines that the signature verification result indicates successful verification, node 50A can further perform parameter verification on the invoice information in the information to be signed 51k to obtain the parameter verification result. Here, parameter verification can include verifying the accuracy of the invoice information. For example, node 50A can obtain the object registration information of the business object from the blockchain ledger (e.g., Figure 5 The object registration information 5x shown can be compared with the invoice information to obtain the comparison result.
[0112] If the comparison result indicates that the invoice information is inconsistent with the object registration information 5x, then node 50A can generate a parameter verification result to indicate verification failure (i.e., verification failure result), and further generate a prompt message to instruct the business object to modify the information (e.g., Figure 5 The indicated prompt information 50T is used to prompt the target terminal 500Z to return the modified invoice information. The format of this prompt information may include audio, text, video, etc., and is not limited here. Optionally, if the comparison result indicates that the invoice information matches the target registration information 5x, then node 50A can execute a transaction (e.g., invoicing) for the business target based on the business invoicing request 50q, and then generate an invoicing transaction 50J for forwarding to the second node in the blockchain network based on the transaction execution result.
[0113] Furthermore, to effectively ensure the security of data transmission between the first and second nodes for invoicing transactions, the first node can obtain the public key of the second node in the blockchain network from the blockchain ledger. Based on this public key, the first node encrypts the invoicing transaction to obtain encrypted transaction data. This encrypted data is then sent to the second node, which decrypts it using its private key to obtain the invoicing transaction. It is understood that upon receiving the invoicing transaction, the second node can invoke the bill contract deployed on the second node to verify the transaction. This verification may include transaction format verification, invoicing field verification, signature verification based on the public key of the business object, and parameter verification (e.g., comparison between bill information and the business object's registration information). The specific implementation method for the second node's verification of the invoicing transaction can be found in the detailed implementation method described above for the first node's verification of business invoicing requests, which will not be elaborated upon further.
[0114] Upon successful verification of the invoice transaction by the second node, the second node can further obtain the object risk status of the business object from the blockchain ledger of the blockchain network based on the invoice contract. For example, the second node can obtain the block with the largest generation timestamp from the blockchain ledger of the blockchain network, and then obtain the object risk status of the business object from the state tree of the obtained block.
[0115] If the object's risk status is at the first risk level, the second node can package the invoicing transaction and upload it to the blockchain. Upon successfully writing the invoicing transaction to the blockchain ledger, the second node can generate an invoicing success notification. Optionally, if the object's risk status is at the second risk level, the second node can directly generate an invoicing failure notification. Furthermore, the second node can use the invoicing success notification or the invoicing failure notification as the invoicing result notification to be returned to the first node.
[0116] Step S102: If the invoicing result notification is an invoicing success notification, the management contract deployed on the first node is triggered. Based on the management contract, the transaction data associated with the invoicing success notification is forwarded to the tax bureau management terminal.
[0117] The invoice issuance success notification is generated by the second node when the object's risk status is at the first risk level. Specifically, when the first node receives the invoice issuance result notification returned by the second node, it can directly forward the notification to the object's terminal. If the second node returns an invoice issuance success notification, the first node can trigger the management contract deployed on it, and then, based on this contract, forward the transaction data associated with the invoice issuance success notification to the tax bureau's management terminal. At this time, the tax bureau's management terminal can determine the cumulative invoice data volume of the business object within the invoice statistics period based on the invoice statistics service, and then, based on this cumulative invoice data volume and the business object's information (e.g., whether it has been added to the illegal invoice list), determine the business object's risk status. Here, the illegal invoice list refers to the blacklist generated by the tax bureau's management terminal. Illegal objects in this list can be business objects with a sudden abnormal increase in invoice frequency (e.g., business objects with an abnormally increased invoice frequency), business objects reported by others, or business objects that have failed in business operations (e.g., bankrupt entities), etc., which will not be listed here. When the tax authority's management terminal detects that the risk status of a business object associated with transaction data is a second risk status, different from the first risk status, the terminal can generate a status change request to send to the second node. Furthermore, upon receiving the status change request, the second node can change the object's risk status from the first to the second risk status, where the second risk status indicates that the second node's invoicing has failed.
[0118] In this context, it can be understood that upon receiving a status change request from the tax administration terminal, the second node can generate a status change transaction associated with the business object based on the request. Further, the second node can retrieve the initial block with the largest generation timestamp from the blockchain ledger and determine the initial state tree within that initial block. Here, the object risk state of the business object in the initial state tree is the first risk state. Further, the second node can change the first risk state in the initial state tree to the second risk state and determine the changed initial state tree as the target state tree, thereby determining the corresponding state snapshot. Simultaneously, the second node can also determine the transaction hash value of the status change transaction, and then determine the block hash value of the target block to be generated based on the transaction hash value. Then, the second node can package the block hash value of the initial block, the state snapshot corresponding to the target state tree, and the block hash value of the target block to obtain the target block. When blockchain nodes in a blockchain network reach a consensus on a target block, the second node can write the target block as the next block after the initial block into the blockchain ledger. Here, the generation timestamp in the target block can be used to update the maximum generation timestamp on the blockchain ledger.
[0119] In this embodiment, the first node in the blockchain network can receive the invoicing result notification returned by the second node in the blockchain network. When the invoicing result notification is a successful invoicing notification, the transaction data associated with the successful invoicing notification can be sent to the tax bureau management terminal in real time based on the locally deployed management contract. Once the tax bureau management terminal detects that the object risk status of the business object needs to be changed, it can send a status change request to the second node so that the second node can update the object risk status of the business object to the second risk status in real time on the blockchain ledger. Since the second risk status is used to indicate invoicing failure, this means that when the business object has a subsequent invoicing requirement, the second node can quickly intercept the new invoicing requirement based on the object risk status (i.e., the second risk status) of the business object stored in the blockchain ledger, thereby improving the real-time performance of risk control.
[0120] Further, please see Figure 6 , Figure 6 This is a flowchart illustrating a data processing method provided in an embodiment of this application. Figure 6 As shown, this method can be interactively executed by the object terminal corresponding to the business object, the tax bureau management terminal providing invoicing and statistics services, the first node in the blockchain network, and the second node in the blockchain network. The object terminal can be one of the aforementioned... Figure 1 Any terminal device in the terminal device cluster shown, for example, terminal device 100a. This tax administration terminal can be any of the aforementioned... Figure 1The tax bureau management terminal 1000G shown can be the first node described above. Figure 1 The node 10A shown can be the second node as described above. Figure 1 The node 10B is shown. This method may include at least the following steps S201-S214:
[0121] Step S201: The target terminal sends a business invoicing request to the first node in the blockchain network.
[0122] Step S202: The first node performs information verification based on the business invoicing request.
[0123] Step S203: When the verification is successful, the first node sends the invoicing transaction corresponding to the business invoicing request to the second node in the blockchain network.
[0124] In step S204, the second node obtains the object risk status of the business object from the blockchain ledger of the blockchain network based on the bill contract, and generates an invoice issuance result notification based on the object risk status.
[0125] The invoice issuance result notification can be either an invoice issuance failure notification or an invoice issuance success notification. The invoice issuance success notification is generated by the second node when the object's risk status is in the first risk status, while the invoice issuance failure notification is generated by the second node when the object's risk status is in the second risk status or when the invoice transaction verification fails. It is understood that when the invoice issuance result notification generated by the second node is an invoice issuance failure notification, the second node can execute the following steps S205-S206:
[0126] In step S205, the second node sends an invoice issuance failure notification to the first node.
[0127] Step S206: The first node forwards the invoicing failure notification to the target terminal.
[0128] It is understandable that while forwarding the invoicing failure notification sent by the second node to the target terminal, the first node can also generate target prompt information (e.g., second prompt information, third prompt information) to be sent to the target terminal based on the reason for invoicing failure indicated in the invoicing failure notification, so that the business object corresponding to the target terminal can perform corresponding operations based on the target prompt information, thereby improving the user experience of the object.
[0129] Specifically, if the invoicing result notification is an invoicing failure notification, and the invoicing failure notification indicates that the cumulative invoicing data volume of the business object within the invoicing statistical period has reached a data volume threshold, then the first node can generate a second prompt message to instruct the business object to adjust the data volume. Further, the first node can send the invoicing failure notification and the second prompt message to the object terminal corresponding to the business object, so that the object terminal can generate a data volume adjustment request based on the second prompt message. When the first node receives the data volume adjustment request returned by the object terminal, it can send the data volume adjustment request to the tax bureau management terminal, so that the tax bureau management terminal can adjust the data volume threshold of the business object.
[0130] For example, if the first node receives an invoicing failure notification indicating that the business object's cumulative invoicing data volume within a day has reached a data volume threshold (e.g., 100), the second prompt message generated by the first node could be a text message such as "The current cumulative data volume of this enterprise object has reached the data volume threshold. Please contact the relevant management object or go to xxx website to readjust it." Understandably, the business object can adjust its data volume from the initial data volume threshold (e.g., 100) to the target data volume threshold (e.g., 150) based on the second prompt message output by the object terminal, and input the reason for this data volume threshold adjustment (e.g., enterprise expansion), and then perform a confirmation operation after inputting the information. When responding to the confirmation operation, the object terminal can generate a data volume adjustment request to be returned to the first node based on the target data volume threshold and the adjustment reason. At this time, the first node can forward the data volume adjustment request to the tax bureau management terminal, so that the tax bureau management terminal can adjust the business object's data volume threshold after verifying that the adjustment reason is legitimate.
[0131] If the invoicing result notification is an invoicing failure notification, and the invoicing failure notification indicates that the business object has an abnormal risk, then the first node can generate a third prompt message to instruct the business object to file a risk appeal. Furthermore, the first node can send the invoicing failure notification and the third prompt message to the corresponding object terminal, so that the object terminal can file a risk appeal based on the third prompt message.
[0132] For example, the invoicing failure notification here can indicate that the business entity has abnormal risks such as being reported by others or an increasing frequency of invoicing. In this case, the third prompt information generated by the first node can be a text message such as "This enterprise entity has xx abnormal risks. In order to ensure the normal execution of your invoicing business, please go to the local tax bureau or xxx website to file a risk appeal as soon as possible."
[0133] Optionally, when the invoicing result notification generated by the second node is an invoicing success notification, the second node can jump to execute the following steps S207-S214 after executing step S204:
[0134] In step S207, the second node sends a notification of successful invoicing to the first node.
[0135] In step S208, the first node forwards the invoice issuance success notification to the target terminal.
[0136] Step S209: The first node triggers the management contract deployed on the first node.
[0137] In step S210, the first node sends the transaction data associated with the invoice success notification to the tax authority's management terminal based on the management contract.
[0138] Step S211: The tax bureau management terminal determines the cumulative amount of invoice data for the business objects associated with the transaction data within the invoice statistics period based on the invoice statistics service.
[0139] In step S212, the tax bureau management terminal determines the object risk status of the business object based on the cumulative invoicing data volume and the object information of the business object.
[0140] If the cumulative invoicing data volume of the tax bureau management terminal does not reach the data volume threshold, and the illegal invoicing list stored in the tax bureau management terminal does not contain the object information of the business object, then the tax bureau management terminal can determine that the object risk status of the business object is still the first risk status stored in the current blockchain ledger.
[0141] Optionally, if the cumulative invoicing data volume of the tax authority management terminal reaches the data volume threshold, or if the illegal invoicing list stored in the tax authority management terminal contains the object information of the business object, then the tax authority management terminal can determine that the object risk status of the business object is different from the first risk status stored in the current blockchain ledger, that is, the object risk status of the business object is the second risk status.
[0142] In step S213, when the tax administration terminal detects that the object risk status of a business object is a second risk status that is different from the first risk status, it sends a status change request to the second node.
[0143] Step S214: The second node changes the object risk status of the business object in the blockchain ledger.
[0144] The specific implementation methods for steps S201-S214 can be found above. Figure 3 The descriptions of steps S101-S102 in the corresponding embodiments will not be repeated here.
[0145] Understandably, to effectively reduce the risks associated with related entities (e.g., other businesses that cooperate with the business), the second node can generate a status change notification message associated with the business after executing step S214. This status change notification message could be a text message such as "The XX company you are cooperating with currently poses a risk; please proceed with caution." The second node can then send this status change notification message to the first node.
[0146] Furthermore, the first node can obtain related objects that are associated with the business object from the blockchain ledger, and then obtain the contact information of the related objects. This contact information can be the object registration information of the related objects recorded in the blockchain ledger. It is understood that the related objects and their contact information can be obtained by the first node in advance from the second node and stored in the first node's memory, or it can be sent by the second node along with the status change notification information; this is not limited here. At this time, the first node can send the status change notification information of the business object to the associated terminal corresponding to the related object based on the contact information (e.g., social media account, email, mobile phone number, etc.). It is understood that in the specific embodiments of this application, when the above embodiments of this application are applied to specific products or technologies, the permission or consent of the user (i.e., the related object) is required, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.
[0147] For better understanding, please refer to [link / reference]. Figure 7 , Figure 7 This is a schematic diagram of an architecture for implementing real-time risk control of blockchain electronic invoices, provided in an embodiment of this application. Figure 7 As shown, in this embodiment of the application, node 70A (i.e., the first node in the blockchain network) can be a blockchain light node with a management contract deployed. Node 70A can be the aforementioned... Figure 1 The corresponding node 10A in the embodiment; the node 70B (i.e., the second node in the blockchain network) in this application embodiment can be a consensus node with a bill contract deployed, and the node 70B can be the aforementioned Figure 1 The corresponding node 70B in the embodiment; the tax bureau management terminal 7000G in this application embodiment can be a computer device with invoicing statistics service function and object registration management service function, and the tax bureau management terminal 7000G can be the above-mentioned Figure 1 The corresponding embodiment is the tax bureau management terminal 1000G.
[0148] It should be understood that when node 70A receives a business invoicing request from a business object, it can send the corresponding invoicing transaction to node 70B in the blockchain network. This allows node 70B to obtain the object risk status of the business object from the blockchain ledger based on the invoicing contract, and subsequently generate an invoicing result notification to be returned to node 70A. The invoicing contract of node 70B can support the control of the object risk status of the business object during the invoicing process.
[0149] If node 70B returns an invoicing success notification, node 70A can trigger the management contract deployed locally on node 70A. Based on this management contract, the transaction data associated with the invoicing success notification can then be forwarded to the tax authority management terminal 7000G. This invoicing success notification is generated by node 70B when the business object's risk status is in the first risk state (e.g., "risk-free state").
[0150] Furthermore, when the tax administration terminal 7000G receives transaction data, it can obtain the initial cumulative invoicing data volume of the business object within the invoicing statistics period based on the invoicing statistics service. Then, it can update the cumulative invoicing data volume based on the transaction data to obtain the updated cumulative invoicing data volume. If the updated cumulative invoicing data volume reaches the data volume threshold, or if the business object's object information indicates that the business object belongs to an abnormal object (i.e., a business object in the illegal invoicing list), the tax administration terminal 7000G can determine the business object's object risk status to a second risk status (e.g., "risky status"). At this time, the tax administration terminal 7000G can send a status change request to the second node based on the object registration management service, so that node 70B changes the business object's object risk status from a first risk status to a second risk status.
[0151] In this embodiment, when the first node in the blockchain network receives a successful invoicing notification, it can send the transaction data associated with the successful invoicing notification to the tax bureau management terminal in real time based on a locally deployed management contract. Once the tax bureau management terminal detects that the risk status of the business object needs to be changed, it can send a status change request to the second node. This allows the second node to update the risk status of the business object to the second risk status in the blockchain ledger in real time. Since the second risk status indicates invoicing failure, this means that if the business object subsequently has another invoicing request, the second node can quickly intercept the request based on the risk status (i.e., the second risk status) recorded in the blockchain ledger, thereby improving the real-time performance of risk control. Furthermore, the network architecture in this embodiment is relatively simple and does not require a centralized invoicing agent for risk control judgment, which effectively solves the problem of insufficient decentralization in blockchain.
[0152] Further, please see Figure 8 , Figure 8 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application. The data processing apparatus 1 can be a computer program (including program code) running on a computer device; for example, the data processing apparatus 1 is an application software. The data processing apparatus 1 can be used to execute corresponding steps in the method provided in the embodiments of this application. Figure 8 As shown, the data processing device 1 can run on the first node in the blockchain network. This first node can locally deploy a smart contract (i.e., a management contract) associated with the blockchain electronic invoice. The first node can be the aforementioned... Figure 1 The blockchain light node in the blockchain network shown is, for example, node 10A. The data processing device 1 may include: an invoice transaction sending module 11, a transaction data forwarding module 12, a first generation module 13, a first sending module 14, a data volume adjustment request receiving module 15, a second generation module 16, a second sending module 17, a change information acquisition module 18, a contact information acquisition module 19, and a change information sending module 20.
[0153] The invoicing transaction sending module 11 is used to send the invoicing transaction corresponding to the business invoicing request to the second node in the blockchain network when a business invoicing request is obtained, so that the second node can generate an invoicing result notification to be returned to the first node based on the object risk status of the business object; the object risk status is stored in the blockchain ledger of the blockchain network.
[0154] The invoice transaction sending module 11 includes: an invoice request acquisition unit 111, a signature verification unit 112, a parameter verification unit 113, and an invoice transaction sending unit 114.
[0155] The invoice request acquisition unit 111 is used to acquire the business invoice request of the business object; the business invoice request includes information to be signed and object signature information; the object signature information is obtained by signing the information to be signed based on the object private key of the business object; the information to be signed includes the invoice information determined by the business object;
[0156] The signature verification unit 112 is used to obtain the public key of the business object corresponding to the blockchain ledger, verify the signature information of the object based on the public key, and obtain the signature verification result.
[0157] The parameter verification unit 113 is used to perform parameter verification on the ticket information in the signature information if the verification result indicates successful verification, and obtain the parameter verification result.
[0158] The parameter verification unit 113 includes: a registration information acquisition subunit 1131, an information comparison subunit 1132, a verification success result generation subunit 1133, a verification failure result generation subunit 1134, and a prompt information sending subunit 1135.
[0159] The registration information acquisition subunit 1131 is used to obtain the object registration information of the business object from the blockchain ledger if the signature verification result indicates successful verification.
[0160] The information comparison subunit 1132 is used to compare the object registration information and the invoice information to obtain the comparison result;
[0161] The verification success result generation subunit 1133 is used to generate a parameter verification result to indicate successful verification if the comparison result indicates that the registration information of the object is consistent with the invoice information.
[0162] The verification failure result generation subunit 1134 is used to generate a parameter verification result indicating verification failure if the comparison result indicates that the registration information of the object is inconsistent with the invoice information, and to generate a first prompt message indicating that the business object should modify the information.
[0163] The prompt message sending subunit 1135 is used to send the first prompt message to the object terminal corresponding to the business object, so that the object terminal returns the modified ticket information.
[0164] The specific implementation methods of the registration information acquisition subunit 1131, information comparison subunit 1132, verification success result generation subunit 1133, verification failure result generation subunit 1134, and prompt information sending subunit 1135 can be found above. Figure 3 The description of parameter validation for business invoicing requests in the corresponding embodiments will not be repeated here.
[0165] The invoice transaction sending unit 114 is used to send the invoice transaction corresponding to the business invoice request to the second node in the blockchain network if the parameter verification result indicates that the verification is successful.
[0166] The invoice transaction sending unit 114 includes: an invoice transaction generation subunit 1141, an encryption processing subunit 1142, and an encrypted data sending subunit 1143.
[0167] The invoice transaction generation subunit 1141 is used to execute a transaction business for the business object based on the business invoice request if the parameter verification result indicates that the verification is successful, and generate an invoice transaction based on the transaction execution result of the transaction business.
[0168] The encryption processing subunit 1142 is used to obtain the node public key of the second node in the blockchain network from the blockchain ledger, and to encrypt the invoicing transaction based on the node public key to obtain encrypted transaction data.
[0169] The encrypted data sending subunit 1143 is used to send the encrypted transaction data to the second node, so that the second node can decrypt the encrypted transaction data based on the second node's private key to obtain the invoice transaction.
[0170] The specific implementation methods of the invoice transaction generation subunit 1141, the encryption processing subunit 1142, and the encrypted data transmission subunit 1143 can be found in the above description. Figure 3 The description of data transmission for invoicing transactions in the corresponding embodiments will not be repeated here.
[0171] The specific implementation methods of the invoice request acquisition unit 111, signature verification unit 112, parameter verification unit 113, and invoice transaction sending unit 114 can be found in the above description. Figure 3 The description of step S101 in the corresponding embodiment will not be repeated here.
[0172] The transaction data forwarding module 12 is used to trigger the management contract deployed on the first node if the invoicing result notification is an invoicing success notification. Based on the management contract, the transaction data associated with the invoicing success notification is forwarded to the tax bureau management terminal. The invoicing success notification is generated by the second node when the object risk status is in the first risk status. The tax bureau management terminal is used to send a status change request to the second node when it determines that the object risk status is a second risk status different from the first risk status based on the transaction data and the object information of the business object. The status change request is used to instruct the second node to change the object risk status from the first risk status to the second risk status. The second risk status is used to indicate that the second node failed to issue the invoice.
[0173] The first generation module 13 is used to generate a second prompt message to instruct the business object to adjust the data volume if the invoicing result notification is an invoicing failure notification and the invoicing failure notification indicates that the cumulative invoicing data volume of the business object within the invoicing statistical period has reached the data volume threshold.
[0174] The first sending module 14 is used to send the invoicing failure notification and the second prompt information to the object terminal corresponding to the business object, so that the object terminal generates a data volume adjustment request based on the second prompt information.
[0175] The data volume adjustment request receiving module 15 is used to receive the data volume adjustment request returned by the target terminal and send the data volume adjustment request to the tax bureau management terminal so that the tax bureau management terminal can adjust the data volume threshold of the business object.
[0176] The second generation module 16 is used to generate a third prompt message to instruct the business object to file a risk appeal if the invoicing result notification is an invoicing failure notification and the invoicing failure notification indicates that the business object has an abnormal risk.
[0177] The second sending module 17 is used to send the invoicing failure notification and the third prompt information to the object terminal corresponding to the business object, so that the object terminal can make a risk appeal based on the third prompt information.
[0178] The change information acquisition module 18 is used to acquire the status change prompt information sent by the second node; the status change prompt information is generated by the second node when it changes the object risk status from the first risk status to the second risk status;
[0179] The contact information acquisition module 19 is used to obtain related objects that are associated with the business object from the blockchain ledger, and to obtain the contact information of the related objects;
[0180] The change information sending module 20 is used to send status change notification information to the associated terminal corresponding to the associated object based on contact information.
[0181] The specific implementation methods of the invoice transaction sending module 11, transaction data forwarding module 12, first generation module 13, first sending module 14, data volume adjustment request receiving module 15, second generation module 16, second sending module 17, change information acquisition module 18, contact information acquisition module 19, and change information sending module 20 can be found above. Figure 3 The descriptions of steps S101-S102 in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated.
[0182] Further, please see Figure 9 , Figure 9 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application. The data processing apparatus 2 can be a computer program (including program code) running on a computer device; for example, the data processing apparatus 2 is application software. The data processing apparatus 2 can be used to execute corresponding steps in the method provided in the embodiments of this application. Figure 9 As shown, the data processing device 2 can operate as a second node in the blockchain network, and this second node can be the aforementioned Figure 1The node 10B is shown. The data processing device 2 may include: an invoice transaction acquisition module 100, a risk status acquisition module 200, a risk status change module 300, a registration request acquisition module 400, a registration information packaging module 500, a block broadcasting module 600, and an information registration block writing module 700.
[0183] The invoice transaction acquisition module 100 is used to acquire invoice transactions sent by the first node in the blockchain network; the invoice transaction is generated by the first node based on the business invoice request of the business object;
[0184] The risk status acquisition module 200 is used to obtain the object risk status of the business object from the blockchain ledger of the blockchain network, and generate an invoicing result notification to be returned to the first node based on the object risk status. When the invoicing result notification is an invoicing success notification, the first node forwards the transaction data associated with the invoicing success notification to the tax bureau management terminal based on the management contract deployed on the first node. When the tax bureau management terminal determines that the object risk status is a second risk status different from the first risk status based on the transaction data and the object information of the business object, it generates a status change request.
[0185] The risk status acquisition module 200 includes: a risk status acquisition unit 2010, a success notification generation unit 2020, a failure notification generation unit 2030, and a result notification determination unit 2040.
[0186] The risk status acquisition unit 2010 is used to call the bill contract deployed on the second node, and based on the bill contract, obtain the object risk status of the business object from the blockchain ledger of the blockchain network;
[0187] The success notification generation unit 2020 is used to generate an invoice success notification when the invoice transaction is successfully written into the blockchain ledger if the object's risk status is the first risk status.
[0188] The failure notification generation unit 2030 is used to generate an invoice issuance failure notification if the object's risk status is the second risk status.
[0189] The result notification determination unit 2040 is used to use the invoice issuance success notification or invoice issuance failure notification as the invoice issuance result notification to be returned to the first node.
[0190] The specific implementation methods of the risk status acquisition unit 2010, the success notification generation unit 2020, the failure notification generation unit 2030, and the result notification determination unit 2040 can be found above. Figure 6 The description of the invoice result notification in the corresponding embodiments will not be repeated here.
[0191] The risk status change module 300 is used to receive status change requests sent by the tax bureau management terminal and change the risk status of the object from the first risk status to the second risk status in the blockchain ledger; the second risk status is used to indicate that the second node failed to issue an invoice.
[0192] The risk status change module 300 includes: a status change request receiving unit 3010, an initial tree determination unit 3020, a target tree determination unit 3030, a block hash value determination unit 3040, a target block generation unit 3050, and a target block writing unit 3060.
[0193] The status change request receiving unit 3010 is used to receive status change requests sent by the tax bureau management terminal and generate status change transactions associated with business objects based on the status change requests.
[0194] The initial tree determination unit 3020 is used to obtain the initial block with the largest generation timestamp from the blockchain ledger and determine the initial state tree in the initial block; the object risk state of the business object in the initial state tree is the first risk state;
[0195] The target tree determination unit 3030 is used to change the first risk state in the initial state tree to the second risk state, determine the changed initial state tree as the target state tree, and determine the state snapshot corresponding to the target state tree.
[0196] The block hash value determination unit 3040 is used to determine the transaction hash value of the state change transaction and determine the block hash value of the target block to be generated based on the transaction hash value.
[0197] The target block generation unit 3050 is used to package the block hash value of the initial block, the state snapshot corresponding to the target state tree, and the block hash value of the target block to obtain the target block;
[0198] The target block writing unit 3060 is used to make the target block the next block after the initial block when the blockchain nodes in the blockchain network reach a consensus on the target block; the generation timestamp in the target block is used to update the maximum generation timestamp on the blockchain ledger.
[0199] The specific implementation methods of the state change request receiving unit 3010, the initial tree determining unit 3020, the target tree determining unit 3030, the block hash value determining unit 3040, the target block generating unit 3050, and the target block writing unit 3060 can be found above. Figure 6 The description of step S214 in the corresponding embodiment will not be repeated here.
[0200] The blockchain ledger includes information registration blocks;
[0201] The registration request acquisition module 400 is used to acquire the object information registration request sent by the tax bureau management terminal; the object information registration request carries the object registration information of the business object.
[0202] The registration information packaging module 500 is used to package the object registration information to obtain the unverified blocks to be written into the blockchain ledger;
[0203] The block broadcasting module 600 is used to broadcast the block to be verified to a third node in the blockchain network, so that the third node can reach a consensus on the obtained block to be verified and obtain a consensus result to be returned to the second node.
[0204] The information registration block writing module 700 is used to determine that the blockchain nodes in the blockchain network have reached a consensus if there is a consensus result in the consensus result that exceeds the consensus threshold, indicating that the consensus is successful, and to write the block to be verified as an information registration block into the blockchain ledger.
[0205] The specific implementation methods of the invoice transaction acquisition module 100, risk status acquisition module 200, risk status change module 300, registration request acquisition module 400, registration information packaging module 500, block broadcasting module 600, and information registration block writing module 700 can be found above. Figure 6 The descriptions of steps S201-S214 in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated.
[0206] Further, please see Figure 10 , Figure 10 This is a schematic diagram of a computer device provided in an embodiment of this application. Figure 10 As shown, the computer device 3000 can be the above-mentioned Figure 2 Corresponding to node 20A or node 20B in the embodiments, the computer device 3000 may include: at least one processor 3001, such as a CPU; at least one network interface 3004; a user interface 3003; a memory 3005; and at least one communication bus 3002. The communication bus 3002 is used to implement communication between these components. The user interface 3003 may include a display screen and a keyboard. The network interface 3004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 3005 may be high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 3005 may also be at least one storage device located remotely from the aforementioned processor 3001. Figure 10 As shown, the memory 3005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a device control application program.
[0207] exist Figure 10 In the computer device 3000 shown, the network interface 3004 is mainly used for network communication; the user interface 3003 is mainly used to provide an input interface for users; and the processor 3001 can be used to call the device control application stored in the memory 3005.
[0208] It should be understood that the computer device 3000 described in the embodiments of this application can execute the foregoing text. Figure 3 or Figure 6 The description of the data processing method in the corresponding embodiment can also be performed as described above. Figure 8 The corresponding embodiment refers to the data processing device 1 or Figure 9 The description of the data processing device 2 in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated here.
[0209] This application also provides a computer-readable storage medium storing a computer program, the computer program including program instructions that are implemented when executed by a processor. Figure 3 and Figure 6 For details on the data processing methods provided in each step, please refer to [link / reference]. Figure 3 as well as Figure 6 The implementation methods provided for each step will not be elaborated here.
[0210] The computer-readable storage medium can be an internal storage unit of the data transmission apparatus or computer device provided in any of the foregoing embodiments, such as a hard disk or memory of the computer device. The computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., provided on the computer device. Furthermore, the computer-readable storage medium may include both internal and external storage units of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0211] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, enabling the computer device to perform the data processing methods or apparatus described in the preceding embodiments, which will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated here.
[0212] For further details, please see Figure 11 , Figure 11 This is a schematic diagram of the structure of a data processing system provided in an embodiment of this application. The data processing system 3 may include a data processing device 1a and a data processing device 2a. The data processing device 1a may be the one described above. Figure 8 Regarding the data processing device 1 in the corresponding embodiment, it can be understood that the data processing device 1a can be integrated into the above-mentioned... Figure 1 The first node in the blockchain network in the corresponding embodiment may locally deploy a smart contract (i.e., a management contract) associated with the blockchain electronic ticket. The first node can be one of the aforementioned... Figure 1 The blockchain network shown includes light nodes, such as node 10A. Therefore, further details will not be provided here. The data processing device 2a can be the aforementioned... Figure 9 Regarding the data processing device 2 in the corresponding embodiment, it can be understood that the data processing device 2a can be integrated into the above-mentioned... Figure 1 The second node in the blockchain network in the corresponding embodiment can be the one described above. Figure 1 Node 10B is shown. Therefore, it will not be described again here. Furthermore, the beneficial effects of using the same method will also not be described again. For technical details not disclosed in the embodiments of the data processing system involved in this application, please refer to the description of the method embodiments of this application.
[0213] The terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other step units inherent to these processes, methods, apparatuses, products, or devices.
[0214] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0215] The methods and related apparatus provided in this application are described with reference to the method flowcharts and / or structural diagrams provided in this application. Specifically, each block of the method flowcharts and / or structural diagrams, as well as combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions are provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, create means for implementing the functions specified in one or more blocks of the flowcharts and / or one or more blocks of the structural diagrams. These computer program instructions may also be stored in a computer-readable storage medium capable of directing a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more blocks of the flowcharts and / or one or more blocks of the structural diagrams. 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 function specified in one or more processes in the flowchart and / or one or more blocks in the structural diagram.
[0216] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A data processing method, characterized in that, The method is executed by the first node in the blockchain network and includes: Upon receiving a business invoicing request from a business object, the invoicing transaction corresponding to the request is sent to a second node in the blockchain network. This allows the second node to generate an invoicing result notification based on the business object's risk status, which is then returned to the first node. Specifically, the second node generates an invoicing success notification when the object's risk status is a first risk status, and an invoicing failure notification when the object's risk status is a second risk status. The object's risk status is stored in the blockchain ledger of the blockchain network. If the invoicing result notification is an invoicing success notification, the management contract deployed on the first node is triggered. Based on the management contract, the transaction data associated with the invoicing success notification is forwarded to the tax bureau management terminal. This triggers the tax bureau management terminal to send a status change request to the second node when it determines that the risk status of the object is a second risk status different from the first risk status based on the transaction data and the object information of the business object. The status change request instructs the second node to change the risk status of the object from the first risk status to the second risk status. The second risk status instructs the second node to return an invoicing failure notification when the business object has a new business invoicing request, thereby intercepting the new business invoicing request. If the invoicing result notification is an invoicing failure notification, then the invoicing failure notification will be forwarded to the object terminal corresponding to the business object.
2. The method according to claim 1, characterized in that, The step of sending the invoicing transaction corresponding to the business invoicing request to the second node in the blockchain network when a business object's business invoicing request is obtained includes: Obtain the business invoicing request of the business object; the business invoicing request includes information to be signed and object signature information; the object signature information is obtained by signing the information to be signed based on the object private key of the business object; the information to be signed includes invoice information determined by the business object; Obtain the public key of the business object corresponding to the blockchain ledger, verify the signature information of the object based on the public key, and obtain the signature verification result; If the signature verification result indicates successful verification, then the ticket information in the information to be signed is subjected to parameter verification to obtain the parameter verification result; If the parameter verification result indicates successful verification, the invoicing transaction corresponding to the business invoicing request is sent to the second node in the blockchain network.
3. The method according to claim 2, characterized in that, If the signature verification result indicates successful verification, then the document information in the information to be signed is subjected to parameter verification to obtain the parameter verification result, including: If the signature verification result indicates successful verification, then the object registration information of the business object is obtained from the blockchain ledger; The object registration information and the invoice information are compared to obtain the comparison result; If the comparison result indicates that the object registration information is consistent with the ticket information, then a parameter verification result is generated to indicate that the verification was successful.
4. The method according to claim 3, characterized in that, The method further includes: If the comparison result indicates that the registration information of the object is inconsistent with the ticket information, a parameter verification result is generated to indicate that the verification failed, and a first prompt message is generated to instruct the business object to modify the information. The first prompt message is sent to the object terminal corresponding to the business object, so that the object terminal returns the modified ticket information.
5. The method according to claim 2, characterized in that, If the parameter verification result indicates successful verification, then the invoicing transaction corresponding to the business invoicing request is sent to the second node in the blockchain network, including: If the parameter verification result indicates successful verification, then the transaction business for the business object is executed based on the business invoicing request, and an invoicing transaction is generated according to the transaction execution result of the transaction business; Obtain the public key of the second node in the blockchain network from the blockchain ledger, and encrypt the invoicing transaction based on the public key to obtain encrypted transaction data; The encrypted transaction data is sent to the second node, so that the second node can decrypt the encrypted transaction data based on the second node's private key to obtain the invoice transaction.
6. The method according to claim 1, characterized in that, The method further includes: If the invoicing result notification is an invoicing failure notification, and the invoicing failure notification indicates that the cumulative invoicing data volume of the business object within the invoicing statistical period has reached the data volume threshold, then a second prompt message is generated to instruct the business object to adjust the data volume. The invoicing failure notification and the second prompt information are sent to the object terminal corresponding to the business object, so that the object terminal generates a data volume adjustment request based on the second prompt information; The system receives the data volume adjustment request returned by the target terminal and sends the data volume adjustment request to the tax bureau management terminal so that the tax bureau management terminal can adjust the data volume threshold of the business object.
7. The method according to claim 1, characterized in that, The method further includes: If the invoicing result notification is an invoicing failure notification, and the invoicing failure notification indicates that the business object has an abnormal risk, then a third prompt message is generated to instruct the business object to file a risk appeal. The invoicing failure notification and the third prompt information are sent to the target terminal corresponding to the business object, so that the target terminal can file a risk appeal based on the third prompt information.
8. The method according to claim 1, characterized in that, The method further includes: Obtain the status change notification information sent by the second node; the status change notification information is generated by the second node when it changes the risk status of the object from the first risk status to the second risk status; Obtain related objects that are associated with the business object from the blockchain ledger, and obtain the contact information of the related objects; Based on the contact information, the status change notification message will be sent to the associated terminal corresponding to the associated object.
9. A data processing method, characterized in that, The method is executed by a second node in the blockchain network and includes: Obtain the invoicing transaction sent by the first node in the blockchain network; the invoicing transaction is generated by the first node based on the business invoicing request of the business object; The system retrieves the object risk status of the business object from the blockchain ledger of the blockchain network. When the object risk status is a first risk status, it generates an invoice issuance result notification as an invoice issuance success notification. When the object risk status is a second risk status, it generates an invoice issuance result notification as an invoice issuance failure notification. The system returns the invoice issuance result notification to the first node. When the invoice issuance result notification is an invoice issuance success notification, the first node forwards the transaction data associated with the invoice issuance success notification to the tax bureau management terminal based on the management contract deployed on the first node. The system then triggers the tax bureau management terminal to generate a status change request when it determines that the object risk status is a second risk status different from the first risk status based on the transaction data and the object information of the business object. The system receives the status change request sent by the tax bureau management terminal, changes the risk status of the object from the first risk status to the second risk status in the blockchain ledger, and returns an invoicing failure notification to intercept the new invoicing request when the business object has a new business invoicing request.
10. The method according to claim 9, characterized in that, The blockchain ledger includes information registration blocks; The method further includes: Obtain the object information registration request sent by the tax bureau management terminal; the object information registration request carries the object registration information of the business object; The registration information of the object is packaged to obtain a block to be verified and written into the blockchain ledger; The block to be verified is broadcast to a third node in the blockchain network, so that the third node can reach a consensus on the obtained block to be verified and obtain a consensus result to be returned to the second node; If any consensus result in the consensus results exceeds the consensus threshold, indicating successful consensus, then it is determined that the blockchain nodes in the blockchain network have reached a consensus, and the block to be verified is written into the blockchain ledger as the information registration block.
11. The method according to claim 9, characterized in that, The step of obtaining the object risk status of the business object from the blockchain ledger of the blockchain network, generating an invoicing result notification as an invoicing success notification when the object risk status is a first risk status, generating an invoicing result notification as an invoicing failure notification when the object risk status is a second risk status, and returning the invoicing result notification to the first node includes: Invoke the bill contract deployed on the second node, and based on the bill contract, obtain the object risk status of the business object from the blockchain ledger of the blockchain network; If the risk status of the object is the first risk status, then when the invoicing transaction is successfully written into the blockchain ledger, an invoicing success notification is generated. If the risk status of the object is the second risk status, then an invoice issuance failure notification is generated; The invoice issuance success notification or the invoice issuance failure notification shall be used as the invoice issuance result notification to be returned to the first node.
12. The method according to claim 9, characterized in that, Receiving the status change request sent by the tax bureau management terminal and changing the object's risk status from the first risk status to the second risk status in the blockchain ledger includes: Receive the status change request sent by the tax bureau management terminal, and generate a status change transaction associated with the business object based on the status change request; Obtain the initial block with the largest generation timestamp from the blockchain ledger, and determine the initial state tree in the initial block; the object risk state of the business object in the initial state tree is the first risk state; Change the first risk state in the initial state tree to the second risk state, determine the changed initial state tree as the target state tree, and determine the state snapshot corresponding to the target state tree. Determine the transaction hash value of the state change transaction, and determine the block hash value of the target block to be generated based on the transaction hash value; The block hash value of the initial block, the state snapshot corresponding to the target state tree, and the block hash value of the target block are packaged together to obtain the target block; When the blockchain nodes in the blockchain network reach a consensus on the target block, the target block is used as the next block after the initial block; the generation timestamp in the target block is used to update the maximum generation timestamp on the blockchain ledger.
13. A data processing apparatus, characterized in that, The data processing device operates on the first node of the blockchain network and includes: The invoicing transaction sending module is used to send the invoicing transaction corresponding to the business invoicing request to a second node in the blockchain network when a business invoicing request is received. This allows the second node to generate an invoicing result notification to be returned to the first node based on the object risk status of the business object. Specifically, the second node generates an invoicing result notification as a successful invoicing when the object risk status is a first risk status, and as an invoicing failure notification when the object risk status is a second risk status. The object risk status is stored in the blockchain ledger of the blockchain network. The transaction data forwarding module is used to, if the invoicing result notification is an invoicing success notification, trigger a management contract deployed on the first node, and based on the management contract, forward the transaction data associated with the invoicing success notification to the tax bureau management terminal. This triggers the tax bureau management terminal to send a status change request to the second node when, based on the transaction data and the object information of the business object, it determines that the object's risk status is a second risk status different from the first risk status. The status change request instructs the second node to change the object's risk status from the first risk status to the second risk status. The second risk status instructs the second node to return an invoicing failure notification when the business object has a new business invoicing request, thereby intercepting the new business invoicing request. The sending module is used to forward the invoicing failure notification to the object terminal corresponding to the business object if the invoicing result notification is an invoicing failure notification.
14. A data processing apparatus, characterized in that, The data processing device operates as a second node in the blockchain network, including: The invoice transaction acquisition module is used to acquire invoice transactions sent by the first node in the blockchain network; the invoice transaction is generated by the first node based on the business invoice request of the business object; The risk status acquisition module is used to obtain the object risk status of the business object from the blockchain ledger of the blockchain network, generate an invoicing result notification as an invoicing success notification when the object risk status is a first risk status, generate an invoicing result notification as an invoicing failure notification when the object risk status is a second risk status, return the invoicing result notification to the first node, trigger the first node to forward the transaction data associated with the invoicing success notification to the tax bureau management terminal based on the management contract deployed on the first node when the invoicing result notification is an invoicing success notification, and trigger the tax bureau management terminal to generate a status change request when it determines that the object risk status is a second risk status different from the first risk status based on the transaction data and the object information of the business object. The risk status change module is used to receive the status change request sent by the tax bureau management terminal, change the risk status of the object from the first risk status to the second risk status in the blockchain ledger, and return an invoicing failure notification to intercept the new business invoicing request when the business object has a new business invoicing request.
15. A computer device, characterized in that, include: Processor and memory; The processor is connected to a memory, wherein the memory is used to store a computer program, and the processor is used to invoke the computer program to cause the computer device to perform the method according to any one of claims 1 to 12.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded and executed by a processor to cause a computer device having the processor to perform the method of any one of claims 1 to 12.
17. A computer program product, characterized in that, The computer program product includes a computer program stored in a computer-readable storage medium, the computer program being adapted to be read and executed by a processor to cause a computer device having the processor to perform the method of any one of claims 1 to 12.
Citation Information
Patent Citations
Data processing method and device, computer equipment and storage medium
CN111369330A
Bill processing method and related device
CN112488777A
