CN111242707A - Data processing method and device and readable storage medium - Google Patents

Data processing method and device and readable storage medium Download PDF

Info

Publication number
CN111242707A
CN111242707A CN202010073162.3A CN202010073162A CN111242707A CN 111242707 A CN111242707 A CN 111242707A CN 202010073162 A CN202010073162 A CN 202010073162A CN 111242707 A CN111242707 A CN 111242707A
Authority
CN
China
Prior art keywords
segment
invoice number
invoice
number segment
identification information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010073162.3A
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 CN202010073162.3A priority Critical patent/CN111242707A/en
Publication of CN111242707A publication Critical patent/CN111242707A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/04Billing or invoicing
    • 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

Abstract

The embodiment of the invention provides a data processing method, a device and a readable storage medium, wherein the data processing method is applied to node equipment of a block chain network, and comprises the following steps: receiving a number section claiming request sent by a user terminal device, wherein the number section claiming request comprises the number of number section claiming and user identification information corresponding to the user terminal device; responding the number section claiming request, and verifying the number of claim sections based on the user identification information; if the verification is passed, calling the intelligent contract to determine a target invoice number section corresponding to the number section claiming quantity; and under the condition that the target invoice number segment is identified and passed by other node equipment in the block chain network, sending the target invoice number segment to the invoicing equipment corresponding to the user identification information. By adopting the data processing method, the uniqueness of the invoice number segment is ensured, and meanwhile, the stability of the invoice number segment distribution can be improved.

Description

Data processing method and device and readable storage medium
Technical Field
The present invention relates to the field of computer applications, and in particular, to a data processing method and apparatus, and a readable storage medium.
Background
The invoice number section of the invoice is the only identification of the invoice, and the tax bureau relies on centralized equipment to distribute the invoice number section so as to avoid the waste of the invoice number section and ensure that the invoice number section is only. However, if the centralized equipment fails, the user cannot acquire the invoice number segment to perform invoicing, so that the stability of acquiring the invoice number segment by adopting the method is poor.
Therefore, how to provide a data processing method which can ensure the uniqueness of the invoice number segment and improve the stability in the invoice distribution process is an urgent problem to be solved.
Disclosure of Invention
The embodiment of the invention provides a data processing method, a device and a readable storage medium, wherein the data processing method is adopted, so that block chain node point equipment can be distributed to invoicing equipment after passing the common identification of the invoice number segment, and the uniqueness of the invoice number segment is ensured; meanwhile, the block chain network technology has the technical characteristic of decentralization, so that other node equipment in the block chain network can be adopted to distribute the number segments when a certain node equipment fails, and the stability of the invoice number segment distribution process is improved.
In a first aspect, an embodiment of the present invention provides a data processing method, where the method is applied to a node device of a blockchain network, and the method includes:
receiving a number segment claiming request sent by user terminal equipment, wherein the number segment claiming request comprises the number of number segment claiming and user identification information corresponding to the user terminal equipment;
verifying the number of number field claiming numbers based on the user identification information in response to the number field claiming request;
if the verification is passed, calling an intelligent contract to determine a target invoice number section corresponding to the number section claiming quantity;
and under the condition that the target invoice number segment is identified with other node equipment in the block chain network, the target invoice number segment is sent to invoicing equipment corresponding to the user identification information.
In a second aspect, an embodiment of the present invention provides a data processing apparatus, where the method is configured in a node device of a blockchain network, and the apparatus includes:
the system comprises a data acquisition unit, a data processing unit and a data processing unit, wherein the data acquisition unit is used for receiving a number segment claiming request sent by user terminal equipment, and the number segment claiming request comprises number of number segment claiming and user identification information corresponding to the user terminal equipment;
the data processing unit is used for responding to the number section claiming request and verifying the number section claiming quantity based on the user identification information;
the data processing unit is also used for calling an intelligent contract to determine a target invoice number section corresponding to the number section claiming quantity if the verification is passed;
and the data sending unit is used for sending the target invoice number segment to the invoicing equipment corresponding to the user identification information under the condition that the target invoice number segment is identified with other node equipment in the block chain network.
In a third aspect, an embodiment of the present invention provides a node device, where the node device includes an input device and an output device, and the node device further includes a processor adapted to implement one or more instructions; and a computer readable storage medium storing one or more instructions adapted to be loaded by the processor and to perform the data processing method of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where instructions are stored, and when the instructions are executed on a computer, the instructions cause the computer to execute the data processing method according to the first aspect.
The embodiment of the invention provides a data processing method, a device and a readable storage medium, wherein the data processing method is applied to node equipment of a block chain network, and comprises the following steps: receiving a number section claiming request sent by a user terminal device, wherein the number section claiming request comprises the number of number section claiming and user identification information corresponding to the user terminal device; responding the number section claiming request, and verifying the number of claim sections based on the user identification information; if the verification is passed, calling the intelligent contract to determine a target invoice number section corresponding to the number section claiming quantity; and under the condition that the target invoice number segment is identified and passed by other node equipment in the block chain network, sending the target invoice number segment to the invoicing equipment corresponding to the user identification information. By adopting the data processing method, the block chain link point equipment can be distributed to the invoicing equipment after passing the invoice number segment common identification, so that the uniqueness of the invoice number segment is ensured, and meanwhile, as the block chain network technology has the technical characteristic of decentralization, other node equipment in the block chain network can be adopted for number segment distribution when a certain node equipment fails, so that the stability of the invoice number segment distribution process is improved.
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. 1 is a block diagram of a data processing system according to an embodiment of the present invention;
FIG. 2 is a flow chart of a data processing method according to an embodiment of the present invention;
FIG. 3 is a flow chart of another data processing method provided by the embodiment of the invention;
FIG. 4 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a node device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described 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 of the 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.
Fig. 1 is a schematic structural diagram of a data processing system according to an embodiment of the present invention, where the data processing system includes a blockchain network 10, a user terminal device 11, and a billing device 12 corresponding to the user terminal. Wherein:
the blockchain network 10 specifically refers to a network for performing data sharing between nodes, and the blockchain network may include a plurality of nodes 101. Each node 101 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 user terminal device 11 and the billing device 12 have access to the blockchain network and can communicate with nodes in the blockchain network. The user terminal device 11 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a vehicle-mounted smart terminal, and the like. The billing device 12 may be a billing machine or a smart phone, a tablet computer, a notebook computer, a desktop computer, a vehicle-mounted intelligent terminal, etc. connected to the billing machine, and if the billing device 12 is a smart phone, a tablet computer, a notebook computer, a desktop computer, a vehicle-mounted intelligent terminal connected to the billing machine, it may be the same device as the user terminal device 11, which is not limited herein.
Each node in the blockchain network has a corresponding node identifier, and each node in the blockchain network can store node identifiers of other nodes in the blockchain network, so that the generated block can be 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 the table is described by taking the IP address as an example.
Node name Node identification
Node 1 117.114.151.174
Node 2 117.116.189.145
Node N 119.123.789.258
In some possible embodiments, a certain node of the block chain network 10 may receive a number segment claim request sent by the user terminal device 11, where the number segment claim request includes the number of number segment claims and the user identification information corresponding to the user terminal device 11. Further, a certain node of the block chain network 10 responds to the number segment claiming request, verifies the claim number of the number segment based on the user identification information, if the verification is passed, calls an intelligent contract to determine a target invoice number segment corresponding to the claim number of the number segment, and sends the target invoice number segment to the invoicing equipment corresponding to the user identification information under the condition that other node equipment in the block chain network passes the target invoice number segment in a consensus. By adopting the data processing method, the block chain link point equipment can be distributed to the invoicing equipment after passing the invoice number segment common identification, so that the uniqueness of the invoice number segment is ensured, and meanwhile, as the block chain network technology has the technical characteristic of decentralization, the data processing method can adopt other node equipment in the block chain network to distribute the number segment when a certain node equipment fails so as to improve the stability of the invoice number segment distribution process.
Referring to fig. 2, a flow chart of a data processing method according to an embodiment of the present invention is shown, where the method is executable by a node device, and the data processing method includes the following steps:
s201: receiving a number segment claiming request sent by user terminal equipment, wherein the number segment claiming request comprises the number of number segment applications and user identification information corresponding to the user terminal equipment.
The user identification information may be a user name, a mobile phone number, an identification number or a character string number, etc., which can uniquely identify the user when the user registers for invoicing in the tax bureau, and is not particularly limited herein.
And when detecting that the invoice number segment stored in the invoicing equipment corresponding to the user identification information is less than or equal to the number threshold N, the user terminal equipment is triggered to send a number segment claiming request to the block link point equipment. The number threshold N is an integer greater than or equal to 0, and may be set by the user according to the self turnover or billing requirement, which is not limited herein.
S202: and responding the number section claiming request to verify the number of the number section application based on the user identification information.
And the node equipment acquires a legal user directory, matches the user identification information with the legal invoicing user identification in the legal user directory, if the matching is successful, determines that the user terminal corresponding to the user identification information is a legal invoicing user, and responds to the number section claiming request. Further, the node device obtains one or more of industry average data of the user, user business data, user invoice using quantity and invoice amount within a preset time limit corresponding to the user identification information, verifies the number of the number section application according to the data, verifies whether the number of the number section application is reasonable or not, and carries out tax management and control on the user terminal in such a way. The preset time limit is set by a developer according to the requirement of the tax bureau or a formulated rule, can be adjusted according to the actual situation, and is not specifically limited herein. It is to be understood that the legal user directory is constructed by storing the user identification information after the user is submitted to the registration information for verification and passing when the tax bureau applies for the user to become the billing agency.
Optionally, the node device responds to the number segment claiming request to query the claimable quantity total amount and claimed quantity corresponding to the user identification information, and if the sum of the claimable quantity and claimed quantity of the number segment is less than or equal to the claimable quantity total amount, the number segment claiming quantity is determined to pass verification. Otherwise, if the sum of the claimed quantity and the claimed quantity is larger than the total limit of the claimed quantity, determining that the claimed quantity of the number section is not verified, further, the node device interrupts the claimed request of the number section of the user and sends a notification message notifying that the claimed quantity is not verified to the user terminal device. The total amount of the amount which can be claimed is set by the tax bureau according to one or more of the business data, the number of the used invoices and the invoice amount of each invoice, and can be adjusted according to the specific use scene at the later stage, and the total amount of the amount which can be claimed is stored in association with the user identification information.
Illustratively, an enterprise A sends a number segment claiming request for claiming 50 invoice number segments to a node device through a user terminal device corresponding to the enterprise A, the node device obtains that the enterprise A is a convenience store after verifying that the enterprise A is a legal invoicing enterprise, the average monthly business amount of the convenience store is 10w within one year, the invoiced denomination does not exceed 1000 yuan, the total amount of invoices claimable by the enterprise A per month is regulated to be 150 according to the formulated rule of a tax bureau, 100 invoice number segments claimed by the enterprise A per month are inquired, the number of claimed invoice segments is 50 reasonable, and the node device verifies the number of claimed invoice segments according to the user identification information of the enterprise A.
Optionally, if the sum of the claimed quantity and the claimed quantity is greater than the total amount of the claimable quantity, the node device determines that the claimed quantity of the number segment fails to be verified, and further, the node device may determine the number of the number segments to which the user terminal can be assigned according to the difference between the claimed quantity and the total amount of the claimable quantity.
Illustratively, after verifying that the enterprise B is a legal invoicing enterprise, the node device acquires that the enterprise B is a snack store, the average monthly business amount of the convenience store is 10w within one year, and the invoicing denomination does not exceed 1500 yuan, the total amount of invoices which can be claimed by the enterprise B per month is 120 according to rules formulated by a tax bureau, and 100 invoice number segments which can be claimed by the enterprise B per month is inquired, so that the number of claim number of the invoice segment is 70 unreasonable, that is, the node device does not pass verification of the number of claim segment according to the user identification information of the enterprise B, the total amount of claimable number is 120 according to the claimed amount of 100, and the difference is 20, so that 20 is used as the number of assignable number segments of the enterprise B.
S203: and if the verification is passed, calling the intelligent contract to determine the target invoice number section corresponding to the number section claiming quantity.
And after the number section claiming quantity is verified, generating a target invoice number section corresponding to the number section claiming quantity according to an invoice number section generation rule in the intelligent contract. The invoice number segment generation rule is formulated by the tax bureau according to relevant provisions or rules, and the invoice number segment generation rule specifies the generation mode (random generation or incremental generation) of the invoice number segment, the invoice number segment style (the length of the segment or the type of characters contained in the segment) and the like.
Optionally, the node device invokes an intelligent contract to generate a first candidate invoice number segment set according to the invoice number segment generation rule and the number of claim of the number segment. And if the invoice number segments included in the first candidate invoice number segment set do not have corresponding identification information, taking the invoice number segments included in the first candidate invoice number segment set as target invoice number segments corresponding to the number segment claim quantity, wherein the identification information is used for identifying the generated invoice number segments, and adding identification information to each invoice number segment in the target invoice number segments. The invoice number segment generation mode is adopted to ensure the uniqueness of each invoice number segment.
Illustratively, the node device invokes an intelligent contract to generate a first set of candidate invoice number segments including 3 invoice number segments, xxxxxxxx 1, xxxxxxxx 2, and xxxxxxxx 3, obtains all invoice number segments in the identification information checklist, matches xxxxxx1, xxxxxx2, and xxxxxx3 with all invoice number segments in the identification information checklist, determines xxxxxx1, xxxxxxxx 2, and xxxxxxxx 3 as allocated invoice number segments if none of the matches are successful, and further, the node device may use the xxxxxx1, xxxx2, and xxxxxxxx 3 as target invoice number segments and add identification information to xxxxxx 35 1, xxxxxxxx 2, and xxxx 3.
Optionally, if the invoice number segment included in the first candidate invoice number segment set has corresponding identification information, the node device invokes the intelligent contract to generate a second candidate invoice number segment set according to the invoice number segment generation rule and the number segment claim number. And if the invoice number segments included in the second candidate invoice number segment set do not have corresponding identification information, taking the invoice number segments included in the second candidate invoice number segment set as target invoice number segments corresponding to the number segment claim quantity.
Illustratively, the node device invokes a smart contract to generate a first set of candidate invoice number segments including 3 invoice number segments, xxxxxx5, xxxxxx6, and xxxxxx7, respectively, obtains all invoice number segments in the identification information verification table, matches xxxxxx5, xxxxxx6, and xxxxxx7 with all invoice number segments in the identification information verification table, determines xxxxxx5 as a used invoice number segment if xxxxxx5 matches an invoice number segment in the identification information verification table successfully, may invoke the smart contract to generate a second set of candidate invoice number segments xxxxxxxxxx 6, xxxxxxxx 7, and xxxxxx8, and determines that a second set of candidate invoice number segments includes an assigned invoice number segment (i.e., an available invoice number segment) if there is no corresponding identification information for the invoice number segment in the second set of candidate invoice number segments, and further may utilize the smart contract to generate the xxxx6, xxxxxx7, and xxxxxx 36 8 as target invoice number segments.
Optionally, the node device may further invoke an intelligent contract to generate a target invoice number segment corresponding to the number segment claim number according to the invoice generation rule and the number segment claim number, and add a timestamp or other unique data identifier (e.g., timestamp) to the target invoice number segment to indicate that the invoice number segment is unique. For example, invoice number segment XXXXXX4 has been assigned to Enterprise A, and the timestamp marks the generation time of the invoice number segment as 0001. After the enterprise B sends a number section claiming request to the node equipment, the node equipment responds to the number section claiming request, an intelligent contract is called to generate an invoice number section XXXXXX4, a timestamp is added to the invoice number section, and the generation time of the invoice number section is marked to be 0002, so that when two invoice number sections are consistent, the uniqueness of the invoice number section can be guaranteed to be marked through the timestamp.
S204: and under the condition that the target invoice number segment is identified and passed by other node equipment in the block chain network, sending the target invoice number segment to invoicing equipment corresponding to the user identification information.
After the node equipment determines the target invoice number segment, other node equipment in the block chain network adopts a block chain network consensus mechanism to perform consensus on the target invoice number segment, and if the consensus passes, the target invoice number segment is sent to invoicing equipment corresponding to the user identification information. And if the common identification is not passed, executing the step of calling the intelligent contract to determine the target invoice number section corresponding to the number section claiming quantity again.
In the embodiment of the application, a node device of a block chain network receives a number segment claiming request sent by a user terminal device, wherein the number segment claiming request comprises a number segment claiming amount and user identification information corresponding to the user terminal device, and further, the number segment claiming amount is verified based on the user identification information in response to the number segment claiming request; and if the verification is passed, calling the intelligent contract to determine the target invoice number section corresponding to the number section claiming quantity. And under the condition that the target invoice number segment is identified and passed by other node equipment in the block chain network, sending the target invoice number segment to invoicing equipment corresponding to the user identification information. By adopting the data processing method, the block chain link point equipment can be distributed to the invoicing equipment after passing the common identification of the invoice number segment, so that the uniqueness of the invoice number segment is ensured. And when the node device passes the common identification with other node devices in the block chain network aiming at the target invoice number segment, the node device sends the target invoice number segment to the invoicing device corresponding to the user identification information. By adopting the data processing method, the block chain link point equipment ensures the uniqueness of the invoice number segment, and the block chain network technology has the technical characteristic of decentralization, so that other node equipment in the block chain network can be adopted to distribute the number segment when a certain node equipment fails, and the stability of the invoice number segment distribution process is improved.
Referring to fig. 3, a schematic flow chart of another data processing method according to an embodiment of the present invention is shown, where the method is executed by a node device, and the data processing method includes the following steps:
s301: receiving a number segment claiming request sent by user terminal equipment, wherein the number segment claiming request comprises the number of number segment applications and user identification information corresponding to the user terminal equipment.
S302: and responding the number section claiming request to verify the number of the number section application based on the user identification information.
The specific implementation of steps S301 to S302 may refer to the specific implementation of steps S201 to S202 in the foregoing embodiments, and will not be described in detail herein.
S303: and if the verification is passed, calling an intelligent contract to obtain the target invoice number section corresponding to the number section claiming quantity from a first number section pool, wherein the first number section pool comprises the invoice number section to be distributed.
After the node device verifies the number of the number section application, the node device can acquire the target invoice number section corresponding to the number section application number from the first number section pool in a random acquisition mode or a sequential rule acquisition mode.
In one embodiment, after the number of the number-section application is verified, the number of the invoice number sections to be allocated in the first number-section pool is obtained by the node device, the number of the number-section application is compared with the number of the invoice number sections to be allocated in the first number-section pool, and if the number of the number-section application is less than or equal to the number of the invoice number sections to be allocated in the first number-section pool, the intelligent contract is called to obtain the target invoice number section corresponding to the number-section application quantity from the first number-section pool.
S304: and under the condition that the target invoice number segment is identified and passed by other node equipment in the block chain network, sending the target invoice number segment to invoicing equipment corresponding to the user identification information.
The specific implementation of step S304 may refer to the specific implementation of step S204 in the foregoing embodiments, and will not be described in detail herein.
S305: the target invoice number segment is removed from the first number segment pool.
The node device may remove the target number segment from the first number segment pool to ensure uniqueness of the invoice number segment and add the target invoice number segment to a second number segment pool that includes the assigned invoice number segments.
Optionally, the node device may invoke an intelligent contract to detect a target number of the invoice number segments to be allocated included in the first number segment pool, and if it is detected that the target number is less than or equal to a number threshold, generate a preset number of invoice number segments according to an invoice number segment generation rule, and add the generated preset number of invoice number segments to the first number segment pool. The preset quantity is calculated and calculated by developers according to experimental data, and can be adjusted in the later stage according to actual conditions. It should be understood that the node device invokes the intelligent contract to perform regular detection or irregular spot check detection on the target number of the invoice number segments to be allocated included in the first number segment pool according to the period measured and calculated by the developer according to the experimental data, which is not specifically limited.
Optionally, the node device may further match the generated invoice number segments of the preset number with the invoice number segments in the first number segment pool and the invoice number segments in the second number segment pool, respectively, and if the matching is not successful, perform the step of adding the generated invoice number segments of the preset number to the first number segment pool.
Optionally, the node device may further mark the target number segment as allocated in the first number segment pool, and cannot match the generated invoice number segments of the preset number with the to-be-allocated invoice number segment and the allocated invoice number segment in the first number segment pool, respectively, and if the matching is not successful, execute the step of adding the generated invoice number segments of the preset number to the first number segment pool.
In the embodiment of the application, the node device receives a number segment claiming request sent by the user terminal device, where the number segment claiming request includes the number of number segment applications and user identification information corresponding to the user terminal device. Further, the node device responds to the number segment claiming request and verifies the number segment application number based on user identification information, if the number segment application number passes the verification, an intelligent contract is called to obtain a target invoice number segment corresponding to the number segment claiming number from a first number segment pool, the first number segment pool comprises invoice number segments to be distributed, and under the condition that the target invoice number segment passes the common identification with other node devices in the block chain network, the target invoice number segment is sent to the invoicing device corresponding to the user identification information, and then the target invoice number segment can be removed from the first number segment pool. By adopting the data processing method, the block chain link point equipment can be distributed to the invoicing equipment after passing the invoice number segment common identification, so that the uniqueness of the invoice number segment is ensured, and meanwhile, as the block chain network technology has the technical characteristic of decentralization, other node equipment in the block chain network can be adopted for number segment distribution when a certain node equipment fails, so that the stability of the invoice number segment distribution process is improved.
Referring to fig. 4, a schematic structural diagram of a data processing apparatus according to an embodiment of the present application is shown, where the apparatus is configured with a node device of a blockchain network, and the apparatus includes:
a data obtaining unit 40, configured to receive a number segment claim request sent by a user terminal device, where the number segment claim request includes a number of number segment claims and user identification information corresponding to the user terminal device;
a data processing unit 41, configured to verify the number of number segment claim based on the user identification information in response to the number segment claim request;
the data processing unit 41 is further configured to, if the verification is passed, invoke an intelligent contract to determine a target invoice number segment corresponding to the number segment claim number;
and a data sending unit 42, configured to send the target invoice number segment to the invoicing equipment corresponding to the user identification information when the target invoice number segment is identified with another node device in the blockchain network.
In one embodiment, the data processing unit 41 is specifically configured to invoke an intelligent contract to generate a first candidate invoice number segment set according to an invoice number segment generation rule and the number of claim number segments; if the invoice number segment included in the first candidate invoice number segment set does not have corresponding identification information, taking the invoice number segment included in the first candidate invoice number segment set as a target invoice number segment corresponding to the number segment claim quantity, wherein the identification information is used for identifying the generated invoice number segment; and adding identification information to each invoice number segment in the target invoice number segments.
In an embodiment, the data processing unit 41 is further specifically configured to invoke the intelligent contract to generate a second candidate invoice number segment set according to the invoice number segment generation rule and the number of claim segments if the invoice number segments included in the first candidate invoice number segment set have corresponding identification information; and if the invoice number segments included in the second candidate invoice number segment set do not have corresponding identification information, taking the invoice number segments included in the second candidate invoice number segment set as target invoice number segments corresponding to the number segment claim quantity.
In an embodiment, the data processing unit 41 is specifically configured to invoke an intelligent contract to obtain a target invoice number segment corresponding to the number-segment claim quantity from a first number-segment pool, where the first number-segment pool includes invoice number segments to be allocated; after the target invoice number segment is sent to the invoicing equipment corresponding to the user identification information, the data processing unit 41 is specifically further configured to remove the target invoice number segment from the first number segment pool.
In an embodiment, the data processing unit 41 is further specifically configured to invoke the intelligent contract to detect a target number of the invoice number segments to be allocated included in the first number segment pool; if the target quantity is smaller than or equal to the quantity threshold value, generating a preset quantity of invoice number segments according to an invoice number segment generation rule; and adding the generated invoice number segments of the preset number into the first number segment pool.
In an embodiment, the data processing unit 41 is further configured to add the target invoice number segment to a second number segment pool, where the second number segment pool includes the allocated invoice number segment; matching the generated invoice number sections with the invoice number sections in the first number section pool and the invoice number sections in the second number section pool respectively; and if the matching is not successful, executing the step of adding the generated invoice number segments with the preset number into the first number segment pool.
In an embodiment, the data processing unit 41 is specifically configured to respond to the number segment claiming request to query a claimable quantity total amount and a claimed quantity corresponding to the user identification information; and if the sum of the claimed quantity of the number section and the claimed quantity is less than or equal to the total amount of the claimable quantity, determining that the claimed quantity of the number section passes verification.
It should be noted that the functions of each unit module of the data processing apparatus described in the embodiment of the present invention may be specifically implemented according to the method in the method embodiment described in fig. 2 or fig. 3, and the specific implementation process may refer to the description related to the method embodiment in fig. 2 or fig. 3, which is not described herein again.
Based on the description of the method embodiment and the apparatus item embodiment, an embodiment of the present invention further provides a node device. Referring to fig. 5, the node device may include at least a processor 501, an input device 502, an output device 503, and a memory 504; the processor 501, the input device 502, the output device 503, and the memory 504 may be connected by a bus or other connection means. The memory 504 may also include a computer-readable storage medium for storing a computer program comprising program instructions, and the processor 501 is configured to execute the program instructions stored by the memory 504. The processor 501 (or CPU) is a computing core and a control core of the node device, and is adapted to implement one or more instructions, and in particular, is adapted to load and execute the one or more instructions so as to implement the corresponding method flow or the corresponding function in the data Processing method embodiment. Wherein the processor 501 is configured to call the program instruction to perform: receiving a number segment claiming request sent by user terminal equipment, wherein the number segment claiming request comprises the number of number segment claiming and user identification information corresponding to the user terminal equipment; verifying the number of number field claiming numbers based on the user identification information in response to the number field claiming request; if the verification is passed, calling an intelligent contract to determine a target invoice number section corresponding to the number section claiming quantity; and under the condition that the target invoice number segment is identified with other node equipment in the block chain network, the target invoice number segment is sent to invoicing equipment corresponding to the user identification information.
In one embodiment, the processor 501 is specifically configured to invoke an intelligent contract to generate a first candidate invoice number segment set according to an invoice number segment generation rule and the number of claim number segments; if the invoice number segment included in the first candidate invoice number segment set does not have corresponding identification information, taking the invoice number segment included in the first candidate invoice number segment set as a target invoice number segment corresponding to the number segment claim quantity, wherein the identification information is used for identifying the generated invoice number segment; and adding identification information to each invoice number segment in the target invoice number segments.
In an embodiment, the processor 501 is further specifically configured to invoke the intelligent contract to generate a second candidate invoice number segment set according to the invoice number segment generation rule and the number of claim segments if the invoice number segments included in the first candidate invoice number segment set have corresponding identification information; and if the invoice number segments included in the second candidate invoice number segment set do not have corresponding identification information, taking the invoice number segments included in the second candidate invoice number segment set as target invoice number segments corresponding to the number segment claim quantity.
In an embodiment, the processor 501 is specifically configured to invoke an intelligent contract to obtain a target invoice number segment corresponding to the number of claim number segments from a first number segment pool, where the first number segment pool includes invoice number segments to be allocated; after the target invoice number segment is sent to the billing device corresponding to the user identification information, the processor 501 is specifically further configured to remove the target invoice number segment from the first number segment pool.
In an embodiment, the processor 501 is further specifically configured to invoke the intelligent contract to detect a target number of to-be-allocated invoice number segments included in the first number segment pool; if the target quantity is smaller than or equal to the quantity threshold value, generating a preset quantity of invoice number segments according to an invoice number segment generation rule; and adding the generated invoice number segments of the preset number into the first number segment pool.
In one embodiment, after the target invoice number segment is removed from the first number segment pool and before the generated preset number of invoice number segments are added to the first number segment pool, the processor 501 is further configured to add the target invoice number segment to a second number segment pool, where the second number segment pool includes the allocated invoice number segments; matching the generated invoice number sections with the invoice number sections in the first number section pool and the invoice number sections in the second number section pool respectively; and if the matching is not successful, executing the step of adding the generated invoice number segments with the preset number into the first number segment pool.
In an embodiment, the processor 501 is specifically configured to respond to the number segment claiming request to query a claimable quantity total amount and a claimed quantity corresponding to the user identification information; and if the sum of the claimed quantity of the number section and the claimed quantity is less than or equal to the total amount of the claimable quantity, determining that the claimed quantity of the number section passes verification.
It should be understood that, in the embodiment of the present invention, the Processor 501 may be a Central Processing Unit (CPU), and the Processor 501 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete a hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 504 may include a read-only memory and a random access memory, and provides instructions and data to the processor 501. A portion of the memory 504 may also include non-volatile random access memory. For example, the memory 504 may also store device type information. The input device 503 may include a touch pad, a fingerprint sensor (for collecting fingerprint information of a user), a microphone, a physical keyboard, etc., and the output device 503 may include a display (LCD, etc.), a speaker, etc.
In specific implementation, the processor 501, the memory 504, the input device 502, and the output device 503, which are described in this embodiment of the present invention, may execute the implementation manner described in the method embodiment shown in fig. 2 or fig. 3 provided in this embodiment of the present invention, and may also execute the implementation method of the data processing apparatus shown in fig. 4 provided in this embodiment of the present invention, 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 applied to a node device of a blockchain network, the method comprising:
receiving a number segment claiming request sent by user terminal equipment, wherein the number segment claiming request comprises the number of number segment claiming and user identification information corresponding to the user terminal equipment;
verifying the number of number field claiming numbers based on the user identification information in response to the number field claiming request;
if the verification is passed, calling an intelligent contract to determine a target invoice number section corresponding to the number section claiming quantity;
and under the condition that the target invoice number segment is identified with other node equipment in the block chain network, the target invoice number segment is sent to invoicing equipment corresponding to the user identification information.
2. The method of claim 1, wherein said invoking an intelligent contract to determine a target invoice number segment corresponding to said number segment claim number comprises:
calling an intelligent contract to generate a first candidate invoice number section set according to an invoice number section generation rule and the number section claiming quantity;
if the invoice number segment included in the first candidate invoice number segment set does not have corresponding identification information, taking the invoice number segment included in the first candidate invoice number segment set as a target invoice number segment corresponding to the number segment claim quantity, wherein the identification information is used for identifying the generated invoice number segment;
and adding identification information to each invoice number segment in the target invoice number segments.
3. The method of claim 2, further comprising:
if the invoice number segment included in the first candidate invoice number segment set has corresponding identification information, calling the intelligent contract to generate a second candidate invoice number segment set according to the invoice number segment generation rule and the number segment claiming quantity;
and if the invoice number segments included in the second candidate invoice number segment set do not have corresponding identification information, taking the invoice number segments included in the second candidate invoice number segment set as target invoice number segments corresponding to the number segment claim quantity.
4. The method of claim 1, wherein said invoking an intelligent contract to determine a target invoice number segment corresponding to said number segment claim number comprises:
calling an intelligent contract to obtain a target invoice number section corresponding to the number section claiming quantity from a first number section pool, wherein the first number section pool comprises invoice number sections to be distributed;
after the target invoice number segment is sent to the invoicing equipment corresponding to the user identification information, the method further comprises the following steps:
removing the target invoice number segment from the first number segment pool.
5. The method of claim 4, further comprising:
calling the intelligent contract to detect the target number of the invoice number segments to be distributed, wherein the invoice number segments are included in the first number segment pool;
if the target quantity is smaller than or equal to the quantity threshold value, generating a preset quantity of invoice number segments according to an invoice number segment generation rule;
and adding the generated invoice number segments of the preset number into the first number segment pool.
6. The method according to claim 5, wherein after said removing said target invoice number segment from said first number segment pool and before said adding said generated predetermined number of invoice number segments to said first number segment pool, said method further comprises:
adding the target invoice number segment to a second number segment pool, the second number segment pool including assigned invoice number segments;
matching the generated invoice number sections with the invoice number sections in the first number section pool and the invoice number sections in the second number section pool respectively;
and if the matching is not successful, executing the step of adding the generated invoice number segments with the preset number into the first number segment pool.
7. The method of claim 1, wherein said validating said number of claim segments based on said user identification information in response to said request for claim segment request comprises:
responding the number field claiming request to inquire the claimable quantity total amount and the claimed quantity corresponding to the user identification information;
and if the sum of the claimed quantity of the number section and the claimed quantity is less than or equal to the total amount of the claimable quantity, determining that the claimed quantity of the number section passes verification.
8. A data processing apparatus configured to a node device of a blockchain network, the apparatus comprising:
the system comprises a data acquisition unit, a data processing unit and a data processing unit, wherein the data acquisition unit is used for receiving a number segment claiming request sent by user terminal equipment, and the number segment claiming request comprises number of number segment claiming and user identification information corresponding to the user terminal equipment;
the data processing unit is used for responding to the number section claiming request and verifying the number section claiming quantity based on the user identification information;
the data processing unit is also used for calling an intelligent contract to determine a target invoice number section corresponding to the number section claiming quantity if the verification is passed;
and the data sending unit is used for sending the target invoice number segment to the invoicing equipment corresponding to the user identification information under the condition that the target invoice number segment is identified with other node equipment in the block chain network.
9. A node device comprising a processor and a memory, the processor and the memory being interconnected, wherein the memory is configured to store a computer program comprising program instructions, and wherein the processor is configured to invoke the program instructions to perform the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, which is executed by a processor to implement the method of any of claims 1-7.
CN202010073162.3A 2020-01-21 2020-01-21 Data processing method and device and readable storage medium Pending CN111242707A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010073162.3A CN111242707A (en) 2020-01-21 2020-01-21 Data processing method and device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010073162.3A CN111242707A (en) 2020-01-21 2020-01-21 Data processing method and device and readable storage medium

Publications (1)

Publication Number Publication Date
CN111242707A true CN111242707A (en) 2020-06-05

Family

ID=70874883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010073162.3A Pending CN111242707A (en) 2020-01-21 2020-01-21 Data processing method and device and readable storage medium

Country Status (1)

Country Link
CN (1) CN111242707A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017145020A1 (en) * 2016-02-23 2017-08-31 nChain Holdings Limited Methods and systems for efficient transfer of entities on a peer-to-peer distributed ledger using the blockchain
CN109949111A (en) * 2019-03-06 2019-06-28 深圳市智税链科技有限公司 Electronic bill mark distributing method, electronic bill generation method, apparatus and system
CN110473030A (en) * 2019-07-31 2019-11-19 阿里巴巴集团控股有限公司 Electronic bill number based on block chain claims method and device, electronic equipment
CN110599275A (en) * 2019-09-27 2019-12-20 腾讯科技(深圳)有限公司 Data processing method and device based on block chain network and storage medium
CN110599267A (en) * 2019-09-16 2019-12-20 腾讯科技(深圳)有限公司 Electronic invoice billing method and device, computer readable storage medium and computer equipment
WO2022001526A1 (en) * 2020-06-30 2022-01-06 平安科技(深圳)有限公司 Block chain-based trade data processing method and related device thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017145020A1 (en) * 2016-02-23 2017-08-31 nChain Holdings Limited Methods and systems for efficient transfer of entities on a peer-to-peer distributed ledger using the blockchain
CN109949111A (en) * 2019-03-06 2019-06-28 深圳市智税链科技有限公司 Electronic bill mark distributing method, electronic bill generation method, apparatus and system
CN110473030A (en) * 2019-07-31 2019-11-19 阿里巴巴集团控股有限公司 Electronic bill number based on block chain claims method and device, electronic equipment
CN110599267A (en) * 2019-09-16 2019-12-20 腾讯科技(深圳)有限公司 Electronic invoice billing method and device, computer readable storage medium and computer equipment
CN110599275A (en) * 2019-09-27 2019-12-20 腾讯科技(深圳)有限公司 Data processing method and device based on block chain network and storage medium
WO2022001526A1 (en) * 2020-06-30 2022-01-06 平安科技(深圳)有限公司 Block chain-based trade data processing method and related device thereof

Similar Documents

Publication Publication Date Title
CN111104392B (en) Database migration method and device, electronic equipment and storage medium
CN111343142B (en) Data processing method and device based on block chain network and storage medium
EP3178011B1 (en) Method and system for facilitating terminal identifiers
CN107633016B (en) Data processing method and device and electronic equipment
CN110543488B (en) Verification node updating method, device and equipment
CN110400217B (en) Rule change processing method and device for intelligent contract
CN110543448A (en) data synchronization method, device, equipment and computer readable storage medium
CN111338608B (en) Distributed application development method and device, node equipment and readable storage medium
CN111290742A (en) Parameter verification method and device, electronic equipment and readable storage medium
CN110599275A (en) Data processing method and device based on block chain network and storage medium
CN111260488B (en) Data processing method and device and readable storage medium
CN110597918A (en) Account management method and device and computer readable storage medium
CN115131022B (en) Block chain based digital asset transaction method, device, equipment and medium
CN111488626A (en) Data processing method, device, equipment and medium based on block chain
CN111414374A (en) Block chain transaction concurrent processing method, device and equipment
CN114328029A (en) Backup method and device of application resources, electronic equipment and storage medium
CN114022151A (en) Block chain data visualization method and system, electronic device and storage medium
CN110674153B (en) Data consistency detection method and device and electronic equipment
CN110597886A (en) Data processing method and device and computer storage medium
CN111242707A (en) Data processing method and device and readable storage medium
CN110619204A (en) Invitation code generation method and device, terminal equipment and storage medium
CN113835780A (en) Event response method and device
CN111209540B (en) Information verification method, device and storage medium
CN110290172B (en) Container application cloning method and device, computer equipment and storage medium
CN111367634A (en) Information processing method, information processing device and terminal equipment

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40024829

Country of ref document: HK