A data processing method and device based on blockchain network

Query users' historical invoice information through the blockchain network, determine the purchase quantity and consumption tax, realize automatic control of minors' purchase of tobacco and other harmful items, and solve the problem of ineffective prevention of health hazards in existing technologies.

CN110909044BActive Publication Date: 2024-10-25TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911124323.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-11-15
Publication Date
2024-10-25
Estimated Expiration
2039-11-27

AI Technical Summary

Technical Problem

Existing technology is difficult to effectively control minors from purchasing tobacco and other harmful items, making it difficult to prevent health hazards.

Method used

Using a data processing method based on the blockchain network, by obtaining user information, querying historical invoice information in the blockchain, and determining the user's purchase quantity and consumption tax, automatic and intelligent control of purchased items is achieved.

Benefits of technology

It effectively limits the number of harmful items purchased by minors, improves the efficiency of monitoring and management of user purchasing behavior, and ensures health and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110909044B_ABST
    Figure CN110909044B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a data processing method and device based on a blockchain network, wherein the method includes: obtaining a purchase request for purchasing a designated item, wherein the purchase request carries the user information of a target user; querying whether there is historical invoice information of the designated item corresponding to the user information in the blockchain corresponding to the blockchain network; if the query result is yes, determining the historical purchase quantity of the designated item purchased by the target user within a preset time range according to the historical invoice information; determining the purchase quantity and consumption tax of the designated item currently purchased by the target user according to the user information and the historical purchase quantity. Through this implementation method, automated and intelligent control of the purchase of designated items is realized, which helps to effectively control the quantity of designated items purchased by users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data processing method and device based on a blockchain network. Background Art

[0002] At present, the harm caused by special items such as tobacco to humans is becoming more and more obvious. Taking tobacco as an example, more and more people are suffering from great harm to their health due to smoking or secondhand smoke. At present, the control of tobacco is mainly to prohibit underage smoking, but tobacco sellers often know that they are minors, but still sell tobacco, or sell it without knowing whether the buyer is underage. Therefore, how to more effectively control the harm caused by smoking has become an urgent problem to be solved. Summary of the invention

[0003] The embodiments of the present invention provide a data processing method and device based on a blockchain network, which realizes automated and intelligent control of the purchase of designated items.

[0004] In a first aspect, an embodiment of the present invention provides a data processing method based on a blockchain network, the method comprising:

[0005] Obtaining a purchase request for purchasing a specified item, wherein the purchase request carries user information of a target user;

[0006] Querying whether there is historical invoice information of the designated item corresponding to the user information in the blockchain corresponding to the blockchain network;

[0007] If the query result is yes, determining the historical purchase quantity of the designated item that the target user has purchased within a preset time range according to the historical invoice information;

[0008] The purchase quantity and consumption tax of the designated item currently purchased by the target user are determined based on the user information and the historical purchase quantity.

[0009] In a second aspect, an embodiment of the present invention provides another data processing method based on a blockchain network, the method comprising:

[0010] receiving an invoice information query request submitted by the item management system, wherein the invoice information query request carries user information of a target user;

[0011] Querying historical invoice information of a specified item corresponding to the user information from the blockchain;

[0012] The historical invoice information is sent to the item management system, and the historical invoice information is used by the item management system to determine the purchase quantity and consumption tax of the designated item currently purchased by the target user.

[0013] In a third aspect, an embodiment of the present invention provides a data processing device, the device comprising:

[0014] An acquisition module, used to acquire a purchase request for purchasing a specified item, wherein the purchase request carries user information of a target user;

[0015] A first query module is used to query whether there is historical invoice information of the specified item corresponding to the user information in the blockchain corresponding to the blockchain network;

[0016] A first determination module, configured to determine, if the query result is yes, the historical purchase quantity of the designated item that the target user has purchased within a preset time range according to the historical invoice information;

[0017] The second determination module is used to determine the purchase quantity and consumption tax of the designated item currently purchased by the target user according to the user information and the historical purchase quantity.

[0018] In a fourth aspect, an embodiment of the present invention provides another data processing device, the device comprising:

[0019] A receiving module, used to receive an invoice information query request submitted by the item management system, wherein the invoice information query request carries user information of a target user;

[0020] A second query module, used to query historical invoice information of a specified item corresponding to the user information from the blockchain;

[0021] The sending module is used to send the historical invoice information to the item management system, and the historical invoice information is used by the item management system to determine the purchase quantity and consumption tax of the designated item currently purchased by the target user.

[0022] In a fifth aspect, an embodiment of the present invention provides an item management system, the system comprising: a processor and a memory, the processor being configured to execute:

[0023] Obtaining a purchase request for purchasing a specified item, wherein the purchase request carries user information of a target user;

[0024] Querying whether there is historical invoice information of the designated item corresponding to the user information in the blockchain corresponding to the blockchain network;

[0025] If the query result is yes, determining the historical purchase quantity of the designated item that the target user has purchased within a preset time range according to the historical invoice information;

[0026] The purchase quantity and consumption tax of the designated item currently purchased by the target user are determined based on the user information and the historical purchase quantity.

[0027] In a sixth aspect, an embodiment of the present invention provides a node, including: a processor and a memory, wherein the processor is configured to execute:

[0028] receiving an invoice information query request submitted by the item management system, wherein the invoice information query request carries user information of a target user;

[0029] Querying historical invoice information of a specified item corresponding to the user information from the blockchain;

[0030] The historical invoice information is sent to the item management system, and the historical invoice information is used by the item management system to determine the purchase quantity and consumption tax of the designated item currently purchased by the target user.

[0031] In a seventh aspect, an embodiment of the present invention further provides a computer-readable storage medium, in which program instructions are stored. When the program instructions are executed, they are used to implement the method described in the first aspect or the second aspect above.

[0032] In the embodiment of the present invention, by obtaining a purchase request for purchasing a designated item that carries the user information of a target user, when the historical invoice information of the designated item corresponding to the user information is found in the blockchain corresponding to the blockchain network, the historical purchase quantity of the designated item that the target user has purchased within a preset time range is determined based on the historical invoice information, and the purchase quantity and consumption tax of the designated item that the target user currently purchases is determined based on the user information and the historical purchase quantity. This implementation method realizes automated and intelligent control of the purchase of designated items, which helps to effectively control the quantity of designated items purchased by users. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0034] Figure 1a is a structural schematic diagram of a data processing system provided by an embodiment of the present invention;

[0035] Figure 1b It is a schematic diagram of the structure of a blockchain provided by an embodiment of the present invention;

[0036] Figure 1c is a schematic diagram of a process of generating a new block provided by an embodiment of the present invention;

[0037] Figure 2 It is a flowchart of a data processing method based on a blockchain network provided by an embodiment of the present invention;

[0038] Figure 3 It is a flowchart of another data processing method based on a blockchain network provided by an embodiment of the present invention;

[0039] Figure 4 It is a flowchart of a data processing interaction method based on a blockchain network provided by an embodiment of the present invention;

[0040] Figure 5 is a structural schematic diagram of a data processing device provided by an embodiment of the present invention;

[0041] Figure 6 is a structural schematic diagram of another data processing device provided by an embodiment of the present invention;

[0042] Figure 7 It is a structural diagram of an item management system provided by an embodiment of the present invention;

[0043] Figure 8 It is a schematic diagram of the structure of a node provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The technical solutions in the embodiments of the present invention will be described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0045] The data processing method based on the blockchain network provided in the embodiments of the present invention can be applied to a data processing system. In some embodiments, the data processing system can establish a communication connection with the blockchain network and the user terminal. In some embodiments, the communication connection method may include but is not limited to Wi-Fi, Bluetooth, Near Field Communication (NFC), etc.

[0046] The embodiment of the present invention provides a data processing method based on a blockchain network that can be applied to an application scenario in which, when a user purchases tobacco, the quantity of tobacco purchased by the user is limited and consumption tax is increased according to user information and the number of times the user has purchased tobacco within a preset time range, and a blockchain electronic invoice is automatically issued when the purchase is made. By limiting the purchase quantity and increasing the consumption tax, automated and intelligent control of tobacco purchases can be achieved. Of course, in other embodiments, the data processing method based on a blockchain network provided by the embodiment of the present invention can also be applied to application scenarios in which other specified items such as wine are purchased, which are not specifically limited here.

[0047] The following is combined with Figure 1a -Attached Figure 1c The data processing system provided by the embodiment of the present invention is schematically described.

[0048] See also Figure 1a , Figure 1a It is a structural diagram of a data processing system provided by an embodiment of the present invention. The data processing system includes: a blockchain network 11, a user terminal 12 and an item management system 13. In some embodiments, the blockchain network 11 and the item management system 13 can establish a communication connection through a wireless communication connection; wherein, in some scenarios, the blockchain network 11 and the item management system 13 can also establish a communication connection through a wired communication connection. In some embodiments, the user terminal 12 and the item management system 13 can establish a communication connection through a wired or wireless communication connection. In some embodiments, the user terminal 13 may include but is not limited to smart phone, tablet computer, laptop computer, desktop computer, vehicle-mounted smart terminal, smart watch and other smart terminal devices.

[0049] In one embodiment, the blockchain network 11 refers to a network for sharing data between nodes, and the blockchain network may include multiple nodes 111. Each node 111 can receive input information when performing normal work, and maintain the shared data (i.e., blockchain) in the blockchain network based on the received input information. In order to ensure the information intercommunication within the blockchain network, there can be an information connection between each node, and peer-to-peer (P2P) communication can be achieved between any two nodes, and P2P communication can be performed specifically through a wired communication link or a wireless communication link. For example, when any node in the blockchain network receives input information, other nodes obtain the input information according to the consensus algorithm, and store the input information as data in the shared data, so that the data stored on all nodes in the blockchain network are consistent.

[0050] The item management system 13 can access the blockchain network 11 and can communicate with nodes in the blockchain network 11. It should be noted that Figure 1a The number of nodes shown in is only for illustration, and any number of nodes may be deployed according to actual needs.

[0051] Among them, for each node in the blockchain network 11, there is a node identifier corresponding to it, and each node in the blockchain network 11 can store the node identifiers of other nodes in the blockchain network, so that the generated blocks can be broadcast to other nodes in the blockchain network according to the node identifiers of other nodes. A node identifier list as shown in the following table can be maintained in each node, and the node name and node identifier are stored in the node identifier list accordingly. Among them, the node identifier can be an Internet Protocol (IP) address and any other information that can be used to identify the node. Table 1 only takes the IP address as an example for illustration.

[0052] Table 1

[0053] Node Name Node ID Node 1 117.114.151.174 Node 2 117.116.189.145 … … Node N 119.123.789.258

[0054] Each node in the blockchain network stores the same blockchain. The blockchain consists of multiple blocks, see Figure 1b , Figure 1b It is a structural diagram of a blockchain provided by an embodiment of the present invention. The blockchain is composed of multiple blocks, and the genesis block includes a block header and a block body. The block header stores input information feature values, version numbers, timestamps, and difficulty values, and the block body stores input information; the next block of the genesis block uses the genesis block as a parent block, and the next block also includes a block header and a block body. The block header stores input information feature values ​​of the current block, block header feature values, version numbers, timestamps, and difficulty values ​​of the parent block, and so on, so that the block data stored in each block in the blockchain are associated with the block data stored in the parent block, ensuring the security of the input information in the block.

[0055] Among them, when generating each block in the blockchain, see Figure 1c , Figure 1c It is a schematic diagram of a process of generating a new block provided by an embodiment of the present invention. When receiving input information, the node where the blockchain is located verifies the input information, and after completing the verification, stores the input information in the memory pool, and updates the hash tree used to record the input information; then, the update timestamp is updated to the time when the input information is received, and different random numbers are tried, and the characteristic value calculation is performed multiple times, so that the calculated characteristic value can satisfy the following formula:

[0056] SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x)) <TARGET

[0057] Among them, SHA256 is the eigenvalue algorithm used to calculate the eigenvalue; version (version number) is the version information of the relevant block protocol in the blockchain; prev_hash is the block header eigenvalue of the parent block of the current block; merkle_root is the eigenvalue of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, which is a fixed value within a period of time and is determined again after exceeding the fixed time period; x is a random number; TARGET is the eigenvalue threshold, which can be determined based on nbits.

[0058] In this way, when the random number that satisfies the above formula is calculated, the information can be stored accordingly, the block header and block body can be generated, and the current block can be obtained. Subsequently, the node where the blockchain is located sends the newly generated block to other nodes in the blockchain network according to the node identification of other nodes in the blockchain network. Other nodes verify the newly generated block and add the newly generated block to the blockchain stored in them after the verification is completed.

[0059] Among them, smart contracts can be run on the nodes of the blockchain network 11. Smart contracts are code implementations that are executed when certain conditions are met. Developers can define the contract logic through programming languages ​​and publish it to the blockchain (smart contract registration). According to the logic of the contract terms, they call keys or other events to trigger execution and complete the contract logic. At the same time, they also provide functions for upgrading and canceling smart contracts.

[0060] In some feasible implementations, a node 111 of the blockchain network 11 may receive an invoice information query request submitted by an item management system, wherein the invoice information query request carries user information of a target user, and queries historical invoice information of a designated item corresponding to the user information from the blockchain, so as to send the historical invoice information to the item management system. The historical invoice information is used by the item management system to determine the purchase quantity and consumption tax of the designated item currently purchased by the target user.

[0061] The following is combined with Figure 2 -Attached Figure 4 The data processing method based on the blockchain network provided in an embodiment of the present invention is schematically illustrated.

[0062] For details, please see Figure 2 , Figure 2It is a flowchart of a data processing method based on a blockchain network provided by an embodiment of the present invention. The data processing method based on a blockchain network in an embodiment of the present invention can be executed by a data processing device, wherein the data processing device is set in an item management system, wherein the specific explanation of the item management system is as described above. Specifically, the method in an embodiment of the present invention includes the following steps.

[0063] S201: Acquire a purchase request for purchasing a specified item, wherein the purchase request carries user information of a target user.

[0064] In the embodiment of the present invention, the item management system may obtain a purchase request for purchasing a designated item, wherein the purchase request carries user information of a target user.

[0065] In one embodiment, the item management system may obtain a purchase request sent by a user terminal for purchasing a designated item, wherein the purchase request carries user information of a target user. In some embodiments, the designated item includes, but is not limited to, tobacco. In some embodiments, the user information includes, but is not limited to, a user ID. In one example, the user ID may be any one or more of an ID number, a telephone number, a name, etc., which is not specifically limited in the embodiments of the present invention.

[0066] S202: Query whether there is historical invoice information of the specified item corresponding to the user information in the blockchain corresponding to the blockchain network.

[0067] In an embodiment of the present invention, the item management system can query whether there is historical invoice information of the specified item corresponding to the user information in the blockchain corresponding to the blockchain network.

[0068] In one embodiment, the user information includes a user identifier. When the item management system obtains a purchase request for purchasing a specified item, it can query the blockchain network corresponding to whether there is historical invoice information of the specified item corresponding to the user identifier carried in the purchase request.

[0069] In one example, assuming that the user identifier is an ID number and the designated item is tobacco, when the item management system obtains a purchase request sent by the user terminal to instruct the purchase of tobacco, the item management system can query the blockchain network corresponding to whether there is historical invoice information for tobacco corresponding to the ID number carried in the purchase request.

[0070] By querying whether there is historical invoice information of the designated item corresponding to the user identifier carried in the purchase request in the blockchain corresponding to the blockchain network, it is helpful to confirm the quantity of the designated item currently purchased by the target user corresponding to the user identifier.

[0071] S203: If the query result is yes, determine the historical purchase quantity of the designated item that the target user has purchased within a preset time range according to the historical invoice information.

[0072] In an embodiment of the present invention, if the item management system queries that the blockchain corresponding to the blockchain network contains historical invoice information of the designated item corresponding to the user information, the historical purchase quantity of the designated item that the target user has purchased within a preset time range can be determined based on the historical invoice information.

[0073] In one embodiment, the historical invoice information includes user identification, purchase quantity of the designated item, consumption tax, consumption amount and other information. The item management system can determine the historical purchase quantity of the designated item that the target user has purchased within a preset time range based on the historical invoice information.

[0074] In an example, suppose the item management system queries and finds that there are three historical invoice information of tobacco corresponding to the user ID of the target user in the blockchain corresponding to the blockchain network. If the quantity of tobacco purchased by the target user in these three historical invoice information is 2 packs, 2 packs, and 3 packs respectively, and all are within a period of 1 month, then it can be determined based on these three historical invoice information that the target user has purchased 7 packs of tobacco in the past month.

[0075] By determining the historical purchase quantity of the designated item that the target user has purchased within the preset time range, it is helpful to confirm the quantity and tax of the designated item that the target user can still purchase within the preset time range, so as to implement restrictions on the purchase of the designated item.

[0076] S204: Determine the purchase quantity and consumption tax of the designated item currently purchased by the target user according to the user information and the historical purchase quantity.

[0077] In the embodiment of the present invention, the item management system can determine the purchase quantity and consumption tax of the designated item currently purchased by the target user according to the user information and the historical purchase quantity.

[0078] In one embodiment, after the item management system determines the current purchase quantity and consumption tax of the designated item by the target user based on the user information and the historical purchase quantity, it can determine the consumption amount corresponding to the current purchase quantity of the designated item by the target user, and send an invoicing request to the blockchain network, wherein the invoicing request carries the current purchase quantity, consumption tax, and consumption amount of the designated item by the target user, and the invoicing request is used to instruct the blockchain network to generate invoice information corresponding to the current purchase of the designated item based on the purchase quantity, consumption tax, and consumption amount, and write the invoice information into the blockchain.

[0079] In an example, assuming that the target user currently purchases 2 packs of tobacco, the corresponding consumption amount for the user to purchase 2 packs of tobacco is 44 yuan, and the corresponding consumption tax for the 2 packs of tobacco is 10 yuan, then the item management system can send an invoicing request to the blockchain network, and the invoicing request carries the current purchase quantity of 2 packs of tobacco purchased by the target user, a consumption tax of 10 yuan, and a consumption amount of 44 yuan, and writes the invoice information into the blockchain of the blockchain network.

[0080] Invoice information for users purchasing designated items is issued through the blockchain network, and the invoice information is written into the blockchain of the blockchain network, which helps the subsequent item management system to determine the historical purchase quantity of the designated item by the user by querying the historical invoice information of the user purchasing the designated item on the blockchain.

[0081] In one embodiment, the user information includes the user's age; when the item management system determines the target user's current purchase quantity and consumption tax of the designated item based on the user information and the historical purchase quantity, the item management system may determine the target user's current purchase quantity within the preset time range based on the target user's age; if it is determined that the historical purchase quantity is less than the purchase quantity upper limit, the target user's current purchase quantity and consumption tax of the designated item are determined based on the difference between the purchase quantity upper limit and the historical purchase quantity.

[0082] In one embodiment, the item management system pre-sets a corresponding relationship between the user's age and the upper limit of the purchase quantity of the designated item. The embodiment of the present invention does not specifically limit the corresponding relationship between the user's age and the upper limit of the purchase quantity of the designated item. In one example, the corresponding relationship between the user's age and the upper limit of the purchase quantity of the designated item pre-set in the item management system is: the upper limit of the purchase quantity of tobacco for users under 18 years old is 0, the upper limit of the purchase quantity of tobacco for users aged 18-28 in a month is 3 packs, the upper limit of the purchase quantity of tobacco for users aged 29-40 in a month is 5 packs, the upper limit of the purchase quantity of tobacco for users aged 41-60 in a month is 4 packs, the upper limit of the purchase quantity of tobacco for users aged 60-80 in a month is 3 packs, and the upper limit of the purchase quantity of tobacco for users over 80 in a month is 2 packs.

[0083] In one embodiment, the item management system pre-sets the corresponding relationship between the user age, the purchase quantity, and the consumption tax. The embodiment of the present invention does not specifically limit the corresponding relationship between the user age, the purchase quantity, and the consumption tax. In one example, the corresponding relationship between the user age, the purchase quantity, and the consumption tax pre-set by the item management system can be: for users aged 18-28, a consumption tax of 10% of the price of each pack of tobacco is charged for each pack of tobacco purchased within the purchase quantity upper limit within one month; for users aged 29-40, a consumption tax of 10% of the price of each pack of tobacco is charged for each pack of tobacco purchased within the purchase quantity upper limit within one month; for users aged 41-60, a consumption tax of 5% of the price of each pack of tobacco is charged for each pack of tobacco purchased within the purchase quantity upper limit within one month; for users aged 60-80, a consumption tax of 2% of the price of each pack of tobacco is charged for each pack of tobacco purchased within the purchase quantity upper limit within one month; for users aged 80 or above, a consumption tax of 1% of the price of each pack of tobacco is charged for each pack of tobacco purchased within the purchase quantity upper limit within one month.

[0084] In an example, assuming that the target user is 30 years old and the preset time range is 1 month, the item management system can determine that the upper limit of the purchase quantity of tobacco that the target user can purchase within 1 month is 5 packs based on the target user's age of 30. If the target user has a historical purchase quantity of 3 packs of tobacco within 1 month, it can be determined that the historical purchase quantity of 3 packs is less than the upper limit of 5 packs. Based on the difference between the upper limit of 5 packs and the historical purchase quantity of 3 packs, which is 5-3=2 packs, it can be determined that the current purchase quantity of tobacco that the target user can purchase is 2 packs. If the price of each pack is 20 yuan and the consumption tax is 10% of the price of each pack of tobacco, it can be determined that the consumption tax is 20*10%=2 yuan.

[0085] In one embodiment, the purchase request also carries the purchase quantity; when the item management system determines the purchase quantity and consumption tax of the designated item currently purchased by the target user based on the difference between the purchase quantity upper limit and the historical purchase quantity, the item management system may determine the difference between the purchase quantity upper limit and the historical purchase quantity, and judge whether the purchase quantity carried in the purchase request is greater than the difference; if the judgment result is yes, the purchase quantity and consumption tax of the designated item currently purchased by the target user may be determined based on the difference; if the judgment result is no, the purchase quantity and consumption tax of the designated item currently purchased by the target user may be determined based on the purchase quantity carried in the purchase request.

[0086] In one embodiment, when the item management system determines the purchase quantity and consumption tax of the designated item currently purchased by the target user based on the purchase quantity carried in the purchase request, it can determine that the purchase quantity carried in the purchase request is the purchase quantity of the designated item currently purchased by the target user, and determine the consumption tax corresponding to the purchase quantity carried in the purchase request based on the corresponding relationship between the preset quantity and the consumption tax and the user age of the target user.

[0087] In one example, assuming that the purchase quantity of tobacco carried in the purchase request is 1 pack, the historical purchase quantity within a month is 1 pack, and the upper limit of the purchase quantity within a month is 3 packs; the item management system can determine that the difference between the upper limit of the purchase quantity of 3 packs and the historical purchase quantity of 1 pack is 2 packs. Therefore, it can be determined that the purchase quantity of 1 pack carried in the purchase request is less than the difference of 2 packs, and the purchase quantity of the target user currently purchasing tobacco is determined to be 1 pack based on the purchase quantity of 1 pack carried in the purchase request. If the price of 1 pack of tobacco is 20 yuan and the age of the target user is 30 years old, it can be determined that the consumption tax is 10% of the tobacco price, and thus the consumption tax is determined to be 20*10%=2 yuan.

[0088] In one embodiment, when the item management system determines the purchase quantity and consumption tax of the designated item currently purchased by the target user based on the difference, it can determine the difference as the purchase quantity of the designated item currently purchased by the target user, and determine the consumption tax corresponding to the difference based on the corresponding relationship between the preset quantity and the consumption tax and the user age of the target user.

[0089] In one example, assuming that the purchase quantity of tobacco carried in the purchase request is 3 packs, the historical purchase quantity within a month is 1 pack, and the upper limit of the purchase quantity within a month is 3 packs; the item management system can determine that the difference between the upper limit of the purchase quantity of 3 packs and the historical purchase quantity of 1 pack is 2 packs. Therefore, it can be determined that the purchase quantity of 3 packs carried in the purchase request is greater than the difference of 2 packs, and the current purchase quantity of tobacco purchased by the target user is determined to be 2 packs based on the difference of 2 packs. If the price of 1 pack of tobacco is 20 yuan, and the age of the target user is 30 years old, it can be determined that the consumption tax is 10% of the tobacco price, and thus the consumption tax is determined to be 2*20*10%=4 yuan.

[0090] By setting the purchase quantity and consumption tax for users of different ages to purchase specified items, it helps to restrict users from purchasing specified items.

[0091] In one embodiment, when the item management system determines that the target user's historical purchase quantity within a preset time range is greater than or equal to the upper limit of the target user's purchase quantity within the preset time range, the target user can determine the additional quantity and consumption tax of the designated item that the target user can purchase when the target user confirms payment of the corresponding consumption tax. If the additional quantity is exceeded, the target user will not be able to purchase the designated item within the preset time range.

[0092] In one example, the correspondence between the user age, purchase quantity, and consumption tax preset by the item management system can also be: if the amount of tobacco purchased by users aged 18-28 in one month exceeds the upper limit of the purchase quantity, a consumption tax of 80% of the price of each pack of tobacco is charged, and the additional amount of tobacco purchased by the target user is 2 packs; if the amount of tobacco purchased by users aged 29-40 in one month exceeds the upper limit of the purchase quantity, a consumption tax of 90% of the price of each pack of tobacco is charged, and the additional amount of tobacco purchased by the target user is 4 packs; if the amount of tobacco purchased by users aged 41-60 in one month exceeds the upper limit of the purchase quantity, a consumption tax of 60% of the price of each pack of tobacco is charged, and the additional amount of tobacco purchased by the target user is 3 packs; if the amount of tobacco purchased by users aged 60-80 in one month exceeds the upper limit of the purchase quantity, a consumption tax of 50% of the price of each pack of tobacco is charged, and the additional amount of tobacco purchased by the target user is 2 packs; if the amount of tobacco purchased by users aged 80 or above in one month exceeds the upper limit of the purchase quantity, a consumption tax of 40% of the price of each pack of tobacco is charged, and the additional amount of tobacco purchased by the target user is 1 pack.

[0093] Further restrictions are imposed on users' purchase of designated items by increasing consumption tax when users of different ages purchase designated items in excess of the purchase quantity limit and limiting the additional purchase quantity.

[0094] In the embodiment of the present invention, by obtaining a purchase request for purchasing a designated item that carries the user information of a target user, when the historical invoice information of the designated item corresponding to the user information is found in the blockchain corresponding to the blockchain network, the historical purchase quantity of the designated item that the target user has purchased within a preset time range is determined based on the historical invoice information, and the purchase quantity and consumption tax of the designated item that the target user currently purchases is determined based on the user information and the historical purchase quantity. This implementation method realizes automated and intelligent control of the purchase of designated items, which helps to effectively control the quantity of designated items purchased by users.

[0095] For details, please see Figure 3 , Figure 3 It is a flow chart of another data processing method based on a blockchain network provided by an embodiment of the present invention. The data processing method based on a blockchain network according to an embodiment of the present invention can be executed by a data processing device, wherein the data processing device is arranged in a node in the blockchain network. Specifically, the method according to an embodiment of the present invention includes the following steps.

[0096] S301: receiving an invoice information query request submitted by an item management system, wherein the invoice information query request carries user information of a target user.

[0097] In an embodiment of the present invention, a node may receive an invoice information query request submitted by an item management system, and the invoice information query request carries user information of a target user. In some embodiments, the user information includes but is not limited to a user ID. In one example, the user ID may be any one or more of an ID number, a phone number, a name, etc., which is not specifically limited in the embodiment of the present invention.

[0098] S302: Query the historical invoice information of the specified item corresponding to the user information from the blockchain.

[0099] In an embodiment of the present invention, the node can query the historical invoice information of the designated item corresponding to the user information from the blockchain. In some embodiments, the designated item includes but is not limited to tobacco.

[0100] In one embodiment, the node may query the historical invoice information of the designated item corresponding to the user identifier from the blockchain based on the user identifier carried in the invoice information query request submitted by the received item management system.

[0101] In one example, assuming that the user identifier is an ID number, the node can query the historical invoice information of tobacco corresponding to the ID number from the blockchain based on the ID number carried in the invoice information query request submitted by the received item management system.

[0102] S303: Sending the historical invoice information to the item management system, where the historical invoice information is used by the item management system to determine the purchase quantity and consumption tax of the designated item currently purchased by the target user.

[0103] In an embodiment of the present invention, the node may send the historical invoice information to the item management system, and the historical invoice information is used by the item management system to determine the purchase quantity and consumption tax of the designated item currently purchased by the target user. In some embodiments, the historical invoice information includes information such as user identification, purchase quantity of the designated item, consumption tax, and consumption amount.

[0104] Sending the historical invoice information of the target user's purchase of the designated item to the item management system through the node helps the item management system confirm the quantity and tax of the designated item that the target user can still purchase within the preset time range, so as to implement restrictions on the purchase of the designated item.

[0105] In one embodiment, the node can receive an invoicing request submitted by the item management system, where the invoicing request carries the purchase quantity, consumption tax, and consumption amount of the target user's current purchase of the designated item; the node generates invoice information corresponding to the current purchase of the designated item based on the purchase quantity, consumption tax, and consumption amount, and writes the invoice information into the blockchain.

[0106] By issuing invoice information for users' purchase of specified items through blockchain and writing the invoice information into blockchain, the item management system can subsequently determine the quantity of the specified items purchased by the user by querying the historical invoice information of the user's purchase of the specified items from the blockchain.

[0107] In the embodiment of the present invention, the node can receive an invoice information query request carrying the user information of the target user submitted by the item management system, query the historical invoice information of the designated item corresponding to the user information from the blockchain, and send the historical invoice information to the item management system. This implementation method helps the item management system determine the purchase quantity and consumption tax of the designated item currently purchased by the target user based on the historical invoice information, so as to achieve effective control over the purchase of the designated item.

[0108] For details, please see Figure 4 , Figure 4 The flowchart of a data processing interaction method based on a blockchain network provided by an embodiment of the present invention is shown in FIG. The data processing interaction method based on a blockchain network provided by an embodiment of the present invention can be executed by an item management system and nodes and user terminals in the blockchain network. Specifically, the method provided by an embodiment of the present invention includes the following steps.

[0109] S401: The item management system obtains a purchase request sent by a user terminal for purchasing a designated item, wherein the purchase request carries user information of a target user.

[0110] In the embodiment of the present invention, the item management system can obtain a purchase request sent by a user terminal for purchasing a specified item, wherein the purchase request carries the user information of the target user. The specific implementation example is described above and will not be repeated here.

[0111] S402: The item management system submits an invoice query request to a node in the blockchain network, where the invoice information query request carries user information of the target user.

[0112] In an embodiment of the present invention, the item management system can submit an invoice query request to a node in the blockchain network, and the invoice information query request carries user information of the target user.

[0113] S403: The node receives the invoice information query request submitted by the item management system, and queries the blockchain for historical invoice information of the specified item corresponding to the user information.

[0114] In an embodiment of the present invention, the node can receive an invoice information query request submitted by the item management system, and query the historical invoice information of the specified item corresponding to the user information from the blockchain. The specific implementation example is described above and will not be repeated here.

[0115] S404: Send the historical invoice information to the item management system.

[0116] In the embodiment of the present invention, the node may send the historical invoice information to the item management system.

[0117] S405: The item management system determines the historical purchase quantity of the designated item that the target user has purchased within a preset time range based on the historical invoice information.

[0118] In the embodiment of the present invention, the item management system can determine the historical purchase quantity of the designated item purchased by the target user within a preset time range according to the historical invoice information. The specific implementation example is described above and will not be repeated here.

[0119] S406: The item management system determines the purchase quantity and consumption tax of the designated item currently purchased by the target user based on the user information and the historical purchase quantity.

[0120] In the embodiment of the present invention, the item management system can determine the purchase quantity and consumption tax of the designated item currently purchased by the target user according to the user information and the historical purchase quantity. The specific implementation example is described above and will not be repeated here.

[0121] In an embodiment of the present invention, when the item management system obtains a purchase request for purchasing a designated item sent by a user terminal, it can submit an invoice query request carrying the user information of the target user to a node in the blockchain network; the node can receive the invoice information query request submitted by the item management system, and query the blockchain for the historical invoice information of the designated item corresponding to the user information, and send the historical invoice information to the item management system, so that the item management system can determine the historical purchase quantity of the designated item that the target user has purchased within a preset time range based on the historical invoice information, and determine the purchase quantity and consumption tax of the designated item currently purchased by the target user based on the user information and the historical purchase quantity. Through this implementation, automated and intelligent control of the purchase of designated items is achieved, which helps to effectively control the quantity of designated items purchased by users.

[0122] See also Figure 5 , Figure 5 5 is a schematic diagram of the structure of a data processing device provided by an embodiment of the present invention. Specifically, the device is set in an item management system, and the device includes: an acquisition module 501, a first query module 502, a first determination module 503 and a second determination module 504;

[0123] The acquisition module 501 is used to acquire a purchase request for purchasing a specified item, wherein the purchase request carries user information of a target user;

[0124] A first query module 502 is used to query whether there is historical invoice information of the specified item corresponding to the user information in the blockchain corresponding to the blockchain network;

[0125] The first determination module 503 is used to determine the historical purchase quantity of the designated item that the target user has purchased within a preset time range according to the historical invoice information if the query result is yes;

[0126] The second determination module 504 is used to determine the purchase quantity and consumption tax of the designated item currently purchased by the target user according to the user information and the historical purchase quantity.

[0127] Furthermore, after determining the purchase quantity and consumption tax of the designated item currently purchased by the target user, the second determination module 504 is further configured to:

[0128] Determine the consumption amount corresponding to the purchase quantity of the designated item currently purchased by the target user;

[0129] An invoicing request is sent to the blockchain network, wherein the invoicing request carries the purchase quantity, consumption tax, and consumption amount of the designated item currently purchased by the target user, and the invoicing request is used to instruct the blockchain network to generate invoice information corresponding to the current purchase of the designated item based on the purchase quantity, consumption tax, and consumption amount, and write the invoice information into the blockchain.

[0130] Further, the user information includes the user's age; when the second determination module 504 determines the purchase quantity and consumption tax of the designated item currently purchased by the target user according to the user information and the historical purchase quantity, it is specifically used to:

[0131] Determining an upper limit on the purchase quantity of the target user within the preset time range according to the user age of the target user;

[0132] If it is determined that the historical purchase quantity is less than the purchase quantity upper limit, the purchase quantity and consumption tax of the designated item currently purchased by the target user are determined based on the difference between the purchase quantity upper limit and the historical purchase quantity.

[0133] Furthermore, the purchase request also carries a purchase quantity; the second determination module 504 determines the purchase quantity and consumption tax of the designated item currently purchased by the target user according to the difference between the purchase quantity upper limit and the historical purchase quantity, specifically for:

[0134] Determine the difference between the purchase quantity upper limit and the historical purchase quantity;

[0135] Determining whether the purchase quantity carried in the purchase request is greater than the difference;

[0136] If the judgment result is yes, determining the purchase quantity and consumption tax of the designated item currently purchased by the target user according to the difference;

[0137] If the judgment result is no, the purchase quantity and consumption tax of the designated item currently purchased by the target user are determined according to the purchase quantity carried in the purchase request.

[0138] Furthermore, when the second determination module 504 determines the purchase quantity and consumption tax of the designated item currently purchased by the target user according to the difference, it is specifically configured to:

[0139] Determine the difference as the purchase quantity of the designated item currently purchased by the target user;

[0140] The consumption tax corresponding to the difference is determined according to the corresponding relationship between the preset quantity and the consumption tax and the user age of the target user.

[0141] Furthermore, when the second determination module 504 determines the purchase quantity and consumption tax of the designated item currently purchased by the target user according to the purchase quantity carried in the purchase request, it is specifically configured to:

[0142] Determining that the purchase quantity carried in the purchase request is the purchase quantity of the designated item currently purchased by the target user;

[0143] The consumption tax corresponding to the purchase quantity carried in the purchase request is determined according to the corresponding relationship between the preset quantity and the consumption tax and the user age of the target user.

[0144] In the embodiment of the present invention, by obtaining a purchase request for purchasing a designated item that carries the user information of a target user, when the historical invoice information of the designated item corresponding to the user information is found in the blockchain corresponding to the blockchain network, the historical purchase quantity of the designated item that the target user has purchased within a preset time range is determined based on the historical invoice information, and the purchase quantity and consumption tax of the designated item that the target user currently purchases is determined based on the user information and the historical purchase quantity. This implementation method realizes automated and intelligent control of the purchase of designated items, which helps to effectively control the quantity of designated items purchased by users.

[0145] See also Figure 6 , Figure 6 60 is a schematic diagram of the structure of another data processing device provided by an embodiment of the present invention. Specifically, the device is set in a node in a blockchain network, and the device includes: a receiving module 601 and a second query module 602;

[0146] Receiving module 601, used to receive an invoice information query request submitted by the item management system, wherein the invoice information query request carries user information of a target user;

[0147] A second query module 602 is used to query the historical invoice information of the specified item corresponding to the user information from the blockchain;

[0148] The sending module 603 is used to send the historical invoice information to the item management system, and the historical invoice information is used by the item management system to determine the purchase quantity and consumption tax of the designated item currently purchased by the target user.

[0149] Furthermore, the receiving module 601 is also used for:

[0150] Receiving an invoicing request submitted by the item management system, the invoicing request carrying the purchase quantity, consumption tax, and consumption amount of the designated item currently purchased by the target user;

[0151] Generate invoice information corresponding to the current purchase of the designated item according to the purchase quantity, the consumption tax, and the consumption amount, and write the invoice information into the blockchain.

[0152] In an embodiment of the present invention, when the item management system obtains a purchase request for purchasing a designated item sent by a user terminal, it can submit an invoice query request carrying the user information of the target user to a node in the blockchain network; the node can receive the invoice information query request submitted by the item management system, and query the blockchain for the historical invoice information of the designated item corresponding to the user information, and send the historical invoice information to the item management system, so that the item management system can determine the historical purchase quantity of the designated item that the target user has purchased within a preset time range based on the historical invoice information, and determine the purchase quantity and consumption tax of the designated item currently purchased by the target user based on the user information and the historical purchase quantity. Through this implementation, automated and intelligent control of the purchase of designated items is achieved, which helps to effectively control the quantity of designated items purchased by users.

[0153] See also Figure 7 , Figure 7 701 and 702. The structure diagram of an article management system provided by an embodiment of the present invention is shown in FIG.

[0154] In one embodiment, the item management system further includes a data interface 703, and the data interface 703 is used to transfer data information between the item management system and other devices.

[0155] The memory 701 may include a volatile memory; the memory 701 may also include a non-volatile memory; the memory 701 may also include a combination of the above-mentioned types of memories. The processor 702 may be a central processing unit (CPU). The processor 702 may further include a hardware chip. The above-mentioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA) or any combination thereof.

[0156] The memory 701 is used to store programs, and the processor 702 can call the program stored in the memory 701 to perform the following steps:

[0157] Obtaining a purchase request for purchasing a specified item, wherein the purchase request carries user information of a target user;

[0158] Querying whether there is historical invoice information of the designated item corresponding to the user information in the blockchain corresponding to the blockchain network;

[0159] If the query result is yes, determining the historical purchase quantity of the designated item that the target user has purchased within a preset time range according to the historical invoice information;

[0160] The purchase quantity and consumption tax of the designated item currently purchased by the target user are determined based on the user information and the historical purchase quantity.

[0161] Furthermore, after determining the purchase quantity and consumption tax of the designated item currently purchased by the target user, the processor 702 is further configured to:

[0162] Determine the consumption amount corresponding to the purchase quantity of the designated item currently purchased by the target user;

[0163] An invoicing request is sent to the blockchain network, wherein the invoicing request carries the purchase quantity, consumption tax, and consumption amount of the designated item currently purchased by the target user, and the invoicing request is used to instruct the blockchain network to generate invoice information corresponding to the current purchase of the designated item based on the purchase quantity, consumption tax, and consumption amount, and write the invoice information into the blockchain.

[0164] Further, the user information includes the user's age; when the processor 702 determines the purchase quantity and consumption tax of the designated item currently purchased by the target user according to the user information and the historical purchase quantity, it is specifically used to:

[0165] Determining an upper limit on the purchase quantity of the target user within the preset time range according to the user age of the target user;

[0166] If it is determined that the historical purchase quantity is less than the purchase quantity upper limit, the purchase quantity and consumption tax of the designated item currently purchased by the target user are determined based on the difference between the purchase quantity upper limit and the historical purchase quantity.

[0167] Furthermore, the purchase request also carries a purchase quantity; when the processor 702 determines the purchase quantity and consumption tax of the designated item currently purchased by the target user according to the difference between the purchase quantity upper limit and the historical purchase quantity, it is specifically configured to:

[0168] Determine the difference between the purchase quantity upper limit and the historical purchase quantity;

[0169] Determining whether the purchase quantity carried in the purchase request is greater than the difference;

[0170] If the judgment result is yes, determining the purchase quantity and consumption tax of the designated item currently purchased by the target user according to the difference;

[0171] If the judgment result is no, the purchase quantity and consumption tax of the designated item currently purchased by the target user are determined according to the purchase quantity carried in the purchase request.

[0172] Further, when the processor 702 determines the purchase quantity and consumption tax of the designated item currently purchased by the target user according to the difference, it is specifically configured to:

[0173] Determine the difference as the purchase quantity of the designated item currently purchased by the target user;

[0174] The consumption tax corresponding to the difference is determined according to the corresponding relationship between the preset quantity and the consumption tax and the user age of the target user.

[0175] Further, when the processor 702 determines the purchase quantity and consumption tax of the designated item currently purchased by the target user according to the purchase quantity carried in the purchase request, it is specifically configured to:

[0176] Determining that the purchase quantity carried in the purchase request is the purchase quantity of the designated item currently purchased by the target user;

[0177] The consumption tax corresponding to the purchase quantity carried in the purchase request is determined according to the corresponding relationship between the preset quantity and the consumption tax and the user age of the target user.

[0178] In the embodiment of the present invention, the item management system obtains a purchase request for purchasing a designated item that carries the user information of the target user, and when the historical invoice information of the designated item corresponding to the user information is found in the blockchain corresponding to the blockchain network, the historical purchase quantity of the designated item that the target user has purchased within a preset time range is determined based on the historical invoice information, and the purchase quantity and consumption tax of the designated item that the target user currently purchases is determined based on the user information and the historical purchase quantity. This implementation method realizes automated and intelligent control of the purchase of designated items, which helps to effectively control the quantity of designated items purchased by users.

[0179] See also Figure 8 , Figure 8 801 and 802. The node is a schematic diagram of a structure of a node provided by an embodiment of the present invention. Specifically, the node includes: a memory 801 and a processor 802.

[0180] In one embodiment, the node further includes a data interface 803, and the data interface 803 is used to transfer data information between the node and other devices.

[0181] The memory 801 may include a volatile memory; the memory 801 may also include a non-volatile memory; the memory 801 may also include a combination of the above-mentioned types of memories. The processor 802 may be a central processing unit (CPU). The processor 802 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA) or any combination thereof.

[0182] The memory 801 is used to store programs, and the processor 802 can call the program stored in the memory 801 to perform the following steps:

[0183] receiving an invoice information query request submitted by the item management system, wherein the invoice information query request carries user information of a target user;

[0184] Querying historical invoice information of a specified item corresponding to the user information from the blockchain;

[0185] The historical invoice information is sent to the item management system, and the historical invoice information is used by the item management system to determine the purchase quantity and consumption tax of the designated item currently purchased by the target user.

[0186] Further, the processor 802 is further configured to:

[0187] Receiving an invoicing request submitted by the item management system, the invoicing request carrying the purchase quantity, consumption tax, and consumption amount of the designated item currently purchased by the target user;

[0188] Generate invoice information corresponding to the current purchase of the designated item according to the purchase quantity, the consumption tax, and the consumption amount, and write the invoice information into the blockchain.

[0189] In the embodiment of the present invention, the node obtains a purchase request for purchasing a designated item that carries the user information of the target user. When the node finds that there is historical invoice information of the designated item corresponding to the user information in the blockchain corresponding to the blockchain network, the node determines the historical purchase quantity of the designated item that the target user has purchased within a preset time range based on the historical invoice information, and determines the purchase quantity and consumption tax of the designated item that the target user currently purchases based on the user information and the historical purchase quantity. This implementation method realizes automated and intelligent control of the purchase of designated items, which helps to effectively control the quantity of designated items purchased by users.

[0190] The embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the present invention is implemented. Figure 2 , Figure 3 or Figure 4 The method described in the corresponding embodiment can also be implemented Figure 5 or Figure 6 The device corresponding to the embodiment of the present invention will not be described in detail here.

[0191] The computer-readable storage medium may be an internal storage unit of the device described in any of the foregoing embodiments, such as a hard disk or memory of the device. The computer-readable storage medium may also be an external storage device of the device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the server. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0192] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0193] The above disclosure is only part of the embodiments of the present invention, which certainly cannot be used to limit the scope of the rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiments and equivalent changes made according to the claims of the present invention are still within the scope of the invention.

Claims

1. A data processing method based on a blockchain network, characterized in that: The method comprises: Obtaining a purchase request for purchasing a specified item, wherein the purchase request carries user information of a target user and a purchase quantity; Querying whether there is historical invoice information of the designated item corresponding to the user information in the blockchain corresponding to the blockchain network; If the query result is yes, determining the historical purchase quantity of the designated item that the target user has purchased within a preset time range according to the historical invoice information; Determine the purchase quantity and consumption tax of the designated item currently purchased by the target user according to the user information and the historical purchase quantity; The step of determining the purchase quantity and consumption tax of the designated item currently purchased by the target user according to the user information and the historical purchase quantity includes: Determine the upper limit of the purchase quantity of the target user within the preset time range according to the user age included in the user information; If it is determined that the historical purchase quantity is greater than or equal to the purchase quantity upper limit, then when the target user confirms payment of the corresponding consumption tax, the additional quantity of the designated item that the target user can purchase is determined based on the user age included in the user information; If the sum of the difference between the historical purchase quantity and the purchase quantity upper limit and the purchase quantity carried in the purchase request is less than or equal to the additional quantity, then determining the purchase quantity carried in the purchase request as the purchase quantity of the designated item currently purchased by the target user, and determining the consumption amount and consumption tax according to the purchase quantity carried in the purchase request; An invoicing request is sent to the blockchain network, wherein the invoicing request carries the purchase quantity, consumption tax, and consumption amount of the designated item currently purchased by the target user, and the invoicing request is used to instruct the blockchain network to generate invoice information corresponding to the current purchase of the designated item based on the purchase quantity, consumption tax, and consumption amount of the designated item currently purchased by the target user, and write the invoice information into the blockchain.

2. The method according to claim 1, characterized in that The step of determining the purchase quantity and consumption tax of the designated item currently purchased by the target user according to the user information and the historical purchase quantity includes: If it is determined that the historical purchase quantity is less than the purchase quantity upper limit, the purchase quantity and consumption tax of the designated item currently purchased by the target user are determined based on the difference between the purchase quantity upper limit and the historical purchase quantity.

3. The method according to claim 2, characterized in that The determining, based on the difference between the purchase quantity upper limit and the historical purchase quantity, the purchase quantity and consumption tax of the designated item currently purchased by the target user comprises: Determine the difference between the purchase quantity upper limit and the historical purchase quantity; Determining whether the purchase quantity carried in the purchase request is greater than the difference; If the judgment result is yes, determining the purchase quantity and consumption tax of the designated item currently purchased by the target user according to the difference; If the judgment result is no, the purchase quantity and consumption tax of the designated item currently purchased by the target user are determined according to the purchase quantity carried in the purchase request.

4. The method according to claim 3, characterized in that The determining, according to the difference, the purchase quantity and consumption tax of the designated item currently purchased by the target user comprises: Determine the difference as the purchase quantity of the designated item currently purchased by the target user; The consumption tax corresponding to the difference is determined according to the corresponding relationship between the preset quantity and the consumption tax and the user age of the target user.

5. The method according to claim 3, characterized in that: The determining, according to the purchase quantity carried in the purchase request, the purchase quantity and consumption tax of the designated item currently purchased by the target user includes: Determining that the purchase quantity carried in the purchase request is the purchase quantity of the designated item currently purchased by the target user; The consumption tax corresponding to the purchase quantity carried in the purchase request is determined according to the corresponding relationship between the preset quantity and the consumption tax and the user age of the target user.

6. A data processing method based on a blockchain network, characterized in that: The method comprises: receiving an invoice information query request submitted by the item management system, wherein the invoice information query request carries user information of a target user; Querying historical invoice information of a specified item corresponding to the user information from the blockchain; The historical invoice information is sent to the item management system, and the historical invoice information is used by the item management system to determine the historical purchase quantity of the designated item that the target user has purchased within a preset time range according to the historical invoice information; determine the upper limit of the purchase quantity of the target user within the preset time range according to the user age included in the user information; if it is determined that the historical purchase quantity is greater than or equal to the upper limit of the purchase quantity, then when the target user confirms to pay the corresponding consumption tax, determine the additional quantity of the designated item that the target user can purchase according to the user age included in the user information; if the difference between the historical purchase quantity and the upper limit of the purchase quantity and the sum of the purchase quantity carried in the purchase request are less than or equal to the additional quantity, then determine that the purchase quantity carried in the purchase request is the purchase quantity of the designated item currently purchased by the target user, and determine the consumption amount and consumption tax of the designated item currently purchased by the target user according to the purchase quantity carried in the purchase request; Receiving an invoicing request submitted by the item management system, the invoicing request carrying the purchase quantity, consumption tax, and consumption amount of the designated item currently purchased by the target user; Generate invoice information corresponding to the current purchase of the designated item according to the purchase quantity, the consumption tax, and the consumption amount, and write the invoice information into the blockchain.

7. A data processing device, characterized in that: The device comprises: An acquisition module, used to acquire a purchase request for purchasing a specified item, wherein the purchase request carries user information of a target user and a purchase quantity; A first query module is used to query whether there is historical invoice information of the specified item corresponding to the user information in the blockchain corresponding to the blockchain network; A first determination module, configured to determine, if the query result is yes, the historical purchase quantity of the designated item that the target user has purchased within a preset time range according to the historical invoice information; A second determination module is used to determine the purchase quantity and consumption tax of the designated item currently purchased by the target user according to the user information and the historical purchase quantity; When the second determination module determines the purchase quantity and consumption tax of the designated item currently purchased by the target user based on the user information and the historical purchase quantity, it is specifically used to: determine the purchase quantity upper limit of the target user within the preset time range based on the user age included in the user information; if it is determined that the historical purchase quantity is greater than or equal to the purchase quantity upper limit, then when the target user confirms payment of the corresponding consumption tax, determine the additional quantity of the designated item that the target user can purchase based on the user age included in the user information; if the difference between the historical purchase quantity and the purchase quantity upper limit and the sum of the purchase quantity carried in the purchase request are less than or equal to the additional quantity, then determine that the purchase quantity carried in the purchase request is the purchase quantity of the designated item currently purchased by the target user, and determine the consumption amount and consumption tax based on the purchase quantity carried in the purchase request; The second determination module is also used to determine the consumption amount corresponding to the current purchase quantity of the designated item by the target user; send an invoicing request to the blockchain network, the invoicing request carries the current purchase quantity, consumption tax, and consumption amount of the designated item by the target user, and the invoicing request is used to instruct the blockchain network to generate invoice information corresponding to the current purchase of the designated item based on the current purchase quantity, consumption tax, and consumption amount of the designated item by the target user, and write the invoice information into the blockchain.

8. A data processing device, characterized in that: The device comprises: A receiving module, used to receive an invoice information query request submitted by the item management system, wherein the invoice information query request carries user information of a target user; A second query module, used to query historical invoice information of a specified item corresponding to the user information from the blockchain; a sending module, configured to send the historical invoice information to the item management system, wherein the historical invoice information is used by the item management system to determine the historical purchase quantity of the designated item that the target user has purchased within a preset time range according to the historical invoice information; determine the upper limit of the purchase quantity of the target user within the preset time range according to the user age included in the user information; if it is determined that the historical purchase quantity is greater than or equal to the upper limit of the purchase quantity, then when the target user confirms payment of the corresponding consumption tax, determine the additional quantity of the designated item that the target user can purchase according to the user age included in the user information; if the difference between the historical purchase quantity and the upper limit of the purchase quantity and the sum of the purchase quantity carried in the purchase request are less than or equal to the additional quantity, then determine that the purchase quantity carried in the purchase request is the purchase quantity of the designated item currently purchased by the target user, and determine the consumption amount and consumption tax of the designated item currently purchased by the target user according to the purchase quantity carried in the purchase request; The receiving module is also used to receive an invoicing request submitted by the item management system, where the invoicing request carries the purchase quantity, consumption tax, and consumption amount of the designated item currently purchased by the target user; generates invoice information corresponding to the current purchase of the designated item based on the purchase quantity, the consumption tax, and the consumption amount, and writes the invoice information into the blockchain.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program instructions, and when the program instructions are executed, they are used to implement the method described in any one of claims 1 to 6.