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

Data processing method and device based on block chain network Download PDF

Info

Publication number
CN110909044A
CN110909044A CN201911124323.0A CN201911124323A CN110909044A CN 110909044 A CN110909044 A CN 110909044A CN 201911124323 A CN201911124323 A CN 201911124323A CN 110909044 A CN110909044 A CN 110909044A
Authority
CN
China
Prior art keywords
purchase quantity
purchase
target user
user
specified
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911124323.0A
Other languages
Chinese (zh)
Inventor
李茂材
朱耿良
杨常青
蓝虎
刘攀
时一防
周开班
王宗友
张劲松
黄焕坤
孔利
刘区城
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911124323.0A priority Critical patent/CN110909044A/en
Publication of CN110909044A publication Critical patent/CN110909044A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0605Supply or demand aggregation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/10Tax strategies

Abstract

The embodiment of the invention discloses a data processing method and a device based on a block chain network, wherein the method comprises the following steps: acquiring a purchase request for purchasing a specified article, wherein the purchase request carries user information of a target user; inquiring whether historical invoice information of the specified article corresponding to the user information exists in a block chain corresponding to the block chain network; if the query result is yes, determining the historical purchase quantity of the specified item purchased by the target user within a preset time range according to the historical invoice information; and determining the purchase quantity and the consumption tax of the target user for currently purchasing the specified item according to the user information and the historical purchase quantity. By the implementation mode, automatic and intelligent control over the purchase of the specified items is achieved, and effective control over the quantity of the specified items purchased by the user is facilitated.

Description

