CN110750808A - Bill processing method and device and storage medium device - Google Patents

Bill processing method and device and storage medium device Download PDF

Info

Publication number
CN110750808A
CN110750808A CN201910966717.4A CN201910966717A CN110750808A CN 110750808 A CN110750808 A CN 110750808A CN 201910966717 A CN201910966717 A CN 201910966717A CN 110750808 A CN110750808 A CN 110750808A
Authority
CN
China
Prior art keywords
terminal
bill
information
private key
ticket
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910966717.4A
Other languages
Chinese (zh)
Other versions
CN110750808B (en
Inventor
蔡弋戈
秦青
戴传兵
张懿方
张建俊
王宗友
郑罗海
蓝虎
郭鹏
洪晓雯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910966717.4A priority Critical patent/CN110750808B/en
Publication of CN110750808A publication Critical patent/CN110750808A/en
Application granted granted Critical
Publication of CN110750808B publication Critical patent/CN110750808B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6209Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the invention discloses a bill processing method, a bill processing device and a storage medium device. The bill processing method comprises the following steps: receiving a bill acquiring request sent by a first terminal, wherein the bill acquiring request comprises bill information; generating a bill for the first terminal according to the bill information; processing the bill according to the first private key use right of the first terminal and the intelligent contract to obtain a first digital signature; and sending the bill and the first digital signature to a second terminal corresponding to a second terminal identifier included in the bill information so that the second terminal can obtain the bill. By adopting the embodiment of the invention, the business node equipment can generate the bill for the first terminal under the condition of not obtaining the private key of the first terminal and only obtaining the private key use right of the first terminal, and the safety of the private key of the first terminal can be improved.

Description

Bill processing method and device and storage medium device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for processing a ticket, and a storage medium apparatus.
Background
Currently, many enterprises authorize the operation of generating tickets to a third party service provider, i.e., a ticket service provider, which generates tickets for the enterprises according to the ticket information sent by the enterprises.
After the enterprise authorizes the bill service provider, the enterprise sends the private key of the enterprise to the bill service provider, so that after the bill service provider generates the bill for the enterprise, the bill is processed by using the private key of the enterprise, the bill is encrypted, and the generated bill is approved by the enterprise, but the method has the risk of enterprise private key leakage.
Disclosure of Invention
The embodiment of the invention provides a bill processing method, a bill processing device and a storage medium device, and by implementing the bill processing method and the bill processing device, the safety of a private key can be improved.
In a first aspect, an embodiment of the present invention provides a method for processing a bill, where the method includes:
receiving a bill acquiring request sent by a first terminal, wherein the bill acquiring request comprises bill information; generating a bill for the first terminal according to the bill information; processing the bill according to the first private key use right of the first terminal and the intelligent contract to obtain a first digital signature; and sending the bill and the first digital signature to a second terminal corresponding to a second terminal identifier included in the bill information so that the second terminal can obtain the bill.
In the technical scheme, the service node equipment generates a bill for the first terminal according to bill information from the first terminal, encrypts the bill according to a first private key use right and an intelligent contract of the first terminal, and sends the encrypted bill to the second terminal corresponding to the second terminal identifier included in the bill information.
In a second aspect, the present invention provides a note handling apparatus comprising:
the receiving module is used for receiving a bill acquiring request sent by a first terminal, and the bill acquiring request comprises bill information;
the generating module is used for generating a bill for the first terminal according to the bill information;
the processing module is used for processing the bill according to the first private key use right and the intelligent contract of the first terminal to obtain a first digital signature;
and the sending module is used for sending the bill and the first digital signature to a second terminal corresponding to the second terminal identifier included in the bill information so as to enable the second terminal to obtain the bill.
In a third aspect, an embodiment of the present invention provides a bill processing apparatus, which is characterized by comprising a processor and a memory, where the processor and the memory are connected to each other, where the memory is used to store a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method of the first aspect.
In a fourth aspect, the present invention provides a computer storage medium characterized in that the computer storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to perform the method of the first aspect.
By implementing the embodiment of the invention, the service node equipment generates the bill for the first terminal under the condition of only obtaining the first private key use right of the first terminal, and encrypts the bill according to the first private key use right and the intelligent contract, and the method can improve the security of the private key of the first terminal. If the first terminal updates the private key of the first terminal, the private key usage right corresponding to the private key is invalid, at this time, the service node device may send an update request to the first terminal to request for updating the second private key usage right corresponding to the first terminal after updating the private key, or the service node device receives the second private key usage right sent by the first terminal every a first preset period. Meanwhile, the service node device can generate the bill for the first terminal according to the target bill information containing the same second terminal identifier in the bill information or the target bill information with the highest credit rating of the second terminal corresponding to the second terminal identifier in the bill information, so that the bill generating efficiency of the service node device can be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or the background art of the present invention, the drawings required to be used in the embodiments or the background art of the present invention will be described below.
In order to more clearly illustrate the technical solutions in the embodiments or the background art of the present invention, the drawings required to be used in the embodiments or the background art of the present invention will be described below.
FIG. 1 is a schematic flow chart illustrating a current block chain electronic invoice generation process;
FIG. 2 is a schematic diagram of a bill handling system according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a bill processing method according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart of another bill processing method according to an embodiment of the present invention;
FIG. 5 is a schematic flow chart of another bill processing method according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a bill handling apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another bill processing device according to an embodiment of the present invention.
Detailed Description
The embodiments of the present invention will be described below with reference to the drawings.
At present, a generation process of a block chain electronic invoice is shown in fig. 1, an enterprise a authorizes a generation operation of a bill to a bill facilitator, after a seller (the enterprise a) and a buyer (the enterprise B) perform a transaction, transaction information is generated, the enterprise a needs to make an invoice for the enterprise B according to the transaction information, at this time, the enterprise a sends bill information generated according to the transaction information and a private key of the enterprise a to the bill facilitator, the bill facilitator generates a bill for the enterprise a according to the bill information, then processes the bill by using the private key of the enterprise a, encrypts the bill and allows the generation of the bill to obtain approval of the enterprise a, and finally sends the processed bill to the buyer enterprise B, so that the enterprise B obtains the bill. In the bill generation process, the bill service provider can obtain the private key of the enterprise A, and the risk that the private key of the enterprise A is revealed exists.
The embodiment of the invention provides a bill processing method, a bill processing device and a storage medium device. According to the method, a first terminal authorizes bill generation operation to service node equipment in a block chain network, when the first terminal and a second terminal complete transaction and the first terminal needs the service node equipment to generate bills for the first terminal, the first terminal sends bill acquisition requests to the service node equipment, the bill acquisition requests comprise bill information, the service node equipment generates bills for the first terminal according to the bill information, processes the bills according to a first private key use right of the first terminal and an intelligent contract to obtain a first digital signature, and finally sends the bills and the first digital signature to a second terminal corresponding to a second terminal identifier contained in the bill information so that the second terminal can acquire the bills. In this way, the service node device only obtains the right of use of the private key of the first terminal, but does not obtain the private key of the first terminal, so that the risk of disclosure of the private key of the first terminal does not exist, and the security of the private key can be improved.
In the bill processing process, the first terminal is taken as a seller, the second terminal is taken as a buyer, and the business node device is taken as a bill service provider, for example, the bill service provider can invoice the seller. When the seller and the buyer complete the transaction, the seller needs to make an invoice for the buyer, and the bill service provider can help the seller to realize the operation of making an invoice, so that the seller sends a bill acquisition request to the bill service provider, and the bill acquisition request comprises bill information; the bill service provider invoices the seller according to the bill information, and processes the bill according to the private key use right and the intelligent contract of the seller to obtain a first digital signature; finally, the ticket facilitator sends the ticket and the first digital signature to the buyer for the buyer to obtain the ticket. In the invoice issuing process, the bill facilitator only obtains the use right of the private key of the seller, but does not obtain the private key of the seller, so that the security of the private key can be improved.
The block chain is a novel application mode of computer technologies such as distributed data storage, consensus mechanism and encryption algorithm, and is essentially a decentralized database; the blockchain can be composed of a plurality of serial transaction records (also called blocks) which are connected in series by cryptography and protect the contents, and the distributed accounts connected in series by the blockchain can effectively record the transaction by multiple parties and can permanently check the transaction (can not be tampered).
In the bill processing process, the service node equipment on the block chain stores the intelligent contract, and the bill can be processed through the intelligent contract and the private key use right of the first terminal to obtain the first digital signature. Smart contracts are, among other things, computer protocols intended to propagate, verify or execute contracts in an informational manner, allowing for trusted transactions to be conducted without third parties, which transactions are traceable and irreversible. An intelligent contract is a set of commitments defined in digital form, including the protocol on which the contract participants can execute the commitments, and is a piece of code written on a blockchain.
In order to better understand a bill processing method, a bill processing device, and a storage medium device disclosed in the embodiments of the present invention, first, a description is given below of an architecture of a system to which the embodiments of the present invention are applicable.
Referring to fig. 2, fig. 2 is a schematic diagram of an architecture of a bill processing system according to an embodiment of the present invention. As shown in fig. 2, the system includes a first terminal 201, a second terminal 202, and a blockchain network 203, where the blockchain network 203 includes a service node device 2031 and a common node device 2032, there may be multiple common node devices in the blockchain network, and the common node devices are configured to perform uplink processing on notification information from the service node devices, and the service node devices are configured to generate a ticket for the first terminal. The first terminal and the second terminal are outside the blockchain network, do not participate in the uplink process, and do not store information in the blockchain network. The system architecture shown in fig. 2 is for illustration only and is not to be construed as a limitation on the embodiments of the present invention.
For convenience of description, except for special descriptions, the first terminal in the embodiment of the present invention is a terminal device used by a seller in a transaction process, and the second terminal is a terminal device used by a buyer in a transaction process.
The first and second terminals may include, but are not limited to: the terminal devices include smart phones (such as Android phones and iOS phones), tablet computers, portable personal computers, smart wearable devices and the like, and the terminal devices have functions of network communication and the like.
Based on the above description, an embodiment of the present invention proposes a ticket processing method as shown in fig. 3, where the ticket processing method may include S301 to S308:
s301: the first terminal sends a bill acquiring request to the service node equipment, wherein the bill acquiring request comprises bill information.
Specifically, after the first terminal and the second terminal complete the transaction, the first terminal needs to provide a bill for the second terminal according to the transaction information, at this time, the first terminal sends a bill acquisition request to the service node device, so that the service node device generates a bill for the first terminal, the bill acquisition request includes bill information, and the bill information includes related information of the invoicing party and the invoiced party, such as enterprises, tax numbers, unit addresses, telephone numbers and the like of the invoicing party and the invoiced party.
S302: and the service node equipment generates a bill for the first type terminal according to the bill information.
After receiving the ticket acquiring request from the first terminal, the service node device indicates that the first terminal has a ticket acquiring requirement, and then the service node device generates a ticket for the first terminal according to the ticket information contained in the ticket acquiring request.
In one implementation, before the service node device generates the ticket for the first terminal according to the ticket information, the service node device verifies the ticket acquisition request, where the ticket acquisition request includes identity information of a sender of the ticket acquisition request, and the verification of the ticket acquisition request by the service node device may include: and checking the identity of the sender of the bill acquisition request, namely checking the identity of the first terminal, so as to improve the reliability of the bill acquisition request. Specifically, the service node device verifies the ticket acquisition request by using the public key created by the first terminal, and if the verification is successful, it indicates that the sender of the ticket acquisition request is the first terminal that sent the ticket acquisition request, and the service node device successfully verifies the ticket acquisition request. By the method, the reliability of the bill acquisition request is improved, namely the reliability of the bill information and the use right of the first private key is improved.
S303: and the service node equipment generates notification information, wherein the notification information comprises the generation time of the bill, the node identifier of the service node equipment and the terminal identifier of the first terminal.
Specifically, after the service node device generates a ticket for the first terminal, the service node device generates notification information, where the notification information includes generation time of the ticket, a node identifier of the service node device, and a terminal identifier of the first terminal, and the notification information is used to notify the consensus node device to perform uplink processing on the notification information, so that the notification information performs distributed data storage in a block manner.
In one implementation manner, the notification information includes the generation time of the ticket, the node identifier of the service node device, the terminal identifier of the first terminal, and the ticket information, so that the consensus node device not only stores the participant and time in the ticket generation process, but also performs uplink processing on the ticket information, stores the information on the consensus node device, prevents the information from being tampered, and can provide a searchable evidence for subsequent ticket problems.
S304: and the service node equipment sends the notification information to the consensus node equipment.
After the service node equipment generates the notification information, the notification information is sent to the common node equipment, so that the common node equipment performs uplink processing on the notification information.
S305: and the consensus node equipment checks the notification information.
And after the consensus node equipment receives the notification information, checking the notification information. The notification information includes identity information of a sender of the notification information, and the checking of the notification information by the consensus node device may include: and checking the identity of the notification information sender, namely checking the identity of the service node equipment, so as to improve the reliability of the notification information. Specifically, the consensus node device verifies the notification information by using the public key created by the service node device, and if the verification is successful, the consensus node device indicates that the sender of the notification information is the service node device that sends the notification information, and the consensus node device verifies the notification information successfully. In this way, the reliability of the notification information is improved.
In one implementation manner, after the consensus node device successfully verifies the notification information, the notification information is sent to each consensus node device, so that each consensus node device verifies the notification information. And sending the notification information to each piece of consensus node equipment in the block chain network only when the consensus node equipment successfully verifies the notification information, so that the reliability of the notification information can be improved. And each piece of consensus node equipment in the block chain network checks the notification information and sends a check result aiming at the notification information to the consensus node equipment receiving the notification information in a notification information check response mode.
Specifically, the checking of the notification information by each piece of common node equipment is the same as the checking of the notification information by the common node equipment, and is not described herein again. Whether the result of the verification of the notification information by the consensus node device is passed or not passed, each consensus node device can send a verification response of the notification information to the consensus node device receiving the notification information. The notification information check responses from the respective consensus node devices in the blockchain network may include check results for the notification information, which are independent of each other.
The consensus node equipment receiving the notification information obtains a notification information verification result according to the notification information verification response, and further determines whether the notification information passes the verification of the block chain network, namely, the bill information verification result is determined jointly according to the notification information verification response returned by each consensus node equipment in the block chain network. By the method, the common node equipment in the block chain network can participate in the verification process aiming at the notification information, and the reliability of the notification information is improved.
In one implementation manner, if the number of passed check results included in the check response of each piece of consensus node equipment to the notification information is greater than a preset threshold, the consensus node equipment receiving the notification information determines that the notification information passes through the check of the block chain network. For example, the preset threshold is 50% of the number of the common node devices in the blockchain network, and if the blockchain network is composed of 45 common node devices, the checking result of the notification information by 26 common node devices is that the notification information passes the checking result, and the number of the common node devices in the blockchain network that the notification information passes the checking result is greater than the preset threshold, the common node devices determine that the notification information passes the checking of each common node device in the blockchain network.
S306: and if the notification information is successfully checked, the common identification node equipment carries out uplink processing on the notification information.
Specifically, if the common node equipment successfully verifies the notification information, uplink processing is performed on the notification information to generate a block including the notification information, so that the notification information is subjected to distributed data storage in a block manner, and is not easily tampered. After the service node equipment generates the bill each time, the notification information about the bill is sent to the common identification node equipment, and the common identification node equipment carries out uplink processing on the notification information, so that the time and the information of the bill generated by the service node equipment for the first terminal each time can be recorded, and a searchable basis can be provided for the follow-up non-recognition problem.
In one implementation, if the notification information includes the ticket information, the common node equipment performs uplink processing on the notification information, so that the ticket information is also stored in a block manner in a distributed manner, which can provide a searchable evidence for subsequent ticket problems.
S307: and the service node equipment processes the bill according to the first private key use right and the intelligent contract to obtain a first digital signature.
In one implementation manner, after a first terminal authorizes a service node device, a first private key usage right of the first terminal is sent to the service node device, the first private key usage right corresponds to a private key of the first terminal, and the first private key usage right is used for the service node device to encrypt a bill. Optionally, when the first terminal has a bill acquiring requirement for the first time, the first terminal sends a bill acquiring request to the service node device, where the bill acquiring request includes bill information and a first private key usage right of the first terminal.
And after the business node equipment generates a bill for the first terminal, processing the bill according to the first private key use right and the intelligent contract to obtain a first digital signature, wherein the intelligent contract comprises a program code for processing the bill according to the private key use right. The service node device calls the program code, the first private key use right proves that the service node device can use the private key of the first terminal, and the private key of the first terminal can be called internally to process the bill. In the processing process, the service node device does not obtain the private key of the first terminal, but the private key is called internally through the first private key use right, and the private key is unknown to the service node device. This process may protect the private key of the first terminal from being revealed.
S308: and the service node equipment sends the bill and the first digital signature to a second terminal corresponding to a second terminal identifier included in the bill information.
And the service node equipment obtains the first digital signature, indicates that the bill is successfully processed, and sends the bill and the first digital signature to a second terminal corresponding to a second terminal identifier included in the bill information so that the second terminal can obtain the processed bill and can decrypt the bill by using the public key of the first terminal to obtain the bill.
In the embodiment of the invention, the business node equipment can only use the private key use right of the first terminal to encrypt the bill without obtaining the private key of the first terminal, so that the security of the private key of the first terminal can be improved, and after the business node equipment generates the bill for the first terminal, the common identification node equipment can store the time and the participant for generating the bill each time of the business node equipment, so that a searchable evidence can be provided for subsequent processing problems.
Referring to fig. 4, fig. 4 is a schematic flowchart of another ticket processing method according to an embodiment of the present invention, where the method is applied to a service node device, and the method includes, but is not limited to, S401-S410.
S401: and the service node equipment receives the bill acquisition request information sent by the first terminal, wherein the bill acquisition request comprises the bill information.
When the first terminal has a bill acquiring requirement, the first terminal sends a bill acquiring request to the service node equipment, and then the service node equipment receives the bill acquiring request sent by the first terminal, wherein the bill acquiring request comprises bill information.
S402: and if the number of the bill information is multiple, the service node equipment determines that the plurality of bill information contain the target bill information of the same second terminal identifier.
In one implementation, one ticket acquiring request received by the service node device includes a plurality of pieces of ticket information, and thus the number of pieces of ticket information is plural.
In one implementation, one acquisition request received by the service node device includes one piece of ticket information, and if multiple ticket acquisition requests sent from the first terminal are received, the number of the ticket information is multiple.
The plurality of pieces of ticket information may include different second terminal identifiers, and similarly, the plurality of pieces of ticket information may also include the same second terminal identifier. When the number of the ticket information is multiple, the service node device determines that the plurality of pieces of ticket information include target ticket information of the same second terminal identifier, for example, the ticket information received by the service node device is ticket information a, ticket information B, ticket information C and ticket information D, the second terminal identifiers included in the ticket information a, the ticket information B, the ticket information C and the ticket information D are terminal identifier 1, terminal identifier 2, terminal identifier 3 and terminal identifier 2, and the ticket information a and the ticket information D include the same second terminal identifier, so that the service node device determines that the target ticket information including the same second terminal identifier is ticket information a and ticket information D.
In one implementation manner, if the second terminal identifiers included in the plurality of pieces of ticket information do not have the same second terminal identifier, the service node device determines that the target ticket information does not exist in the plurality of pieces of ticket information.
S403: and the service node equipment generates bills for the first terminal according to the target bill information.
And after the service node equipment determines target bill information in the plurality of bill information, generating a plurality of bills for the first terminal according to each piece of target bill information, wherein the bill receiver of each bill is a second terminal corresponding to a second terminal identifier included in the target bill information. By means of generating the bill according to the target bill information, the service node device can provide the bill for the second terminal containing the same second terminal identification in the bill information preferentially, and billing efficiency of the service node device can be improved.
In one implementation, if the service node device determines that the target ticket information does not exist in the plurality of ticket information, a plurality of tickets are generated for the first terminal according to a preset rule and each piece of ticket information, where the preset rule is a preset rule. For example, if the preset rule is a reception time priority rule, the service node device generates a plurality of tickets for the first terminal according to the time sequence of receiving each ticket information and thus according to each ticket information.
S404: and the service node equipment generates notification information, wherein the notification information comprises the generation time of the bill, the node identifier of the service node equipment and the terminal identifier of the first terminal.
S405: and the service node equipment sends the notification information to the common node equipment so that the common node equipment carries out uplink processing on the notification information.
Steps S404 to S405 in the embodiment of the present application may specifically refer to the execution process of steps S303 to S304 in the above embodiment, and the embodiment of the present invention is not described again.
S406: and the service node equipment processes the bill according to the first private key use right and the intelligent contract.
In one implementation manner, after a first terminal authorizes a service node device, a first private key usage right of the first terminal is sent to the service node device, the first private key usage right corresponds to a private key of the first terminal, and the first private key usage right is used for the service node device to encrypt a bill. Optionally, when the first terminal has a bill acquiring requirement for the first time, the first terminal sends a bill acquiring request to the service node device, where the bill acquiring request includes bill information and a first private key usage right of the first terminal.
And after the service node equipment generates a plurality of bills for the first terminal, processing each bill according to the first private key use right and the intelligent contract to obtain a plurality of first digital signatures, wherein the intelligent contract comprises a program code for processing the bills according to the first private key use right. The service node device calls the program code, the first private key use right proves that the service node device can use the private key of the first terminal, and the private key of the first terminal can be called internally to process each bill so as to encrypt each bill.
In the processing process, the service node device still does not obtain the private key of the first terminal, only the private key is called by the first private key using right inside, and the private key is still unknown to the service node device, so that the security of the private key of the first terminal can be protected.
S407: and if the bill processing fails, the service node equipment sends an updating request to the first terminal, wherein the updating request is used for requesting to update the first private key use right.
The service node equipment processes the plurality of bills according to the first private key use right and the intelligent contract, if the processing fails, the first terminal is indicated to update the private key of the first terminal, and at the moment, the first private key use right corresponding to the private key of the first terminal is invalid, so that the service node equipment cannot use the first private key use right. And the service node equipment sends an updating request to the first terminal to request for updating the corresponding first private key use right after the private key is updated by the first terminal.
S408: and the service node equipment receives a second private key use right sent by the first terminal, wherein the second private key use right is obtained by updating the private key of the first terminal by the first terminal.
After receiving the update request sent by the service node device, the first terminal sends the second private key usage right corresponding to the update private key to the service node device, so that the service node device receives the second private key usage right sent by the first terminal, and the second private key usage right is obtained by updating the private key of the first terminal by the first terminal.
S409: and the service node equipment processes the bill according to the second private key use right and the intelligent contract to obtain a second digital signature.
And after receiving the latest second private key use right, the service node equipment encrypts each bill according to the second private key use right and the intelligent contract to obtain a plurality of second digital signatures. The intelligent contract includes program code for processing the ticket in accordance with the use of the private key. The service node device calls the program code, and internally calls the private key of the first terminal to process the bill through the first private key use right.
In the processing process, the service node device does not obtain the private key of the first terminal, but the private key is called internally through the first private key use right, and the private key is unknown to the service node device. This process may make the private key of the first terminal undisclosed.
S410: and the service node equipment sends the bill and the second digital signature to a second terminal corresponding to a second terminal identifier contained in the target bill information.
And the service node equipment sends each bill and each second digital signature to a second terminal corresponding to a second terminal identifier contained in the target bill information, so that the second terminal receives each bill and decrypts each second digital signature by using a public key created by the first terminal to obtain a plurality of bills.
In the embodiment of the invention, the number of the bill information is multiple, and the service node equipment can generate the bill for the first terminal preferentially according to the target bill information of the same second terminal identifier contained in the multiple pieces of bill information, so that the bill generating efficiency of the service node equipment can be improved. Meanwhile, if the service node equipment fails to process the bill information according to the first private key use right of the first terminal, an update request can be sent to the first terminal to obtain a second private key use right corresponding to the first terminal after the private key is updated, and then the bill is processed according to the second private key use right. In this way, the first terminal can update the private key of the first terminal at irregular time, and the security of the private key can be improved.
Referring to fig. 5, fig. 5 is a schematic flow chart of another bill processing method according to an embodiment of the present invention, which includes, but is not limited to, S501-S511.
S501: and the service node equipment receives the bill acquisition request information sent by the first terminal, wherein the bill acquisition request comprises the bill information.
Step S501 in this embodiment may specifically refer to the execution process of step S401 in the above embodiment, and is not described again in this embodiment.
S502: and if the number of the bill information is multiple, the service node equipment determines multiple second terminals corresponding to the second terminal identifications contained in each bill information.
The service node equipment receives a bill acquiring request which comprises a plurality of pieces of bill information, and the number of the bill information is multiple. Optionally, one ticket obtaining request received by the service node device includes one ticket information, and a plurality of ticket obtaining requests sent from the first terminal are received, where the number of the ticket information is multiple.
Each piece of bill information comprises a second terminal identification. And if the number of the bill information is multiple, the service node equipment determines multiple second terminals corresponding to the second terminal identifications contained in each bill information through the second terminal identifications contained in each bill information.
S503: and the service node equipment acquires the total transaction times and the transaction success times of each second terminal in a preset period.
Each second terminal can transact with the first terminal for multiple times, a transaction record is generated every time the transaction with the first terminal is performed, and the transaction condition of each second terminal and the first terminal can be transaction success or transaction failure. And the service node equipment acquires the total transaction times and the successful transaction times of each second terminal corresponding to the first terminal through the second terminal identification included in each bill information in a preset period, wherein the preset period is a second preset period, and the second preset period is preset.
S504: and the service node equipment determines the credit level of each second terminal according to the total transaction times and the successful transaction times of each second terminal.
Specifically, the service node device determines the transaction success rate of each second terminal according to the total transaction times and the transaction success times of each second terminal, and then determines the credit level of each second terminal according to the transaction success rate of each second terminal.
Illustratively, the second terminals corresponding to the second terminal identifiers included in the plurality of ticket information are a second terminal a, a second terminal B and a second terminal C, the transaction frequency of the second terminal a is 26 times, the transaction success frequency is 17 times, the transaction frequency of the second terminal B is 12 times, the transaction success frequency is 4 times, the transaction frequency of the second terminal C is 45 times, and the transaction success frequency is 31 times, the transaction success rate of the second terminal a is 65.4%, the transaction success rate of the second terminal B is 33.3%, the transaction success rate of the second terminal C is 68.9%, if the credit levels of the three second terminals are sorted by capital letters, and a represents the second terminal with the highest credit level, the credit levels of the second terminal a, the second terminal B and the second terminal C are B, C and a, respectively. The credit rating ranking of the second terminal may also be expressed in other ways, such as numbers, and the like, and is not limited herein.
S505: and the service node equipment determines a target second terminal identifier corresponding to the highest credit level in the credit levels.
And after the service node equipment determines the credit levels of the second terminals, determining a target second terminal identifier corresponding to the highest credit level in the credit levels. For example, the credit levels of the second terminals determined by the service node device are as shown in S504, the credit levels of the second terminal a, the second terminal B, and the second terminal C are B, C and a, respectively, if the highest credit level of the three second terminals is the second terminal C, then the target second terminal identifier corresponding to the highest credit level in the credit levels is determined to be the terminal identifier of the second terminal C.
S506: and the service node equipment generates a bill for the first terminal according to the bill information corresponding to the target second terminal identifier.
Specifically, the service node device determines bill information according to the target second terminal identifier, and generates a bill for the first terminal according to the determined bill information.
In one implementation manner, the number of the ticket information corresponding to the target second terminal identifier is one, and the service node device generates a ticket for the first terminal according to the determined ticket information.
In one implementation manner, the number of pieces of ticket information corresponding to the target second terminal identifier is multiple, and the service node device generates multiple tickets for the first terminal according to the determined multiple pieces of ticket information.
In the method, the service node equipment generates the bill according to the bill information corresponding to the target second terminal identifier of the second terminal with the highest credit level, so that the service node equipment preferentially provides the bill for the second terminal with the highest credit level. The probability of successful transaction between the second terminal with high credit level and the first terminal is greater than that between the second terminals with lower credit level, and the service node equipment preferentially provides bills for the second terminals with high credit level, so that the number of tax refunds caused by transaction failure in the follow-up process can be reduced.
S507: and the service node equipment generates notification information, wherein the notification information comprises the generation time of the bill, the node identifier of the service node equipment and the terminal identifier of the first terminal.
S508: and the service node equipment sends the notification information to the common node equipment so that the common node equipment carries out uplink processing on the notification information.
Steps S507 to S508 in the embodiment of the present application may specifically refer to the execution process of steps S404 to S405 in the above embodiment, and the embodiment of the present invention is not described again.
S509: and the service node equipment receives the second private key use right sent by the first terminal every preset period.
And the service node equipment receives a second private key use right sent by the first terminal at every preset interval, wherein the preset interval is a first preset interval which is preset, and the second private key use right is obtained by the first terminal through updating the private key of the first terminal.
The service node device automatically receives the second private key usage right sent by the first terminal every first preset interval period, so that the private key usage right used each time is the private key usage right corresponding to the latest private key from the first terminal.
S510: and the service node equipment processes the bill according to the second private key use right and the intelligent contract to obtain a second digital signature.
S511: and the service node equipment sends the bill and the second digital signature to a second terminal corresponding to a second terminal identifier contained in the target bill information.
Steps S510 to S511 in the embodiment of the present application may specifically refer to the execution process of steps S409 to S410 in the above embodiment, and the embodiment of the present invention is not described again.
In the embodiment of the present invention, the service node device may preferentially generate the ticket for the first terminal according to the credit level of the second terminal corresponding to the second terminal identifier included in the ticket information, and the service node device may receive the second private key usage right from the first terminal at every preset period, so that the owned private key usage right is obtained after the private key of the first terminal is updated by the first terminal, and further, when processing the ticket, the case of processing the ticket failure due to the failure of the private key usage right is avoided.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a ticket processing apparatus according to an embodiment of the present invention, where the ticket processing apparatus may be used in the steps executed by the service node device in the embodiments shown in fig. 3 to fig. 5, and the ticket processing apparatus 60 may include:
a receiving module 601, configured to receive a ticket obtaining request sent by a first terminal, where the ticket obtaining request includes ticket information;
a generating module 602, configured to generate a ticket for the first terminal according to the ticket information;
the processing module 603 is configured to process the ticket according to the first private key usage right and the intelligent contract of the first terminal to obtain a first digital signature;
the sending module 604 is configured to send the ticket and the first digital signature to a second terminal corresponding to a second terminal identifier included in the ticket information, so that the second terminal obtains the ticket.
In one implementation, the processing module 603 is further configured to send an update request to the first terminal through the sending module 604 if the ticket processing fails according to the first private key usage right and the intelligent contract, where the update request is used to request to update the first private key usage right;
the receiving module 601 is further configured to receive a second private key usage right sent by the first terminal, where the second private key usage right is obtained by updating a private key of the first terminal by the first terminal;
the processing module 603 is further configured to process the ticket according to the second private key usage right and the intelligent contract, so as to obtain a second digital signature;
the sending module 604 is further configured to send the ticket and the second digital signature to a second terminal corresponding to the second terminal identifier included in the ticket information, so that the second terminal obtains the ticket.
In an implementation manner, the receiving module 601 is further configured to receive, every interval of a first preset period, a second private key usage right sent by the first terminal, where the second private key usage right is obtained by the first terminal by updating a private key of the first terminal;
the processing module 603 is further configured to process the ticket according to the second private key usage right and the intelligent contract, so as to obtain a second digital signature;
the sending module 604 is further configured to send the ticket and the second digital signature to a second terminal corresponding to the second terminal identifier included in the ticket information, so that the second terminal obtains the ticket.
In an implementation manner, after the generating module 602 generates the ticket for the first terminal according to the ticket information, the generating module 602 is further configured to generate notification information, where the notification information includes generation time of the ticket, a node identifier of the service node device, and a terminal identifier of the first terminal;
the sending module 604 is further configured to send the notification information to the common node equipment, so that the common node equipment performs uplink processing on the notification information.
In an implementation manner, the number of the pieces of ticket information is multiple, and the processing module 602 is further configured to determine that the pieces of ticket information include target ticket information of the same second terminal identifier;
the generating module 602 is further configured to generate a ticket for the first terminal according to the target ticket information.
In an implementation manner, the processing module 603 is further configured to determine a plurality of second terminals corresponding to second terminal identifiers included in each piece of ticket information;
the processing module 603 is further configured to determine a credit level of each second terminal;
the processing module 603 is further configured to determine a target second terminal identifier corresponding to a highest credit level in the credit levels;
the generating module 602 is further configured to generate a ticket for the first terminal according to the ticket information corresponding to the target second terminal identifier.
In an implementation manner, the processing module 603 is further configured to obtain the total transaction times and the transaction success times of each second terminal in a second preset period;
the processing module 603 is further configured to determine the credit rating of each second terminal according to the total transaction times and the transaction success times of each second terminal.
The modules in the apparatus shown in fig. 6 may be respectively or entirely combined into one or several other modules to form another module, or some module(s) may be further split into multiple functionally smaller modules to form another module, which may implement the same operation without affecting the implementation of the technical effect of the embodiments of the present application. The modules are divided based on logic functions, and in practical application, the functions of one module can be realized by a plurality of modules, or the functions of a plurality of modules can be realized by one module. In other embodiments of the present application, other modules may also be included, and in practical applications, these functions may also be implemented by being assisted by other modules, and may be implemented by cooperation of a plurality of modules, which is not limited in this application.
Referring to fig. 7, fig. 7 is a schematic structural diagram of another bill handling device according to an embodiment of the present invention, where the bill handling device 70 includes a processor 701, a memory 702, and a communication interface 703, and the processor 701, the memory 702, and the communication interface 703 are connected by one or more communication buses.
The processor 701 is configured to support the ticket processing apparatus to perform the corresponding functions of the service node device of the embodiments shown in fig. 3-5. The processor 701 may be a Central Processing Unit (CPU), a Network Processor (NP), a hardware chip, or any combination thereof.
The memory 702 is used to store program codes and the like. The memory 702 may include volatile memory (volatile), such as Random Access Memory (RAM); the memory 702 may also include a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD); the memory 702 may also comprise a combination of the above types of memory.
The communication interface 703 is configured to receive and send data, for example, the communication interface 703 is configured to receive a ticket obtaining request sent by a first terminal, or the communication interface 703 is configured to send a ticket and a first digital signature to a second terminal corresponding to a second terminal identifier included in the ticket information.
In the embodiment of the present invention, the bill processing apparatus 70 includes a plurality of communication interfaces, wherein the communication interface for transmitting data and the communication interface for receiving data may not be the same communication interface.
The processor 701 may call the program code stored in the memory 702 to perform the following operations:
a communication interface 703 receives a ticket acquiring request sent by a first terminal, where the ticket acquiring request includes ticket information;
the processor 701 generates a bill for the first terminal according to the bill information;
the processor 701 processes the bill according to the first private key use right and the intelligent contract of the first terminal to obtain a first digital signature;
the processor 701 sends the ticket and the first digital signature to the second terminal corresponding to the second terminal identifier included in the ticket information through the communication interface 703, so that the second terminal obtains the ticket.
In one implementation, the processor 701 may further perform the following operations:
if the processing of the bill fails according to the first private key usage right and the intelligent contract, the processor 701 sends an update request to the first terminal through the communication interface 703, where the update request is used to request to update the first private key usage right;
the processor 701 receives a second private key usage right sent by the first terminal through the communication interface 703, where the second private key usage right is obtained by the first terminal through updating a private key of the first terminal;
the processor 701 processes the bill according to the second private key use right and the intelligent contract to obtain a second digital signature;
the processor 701 sends the ticket and the second digital signature to the second terminal corresponding to the second terminal identifier included in the ticket information through the communication interface 703, so that the second terminal obtains the ticket.
In one implementation, the processor 701 may further perform the following operations:
every interval of a first preset period, the processor 701 receives a second private key use right sent by the first terminal through the communication interface 703, wherein the second private key use right is obtained by the first terminal through updating a private key of the first terminal;
the processor 701 processes the bill according to the second private key use right and the intelligent contract to obtain a second digital signature;
the processor 701 sends the ticket and the second digital signature to the second terminal corresponding to the second terminal identifier included in the ticket information through the communication interface 703, so that the second terminal obtains the ticket.
In one implementation, after the processor 701 generates the ticket for the first terminal according to the ticket information, the following operations may be further performed:
the processor 701 generates notification information, where the notification information includes generation time of a ticket, a node identifier of the service node device, and a terminal identifier of the first terminal;
the processor 701 sends the notification message to the identified node device through the communication interface 703, so that the identified node device performs uplink processing on the notification message.
In one implementation, the number of the ticket information is multiple, and the processor 701 may further perform the following operations:
the processor 701 determines target bill information containing the same second terminal identifier in the plurality of bill information;
the processor 701 generates tickets for the first terminal according to the respective target ticket information.
In one implementation, the number of the ticket information is multiple, and the processor 701 may further perform the following operations:
the processor 701 determines a plurality of second terminals corresponding to the second terminal identifiers included in each piece of ticket information;
the processor 701 determines a credit rating for each second terminal;
the processor 701 determines a target second terminal identifier corresponding to the highest credit level in each credit level;
the processor 701 generates a ticket for the first terminal according to the ticket information corresponding to the target second terminal identifier.
In one implementation, the processor 701 may further perform the following operations:
the processor 701 obtains the total transaction times and the transaction success times of each second terminal in a second preset period;
the processor 701 determines the credit rating of each second terminal according to the total number of transactions and the number of successful transactions of each second terminal.
Embodiments of the present invention further provide a computer-readable storage medium, which can be used to store computer software instructions for the service node device in the embodiments shown in fig. 3 to fig. 7, and which contain programs designed for the service node device in the embodiments described above.
The computer readable storage medium includes, but is not limited to, flash memory, hard disk, solid state disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A bill handling method, applied to a service node device, the method comprising:
receiving a bill acquiring request sent by a first terminal, wherein the bill acquiring request comprises bill information;
generating a bill for the first terminal according to the bill information;
processing the bill according to the first private key use right of the first terminal and an intelligent contract to obtain a first digital signature;
and sending the bill and the first digital signature to a second terminal corresponding to a second terminal identifier included in the bill information so that the second terminal can obtain the bill.
2. The method of claim 1, further comprising:
if the bill processing fails according to the first private key use right and the intelligent contract, sending an updating request to the first terminal, wherein the updating request is used for requesting to update the first private key use right;
receiving a second private key use right sent by the first terminal, wherein the second private key use right is obtained by updating a private key of the first terminal by the first terminal;
processing the bill according to the second private key use right and the intelligent contract to obtain a second digital signature;
and sending the bill and the second digital signature to a second terminal corresponding to a second terminal identifier included in the bill information so that the second terminal can obtain the bill.
3. The method of claim 1, further comprising:
receiving a second private key use right sent by the first terminal every a first preset period, wherein the second private key use right is obtained by the first terminal through updating a private key of the first terminal;
processing the bill according to the second private key use right and the intelligent contract to obtain a second digital signature;
and sending the bill and the second digital signature to a second terminal corresponding to a second terminal identifier included in the bill information so that the second terminal can obtain the bill.
4. The method of claim 1, wherein after generating a ticket for the first terminal according to the ticket information, the method further comprises:
generating notification information, wherein the notification information comprises the generation time of the bill, the node identifier of the service node device and the terminal identifier of the first terminal;
and sending the notification information to the common-identification node equipment so that the common-identification node equipment carries out uplink processing on the notification information.
5. The method according to any one of claims 1 to 4, wherein the number of the ticket information is plural, and the generating of the ticket for the first terminal according to the ticket information includes:
determining target bill information containing the same second terminal identification in the plurality of bill information;
and generating bills for the first terminal according to the target bill information.
6. The method according to any one of claims 1 to 4, wherein the number of the ticket information is plural, and the generating of the ticket for the first terminal according to the ticket information includes:
determining a plurality of second terminals corresponding to second terminal identifications contained in each piece of bill information;
determining a credit level of each second terminal;
determining a target second terminal identification corresponding to the highest credit level in the credit levels;
and generating a bill for the first terminal according to the bill information corresponding to the target second terminal identifier.
7. The method of claim 6, wherein the determining the credit rating of each second terminal comprises:
acquiring the total transaction times and the transaction success times of each second terminal in a second preset period;
and determining the credit level of each second terminal according to the total transaction times and the successful transaction times of each second terminal.
8. A bill handling apparatus comprising:
the receiving module is used for receiving a bill acquiring request sent by a first terminal, wherein the bill acquiring request comprises bill information;
the generating module is used for generating a bill for the first terminal according to the bill information;
the processing module is used for processing the bill according to the first private key use right of the first terminal and the intelligent contract to obtain a first digital signature;
and the sending module is used for sending the bill and the first digital signature to a second terminal corresponding to a second terminal identifier included in the bill information so as to enable the second terminal to obtain the bill.
9. A bill handling apparatus comprising a processor and a memory, the processor and memory being interconnected, wherein the memory is configured to store a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of any one of claims 1 to 7.
10. A computer storage medium, characterized in that the computer storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to perform the method according to any one of claims 1-7.
CN201910966717.4A 2019-10-10 2019-10-10 Bill processing method and device and storage medium device Active CN110750808B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910966717.4A CN110750808B (en) 2019-10-10 2019-10-10 Bill processing method and device and storage medium device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910966717.4A CN110750808B (en) 2019-10-10 2019-10-10 Bill processing method and device and storage medium device

Publications (2)

Publication Number Publication Date
CN110750808A true CN110750808A (en) 2020-02-04
CN110750808B CN110750808B (en) 2024-05-17

Family

ID=69277996

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910966717.4A Active CN110750808B (en) 2019-10-10 2019-10-10 Bill processing method and device and storage medium device

Country Status (1)

Country Link
CN (1) CN110750808B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001265687A (en) * 2000-03-17 2001-09-28 Canon Inc Network system, device and method for accounting processing and computer readable storage medium
US20040088576A1 (en) * 2002-10-31 2004-05-06 Foster Ward Scott Secure resource access
CN105515768A (en) * 2016-01-08 2016-04-20 腾讯科技(深圳)有限公司 Method, device and system for updating secret key
CN108632284A (en) * 2018-05-10 2018-10-09 网易(杭州)网络有限公司 User data authorization method, medium, device and computing device based on block chain
CN110060111A (en) * 2018-12-12 2019-07-26 阿里巴巴集团控股有限公司 Based on the invoice access method and device of block chain, electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001265687A (en) * 2000-03-17 2001-09-28 Canon Inc Network system, device and method for accounting processing and computer readable storage medium
US20040088576A1 (en) * 2002-10-31 2004-05-06 Foster Ward Scott Secure resource access
CN105515768A (en) * 2016-01-08 2016-04-20 腾讯科技(深圳)有限公司 Method, device and system for updating secret key
CN108632284A (en) * 2018-05-10 2018-10-09 网易(杭州)网络有限公司 User data authorization method, medium, device and computing device based on block chain
CN110060111A (en) * 2018-12-12 2019-07-26 阿里巴巴集团控股有限公司 Based on the invoice access method and device of block chain, electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
缪锦春;: "区块链技术的研析及其在商业银行领域的应用建议", 邵阳学院学报(社会科学版), no. 03 *

Also Published As

Publication number Publication date
CN110750808B (en) 2024-05-17

Similar Documents

Publication Publication Date Title
CN108712395B (en) Account management method, device, server and storage medium based on block chain
US10547625B2 (en) Software tampering detection and reporting process
CN111107066A (en) Sensitive data transmission method and system, electronic equipment and storage medium
CN111476572B (en) Block chain-based data processing method, device, storage medium and equipment
EP3432542A1 (en) Method and device for linking to account and providing service process
CN110084600B (en) Processing and verifying method, device, equipment and medium for resolution transaction request
CN109660534B (en) Multi-merchant-based security authentication method and device, electronic equipment and storage medium
CN113572715A (en) Data transmission method and system based on block chain
WO2021204044A1 (en) Correction of blockchain data
US20210241270A1 (en) System and method of blockchain transaction verification
CN110738502A (en) bill processing method and device and storage medium device
CN111260475A (en) Data processing method, block chain node point equipment and storage medium
US11943210B2 (en) System and method for distributed, keyless electronic transactions with authentication
CN114095277A (en) Power distribution network secure communication method, secure access device and readable storage medium
CN114239072A (en) Block chain node management method and block chain network
CN112788555B (en) Cross-operator telephone charge transfer settlement method, device and computing equipment
CN112053159A (en) Transaction data verification method and device, risk control server and business server
CN113379577A (en) Transaction auditing method, device and equipment
KR20210109767A (en) A method for providing asset backup services based on blockchain monitoring
CN108848061B (en) User information transmission method and terminal equipment
CN110598479A (en) Data processing method and device and computer readable storage medium
US20220138760A1 (en) Dynamic Ledger Address Masking
CN110750808B (en) Bill processing method and device and storage medium device
CN114418769A (en) Block chain transaction charging method and device and readable storage medium
CN110852864B (en) Digital resource amount processing method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40020188

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant