Electronic bill data processing method, device and computer equipment

Through the electronic bill data processing method, the target electronic bill identification is generated and distributed, which solves the problem of low invoicing efficiency of the existing invoice system and realizes efficient electronic bill identification acquisition and invoice generation.

CN110597834BActive Publication Date: 2024-09-06TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910871798.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-16
Publication Date
2024-09-06
Estimated Expiration
2039-09-16

AI Technical Summary

Technical Problem

The existing invoicing system has low invoicing efficiency. It requires going to the tax bureau center every time to get the invoice identification, which makes the invoicing process cumbersome.

Method used

Through the electronic bill data processing method, receive the electronic bill identification acquisition request, obtain the first string and the second string, generate the target electronic bill identification according to the electronic bill identification generation rules, and assign it to the electronic bill identification generation node to avoid requesting the bill every time Identify management node allocation to improve invoicing efficiency.

Benefits of technology

It improves the efficiency of obtaining electronic bill identification, simplifies the invoicing process, reduces dependence on the tax bureau, and improves the efficiency and system performance of invoice generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110597834B
    Figure CN110597834B
Patent Text Reader

Abstract

The present application relates to an electronic bill data processing method, device and computer equipment. The method comprises: receiving an electronic bill identification acquisition request; acquiring a first string and a second string, wherein the first string is generated according to an electronic bill identification generation rule, and the second string is determined according to a target bill identification field range, wherein the first string and the target bill identification field range are pre-allocated by an electronic bill identification management node, and the target bill identification field range corresponds to multiple strings; in response to the electronic bill identification acquisition request, allocating a corresponding target electronic bill identification, wherein the target electronic bill identification includes the first string and the second string. The use of this method can improve the efficiency of billing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device and computer equipment for processing electronic invoice data. Background Art

[0002] An invoice is a voucher provided by an enterprise or individual to consumers when they sell goods, provide services or engage in other business activities. When an enterprise or individual sells goods, provides services or engages in other business activities to consumers, they must issue invoices and pay taxes based on the invoices in accordance with the law.

[0003] At present, invoices are uniquely identified by invoice IDs. Every time an invoice is issued, one needs to go to the tax bureau center to obtain the invoice ID, resulting in low invoicing efficiency. Summary of the invention

[0004] Based on this, it is necessary to provide an electronic invoice data processing method, device and computer equipment to address the above-mentioned technical problem of low invoicing efficiency.

[0005] A method for processing electronic bill data, the method comprising: receiving an electronic bill identification acquisition request; acquiring a first character string and a second character string, wherein the first character string is generated according to an electronic bill identification generation rule, and the second character string is determined according to a target bill identification field range, the first character string and the target bill identification field range are pre-allocated by an electronic bill identification management node, and the target bill identification field range corresponds to multiple character strings; in response to the electronic bill identification acquisition request, allocating a corresponding target electronic bill identification, the target electronic bill identification including the first character string and the second character string.

[0006] An electronic bill data processing device, the device comprising: an electronic bill identification acquisition request receiving module, used to receive an electronic bill identification acquisition request; a first string and a second string acquisition module, used to acquire a first string and a second string, the first string is generated according to an electronic bill identification generation rule, the second string is determined according to a target bill identification field range, the first string and the target bill identification field range are pre-allocated by an electronic bill identification management node, and the target bill identification field range corresponds to multiple strings; a target electronic bill identification allocation module, used to allocate a corresponding target electronic bill identification in response to the electronic bill identification acquisition request, the target electronic bill identification includes the first string and the second string.

[0007] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the electronic invoice data processing method when executing the computer program.

[0008] The above-mentioned electronic invoice data processing method, device and computer equipment can obtain the first character string and the second character string when receiving an electronic invoice identification acquisition request. The second character string is determined according to the invoice field range of the electronic invoice identification management node, and the first character string is generated according to the invoice identification generation rule. Therefore, the obtained electronic invoice identification not only satisfies the electronic invoice generation rule, but also does not need to request the invoice identification management node to allocate an electronic invoice identification every time an electronic invoice acquisition request is received. The electronic invoice identification acquisition efficiency is high, thereby improving the invoicing efficiency.

[0009] A method for processing electronic invoice data, the method comprising: receiving a bill identifier allocation request sent by an electronic invoice identifier generation node; in response to the bill identifier allocation request, obtaining an unallocated bill identifier field range as a target bill identifier field range, the target bill identifier field range corresponding to multiple character strings; sending the target bill identifier field range to the electronic invoice identifier generation node, so that the electronic invoice identifier generation node determines a second character string according to the target bill identifier field range, and allocates a target electronic invoice identifier according to a first character string and the second character string, the first character string being generated according to an electronic invoice identifier generation rule.

[0010] An electronic bill data processing device, the device comprising: a bill identification allocation request receiving module, used to receive a bill identification allocation request sent by an electronic bill identification generation node; a target bill identification field range acquisition module, used to respond to the bill identification allocation request, obtain an unallocated bill identification field range as a target bill identification field range, the target bill identification field range corresponds to a plurality of character strings; a target bill identification field range sending module, used to send the target bill identification field range to the electronic bill identification generation node, so that the electronic bill identification generation node determines a second character string according to the target bill identification field range, and allocates a target electronic bill identification according to a first character string and the second character string, the first character string being generated according to an electronic bill identification generation rule.

[0011] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned electronic invoice data processing method when executing the computer program.

[0012] The electronic bill data processing method, device and computer device receive a bill identification allocation request sent by an electronic bill identification generation node, respond to the bill identification allocation request, thereby obtaining an unallocated bill identification field range, and sending the target bill identification field range to the electronic bill identification generation node, so that the electronic bill identification generation node obtains the second string according to the target bill identification field range, allocates the electronic bill identification according to the first string and the second string, and the first string is generated according to the electronic bill identification generation rule. The electronic bill identification thus obtained not only satisfies the electronic bill generation rule, but also makes it unnecessary for the electronic bill identification generation node to request the bill identification management node to allocate the electronic bill identification every time it receives an electronic bill acquisition request, and the electronic bill identification acquisition efficiency is high, thereby improving the billing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 A diagram of the application environment of the electronic invoice data processing method in some embodiments;

[0014] Figure 2 A schematic diagram of a flow chart of an electronic bill data processing method in some embodiments;

[0015] Figure 3 A schematic diagram of electronic bill identification generation rules in some embodiments;

[0016] Figure 4 A schematic diagram of a flow chart of an electronic bill data processing method in some embodiments;

[0017] Figure 5 A schematic diagram of a flow chart of an electronic bill data processing method in some embodiments;

[0018] Figure 6 A schematic diagram of a flow chart of an electronic bill data processing method in some embodiments;

[0019] Figure 7 A schematic diagram of a flow chart of an electronic bill data processing method in some embodiments;

[0020] Figure 8 A schematic diagram of a flow chart of an electronic bill data processing method in some embodiments;

[0021] Fig. 9 It is a deployment diagram of a system corresponding to the electronic invoice data processing method in some embodiments;

[0022] Fig.10 It is a structural block diagram of an electronic bill data processing device in some embodiments;

[0023] Fig.11 is a structural block diagram of an electronic bill data processing device in some embodiments;

[0024] Fig.12 is a structural block diagram of an electronic bill data processing device in some embodiments;

[0025] Fig.13 is a structural block diagram of an electronic bill data processing device in some embodiments;

[0026] Fig.14 1 is a diagram of the internal structure of a computer device in some embodiments. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0028] The electronic bill data processing method provided in this application can be applied to Figure 1 In the application environment shown. The application environment includes an electronic bill identification management node 102, an electronic bill identification generation node 104, a blockchain node 106, a management terminal 108, and an invoice request device 110. There can be multiple electronic bill identification generation nodes 104. There can also be multiple blockchain nodes 106, and data can be transmitted between these blockchain nodes. The blockchain node 106 includes blockchain nodes corresponding to each electronic bill identification generation node in the electronic bill identification management node 102 and the electronic bill identification generation node 104. Therefore, the electronic bill identification management node 102 and the electronic bill identification generation node 104 can communicate with the corresponding blockchain node to obtain information stored in the blockchain and write information to the blockchain, such as storing electronic bills in the blockchain. The electronic bill identification management node 102 and the corresponding blockchain node can be the same node, and the electronic bill identification generation node 104 and the corresponding blockchain node can also be the same node. The invoice request device 110 can be a terminal or a server. The electronic bill identification management node 102 communicates with the electronic bill identification generation node 104 through a network. The electronic invoice identification generation node 104 communicates with the blockchain node 106 through the network. The management terminal 108 communicates with the electronic invoice identification generation node through the network. The invoice request device 110 communicates with the electronic invoice identification generation node through the network.

[0029] Specifically, the electronic bill identification generation node 104 may send a bill identification allocation request to the electronic bill identification management node 102, and the electronic bill identification management node 102 receives the bill identification allocation request, and the bill identification allocation request may carry a historical bill identification field range. The electronic bill identification management node 102 may determine the target bill identification field range based on the historical bill identification field range, and send the determined target bill identification field range to the electronic bill identification generation node 104, and the electronic bill identification generation node 104 receives and stores the target bill identification field range. When sending the target bill identification field range to the electronic bill identification generation node 104, the electronic bill identification management node 102 may also send the first character string corresponding to the target bill identification field range to the electronic bill identification generation node 104, and the electronic bill identification generation node 104 receives and stores the target bill identification field range in correspondence with the first character string corresponding to the target bill identification field range. The electronic invoice identifier generation node 104 can receive an invoice issuance request sent by the invoice issuance request device 110. The invoice issuance request can carry invoice information. The invoice information can include an invoice issuer identifier, a recipient identifier, and a resource transfer share. The electronic invoice identifier generation node 104 can respond to the invoice issuance request, trigger an electronic invoice identifier acquisition request, determine a second string using the stored target invoice identifier field range according to the electronic invoice identifier acquisition request, and acquire a stored first string corresponding to the second string, and use the acquired second string and the first string corresponding thereto as the target electronic invoice identifier, and assign the target electronic invoice identifier to the electronic invoice identifier acquisition request. The electronic invoice identifier generation node 104 can also use the private key corresponding to the invoice issuer to sign the invoice information including the invoice issuer identifier, the recipient identifier, the resource transfer share, and the target electronic invoice identifier, obtain the signed invoice information, and write the signed invoice information into the blockchain, and the blockchain can generate an invoice based on the invoice information.

[0030] In some embodiments, the electronic bill identification can be the identification of the blockchain electronic invoice; the electronic bill identification management node 102 can be a tax bureau server; the electronic bill identification generation node 104 can be a server corresponding to the invoice issuer, or a third-party proxy server authorized by the invoice issuer, specifically a tax bureau branch server, a server corresponding to the enterprise, or an agent server, and the agent server is a server that issues invoices on behalf of the invoice issuer; the management terminal 108 can be a terminal operated by the administrator of the server corresponding to the invoice issuer, or a terminal operated by the administrator of the third-party proxy server authorized by the invoice issuer, specifically a terminal operated by the administrator of the tax bureau branch server, a server corresponding to the enterprise, or an agent server; the invoice request device 110 can be a terminal or server corresponding to an individual or enterprise after the consumption is completed. The terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices, and the server can be implemented as an independent server or a server cluster composed of multiple servers.

[0031] Among them, blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0032] The underlying blockchain platform can include processing modules such as user management, basic services, smart contracts, and operations. Among them, the user management module is responsible for the identity information management of all blockchain participants, including maintaining the generation of public and private keys (account management), key management, and the maintenance of the correspondence between the user's real identity and the blockchain address (authority management), etc., and, under authorization, supervises and audits the transactions of certain real identities and provides risk control rule configuration (risk control audit); the basic service module is deployed on all blockchain node devices to verify the validity of business requests (such as invoicing requests), and records valid requests to storage after consensus is reached. For a new business request, the basic service first performs interface adaptation analysis and authentication processing (interface adaptation), and then uses the consensus algorithm to convert the business information into a smart contract. The information is encrypted (consensus management), and after encryption, it is completely and consistently transmitted to the shared ledger (network communication) and recorded and stored; the smart contract module is responsible for the registration and issuance of contracts, as well as contract triggering and contract execution. Developers can define the contract logic in a programming language and publish it to the blockchain (contract registration). According to the logic of the contract terms, the key or other event trigger execution is called to complete the contract logic. At the same time, it also provides the function of contract upgrade and cancellation; the operation module is mainly responsible for the deployment, configuration modification, contract setting, cloud adaptation and real-time status visualization output of the product during the product release process, such as alarms, network conditions, node equipment health status, etc.

[0033] The platform product service layer provides the basic capabilities and implementation framework of typical applications. Developers can superimpose business features based on these basic capabilities to complete the blockchain implementation of business logic. The application service layer provides application services based on blockchain solutions for business participants to use.

[0034] In some embodiments, Figure 2 As shown, a method for processing electronic bill data is provided, and the method is applied to Figure 1 The electronic invoice identification generation node 104 in the example is used for explanation, and the following steps are included:

[0035] S202, receiving a request for obtaining an electronic invoice identification.

[0036] Specifically, the electronic bill identification acquisition request is used to obtain an available electronic bill identification. The electronic bill identification is used to uniquely identify the electronic bill. The electronic bill is an electronically stored bill. The electronic bill can be stored in a storage medium or a computer device. The electronic bill can be an electronic invoice, and the electronic bill identification can be an electronic invoice identification. The electronic invoice identification can include an invoice code and an invoice number. The electronic invoice can be uniquely identified by the invoice code and the invoice number. The invoice code and the invoice number can refer to two codes given to the invoice by the tax department. The invoice code can be a 12-digit number, and the invoice number can be an 8-digit number.

[0037] In some embodiments, the electronic invoice identification acquisition request may be sent by other devices to the electronic invoice identification generation node, or may be triggered by the electronic invoice identification generation node itself. For example, the electronic invoice identification generation node may be the invoicing node corresponding to the enterprise that issues the invoice, and when receiving the invoicing request, the invoicing node triggers the electronic invoice identification acquisition request. The electronic invoice identification generation node may also be the node corresponding to each branch of the tax bureau, and the invoicing node corresponding to the enterprise that issues the invoice may send the electronic invoice identification acquisition request to the electronic invoice identification generation node.

[0038] In some embodiments, the electronic invoice identifier generation node may provide a client or web page for triggering an invoicing request. The invoicing request device may access the client or web page for triggering an invoicing request provided by the electronic invoice identifier generation node to send an invoicing request to the electronic invoice identifier generation node. When the electronic invoice identifier generation node receives the invoicing request, it may trigger an electronic invoice identifier acquisition request to obtain the electronic invoice identifier and issue an invoice based on the electronic invoice identifier.

[0039] S204, obtaining a first string and a second string, wherein the first string is generated according to an electronic bill identifier generation rule, and the second string is determined according to a target bill identifier field range, wherein the first string and the target bill identifier field range are pre-allocated by the electronic bill identifier management node, and the target bill identifier field range corresponds to multiple strings.

[0040] Specifically, the character string is a string of characters consisting of at least one of the character types such as numbers, letters, and underscores. The first character string may include multiple characters. The second character string may include multiple characters. The first character string is generated according to the electronic bill identification generation rule. The second character string is determined according to the target bill identification field range. The first character string may be an invoice code, and the second character string may be an invoice number. The target bill identification field range indicates the range corresponding to the second character string, and the target bill identification field range may correspond to multiple character strings.

[0041] The electronic bill identification generation rule may be a certain rule with special meanings set by humans, and the attribute information related to the electronic bill can be determined by the rule. For example, the electronic bill identification generation rule may include the correspondence between the attribute information and the characters. The electronic bill identification generation rule may also include the arrangement order of the characters corresponding to the attribute information. The attribute information may include at least one of the issuing place, year, industry type, bill type, batch, number of copies, and amount type. Different attribute information may correspond to different characters or character strings. For example, if the issuing place is Qingdao, the corresponding character may be 3702, and if the issuing place is Guangzhou, the corresponding character may be 4400.

[0042] In some embodiments, the electronic bill identification generation rule may be a generation rule for the invoice code in the electronic invoice identification. Figure 3 , shows a generation rule of invoice code in electronic invoice identification and the representation form of invoice number. The attribute information of invoice code includes tax bureau type, issuing place, year, industry type, bill type, batch, number of copies and amount type. Among them, invoice code is 12 digits and invoice number is 8 digits. The first digit of invoice code indicates the type of tax bureau, which can be represented by 0 for the General Administration and 1 for the State Administration of Taxation. The second to fifth digits of invoice code indicate the issuing place, which can be represented by 1100 for Beijing. The sixth and seventh digits indicate the year, the eighth digit indicates the industry type, the ninth digit indicates the invoice type, the tenth digit indicates the batch, and the number corresponding to the tenth digit can be increased by 1 when the batch increases. The eleventh digit indicates the number of copies, and the twelfth digit indicates the amount type. For example, the first 0 of invoice code 011001909110 indicates that the type of tax bureau is the General Administration, and the second to fifth digits 1100 indicate that the issuing place is Beijing. The value range of the invoice number can be an integer from 00000001 to 99999999 (including 00000001 and 99999999). When the invoice numbers are used up, the number corresponding to the 10th digit of the invoice code representing the batch is increased by 1. If the number corresponding to the 10th digit of the original invoice code is 1, it represents batch 1. At this time, the invoice code can represent batch 2.

[0043] In some embodiments, the electronic invoice identification management node can obtain characters corresponding to each attribute based on the attribute information corresponding to the invoice to be issued and the electronic invoice identification generation rules, and arrange the characters corresponding to each attribute according to the arrangement order of the characters corresponding to the attribute information to obtain a first character string.

[0044] In some embodiments, an unused string can be selected from the string corresponding to the target bill identification field range as the second string. The target bill identification field range can be represented by a closed interval, where the closed interval only includes integers, representing a set consisting of multiple numbers with an increasing pattern. For example, the target bill identification field range can represent a set consisting of multiple invoice numbers. If it is represented by a closed interval [00000001, 00000100], it means that the target bill identification field range includes all integers between 00000001 and 00000100 (including 00000001 and 00000100), and an unused string can be selected from [00000001, 00000100] as the invoice number.

[0045] In some embodiments, the size of the target bill identification field range assigned by the electronic bill identification management node to the electronic bill identification generation node may be preset.

[0046] In some embodiments, the electronic bill identifier generation node may send a bill identifier allocation request to the electronic bill identifier management node to apply for a target bill identifier field range from the electronic bill identifier management node. The electronic bill identifier management node may correspond to multiple electronic bill identifier generation nodes. The electronic bill identifier management node may respectively respond to the bill identifier allocation request corresponding to each electronic bill identifier generation node, obtain the corresponding unallocated bill identifier field range as the corresponding target bill identifier field range, and send the target bill identifier field range to the corresponding electronic bill identifier generation node.

[0047] S206: In response to the electronic bill identification acquisition request, a corresponding target electronic bill identification is allocated, where the target electronic bill identification includes a first character string and a second character string.

[0048] Specifically, the electronic bill identifier generation node responds to the electronic bill identifier acquisition request, allocates the target electronic bill identifier corresponding to the request, and can also return the corresponding target electronic bill identifier to the sender of the electronic bill identifier acquisition request, where the target electronic bill identifier includes a first string and a second string.

[0049] In some embodiments, the invoice request device needs to apply for an electronic invoice identifier to complete the invoicing function. The invoice request device can trigger the generation of an electronic invoice identifier acquisition request through a web page or client provided by the electronic invoice identifier generation node. The electronic invoice identifier generation node responds to the electronic invoice identifier acquisition request and sends the target electronic invoice identifier to the invoice request device, thereby allocating the target electronic invoice identifier to the invoicing node.

[0050] In some embodiments, the target electronic bill identifier may be an electronic invoice identifier, the first character string included in the target electronic bill identifier may be an invoice code, and the second character string included in the target electronic bill identifier may be an invoice number. For example, when the invoice code of the electronic invoice identifier is "037021900111" and the invoice number of the electronic invoice identifier is "89863102", the first character string included in the target electronic bill identifier may be "037021900111", and the second character string included in the target electronic bill identifier may be "89863102".

[0051] In the above-mentioned electronic invoice data processing method, when an electronic invoice identification acquisition request is received, a first character string and a second character string can be obtained. The second character string is determined according to the invoice field range of the electronic invoice identification management node, and the first character string is generated according to the invoice identification generation rule. Therefore, the obtained electronic invoice identification not only satisfies the electronic invoice generation rule, but also does not need to request the invoice identification management node to allocate an electronic invoice identification every time an electronic invoice acquisition request is received. The electronic invoice identification acquisition efficiency is high, thereby improving the invoicing efficiency.

[0052] In the above-mentioned electronic invoice data processing method, the electronic invoice identification management node can correspond to multiple electronic invoice identification generation nodes, and the electronic invoice identification management node can respectively respond to the invoice identification allocation request corresponding to each electronic invoice identification generation node, obtain the corresponding unallocated invoice identification field range as the corresponding target invoice identification field range, and send the target invoice identification field range to the corresponding electronic invoice identification generation node, thereby ensuring that in a distributed system, even if the invoice identification is generated by multiple electronic invoice identification generation nodes, the electronic invoice identification generated by each electronic invoice identification generation node is non-repetitive, that is, the uniqueness of the electronic invoice identification is guaranteed, and since the invoice identification is generated by multiple electronic invoice identification generation nodes, the performance of the invoice identification allocation system is also improved.

[0053] In some embodiments, obtaining the first string and the second string includes: obtaining a pre-stored first string and a target bill identification field range corresponding to the first string; and obtaining the second string according to the target bill identification field range.

[0054] Specifically, the electronic bill identifier generation node may request the electronic bill identifier management node to obtain the first string and the target bill identifier field range corresponding to the first string, and store the first string and the target bill identifier field range corresponding to the first string locally, for example, in a local database or storage medium. When it is necessary to generate an electronic bill identifier, the electronic bill identifier generation node may obtain the stored first string and the target bill identifier field range corresponding to the first string, and obtain the second string through the target bill identifier field range.

[0055] In the embodiment of the present application, the first character string and the target bill identification field range corresponding to the first character string are pre-stored, and the second character string is obtained according to the target bill identification field range by obtaining the pre-stored first character string and the target bill identification field range corresponding to the first character string. Therefore, the method for obtaining the first character string and the second character string is simple, which improves the efficiency of obtaining the target electronic bill identification.

[0056] In some embodiments, Figure 4As shown, the electronic invoice data processing method also includes:

[0057] S402: Send a ticket identifier allocation request to the electronic ticket identifier management node.

[0058] In some embodiments, when the number of usable second character strings corresponding to the target bill identification field range is less than a preset threshold or does not exist, the electronic bill identification generation node sends a bill identification allocation request to the electronic bill identification allocation node. For example, assuming that the target bill identification field range is 000-100, 000-099 has been used, and only the last one is left, a bill identification allocation request can be sent to the electronic bill identification management node.

[0059] S404, receiving and storing a target bill identification field range, where the target bill identification field range is returned by the electronic bill identification management node in response to the bill identification allocation request.

[0060] Specifically, the bill identification allocation request is used to request a bill identification field range. The electronic bill identification generation node sends the bill identification allocation request to the electronic bill identification management node, and the electronic bill identification management node responds to the bill identification allocation request and determines a target bill identification field range, wherein the target bill identification field range belongs to a field range that is not allocated to other nodes. The target bill identification field range is sent to the electronic bill identification generation node, and the electronic bill identification generation node receives and stores the target bill identification field range.

[0061] In some embodiments, the first string can remain unchanged within a certain period of time. Therefore, when the electronic ticket identifier management node responds to the ticket identifier allocation request sent by the electronic ticket identifier generation node, it is not necessary to allocate the first string every time. For example, the first string can be Figure 3 For the invoice code "011001909110", when the invoice number corresponding to "011001909110" has not been allocated, the first character string can remain unchanged as "011001909110".

[0062] In an embodiment of the present application, a bill identification allocation request is sent to an electronic bill identification management node, a target bill identification field range is received and stored, and the target bill identification field range corresponds to multiple second character strings, which is equivalent to obtaining multiple bill identifications at one time. When the bill identification is needed, the bill identification can be directly determined by the target bill identification field range, thereby improving the efficiency of bill identification generation.

[0063] In some embodiments, sending a bill identification allocation request to an electronic bill identification management node includes: obtaining a historical bill identification field range, where the historical bill identification field range is a bill identification field range received last time; sending a bill identification allocation request to the electronic bill identification management node, where the bill identification allocation request carries the historical bill identification field range.

[0064] Specifically, the historical bill identification field range is the bill identification field range received last time by the electronic bill identification generating node.

[0065] In some embodiments, the electronic bill identification generation node may obtain the last received bill identification field range from a local storage location for bill identification field ranges as a historical bill identification field range. The electronic bill identification generation node may add the historical bill identification field range to a bill identification allocation request, and send the bill identification allocation request carrying the historical bill identification field range to the electronic bill identification management node.

[0066] Specifically, by carrying the historical bill identification field range, it can be determined whether the bill allocation request is a repeated allocation request or a new allocation request. The electronic bill identification management node can determine whether the electronic bill identification generation node has repeatedly sent the same bill identification allocation request multiple times, or has repeatedly requested the allocation of a new bill identification, based on the historical bill identification field range carried in the bill identification allocation request sent by the electronic bill identification generation node. This is to avoid the following situation: the electronic bill identification generation node may not receive the target bill identification field range sent by the electronic bill identification management node, but the electronic bill identification management node may believe that the electronic bill identification generation node has received it, and mark the target bill identification field range sent to the electronic bill identification generation node as allocated, which wastes the target bill identification field range.

[0067] For example, when the electronic invoice identifier generation node sends the first invoice identifier allocation request, it carries the historical invoice identifier field range A, and the electronic invoice identifier management node allocates the invoice identifier field range B in response to the first invoice identifier allocation request. When the electronic invoice identifier management node receives the second invoice identifier allocation request, if the second invoice identifier allocation request carries B, it confirms that the electronic invoice identifier generation node requests to update the invoice identifier field range, and thus can allocate the invoice identifier field range C. If the second invoice identifier allocation request still carries A, it means that the electronic invoice identifier generation node has not received the allocated invoice identifier field range B, and therefore returns the invoice identifier field range B, thereby avoiding the invoice identifier field range B not being allocated successfully.

[0068] Therefore, when the ticket identification allocation request sent by the electronic ticket identification generation node carries a historical ticket identification field range, the electronic ticket identification management node can determine the target ticket identification field range received by the electronic ticket identification generation node based on the historical ticket identification field range carried in the ticket identification allocation request sent by the electronic ticket identification generation node, that is, whether the target ticket identification field range sent by the electronic ticket identification management node to the electronic ticket identification generation node last time was successfully received, and then determine the target ticket identification field range corresponding to the response to this ticket identification allocation request to avoid wasting the ticket identification field range.

[0069] In an embodiment of the present application, an electronic invoice identification generation node sends a bill identification allocation request carrying a historical bill identification field range to an electronic invoice identification management node, so that the electronic invoice identification management node determines the target bill identification field range corresponding to the bill identification allocation request based on the historical bill identification field range, avoids sending duplicate target bill identification field ranges, and avoids mistakenly judging an unallocated bill identification field range as an already allocated bill identification field range, thereby ensuring the uniqueness of the bill identification and making full use of the bill identification field range.

[0070] In some embodiments, receiving and storing the target bill identification field range includes: receiving the target bill identification field range and a first string; updating the locally stored first string using the received first string, and storing the updated first string corresponding to the target bill identification field range.

[0071] Specifically, the first character string can remain unchanged within a certain period of time. Therefore, when the electronic bill identification management node responds to the bill identification allocation request sent by the electronic bill identification generation node, it is not necessary to send the target first character string every time. After the electronic bill identification management node updates the first character string, for example, after the invoice batch is updated, resulting in the invoice code being updated, the updated first character string can be sent to the electronic bill identification generation node in response to the bill identification allocation request received from the electronic bill identification generation node. After receiving the first character string, the electronic bill identification generation node can perform corresponding operations based on the locally stored first character string. For example, when the received first character string is different from the locally stored first character string, the locally stored first character string can be updated using the received first character string, and the received target bill identification field range can be associated with the updated first character string and stored.

[0072] In an embodiment of the present application, by receiving the target bill identification field range and the first character string, the electronic bill identification generation node updates the local first character string, and stores the target bill identification field range and the updated first character string in correspondence, thereby ensuring that when the first character string that can be allocated by the electronic bill identification management node is updated, the electronic bill identification generation node can also make corresponding updates, thereby ensuring the accuracy of the electronic bill identification.

[0073] In some embodiments, the electronic invoice identifier generating node is a third-party proxy server authorized by the electronic invoice issuer, such as Figure 5 As shown, the electronic invoice data processing method also includes:

[0074] S502: Receive an invoicing request, where the invoicing request carries an invoicing party identifier, a recipient identifier, and a resource transfer share.

[0075] Specifically, the electronic invoice identifier generating node may receive an invoicing request. The invoicing request is used to request an invoicing operation to be performed on behalf of the user. The invoicing request may be sent by a user or enterprise that needs to issue an invoice. The invoicing request may carry an invoicing party identifier, a recipient identifier, and a resource transfer share.

[0076] The billing party identification is the identification of the billing party corresponding to the device that initiates the billing request, and is used to uniquely identify the billing party. The billing party can specifically be a sales company. When the billing party sells goods, provides services or engages in other business activities to consumers, it needs to provide consumers with consumption vouchers, that is, electronic receipts. The billing party identification can specifically be the name of the seller, the seller's taxpayer identification number or the seller's account number. The billing party may not have the ability to issue electronic receipts, for example, it does not have the ability to access the blockchain to store electronic receipts in the blockchain. In this case, the billing party can choose to entrust a third-party agency to perform the billing operation instead. That is, the agency service provider can be authorized to perform the billing operation on behalf of the billing party.

[0077] The recipient identifier is used to uniquely identify the recipient of the electronic invoice. The recipient can be a consumer or a consumer enterprise. When the consumer or consumer enterprise consumes at the sales enterprise, the sales enterprise can provide the consumer or consumer enterprise with a consumption voucher, that is, an electronic invoice. The recipient identifier can be the name of the purchaser, the purchaser's taxpayer identification number, or the purchaser's account number. The resource transfer share is the specific resource share consumed by the consumer.

[0078] S504: In response to the request for issuing invoices on behalf of others, a request for obtaining an electronic invoice identifier is triggered.

[0079] Specifically, the electronic invoice identifier generation node triggers an electronic invoice identifier acquisition request in response to the request for issuing invoice on behalf of another.

[0080] S506, using the private key corresponding to the issuer to sign the bill information, to obtain the signed bill information, the bill information includes the issuer ID, the recipient ID, the resource transfer share and the target electronic bill ID.

[0081] Specifically, the private key corresponding to the issuer is used to prove the identity of the issuer. Ticket information is information used to generate electronic tickets, including the issuer ID, recipient ID, resource transfer share, and target electronic ticket ID. Signed ticket information refers to the ticket information signed using the private key corresponding to the issuer.

[0082] In some embodiments, the invoice issuer can register with the electronic invoice identification management node, and the electronic invoice identification management node generates the identity key of the invoice issuer. The identity key includes a public key and a private key, including a user public key and a user private key. Data encrypted by the user public key can be decrypted by the user private key; data encrypted by the user private key can be decrypted by the user public key, so the private key is used to prove the identity of the invoice issuer; the public key is used to verify the identity of the invoice issuer. For example, an enterprise can register with the electronic invoice identification management node, and the electronic invoice identification management node generates the enterprise's identity key. The invoice issuing node can query the private key corresponding to the enterprise in the electronic invoice identification management node and store it. When it is necessary to issue an invoice on behalf of the enterprise, the private key of the enterprise is used to sign the invoice information. The key can specifically be an asymmetric key based on RSA-2048. Of course, the user key can also be other asymmetric keys, which is not limited in the embodiments of the present application.

[0083] S508, write the signed bill information into the blockchain.

[0084] Specifically, blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc., which can include multiple blockchain nodes. A blockchain node is a data processing node in a blockchain network. The blockchain network is the carrier and organizational method for running blockchain technology. Blockchain technology (BT), also known as distributed ledger technology, is an Internet database technology that is characterized by decentralization, openness and transparency, allowing everyone to participate in data recording. Blockchain technology is a new distributed infrastructure and computing method that uses block chain data structures to verify and store data, uses distributed node consensus algorithms to generate and update data, uses cryptography to ensure the security of data transmission and access, and uses smart contracts composed of automated script codes to program and operate data.

[0085] In some embodiments, the electronic invoice identification generation node writes the signed invoice information into the blockchain node corresponding to the electronic invoice identification generation node to generate a blockchain electronic invoice. The blockchain node corresponding to the electronic invoice identification generation node can be a blockchain node composed of the electronic invoice identification generation node's own equipment, or a blockchain node composed of a third-party agent device authorized by the electronic invoice identification generation node. Specifically, the electronic invoice identification generation node writes the signed invoice information into the blockchain node corresponding to the electronic invoice identification generation node. After the blockchain node corresponding to the electronic invoice identification generation node receives the signed invoice information sent by the electronic invoice identification generation node, it broadcasts the signed invoice information to other blockchain nodes in the blockchain network. After reaching a consensus, these blockchain nodes indicate that the signed invoice information has passed the blockchain verification, that is, it is proven to be authentic and reliable, so the invoice information can be stored.

[0086] In the embodiment of the present application, the service provider stores the electronic invoice identification range and has the ability to generate electronic invoice identification. When an electronic invoice needs to be issued, there is no need to go to the corresponding node of the tax bureau to obtain the invoice identification every time, and it can provide invoice issuance services for multiple invoicing companies at the same time. When an enterprise or individual does not have the ability to issue an invoice, they can use the proxy service provider to perform the invoicing operation instead, thereby providing great convenience for enterprises or individuals who do not have the ability to issue invoices and improving the invoicing efficiency of enterprises or individuals.

[0087] In the embodiment of the present application, the bill information is signed using the private key corresponding to the issuer to obtain the signed bill information, and the signed bill information is written into the blockchain, so that the bill information enters the blockchain, ensuring that the bill information cannot be tampered with and improving the security of the electronic bill.

[0088] In some embodiments, Figure 6 As shown, a method for processing electronic bill data is provided, and the method is applied to Figure 1 Taking the electronic bill identification management node 102 in the example as an example, the following steps are included:

[0089] S602: Receive a ticket identifier allocation request sent by an electronic ticket identifier generation node.

[0090] S604, in response to the bill identification allocation request, obtaining an unallocated bill identification field range as a target bill identification field range, the target bill identification field range corresponding to a plurality of character strings.

[0091] Specifically, the electronic invoice identification management node can manage multiple electronic invoice identification generation nodes, and the unallocated invoice identification field range refers to the field range that is not allocated to any electronic invoice identification generation node. For example, the range corresponding to the invoice number is divided into multiple field ranges. Different field ranges are allocated to each electronic invoice identification generation node. For example, assuming that the invoice number range can be from 0001 to 1000. Then 0001-0100 can be used as the first field range and allocated to the electronic invoice identification generation node B1, and 0101-0200 can be used as the second field range and allocated to the electronic invoice identification generation node B2. 0201-0300 is used as the third field range and allocated to the electronic invoice identification generation node B3.

[0092] S606, sending the target bill identifier field range to the electronic bill identifier generation node, so that the electronic bill identifier generation node obtains the second string according to the target bill identifier field range, allocates the target electronic bill identifier according to the first string and the second string, and the first string is generated according to the electronic bill identifier generation rule.

[0093] In the above-mentioned electronic bill data processing method, a bill identification allocation request sent by an electronic bill identification generation node is received, and the bill identification allocation request is responded to, thereby obtaining an unallocated bill identification field range, and the target bill identification field range is sent to the electronic bill identification generation node, so that the electronic bill identification generation node obtains the second string according to the target bill identification field range, allocates the electronic bill identification according to the first string and the second string, and the first string is generated according to the electronic bill identification generation rule. Therefore, the obtained electronic bill identification not only meets the electronic bill generation rule, but also does not need to request the bill identification management node to allocate the electronic bill identification every time an electronic bill acquisition request is received, and the electronic bill identification acquisition efficiency is high, thereby improving the billing efficiency.

[0094] In some embodiments, the ticket identifier allocation request carries a historical ticket identifier field range, and the historical ticket identifier field range is the ticket identifier field range that the electronic ticket identifier generation node received last time, such as Figure 7 As shown, the electronic bill data processing method also includes:

[0095] S702: Compare the historical bill identification field range with the bill identification field range last allocated to the electronic bill identification generation node.

[0096] The step of obtaining the unallocated bill identification field range as the target bill identification field range in step S604 includes:

[0097] S604A, when the comparison is consistent, obtain an unallocated bill identification field range as a target bill identification field range.

[0098] S604B: When the comparison is inconsistent, obtain the bill identification field range that was last allocated to the electronic bill identification generation node as the target bill identification field range.

[0099] Specifically, when the historical bill identification field range is compared with the bill identification field range last allocated to the electronic bill identification generation node, and the result is consistent, it means that the electronic bill identification generation node has received the bill identification field range allocated last time. Therefore, the unallocated bill identification field range is obtained as the target bill identification field range.

[0100] When the comparison result of the historical bill identification field range and the bill identification field range last assigned to the electronic bill identification generation node is inconsistent, it means that the electronic bill identification management node has not received the bill identification field range last assigned. Therefore, the bill identification field range last assigned to the electronic bill identification generation node is obtained as the target bill identification field range.

[0101] In an embodiment of the present application, by comparing the historical bill identification field range with the bill identification field range last allocated to the electronic bill identification generation node, the target bill identification field range corresponding to the bill identification allocation request is determined, thereby avoiding sending duplicate bill identification field ranges and avoiding mistakenly judging an unallocated bill identification field range as an already allocated bill identification field range, thereby ensuring the uniqueness of the bill identification and full utilization of the field range.

[0102] In the traditional method, for example, a unique random number can be generated by means of UUID (Universally Unique Identifier) ​​or GUID (Globally Unique Identifier), and the generated unique random number is used as a unique identifier. However, although the generated unique random number satisfies the uniqueness, it cannot meet the special electronic invoice identifier generation rules of the electronic invoice identifier, that is, it cannot generate meaningful strings and ordered strings. By adopting the method provided in the embodiment of the present application, the obtained electronic invoice identifier can meet the invoice generation rules and ensure the uniqueness of the electronic invoice identifier.

[0103] In some embodiments, Figure 8 As shown, the electronic invoice data processing method specifically includes the following steps:

[0104] S802, the electronic bill identification generation node obtains the historical bill identification field range, which is the bill identification field range received last time; sends a bill identification allocation request to the electronic bill identification management node, and the bill identification allocation request carries the historical bill identification field range.

[0105] S804: The electronic invoice identifier management node receives the invoice identifier allocation request sent by the electronic invoice identifier generation node.

[0106] S806, the electronic invoice identification management node responds to the invoice identification allocation request and compares the historical invoice identification field range carried in the invoice identification allocation request with the invoice identification field range last allocated to the electronic invoice identification generation node; when the comparison is consistent, the unallocated invoice identification field range is obtained as the target invoice identification field range; when the comparison is inconsistent, the invoice identification field range last allocated to the electronic invoice identification generation node is obtained as the target invoice identification field range.

[0107] S808, receiving a target bill identification field range and a first character string; using the received first character string to update the locally stored first character string, and storing the updated first character string in correspondence with the target bill identification field range.

[0108] S810, the electronic invoice identifier generation node receives an electronic invoice identifier acquisition request.

[0109] S812, the electronic bill identification generation node obtains a pre-stored first character string and a target bill identification field range corresponding to the first character string; and obtains a second character string according to the target bill identification field range.

[0110] S814, the electronic bill identifier generation node allocates a corresponding target electronic bill identifier in response to the electronic bill identifier acquisition request, where the target electronic bill identifier includes a first character string and a second character string.

[0111] S816, the electronic invoice identifier generating node receives the invoicing request, which carries the invoicing party identifier, the recipient identifier and the resource transfer share.

[0112] S818, the electronic invoice identification generation node responds to the request for issuing invoices on behalf of others and triggers the electronic invoice identification acquisition request; the invoice information is signed using the private key corresponding to the invoice issuer to obtain the signed invoice information, which includes the invoice issuer identification, the recipient identification, the resource transfer share and the target electronic invoice identification.

[0113] S820, the electronic invoice identification generation node writes the signed invoice information into the blockchain.

[0114] In the embodiment of the present application, the electronic bill identification management node receives the bill identification allocation request sent by the electronic bill identification generation node, responds to the bill identification allocation request, thereby obtaining the unallocated bill identification field range, and sends the target bill identification field range and the corresponding first string to the electronic bill identification generation node. The electronic bill identification generation node stores the received target bill identification field range and the corresponding first string accordingly. When receiving the electronic bill identification acquisition request, the first string and the second string can be obtained from the stored target bill identification field range and the corresponding first string. The second string is determined according to the bill field range of the electronic bill identification management node, and the first string is generated according to the bill identification generation rule. Therefore, the obtained electronic bill identification not only satisfies the electronic bill generation rule, but also does not need to request the bill identification management node to allocate the electronic bill identification every time the electronic bill identification request is received. The electronic bill identification acquisition efficiency is high, thereby improving the billing efficiency.

[0115] For example, Fig. 9 As shown, a deployment diagram of the system corresponding to the electronic invoice data processing method in some embodiments is shown. Specifically, the tax bureau invoice code segment allocation device is an electronic invoice identification management node, and the invoice node is an electronic invoice identification generation node. One tax bureau invoice code segment allocation device corresponds to multiple invoice nodes. The tax bureau invoice code segment allocation device and the corresponding multiple invoice nodes may belong to the same region, for example, they belong to the same Shenzhen region, and each invoice node may be an invoice enterprise belonging to the Shenzhen Tax Bureau. The invoice code and invoice segment obtained by each invoice node are allocated by the tax bureau invoice code segment allocation device. The invoice node is installed with an invoice code number generator and an invoice application, and can store invoice codes and invoice segments. Among them, the invoice code number generator is used to generate invoice codes and invoice numbers. The application is used for invoicing, and the invoice identification needs to be obtained when invoicing, and the invoice identification includes the invoice code and the invoice number. The invoice code corresponds to the first string, and the invoice number corresponds to the second string. The tax bureau's invoice code segment allocation device is a business center that can be implemented based on blockchain smart contract technology (or traditional centralized technology), providing invoice code management and invoice segment generation functions, and can communicate with the invoice code number generator of the invoicing node through the network. The invoice segment corresponds to the bill identification field range.

[0116] The invoicing node may send a bill identification allocation request to the tax bureau invoice code segment allocation device through the corresponding invoice code number generator to apply for an invoice segment. The tax bureau invoice code segment allocation device receives and responds to the bill identification allocation request, obtains an unallocated invoice segment or obtains an unallocated invoice segment and a corresponding invoice code, and returns the obtained unallocated invoice segment or the obtained unallocated invoice segment and the corresponding invoice code to the invoice code number generator corresponding to the invoicing node, and the invoice code number generator corresponding to the invoicing node receives and stores the received invoice segment or the invoice segment and the corresponding invoice code.

[0117] The application of the invoicing node can send an electronic invoice identification acquisition request to the corresponding invoice code number generator to apply for the invoice code and invoice number. The invoice code number generator can query whether there are unused invoice numbers and invoice codes corresponding to the invoice numbers in the stored invoice codes and invoice numbers. If so, the unused invoice number and the invoice code corresponding to the invoice number are obtained, and the unused invoice number and the invoice code corresponding to the invoice number are allocated to the corresponding application; if not, the invoice code number generator can send a bill identification allocation request to the corresponding tax bureau invoice code number segment allocation device to apply for the invoice code and invoice number segment, and store the acquired invoice code and invoice number segment, and query again from the stored invoice codes and invoice number segments whether there are unused invoice numbers and invoice codes corresponding to the invoice number.

[0118] It should be understood that, although the various steps in the flowchart of the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above-mentioned embodiments may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.

[0119] In some embodiments, Fig.10 As shown, an electronic bill data processing device is provided, the device comprising:

[0120] The electronic invoice identification acquisition request receiving module 1002 is used to receive an electronic invoice identification acquisition request.

[0121] The first string and second string acquisition module 1004 is used to obtain the first string and the second string, the first string is generated according to the electronic bill identification generation rule, and the second string is determined according to the target bill identification field range. The first string and the target bill identification field range are pre-allocated by the electronic bill identification management node, and the target bill identification field range corresponds to multiple strings.

[0122] The target electronic bill identifier allocation module 1006 is used to allocate a corresponding target electronic bill identifier in response to an electronic bill identifier acquisition request, where the target electronic bill identifier includes a first character string and a second character string.

[0123] In some embodiments, the first character string and the second character string obtaining module 1004 includes:

[0124] The first character string and target bill identification field range acquisition unit is used to acquire a pre-stored first character string and a target bill identification field range corresponding to the first character string.

[0125] The second character string generating unit is used to determine the second character string according to the target bill identification field range.

[0126] In some embodiments, Fig.11 As shown, the electronic bill data processing device also includes:

[0127] The ticket identifier allocation request sending module 1102 is used to send a ticket identifier allocation request to the electronic ticket identifier management node.

[0128] The target bill identification field range receiving and storing module 1104 is used to receive and store the target bill identification field range, where the target bill identification field range is returned by the electronic bill identification management node in response to the bill identification allocation request.

[0129] In some embodiments, the ticket identification allocation request sending module 1102 includes:

[0130] The historical bill identification field range acquisition unit is used to acquire the historical bill identification field range, where the historical bill identification field range is the bill identification field range received last time.

[0131] The bill identification allocation request sending unit is used to send a bill identification allocation request to the electronic bill identification management node, where the bill identification allocation request carries the historical bill identification field range.

[0132] In some embodiments, the target ticket identification field range receiving and storing module 1104 includes:

[0133] The target bill identification field range and target first character string receiving unit is used to receive the target bill identification field range and the first character string.

[0134] The first character string updating unit is used to update the locally stored first character string using the received first character string, and store the updated first character string in correspondence with the target bill identification field range.

[0135] In some embodiments, Fig.12 As shown, the electronic bill data processing device also includes:

[0136] The invoicing request receiving module 1202 is used to receive an invoicing request, where the invoicing request carries an invoicing party identifier, a receiving party identifier and a resource transfer share.

[0137] The invoicing request response module 1204 is used to trigger an electronic invoice identification acquisition request in response to the invoicing request.

[0138] The signed ticket information obtaining module 1206 is used to sign the ticket information using the private key corresponding to the issuer to obtain the signed ticket information, which includes the issuer identifier, the recipient identifier, the resource transfer share and the target electronic ticket identifier.

[0139] The writing module 1208 is used to write the signed bill information into the blockchain.

[0140] In some embodiments, Fig.13 As shown, an electronic bill data processing device is provided, the device comprising:

[0141] The ticket identifier allocation request receiving module 1302 is used to receive a ticket identifier allocation request sent by the electronic ticket identifier generation node.

[0142] The target ticket identification field range acquisition module 1304 is used to respond to the ticket identification allocation request and acquire an unallocated ticket identification field range as the target ticket identification field range. The target ticket identification field range corresponds to multiple character strings.

[0143] The target bill identification field range sending module 1306 is used to send the target bill identification field range to the electronic bill identification generation node, so that the electronic bill identification generation node determines the second string according to the target bill identification field range, allocates the target electronic bill identification according to the first string and the second string, and the first string is generated according to the electronic bill identification generation rule.

[0144] In some embodiments, the ticket identifier allocation request carries a historical ticket identifier field range, the historical ticket identifier field range is the ticket identifier field range last received by the electronic ticket identifier generation node, and the electronic ticket data processing device further includes:

[0145] The bill field range comparison module is used to compare the historical bill identification field range with the bill identification field range last allocated to the electronic bill identification generation node.

[0146] The target bill identification field range acquisition module 1304 is also used to obtain an unassigned bill identification field range as the target bill identification field range when the comparison is consistent; when the comparison is inconsistent, obtain the bill identification field range last assigned to the electronic bill identification generation node as the target bill identification field range.

[0147] The specific definition of the electronic invoice data processing device can be found in the definition of the electronic invoice data processing method above, which will not be repeated here. Each module in the above electronic invoice data processing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0148] In some embodiments, a computer device is provided. The computer device may be an electronic ticket identification generation node or an electronic ticket identification management node. The internal structure diagram thereof may be as follows: Fig.14 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an electronic invoice data processing method is implemented.

[0149] Those skilled in the art will understand that Fig.14 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0150] In some embodiments, the electronic ticket data processing device provided by the present application can be implemented in the form of a computer program. The computer program can be Fig.14 The computer device shown in the figure is run on the computer device. The memory of the computer device can store various program modules constituting the electronic ticket data processing device, such as: Fig.10 The electronic bill identification acquisition request receiving module 1002, the first character string and the second character string acquisition module 1004 and the target electronic bill identification allocation module 1006 in the electronic bill data processing device shown; Fig.13 The electronic receipt data processing device shown includes a receipt identification allocation request receiving module 1302, a target receipt identification field range acquiring module 1304, and a target receipt identification field range sending module 1306. The computer program composed of various program modules enables the processor to execute the steps of the electronic receipt data processing method of each embodiment of the present application described in this specification.

[0151] For example, Fig.14 The computer device shown can be Fig.10 The electronic invoice identification acquisition request receiving module 1002 in the electronic invoice data processing device shown receives the electronic invoice identification acquisition request. The computer device can obtain the first string and the second string through the first string and the second string acquisition module 1004. The first string is generated according to the electronic invoice identification generation rule, and the second string is determined according to the target invoice identification field range. The first string and the target invoice identification field range are pre-allocated by the electronic invoice identification management node, and the target invoice identification field range corresponds to multiple strings. The computer device can respond to the electronic invoice identification acquisition request through the target electronic invoice identification allocation module 1006 and allocate the corresponding target electronic invoice identification. The target electronic invoice identification includes the first string and the second string

[0152] For example, Fig.14 The computer device shown can be Fig.13 The bill identification allocation request receiving module 1302 in the electronic bill data processing device shown receives the bill identification allocation request sent by the electronic bill identification generation node. The computer device can respond to the bill identification allocation request through the target bill identification field range acquisition module 1304 to obtain the unallocated bill identification field range as the target bill identification field range, and the target bill identification field range corresponds to multiple character strings. The computer device can send the target bill identification field range to the electronic bill identification generation node through the target bill identification field range sending module 1306, so that the electronic bill identification generation node obtains the second character string according to the target bill identification field range, allocates the target electronic bill identification according to the first character string and the second character string, and the first character string is generated according to the electronic bill identification generation rule.

[0153] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above-mentioned electronic invoice data processing method. The steps of the electronic invoice data processing method here may be the steps of the electronic invoice data processing method in each of the above-mentioned embodiments.

[0154] In one embodiment, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the processor executes the steps of the above-mentioned electronic receipt data processing method. The steps of the electronic receipt data processing method here can be the steps of the electronic receipt data processing method in each of the above-mentioned embodiments.

[0155] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0156] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0157] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for processing electronic invoice data, executed by an electronic invoice identifier generation node, the method comprising: Obtain the last received bill identification field range from the local computer to obtain the historical bill identification field range; Sending a bill identification allocation request carrying the historical bill identification field range to the electronic bill identification management node; the electronic bill identification management node compares the historical bill identification field range with the bill identification field range last allocated to the electronic bill identification generation node, and when the comparison is consistent, obtains the unallocated bill identification field range as the target bill identification field range; when the comparison is inconsistent, obtains the bill identification field range last allocated to the electronic bill identification generation node as the target bill identification field range; the electronic bill identification generation node locally stores a first character string; The first character string is generated according to an electronic bill identifier generation rule; In the case where the electronic bill identification management node does not update the first character string, receiving and storing the target bill identification field range returned by the electronic bill identification management node in response to the bill identification allocation request; the size of the target bill identification field range allocated by the electronic bill identification management node to the electronic bill identification generation node is preset; In the case where the electronic ticket identification management node has updated the first string, receiving the target ticket identification field range and the updated first string returned by the electronic ticket identification management node in response to the ticket identification allocation request, replacing the locally stored first string with the updated first string, and storing the target ticket identification field range and the updated first string in association with each other; Receiving an electronic invoice identification acquisition request; Acquire a first character string and a second character string stored locally, wherein the second character string is determined according to the target bill identification field range, and the target bill identification field range corresponds to multiple character strings; In response to the electronic bill identification acquisition request, a corresponding target electronic bill identification is allocated, where the target electronic bill identification includes a first character string and a second character string stored locally.

2. The method according to claim 1, characterized in that The step of obtaining the first character string and the second character string stored locally includes: Acquire a first character string stored locally and the target bill identification field range corresponding to the first character string stored locally; A second character string is obtained according to the target bill identification field range.

3. The method according to claim 1, characterized in that: The method further comprises: receiving a request for issuing an invoice on behalf of another party, wherein the request for issuing an invoice on behalf of another party carries an identifier of an issuer, an identifier of a recipient, and a resource transfer share; In response to the request for issuing invoices on behalf of another, triggering the request for obtaining the electronic invoice identification; The bill information is signed using the private key corresponding to the bill issuer to obtain the signed bill information, wherein the bill information includes the bill issuer identifier, the recipient identifier, the resource transfer share, and the target electronic bill identifier; The signed bill information is written into the blockchain.

4. An electronic invoice data processing method, executed by an electronic invoice identification management node, the method comprising: Receiving a ticket identifier allocation request sent by an electronic ticket identifier generation node; The bill identifier allocation request carries a historical bill identifier field range, where the historical bill identifier field range is the bill identifier field range received by the electronic bill identifier generation node last time; the electronic bill identifier generation node locally stores a first string; the first string is generated according to an electronic bill identifier generation rule; In response to the bill identification allocation request, the historical bill identification field range is compared with the bill identification field range that was last allocated to the electronic bill identification generation node. When the comparison is consistent, the unallocated bill identification field range is obtained as the target bill identification field range, and the target bill identification field range corresponds to multiple character strings; when the comparison is inconsistent, the bill identification field range that was last allocated to the electronic bill identification generation node is obtained as the target bill identification field range; In the case where the first character string is not updated, the target bill identifier field range is sent to the electronic bill identifier generation node, so that the electronic bill identifier generation node obtains a second character string according to the target bill identifier field range, and allocates a target electronic bill identifier according to the first character string and the second character string; the size of the target bill identifier field range allocated by the electronic bill identifier management node to the electronic bill identifier generation node is preset; In the case where the first string has been updated, the target ticket identification field range and the updated first string are sent to the electronic ticket identification generation node, so that the electronic ticket identification generation node replaces the locally stored first string with the updated first string, and stores the target ticket identification field range and the updated first string in association.

5. An electronic bill data processing device, the device comprising: a bill identification allocation request sending module, configured to obtain the last received bill identification field range from the local, obtain the historical bill identification field range, and send the bill identification allocation request carrying the historical bill identification field range to the electronic bill identification management node; the electronic bill identification management node compares the historical bill identification field range with the bill identification field range last allocated to the electronic bill identification generation node, and when the comparison is consistent, obtains the unallocated bill identification field range as the target bill identification field range; when the comparison is inconsistent, obtains the bill identification field range last allocated to the electronic bill identification generation node as the target bill identification field range; the electronic bill identification generation node locally stores a first character string; The first character string is generated according to an electronic bill identifier generation rule; The target bill identification field range receiving and storing module is used to receive and store the target bill identification field range returned by the electronic bill identification management node in response to the bill identification allocation request when the electronic bill identification management node has not updated the first character string; the size of the target bill identification field range allocated by the electronic bill identification management node to the electronic bill identification generation node is preset; when the electronic bill identification management node has updated the first character string, receive the target bill identification field range returned by the electronic bill identification management node in response to the bill identification allocation request and the updated first character string, replace the locally stored first character string with the updated first character string, and store the target bill identification field range and the updated first character string in association; An electronic invoice identification acquisition request receiving module, used for receiving an electronic invoice identification acquisition request; A first string and a second string acquisition module, used to acquire a first string and a second string stored locally, wherein the second string is determined according to the target bill identification field range, and the target bill identification field range corresponds to a plurality of strings; The target electronic bill identifier allocation module is used to allocate a corresponding target electronic bill identifier in response to the electronic bill identifier acquisition request, wherein the target electronic bill identifier includes a first character string and a second character string stored locally.

6. The device according to claim 5, characterized in that The first character string and the second character string obtaining module are further used for: Acquire a first character string stored locally and the target bill identification field range corresponding to the first character string stored locally; A second character string is obtained according to the target bill identification field range.

7. The device according to claim 5, characterized in that The device is also used for: receiving a request for issuing an invoice on behalf of another party, wherein the request for issuing an invoice on behalf of another party carries an identifier of an issuer, an identifier of a recipient, and a resource transfer share; In response to the request for issuing invoices on behalf of another, triggering the request for obtaining the electronic invoice identification; The bill information is signed using the private key corresponding to the bill issuer to obtain the signed bill information, wherein the bill information includes the bill issuer identifier, the recipient identifier, the resource transfer share, and the target electronic bill identifier; The signed bill information is written into the blockchain.

8. An electronic bill data processing device, the device comprising: A ticket identification allocation request receiving module, used to receive a ticket identification allocation request sent by an electronic ticket identification generating node; The bill identifier allocation request carries a historical bill identifier field range, where the historical bill identifier field range is the bill identifier field range received by the electronic bill identifier generation node last time; the electronic bill identifier generation node locally stores a first character string; a target bill identification field range acquisition module, configured to respond to the bill identification allocation request, compare the historical bill identification field range with the bill identification field range last allocated to the electronic bill identification generation node, and when the comparison is consistent, obtain the unallocated bill identification field range as the target bill identification field range, the target bill identification field range corresponds to a plurality of character strings; when the comparison is inconsistent, obtain the bill identification field range last allocated to the electronic bill identification generation node as the target bill identification field range; A target bill identification field range sending module is used to send the target bill identification field range to the electronic bill identification generation node when the first character string is not updated, so that the electronic bill identification generation node determines the second character string according to the target bill identification field range, allocates the target electronic bill identification according to the first character string and the second character string, and the first character string is generated according to the electronic bill identification generation rule; the size of the target bill identification field range allocated by the electronic bill identification management node to the electronic bill identification generation node is preset; when the first character string has been updated, send the target bill identification field range and the updated first character string to the electronic bill identification generation node, so that the electronic bill identification generation node replaces the locally stored first character string with the updated first character string, and stores the target bill identification field range and the updated first character string in association.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 4 when executing the computer program.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.