Data processing method and device based on block chain network
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data processing method and apparatus based on a blockchain network.
Background
At present, the harm of special articles such as tobacco to human beings is more and more obvious, taking tobacco as an example, more and more people cause great harm to the health because of smoking or smoking the two-handed cigarette. Currently, the control of tobacco is mainly to forbid the young smoking, but tobacco vendors usually know that they are young and still sell tobacco, or cannot know whether the tobacco buyer is young and sold. Therefore, how to control the harm brought by smoking to people more efficiently becomes an urgent problem to be solved.
Disclosure of Invention
The embodiment of the invention provides a data processing method and device based on a block chain network, which realize automatic and intelligent control on the purchase of specified articles.
In a first aspect, an embodiment of the present invention provides a data processing method based on a blockchain network, where the method includes:
acquiring a purchase request for purchasing a specified article, wherein the purchase request carries user information of a target user;
inquiring whether historical invoice information of the specified article corresponding to the user information exists in a block chain corresponding to the block chain network;
if the query result is yes, determining the historical purchase quantity of the specified item purchased by the target user within a preset time range according to the historical invoice information;
and determining the purchase quantity and the consumption tax of the target user for currently purchasing the specified item according to the user information and the historical purchase quantity.
In a second aspect, an embodiment of the present invention provides another data processing method based on a blockchain network, where the method includes:
receiving an invoice information query request submitted by an article management system, wherein the invoice information query request carries user information of a target user;
querying historical invoice information of a specified article corresponding to the user information from a block chain;
sending the historical invoice information to the item management system, wherein the historical invoice information is used for determining the purchase quantity and consumption tax of the specified item currently purchased by the target user through the item management system.
In a third aspect, an embodiment of the present invention provides a data processing apparatus, where the apparatus includes:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a purchase request for purchasing a specified article, and the purchase request carries user information of a target user;
the first query module is used for querying whether historical invoice information of the specified article corresponding to the user information exists in a block chain corresponding to the block chain network;
the first determination module is used for determining the historical purchase quantity of the specified item purchased by the target user within a preset time range according to the historical invoice information if the query result is yes;
and the second determination module is used for determining the purchase quantity and the consumption tax of the specified item currently purchased by the target user according to the user information and the historical purchase quantity.
In a fourth aspect, an embodiment of the present invention provides another data processing apparatus, where the apparatus includes:
the receiving module is used for receiving an invoice information query request submitted by an article management system, wherein the invoice information query request carries user information of a target user;
the second query module is used for querying historical invoice information of the specified article corresponding to the user information from the block chain;
and the sending module is used for sending the historical invoice information to the article management system, and the historical invoice information is used for determining the purchase quantity and the consumption tax of the specified articles purchased by the target user currently by the article management system.
In a fifth aspect, an embodiment of the present invention provides an article management system, where the system includes: a processor and a memory, the processor to perform:
acquiring a purchase request for purchasing a specified article, wherein the purchase request carries user information of a target user;
inquiring whether historical invoice information of the specified article corresponding to the user information exists in a block chain corresponding to the block chain network;
if the query result is yes, determining the historical purchase quantity of the specified item purchased by the target user within a preset time range according to the historical invoice information;
and determining the purchase quantity and the consumption tax of the target user for currently purchasing the specified item according to the user information and the historical purchase quantity.
In a sixth aspect, an embodiment of the present invention provides a node, including: a processor and a memory, the processor to perform:
receiving an invoice information query request submitted by an article management system, wherein the invoice information query request carries user information of a target user;
querying historical invoice information of a specified article corresponding to the user information from a block chain;
sending the historical invoice information to the item management system, wherein the historical invoice information is used for determining the purchase quantity and consumption tax of the specified item currently purchased by the target user through the item management system.
In a seventh aspect, the present invention further provides a computer-readable storage medium, where program instructions are stored, and when executed, the program instructions are configured to implement the method according to the first aspect or the second aspect.
According to the method and the device, through acquiring the purchase request carrying the user information of the target user and used for purchasing the specified article, when the historical invoice information of the specified article corresponding to the user information exists in the block chain corresponding to the block chain network, the historical purchase quantity of the specified article purchased by the target user in a preset time range is determined according to the historical invoice information, and the purchase quantity and the consumption tax of the specified article purchased by the target user at present are determined according to the user information and the historical purchase quantity. By the implementation mode, automatic and intelligent control over the purchase of the specified items is achieved, and effective control over the quantity of the specified items purchased by the user is facilitated.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1a is a block diagram of a data processing system according to an embodiment of the present invention;
fig. 1b is a schematic structural diagram of a block chain according to an embodiment of the present invention;
FIG. 1c is a schematic diagram of a process for generating a new block according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a data processing method based on a blockchain network according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of another data processing method based on a blockchain network according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a data processing interaction method based on a blockchain network according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention;
FIG. 6 is a block diagram of another data processing apparatus according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of an article management system according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a node according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The data processing method based on the blockchain network provided by the embodiment of the invention can be applied to a data processing system, and in some embodiments, the data processing system can establish communication connection with the blockchain network and a user terminal. In some embodiments, the manner of the Communication connection may include, but is not limited to, Wi-Fi, Bluetooth, Near Field Communication (NFC), and the like.
The data processing method based on the blockchain network can be applied to an application scene that when a user purchases tobacco, the quantity of the tobacco purchased by the user is limited and the consumption tax is increased according to the user information and the times of the user purchasing the tobacco within a preset time range, and the blockchain electronic invoice is automatically issued during the purchasing. By limiting the number of purchases and increasing the consumption tax, automated and intelligent control over the purchase of tobacco can be achieved. Of course, in other embodiments, the data processing method based on the block chain network provided in the embodiment of the present invention may also be applied to an application scenario of purchasing other specified items, such as wine, and is not specifically limited herein.
A data processing system according to an embodiment of the present invention is schematically illustrated with reference to fig. 1 a-1 c.
Referring to fig. 1a, fig. 1a is a schematic structural diagram of a data processing system according to 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 article management system 13 may establish a communication connection through a wireless communication connection; in some scenarios, the blockchain network 11 and the article management system 13 may also establish a communication connection through a wired communication connection. In some embodiments, the user terminal 12 and the article management system 13 may 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, a smart terminal device such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a vehicle-mounted smart terminal, and a smart watch.
In one embodiment, the blockchain network 11 refers to a network for performing data sharing between nodes, and the blockchain network may include a plurality of nodes 111. Each node 111 may receive input information and maintain shared data (i.e., blockchains) within the blockchain network based on the received input information while operating normally. In order To ensure information intercommunication in the blockchain network, each node may have information connection, and any two nodes may implement Peer-To-Peer (P2P) communication, and specifically may perform P2P communication through a wired communication link or a wireless communication link. For example, when any node in the blockchain network receives input information, other nodes acquire the input information according to a consensus algorithm, and store the input information as data in shared data, so that the data stored on all nodes in the blockchain network are consistent.
The article management system 13 has access to the blockchain network 11 and can communicate with nodes in the blockchain network 11. It should be noted that the number of nodes shown in fig. 1a is only illustrative, and any number of nodes may be deployed according to actual needs.
Each node in the blockchain network 11 has a corresponding node identifier, and each node in the blockchain network 11 may store node identifiers of other nodes in the blockchain network, so that the generated block is broadcast to other nodes in the blockchain network according to the node identifiers of other nodes. Each node may maintain a node identifier list as shown in the following table, and store the node name and the node identifier in the node identifier list correspondingly. The node identifier may be an Internet Protocol (IP) address or any other information that can be used to identify the node, and table 1 only illustrates the IP address as an example.
TABLE 1
Node name Node identification
Node 1 117.114.151.174
Node 2 117.116.189.145
Node N 119.123.789.258
Each node in the blockchain network stores one identical blockchain. The block chain is composed of a plurality of blocks, and referring to fig. 1b, fig. 1b is a schematic structural diagram of a block chain according to an embodiment of the present invention. The block chain is composed of a plurality of blocks, the starting block comprises a block head and a block main body, the block head stores an input information characteristic value, a version number, a timestamp and a difficulty value, and the block main body stores input information; the next block of the starting block takes the starting block as a parent block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the parent block, the version number, the timestamp and the difficulty value, and the like, so that the block data stored in each block in the block chain is associated with the block data stored in the parent block, and the safety of the input information in the block is ensured.
When generating each block in the block chain, referring to fig. 1c, fig. 1c is a schematic diagram of a process for generating a new block according to an embodiment of the present invention. When the node where the block chain is located receives input information, verifying the input information, storing the input information into a memory pool after the verification is completed, and updating a hash tree for recording the input information; and then, updating the updating time stamp to the time when the input information is received, trying different random numbers, and calculating the characteristic value for multiple times, so that the calculated characteristic value can meet the following formula:
SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x))<TARGET
wherein, SHA256 is a characteristic value algorithm used for calculating a characteristic value; version is version information of the relevant block protocol in the block chain; prev _ hash is a block head characteristic value of a parent block of the current block; merkle _ root is a characteristic value of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, is a fixed value within a period of time, and is determined again after exceeding a fixed time period; x is a random number; TARGET is a feature threshold, which can be determined from nbits.
Therefore, when the random number meeting the formula is obtained through calculation, the information can be correspondingly stored, and the block head and the block main body are generated to obtain the current block. And then, the node where the block chain is located respectively sends the newly generated blocks to other nodes in the block chain network where the newly generated blocks are located according to the node identifications of the other nodes in the block chain network, the newly generated blocks are verified by the other nodes, and the newly generated blocks are added to the block chain stored in the newly generated blocks after the verification is completed.
The nodes of the blockchain network 11 may run an intelligent contract, the intelligent contract is implemented by a code executed when a certain condition is satisfied, and a developer may define a contract logic through a programming language, issue the contract logic to the blockchain (intelligent contract registration), call a key or trigger execution of other events according to the logic of contract terms, complete the contract logic, and provide functions of upgrading and deregistering the intelligent contract.
In some possible embodiments, a certain node 111 of the blockchain network 11 may receive an invoice information query request submitted by an article management system, where the invoice information query request carries user information of a target user, and query historical invoice information of a specified article corresponding to the user information from the blockchain to send the historical invoice information to the article management system, where the historical invoice information is used by the article management system to determine a purchase quantity and a consumption tax of the specified article currently purchased by the target user.
The following describes schematically a data processing method based on a blockchain network according to an embodiment of the present invention with reference to fig. 2 to 4.
Referring to fig. 2 specifically, fig. 2 is a schematic flowchart of a data processing method based on a blockchain network according to an embodiment of the present invention, where the data processing method based on a blockchain network according to an embodiment of the present invention may be executed by a data processing device, where the data processing device is disposed in an article management system, and a specific explanation of the article management system is as described above. Specifically, the method of the embodiment of the present invention includes the following steps.
S201: the method comprises the steps of obtaining a purchase request for purchasing a specified item, wherein the purchase request carries user information of a target user.
In the embodiment of the present invention, the item management system may obtain a purchase request for purchasing a specified item, where the purchase request carries user information of a target user.
In one embodiment, the item management system may obtain a purchase request sent by a user terminal for purchasing a specified item, where the purchase request carries user information of a target user. In certain embodiments, the specified article includes, but is not limited to, tobacco. In some embodiments, the user information includes, but is not limited to, a user identifier, and in an example, the user identifier may be any one or more of an identification number, a telephone number, a name, and the like, and the embodiments of the present invention are not limited in particular.
S202: and inquiring whether historical invoice information of the specified article corresponding to the user information exists in a block chain corresponding to the block chain network.
In the embodiment of the present invention, the article management system may query whether historical invoice information of the specified article corresponding to the user information exists in a blockchain corresponding to a blockchain network.
In one embodiment, the user information includes a user identifier, and when the article management system obtains a purchase request for purchasing a specified article, it may be queried whether historical invoice information of the specified article corresponding to the user identifier carried in the purchase request exists in a blockchain corresponding to a blockchain network.
In an example, assuming that the user identifier is an identity card number, and the specified article is tobacco, when the article management system obtains a purchase request sent by the user terminal and used for instructing to purchase tobacco, the article management system may query whether historical invoice information of tobacco corresponding to the identity card number carried in the purchase request exists in a block chain corresponding to a block chain network.
Whether historical invoice information of the specified items corresponding to the user identification carried in the purchase request exists in the blockchain corresponding to the block chain network is inquired, and the method is helpful for confirming the number of the specified items purchased by the target user corresponding to the user identification at present.
S203: and if the inquiry result is yes, determining the historical purchase quantity of the specified item purchased by the target user within a preset time range according to the historical invoice information.
In the embodiment of the present invention, if the article management system queries that historical invoice information of the specified article corresponding to the user information exists in the blockchain corresponding to the blockchain network, the article management system may determine, according to the historical invoice information, the historical purchase quantity of the specified article purchased by the target user within a preset time range.
In one embodiment, the historical invoice information includes information such as user identification, purchase quantity of the specified item, consumption tax, consumption amount, etc., and the item management system may determine the historical purchase quantity of the specified item purchased by the target user within a preset time range according to the historical invoice information.
In one example, assuming that the article management system queries that there are 3 pieces of historical invoice information of tobacco corresponding to the user identifier of the target user in the blockchain corresponding to the blockchain network, if the number of pieces of tobacco purchased by the target user in the 3 pieces of historical invoice information is 2, and 3 respectively and is within a period of 1 month, it may be determined that the historical purchase number of the tobacco purchased by the target user within 1 month is 7 according to the 3 pieces of historical invoice information.
The method is used for determining the historical purchase quantity of the specified items purchased by the target user within the preset time range, and is helpful for confirming the quantity and the tax of the specified items which can be purchased by the target user within the preset time range so as to realize the limit of purchasing the specified items.
S204: and determining the purchase quantity and the consumption tax of the target user for currently purchasing the specified item according to the user information and the historical purchase quantity.
In this embodiment of the present invention, the item management system may determine the purchase amount and the consumption tax of the target user for currently purchasing the specified item according to the user information and the historical purchase amount.
In one embodiment, after determining the purchase quantity and the consumption tax of the specified item currently purchased by the target user according to the user information and the historical purchase quantity, the item management system may determine a consumption amount corresponding to the purchase quantity of the specified item currently purchased by the target user, and send an invoicing request to the blockchain network, where the invoicing request carries the purchase quantity, the consumption tax and the consumption amount of the specified 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 specified item according to the purchase quantity, the consumption tax and the consumption amount, and write the invoice information into the blockchain.
In one example, assuming that the current purchase quantity of tobacco for the target user is 2 packets, the consumption amount corresponding to the purchase of 2 packets of tobacco for the user is 44 yuan, and the consumption tax corresponding to the 2 packets of tobacco for the user is 10 yuan, the article management system may send an invoicing request to the blockchain network, where the invoicing request carries the current purchase quantity of tobacco for the target user, 2 packets, consumption tax 10 yuan, and consumption amount 44 yuan, and write the invoice information into the blockchain of the blockchain network.
The invoice information of the specific articles purchased by the user is made through the blockchain network, and the invoice information is written into the blockchain of the blockchain network, so that the subsequent article management system is facilitated to determine the historical purchase quantity of the specific articles purchased by the user by inquiring the historical invoice information of the specific articles purchased by the user on the blockchain.
In one embodiment, the user information includes a user age; when the item management system determines the purchase quantity and the consumption tax of the specified item currently purchased by the target user according to the user information and the historical purchase quantity, the upper limit of the purchase quantity of the target user in the preset time range can be determined according to the user age of the target user; and if the historical purchase quantity is smaller than the purchase quantity upper limit, determining the purchase quantity and the consumption tax of the specified item currently purchased by the target user according to the difference between the purchase quantity upper limit and the historical purchase quantity.
In one embodiment, the article management system is preset with a corresponding relationship between the age of the user and the upper limit of the purchase quantity of the purchased specified article, and the embodiment of the present invention does not specifically limit the corresponding relationship between the age of the user and the upper limit of the purchase quantity of the purchased specified article. In one example, the relationship between the user age preset in the article management system and the upper limit of the purchase quantity for purchasing the specified article is as follows: the upper limit of the tobacco purchase quantity of the users under 18 years old is 0, the upper limit of the tobacco purchase quantity of the users under 18 years old is 3 bags in one month, the upper limit of the tobacco purchase quantity of the users under 29-40 years old is 5 bags in one month, the upper limit of the tobacco purchase quantity of the users under 41-60 years old is 4 bags in one month, the upper limit of the tobacco purchase quantity of the users under 60-80 years old is 3 bags in one month, and the upper limit of the tobacco purchase quantity of the users over 80 years old is 2 bags in one month.
In one embodiment, the article management system is preset with the corresponding relationship among the age of the user, the purchase quantity and the consumption tax, and the embodiment of the invention does not specifically limit the corresponding relationship among the age of the user, the purchase quantity and the consumption tax. In one example, the correspondence relationship among the age, the purchase amount and the consumption tax of the user preset by the article management system may be: a user aged 18-28 purchases tobacco in a month at a rate of 10% of a tobacco price per package, a user aged 29-40 purchases tobacco in a month at a rate of 10% of a tobacco price per package, a user aged 41-60 purchases tobacco in a month at a rate of 5% of a tobacco price per package, a user aged 60-80 purchases tobacco in a month at a rate of 2% of a tobacco price per package, and a user aged 80 purchases tobacco in a month at a rate of 1% of a tobacco price per package.
In one example, assuming that the user age of the target user is 30 years and the preset time range is 1 month, the article management system may determine that the target user purchases 5 packs of tobacco within 1 month according to the user age of the target user being 30 years, may determine that the historical purchase amount of the target user purchases 3 packs of tobacco within 1 month is less than the purchase amount upper limit 5 packs of tobacco, may determine that the target user currently purchases 2 packs of tobacco according to a difference value of 5-3 ═ 2 packs between the purchase amount upper limit 5 packs and the historical purchase amount 3 packs, and may determine that the consumption tax is 20 × 10% — 2 packs if the price per pack is 20 elements and the consumption is 10% of the price per pack of tobacco.
In one embodiment, the purchase request also carries the purchase quantity; when determining the purchase quantity and the consumption tax of the specified item currently purchased by the target user according to 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 determine whether the purchase quantity carried in the purchase request is greater than the difference, if the determination result is yes, the purchase quantity and the consumption tax of the specified item currently purchased by the target user may be determined according to the difference, and if the determination result is no, the purchase quantity and the consumption tax of the specified item currently purchased by the target user may be determined according to the purchase quantity carried in the purchase request.
In an embodiment, when determining the purchase quantity and the consumption tax of the specified item currently purchased by the target user according to the purchase quantity carried in the purchase request, the item management system may determine that the purchase quantity carried in the purchase request is the purchase quantity of the specified item currently purchased by the target user, and determine the consumption tax corresponding to the purchase quantity carried in the purchase request according to a preset corresponding relationship between the quantity and the consumption tax and a user age of the target user.
In one example, assume that the purchase quantity of tobacco carried in the purchase request is 1 pack, the historical purchase quantity in one month is 1 pack, and the upper limit of the purchase quantity in 1 month is 3 packs; the item management system may determine that the purchase amount upper limit 3 packages is different from the historical purchase amount 1 packages by 2 packages. Therefore, it may be determined that the purchase quantity 1 pack carried in the purchase request is smaller than the difference 2 pack, and it is determined that the purchase quantity of the target user currently purchasing tobacco is 1 pack according to the purchase quantity 1 pack carried in the purchase request, and if the price of 1 pack of tobacco is 20 yuan and the age of the target user is 30 years, the consumption tax may be determined to be 10% of the tobacco price, thereby determining that the consumption tax is 20 × 10% — 2 yuan.
In one embodiment, when determining the purchase quantity and the consumption tax of the specified item currently purchased by the target user according to the difference, the item management system may determine that the difference is the purchase quantity of the specified item currently purchased by the target user, and determine the consumption tax corresponding to the difference according to a preset corresponding relationship between the quantity and the consumption tax and the user age of the target user.
In one example, assume that the purchase quantity of tobacco carried in the purchase request is 3 bales, the historical purchase quantity in one month is 1 bale, and the upper limit of the purchase quantity in 1 month is 3 bales; the item management system may determine that the purchase amount upper limit 3 packages is different from the historical purchase amount 1 packages by 2 packages. Therefore, it can be determined that the purchase quantity 3 packets carried in the purchase request is greater than the difference 2 packets, and it is determined that the purchase quantity of the target user currently purchasing tobacco is 2 packets according to the difference 2 packets, and if the price of 1 packet of tobacco is 20 yuan and the age of the target user is 30 years, the consumption tax can be determined to be 10% of the tobacco price, so as to determine that the consumption tax is 2 × 20 × 10% — 4 yuan.
The method helps to limit the purchase of the specified items by the users at different ages by setting the purchase quantity and the consumption tax of the specified items purchased by the users at different ages.
In one embodiment, the article management system may determine, when the target user confirms payment of a corresponding consumption tax when it is determined that the historical purchase quantity of the target user within a preset time range is greater than or equal to the purchase quantity upper limit of the target user within the preset time range, an additional quantity and consumption tax at which the target user may purchase the specified article, and the target user cannot purchase the specified article within the preset time range beyond the additional quantity.
In one example, the correspondence relationship among the age, the purchase quantity and the consumption tax of the user, which is preset by the article management system, may also be: a user 18-28 years old purchases tobacco in a month with an amount exceeding the upper limit of the amount purchased, a royalty charge of 80% of the price per package of tobacco, and the target user purchases an additional amount of tobacco of 2 packages; a 29-40 year old user purchases tobacco in a month that exceeds the upper limit of the purchase amount by 90% of the price per package of tobacco, and the target user purchases an additional amount of tobacco of 4 packages; a user age of 41-60 may charge a consumption tax 60% of the price per pack of tobacco in a month that the amount of tobacco purchased by the user exceeds the upper limit of the amount purchased, and the target user purchases 3 packs of tobacco in additional amounts; the user aged 60-80 purchases 50% of the tobacco per package price with the amount of tobacco purchased exceeding the upper limit of the purchase amount in one month, and the target user purchases 2 packages of tobacco, the user aged 80 or older purchases 40% of the tobacco per package price with the amount of tobacco purchased exceeding the upper limit of the purchase amount in one month, and the target user purchases 1 package of tobacco.
The purchase of the specified items by the users is further limited by increasing the consumption tax and limiting the additional purchase quantity when the purchase quantity of the specified items by the users of different ages exceeds the upper limit of the purchase quantity.
According to the method and the device, through acquiring the purchase request carrying the user information of the target user and used for purchasing the specified article, when the historical invoice information of the specified article corresponding to the user information exists in the block chain corresponding to the block chain network, the historical purchase quantity of the specified article purchased by the target user in a preset time range is determined according to the historical invoice information, and the purchase quantity and the consumption tax of the specified article purchased by the target user at present are determined according to the user information and the historical purchase quantity. By the implementation mode, automatic and intelligent control over the purchase of the specified items is achieved, and effective control over the quantity of the specified items purchased by the user is facilitated.
Referring to fig. 3 specifically, fig. 3 is a schematic flowchart of another data processing method based on a blockchain network according to an embodiment of the present invention, where the data processing method based on a blockchain network according to the embodiment of the present invention may be executed by a data processing device, where the data processing device is disposed in a node in the blockchain network, and specifically, the method according to the embodiment of the present invention includes the following steps.
S301: receiving an invoice information query request submitted by an article management system, wherein the invoice information query request carries user information of a target user.
In the embodiment of the invention, the node can receive an invoice information query request submitted by an article management system, wherein 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 identifier, and in an example, the user identifier may be any one or more of an identification number, a telephone number, a name, and the like, and the embodiments of the present invention are not limited in particular.
S302: and querying historical invoice information of the specified item corresponding to the user information from the block chain.
In the embodiment of the invention, the node can inquire the historical invoice information of the specified article corresponding to the user information from the block chain. In certain embodiments, the specified article includes, but is not limited to, tobacco.
In an embodiment, a node may query historical invoice information of a specified item corresponding to a user identifier from a block chain according to the user identifier carried in a received invoice information query request submitted by an item management system.
In an example, assuming that the user identifier is an identity card number, the node may query, according to the identity card number carried in the received invoice information query request submitted by the article management system, historical invoice information of tobacco corresponding to the identity card number from the block chain.
S303: sending the historical invoice information to the item management system, wherein the historical invoice information is used for determining the purchase quantity and consumption tax of the specified item currently purchased by the target user through the item management system.
In this embodiment of the present invention, the node may send the historical invoice information to the article management system, where the historical invoice information is used by the article management system to determine the purchase quantity and the consumption tax of the specified article currently purchased by the target user. In some embodiments, the historical invoice information includes information such as user identification, purchase quantity of the specified item, consumption tax, consumption amount, and the like.
And sending the historical invoice information of the target user for purchasing the specified articles to the article management system through the node, so that the article management system is helped to confirm that the target user can also purchase the quantity and the tax of the specified articles within the preset time range, and the limitation on purchasing the specified articles is realized.
In one embodiment, a node may receive an invoicing request submitted by the article management system, where the invoicing request carries a purchase quantity, a consumption tax, and a consumption amount of a specified article currently purchased by the target user; and the node generates invoice information corresponding to the current purchased specified article according to the purchase quantity, the consumption tax and the consumption amount, and writes the invoice information into the block chain.
By invoicing information of the user for purchasing the specified item through the blockchain and writing the invoice information into the blockchain, the item management system is facilitated to determine the quantity of the specified item purchased by the user by inquiring historical invoice information of the user for purchasing the specified item from the blockchain.
In the embodiment of the invention, the node can receive an invoice information query request which is submitted by an article management system and carries user information of a target user, query historical invoice information of a specified article corresponding to the user information from a block chain, and send the historical invoice information to the article management system. By the embodiment, the article management system is facilitated to determine the purchase quantity and the consumption tax of the specified article currently purchased by the target user according to the historical invoice information, so that the effective control on the purchase of the specified article is realized.
Referring to fig. 4 specifically, fig. 4 is a schematic flowchart of a data processing interaction method based on a blockchain network according to an embodiment of the present invention, where the data processing interaction method based on a blockchain network according to the embodiment of the present invention may be executed by an article management system, a node in the blockchain network, and a user terminal. Specifically, the method of the embodiment of the present invention includes the following steps.
S401: the item management system acquires a purchase request which is sent by a user terminal and used for purchasing a specified item, wherein the purchase request carries user information of a target user.
In the embodiment of the invention, the article management system can acquire a purchase request which is sent by the user terminal and used for purchasing a specified article, wherein the purchase request carries the user information of the target user. The specific embodiments are as described above and will not be described herein.
S402: and the article management system submits an invoice inquiry request to a node in the block chain network, wherein the invoice information inquiry request carries user information of a target user.
In the embodiment of the invention, the article management system can submit the invoice inquiry request to the nodes in the blockchain network, wherein the invoice information inquiry request carries the user information of the target user.
S403: and the node receives an invoice information query request submitted by the article management system and queries historical invoice information of the specified article corresponding to the user information from the block chain.
In the embodiment of the invention, the node can receive the invoice information query request submitted by the article management system and query the historical invoice information of the specified article corresponding to the user information from the block chain. The specific embodiments are as described above and will not be described herein.
S404: sending the historical invoice information to the item management system.
In the embodiment of the present invention, the node may send the historical invoice information to the article management system.
S405: and the article management system determines the historical purchase quantity of the specified articles purchased by the target user within a preset time range according to the historical invoice information.
In the embodiment of the present invention, the article management system may determine, according to the historical invoice information, a historical purchase quantity that the target user has purchased the specified article within a preset time range. The specific embodiments are as described above and will not be described herein.
S406: and the article management system determines the purchase quantity and the consumption tax of the specified articles currently purchased by the target user according to the user information and the historical purchase quantity.
In this embodiment of the present invention, the item management system may determine the purchase amount and the consumption tax of the target user for currently purchasing the specified item according to the user information and the historical purchase amount. The specific embodiments are as described above and will not be described herein.
In the embodiment of the invention, when acquiring a purchase request which is sent by a user terminal and used for purchasing a specified article, an article management system can submit an invoice inquiry request carrying user information of a target user to a node in a blockchain network; the node can receive an invoice information query request submitted by an article management system, query historical invoice information of a specified article corresponding to the user information from a block chain, and send the historical invoice information to the article management system, so that the article management system can determine the historical purchase quantity of the specified article purchased by the target user within a preset time range according to the historical invoice information, and determine the purchase quantity and consumption tax of the specified article purchased by the target user currently according to the user information and the historical purchase quantity. By the implementation mode, automatic and intelligent control over the purchase of the specified items is achieved, and effective control over the quantity of the specified items purchased by the user is facilitated.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention. Specifically, the device is provided in an article management system, and the device includes: an obtaining module 501, a first query module 502, a first determining module 503 and a second determining module 504;
an obtaining module 501, configured to obtain a purchase request for purchasing a specified item, where the purchase request carries user information of a target user;
a first query module 502, configured to query whether historical invoice information of the specified item corresponding to the user information exists in a blockchain corresponding to the blockchain network;
a first determining module 503, configured to determine, according to the historical invoice information, a historical purchase quantity that the target user has purchased the specified item within a preset time range if the query result is yes;
a second determining module 504, configured to determine, according to the user information and the historical purchase amount, a purchase amount and a consumption tax of the target user for currently purchasing the specified item.
Further, after the second determining module 504 determines the purchase quantity and the consumption tax of the target user for currently purchasing the specified item, it is further configured to:
determining the consumption amount corresponding to the purchase quantity of the specified item currently purchased by the target user;
and sending a billing request to the block chain network, wherein the billing request carries the purchase quantity, the consumption tax and the consumption amount of the specified item currently purchased by the target user, and the billing request is used for indicating the block chain network to generate invoice information corresponding to the currently purchased specified item according to the purchase quantity, the consumption tax and the consumption amount, and writing the invoice information into the block chain.
Further, the user information includes a user age; the second determining module 504 is specifically configured to, when determining the purchase quantity and the consumption tax of the specified item currently purchased by the target user according to the user information and the historical purchase quantity:
determining the upper limit of the purchase quantity of the target user in the preset time range according to the user age of the target user;
and if the historical purchase quantity is smaller than the purchase quantity upper limit, determining the purchase quantity and the consumption tax of the specified item currently purchased by the target user according to the difference between the purchase quantity upper limit and the historical purchase quantity.
Further, the purchase request also carries the purchase quantity; the second determining module 504 is specifically configured to, when determining the purchase quantity and the consumption tax of the specified item currently purchased by the target user according to the difference between the purchase quantity upper limit and the historical purchase quantity:
determining a difference between the upper purchase quantity limit and the historical purchase quantity;
judging whether the purchase quantity carried in the purchase request is greater than the difference value;
if so, determining the purchase quantity and the consumption tax of the specified item currently purchased by the target user according to the difference;
and if the judgment result is negative, determining the purchase quantity and the consumption tax of the target user for purchasing the specified item currently according to the purchase quantity carried in the purchase request.
Further, when the second determining module 504 determines the current purchase quantity and the consumption tax of the specified item purchased by the target user according to the difference, it is specifically configured to:
determining the difference value as the purchase quantity of the specified item currently purchased by the target user;
and determining the consumption tax corresponding to the difference value according to the corresponding relation between the preset quantity and the consumption tax and the user age of the target user.
Further, when the second determining module 504 determines the purchase quantity and the consumption tax of the specified item currently purchased by the target user according to the purchase quantity carried in the purchase request, it is specifically configured to:
determining the purchase quantity carried in the purchase request as the purchase quantity of the specified item currently purchased by the target user;
and determining the consumption tax corresponding to the purchase quantity carried in the purchase request according to the corresponding relation between the preset quantity and the consumption tax and the user age of the target user.
According to the method and the device, through acquiring the purchase request carrying the user information of the target user and used for purchasing the specified article, when the historical invoice information of the specified article corresponding to the user information exists in the block chain corresponding to the block chain network, the historical purchase quantity of the specified article purchased by the target user in a preset time range is determined according to the historical invoice information, and the purchase quantity and the consumption tax of the specified article purchased by the target user at present are determined according to the user information and the historical purchase quantity. By the implementation mode, automatic and intelligent control over the purchase of the specified items is achieved, and effective control over the quantity of the specified items purchased by the user is facilitated.
Referring to fig. 6, fig. 6 is a schematic structural diagram of another data processing apparatus according to an embodiment of the present invention. Specifically, the apparatus is disposed in a node in a block chain network, and the apparatus includes: a receiving module 601 and a second query module 602;
a receiving module 601, configured to receive an invoice information query request submitted by an article management system, where the invoice information query request carries user information of a target user;
a second query module 602, configured to query historical invoice information of a specified item corresponding to the user information from a blockchain;
a sending module 603, configured to send the historical invoice information to the article management system, where the historical invoice information is used by the article management system to determine the purchase quantity and consumption tax of the specified article currently purchased by the target user.
Further, the receiving module 601 is further configured to:
receiving an invoicing request submitted by the article management system, wherein the invoicing request carries the purchase quantity, the consumption tax and the consumption amount of the target user for purchasing the specified articles currently;
and generating invoice information corresponding to the current purchased specified article according to the purchase quantity, the consumption tax and the consumption amount, and writing the invoice information into the block chain.
In the embodiment of the invention, when acquiring a purchase request which is sent by a user terminal and used for purchasing a specified article, an article management system can submit an invoice inquiry request carrying user information of a target user to a node in a blockchain network; the node can receive an invoice information query request submitted by an article management system, query historical invoice information of a specified article corresponding to the user information from a block chain, and send the historical invoice information to the article management system, so that the article management system can determine the historical purchase quantity of the specified article purchased by the target user within a preset time range according to the historical invoice information, and determine the purchase quantity and consumption tax of the specified article purchased by the target user currently according to the user information and the historical purchase quantity. By the implementation mode, automatic and intelligent control over the purchase of the specified items is achieved, and effective control over the quantity of the specified items purchased by the user is facilitated.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an article management system according to an embodiment of the present invention. Specifically, the article management system includes: memory 701, processor 702.
In one embodiment, the article management system further comprises a data interface 703, and the data interface 703 is used for transferring data information between the article management system and other devices.
The memory 701 may include a volatile memory (volatile memory); the memory 701 may also include a non-volatile memory (non-volatile memory); the memory 701 may also comprise a combination of memories of the kind described above. The processor 702 may be a Central Processing Unit (CPU). The processor 702 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.
The memory 701 is used for storing programs, and the processor 702 may call the programs stored in the memory 701 to execute the following steps:
acquiring a purchase request for purchasing a specified article, wherein the purchase request carries user information of a target user;
inquiring whether historical invoice information of the specified article corresponding to the user information exists in a block chain corresponding to the block chain network;
if the query result is yes, determining the historical purchase quantity of the specified item purchased by the target user within a preset time range according to the historical invoice information;
and determining the purchase quantity and the consumption tax of the target user for currently purchasing the specified item according to the user information and the historical purchase quantity.
Further, after determining the purchase quantity and the consumption tax of the specified item currently purchased by the target user, the second processor 702 is further configured to:
determining the consumption amount corresponding to the purchase quantity of the specified item currently purchased by the target user;
and sending a billing request to the block chain network, wherein the billing request carries the purchase quantity, the consumption tax and the consumption amount of the specified item currently purchased by the target user, and the billing request is used for indicating the block chain network to generate invoice information corresponding to the currently purchased specified item according to the purchase quantity, the consumption tax and the consumption amount, and writing the invoice information into the block chain.
Further, the user information includes a user age; the processor 702, when determining the purchase quantity and the consumption tax of the specified item currently purchased by the target user according to the user information and the historical purchase quantity, is specifically configured to:
determining the upper limit of the purchase quantity of the target user in the preset time range according to the user age of the target user;
and if the historical purchase quantity is smaller than the purchase quantity upper limit, determining the purchase quantity and the consumption tax of the specified item currently purchased by the target user according to the difference between the purchase quantity upper limit and the historical purchase quantity.
Further, the purchase request also carries the purchase quantity; the processor 702 is specifically configured to, when determining the purchase quantity and the consumption tax of the specified item currently purchased by the target user according to the difference between the purchase quantity upper limit and the historical purchase quantity, determine:
determining a difference between the upper purchase quantity limit and the historical purchase quantity;
judging whether the purchase quantity carried in the purchase request is greater than the difference value;
if so, determining the purchase quantity and the consumption tax of the specified item currently purchased by the target user according to the difference;
and if the judgment result is negative, determining the purchase quantity and the consumption tax of the target user for purchasing the specified item currently according to the purchase quantity carried in the purchase request.
Further, when determining the current purchase quantity and consumption tax of the specified item purchased by the target user according to the difference, the processor 702 is specifically configured to:
determining the difference value as the purchase quantity of the specified item currently purchased by the target user;
and determining the consumption tax corresponding to the difference value according to the corresponding relation between the preset quantity and the consumption tax and the user age of the target user.
Further, when determining the purchase quantity and the consumption tax of the specified item currently purchased by the target user according to the purchase quantity carried in the purchase request, the processor 702 is specifically configured to:
determining the purchase quantity carried in the purchase request as the purchase quantity of the specified item currently purchased by the target user;
and determining the consumption tax corresponding to the purchase quantity carried in the purchase request according to the corresponding relation between the preset quantity and the consumption tax and the user age of the target user.
According to the embodiment of the invention, an article management system acquires a purchase request carrying user information of a target user and used for purchasing a specified article, determines the historical purchase quantity of the specified article purchased by the target user within a preset time range according to historical invoice information when the historical invoice information of the specified article corresponding to the user information exists in a block chain corresponding to a block chain network, and determines the purchase quantity and consumption tax of the specified article purchased by the target user currently according to the user information and the historical purchase quantity. By the implementation mode, automatic and intelligent control over the purchase of the specified items is achieved, and effective control over the quantity of the specified items purchased by the user is facilitated.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a node according to an embodiment of the present invention. Specifically, the node includes: memory 801, processor 802.
In one embodiment, the node further comprises a data interface 803, and the data interface 803 is used for transmitting data information between the node and other devices.
The memory 801 may include a volatile memory (volatile memory); the memory 801 may also include a non-volatile memory (non-volatile memory); the memory 801 may also comprise a combination of memories of the kind described above. 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.
The memory 801 is used for storing programs, and the processor 802 can call the programs stored in the memory 801 for executing the following steps:
receiving an invoice information query request submitted by an article management system, wherein the invoice information query request carries user information of a target user;
querying historical invoice information of a specified article corresponding to the user information from a block chain;
sending the historical invoice information to the item management system, wherein the historical invoice information is used for determining the purchase quantity and consumption tax of the specified item currently purchased by the target user through the item management system.
Further, the processor 802 is further configured to:
receiving an invoicing request submitted by the article management system, wherein the invoicing request carries the purchase quantity, the consumption tax and the consumption amount of the target user for purchasing the specified articles currently;
and generating invoice information corresponding to the current purchased specified article according to the purchase quantity, the consumption tax and the consumption amount, and writing the invoice information into the block chain.
According to the method and the device for purchasing the designated articles, a node acquires a purchase request carrying user information of a target user and used for purchasing the designated articles, when historical invoice information of the designated articles corresponding to the user information exists in a block chain corresponding to a block chain network, the historical purchase quantity of the designated articles purchased by the target user in a preset time range is determined according to the historical invoice information, and the purchase quantity and the consumption tax of the designated articles purchased by the target user at present are determined according to the user information and the historical purchase quantity. By the implementation mode, automatic and intelligent control over the purchase of the specified items is achieved, and effective control over the quantity of the specified items purchased by the user is facilitated.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the method described in the embodiment corresponding to fig. 2, fig. 3, or fig. 4 of the present invention, and may also implement the apparatus in the embodiment corresponding to the present invention described in fig. 5 or fig. 6, which is not described herein again.
The computer readable storage medium may be an internal storage unit of the device according to any of the foregoing embodiments, for example, a hard disk or a 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 Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the device. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the apparatus. The computer-readable storage medium is used for storing 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.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the invention has been described with reference to a number of embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A data processing method based on a block chain network is characterized by comprising the following steps:
acquiring a purchase request for purchasing a specified article, wherein the purchase request carries user information of a target user;
inquiring whether historical invoice information of the specified article corresponding to the user information exists in a block chain corresponding to the block chain network;
if the query result is yes, determining the historical purchase quantity of the specified item purchased by the target user within a preset time range according to the historical invoice information;
and determining the purchase quantity and the consumption tax of the target user for currently purchasing the specified item according to the user information and the historical purchase quantity.
2. The method of claim 1, wherein after determining the purchase quantity and the consumption tax of the target user for currently purchasing the specified item, further comprising:
determining the consumption amount corresponding to the purchase quantity of the specified item currently purchased by the target user;
and sending a billing request to the block chain network, wherein the billing request carries the purchase quantity, the consumption tax and the consumption amount of the specified item currently purchased by the target user, and the billing request is used for indicating the block chain network to generate invoice information corresponding to the currently purchased specified item according to the purchase quantity, the consumption tax and the consumption amount, and writing the invoice information into the block chain.
3. The method of claim 1, wherein the user information comprises a user age; the determining the purchase quantity and the consumption tax of the target user for currently purchasing the specified item according to the user information and the historical purchase quantity comprises the following steps:
determining the upper limit of the purchase quantity of the target user in the preset time range according to the user age of the target user;
and if the historical purchase quantity is smaller than the purchase quantity upper limit, determining the purchase quantity and the consumption tax of the specified item currently purchased by the target user according to the difference between the purchase quantity upper limit and the historical purchase quantity.
4. The method of claim 3, wherein the purchase request further carries a purchase amount; the determining the purchase quantity and the consumption tax of the target user for currently purchasing the specified item according to the difference value between the purchase quantity upper limit and the historical purchase quantity comprises:
determining a difference between the upper purchase quantity limit and the historical purchase quantity;
judging whether the purchase quantity carried in the purchase request is greater than the difference value;
if so, determining the purchase quantity and the consumption tax of the specified item currently purchased by the target user according to the difference;
and if the judgment result is negative, determining the purchase quantity and the consumption tax of the target user for purchasing the specified item currently according to the purchase quantity carried in the purchase request.
5. The method of claim 4, wherein said determining a purchase quantity and a consumption tax of said target user for currently purchasing said specified item based on said difference comprises:
determining the difference value as the purchase quantity of the specified item currently purchased by the target user;
and determining the consumption tax corresponding to the difference value according to the corresponding relation between the preset quantity and the consumption tax and the user age of the target user.
6. The method of claim 4, wherein determining the purchase quantity and the consumption tax of the target user for currently purchasing the specified item according to the purchase quantity carried in the purchase request comprises:
determining the purchase quantity carried in the purchase request as the purchase quantity of the specified item currently purchased by the target user;
and determining the consumption tax corresponding to the purchase quantity carried in the purchase request according to the corresponding relation between the preset quantity and the consumption tax and the user age of the target user.
7. A data processing method based on a block chain network is characterized by comprising the following steps:
receiving an invoice information query request submitted by an article management system, wherein the invoice information query request carries user information of a target user;
querying historical invoice information of a specified article corresponding to the user information from a block chain;
sending the historical invoice information to the item management system, wherein the historical invoice information is used for determining the purchase quantity and consumption tax of the specified item currently purchased by the target user through the item management system.
8. The method of claim 7, wherein the method comprises:
receiving an invoicing request submitted by the article management system, wherein the invoicing request carries the purchase quantity, the consumption tax and the consumption amount of the target user for purchasing the specified articles currently;
and generating invoice information corresponding to the current purchased specified article according to the purchase quantity, the consumption tax and the consumption amount, and writing the invoice information into the block chain.
9. A data processing apparatus, characterized in that the apparatus comprises:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a purchase request for purchasing a specified article, and the purchase request carries user information of a target user;
the first query module is used for querying whether historical invoice information of the specified article corresponding to the user information exists in a block chain corresponding to the block chain network;
the first determination module is used for determining the historical purchase quantity of the specified item purchased by the target user within a preset time range according to the historical invoice information if the query result is yes;
and the second determination module is used for determining the purchase quantity and the consumption tax of the specified item currently purchased by the target user according to the user information and the historical purchase quantity.
10. A data processing apparatus, characterized in that the apparatus comprises:
the receiving module is used for receiving an invoice information query request submitted by an article management system, wherein the invoice information query request carries user information of a target user;
the second query module is used for querying historical invoice information of the specified article corresponding to the user information from the block chain;
and the sending module is used for sending the historical invoice information to the article management system, and the historical invoice information is used for determining the purchase quantity and the consumption tax of the specified articles purchased by the target user currently by the article management system.
CN201911124323.0A 2019-11-15 2019-11-15 Data processing method and device based on block chain network Pending CN110909044A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911124323.0A CN110909044A (en) 2019-11-15 2019-11-15 Data processing method and device based on block chain network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911124323.0A CN110909044A (en) 2019-11-15 2019-11-15 Data processing method and device based on block chain network

Publications (1)

Publication Number Publication Date
CN110909044A true CN110909044A (en) 2020-03-24

Family

ID=69817843

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911124323.0A Pending CN110909044A (en) 2019-11-15 2019-11-15 Data processing method and device based on block chain network

Country Status (1)

Country Link
CN (1) CN110909044A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102651089A (en) * 2011-02-25 2012-08-29 研祥智能科技股份有限公司 Tobacco management system and tobacco selling control method
CN105976201A (en) * 2016-04-28 2016-09-28 北京小米移动软件有限公司 Purchase behavior monitoring method for electronic business system and device
CN107077682A (en) * 2016-12-23 2017-08-18 深圳前海达闼云端智能科技有限公司 Method and device for inquiring state information of electronic ticket and block link point
CN108734576A (en) * 2018-04-04 2018-11-02 深圳大学 A kind of shared education resources method and system based on block chain
CN110322327A (en) * 2019-07-09 2019-10-11 深圳市炳德区块链技术有限公司 A kind of laboratory personnel shopping recommended method and device based on block chain technology

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102651089A (en) * 2011-02-25 2012-08-29 研祥智能科技股份有限公司 Tobacco management system and tobacco selling control method
CN105976201A (en) * 2016-04-28 2016-09-28 北京小米移动软件有限公司 Purchase behavior monitoring method for electronic business system and device
CN107077682A (en) * 2016-12-23 2017-08-18 深圳前海达闼云端智能科技有限公司 Method and device for inquiring state information of electronic ticket and block link point
CN108734576A (en) * 2018-04-04 2018-11-02 深圳大学 A kind of shared education resources method and system based on block chain
CN110322327A (en) * 2019-07-09 2019-10-11 深圳市炳德区块链技术有限公司 A kind of laboratory personnel shopping recommended method and device based on block chain technology

Similar Documents

Publication Publication Date Title
CN108985757B (en) Information processing method, device and system, storage medium and electronic equipment
US10387856B2 (en) Online payment method, system, and apparatus
WO2017049550A1 (en) Adapter and adapter upgrade method
CN110599349A (en) Data processing method based on block chain network, related equipment and storage medium
CN105187444A (en) Key information burning method and device
CN111177121A (en) Order data feedback method and device, computer equipment and storage medium
CN111581502A (en) Information notification method and device
CN113434293A (en) Method and apparatus for processing repeat request, storage medium, and electronic apparatus
CN112860953A (en) Data importing method, device, equipment and storage medium of graph database
CN108965991B (en) Program ordering state verification method and system, terminal device and storage medium
CN112738019B (en) Method and device for displaying device information, storage medium and electronic device
CN111325586B (en) Bill generation method, device, server and medium based on block chain network
CN111355765A (en) Network request processing and sending method and device
CN108882230B (en) Call record management method, device and system
CN110390060B (en) Parking information query method and device, terminal, cloud server and system
CN110909044A (en) Data processing method and device based on block chain network
CN111899104B (en) Service execution method and device
CN110599133A (en) Data processing method and device based on block chain network and storage medium
CN110597886A (en) Data processing method and device and computer storage medium
CN106341449A (en) Data synchronization method and device
EP3174322A1 (en) Method for deleting notification resource, and common service entity
CN110753323A (en) Card resource allocation method and server
CN112491994B (en) Identification method and communication device of Internet of vehicles terminal
CN115913802A (en) Service data processing method and device, electronic equipment and storage medium
CN111292144B (en) Bill processing method and device based on block chain network and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination