Blockchain-based data processing method, device, terminal and storage medium

Through the data processing method based on the blockchain, automatic accounting and data management are realized, which solves the problems of wrong accounting and low audit efficiency in the business activities of enterprises, improves data security and reduces audit costs.

CN110675145BActive Publication Date: 2024-09-17CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN201910780119.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-08-22
Publication Date
2024-09-17
Estimated Expiration
2039-08-22

AI Technical Summary

Technical Problem

In the existing technology, the use of paper notes by enterprises in business activities leads to misaccounting and low audit efficiency, and the storage and review process of paper notes is cumbersome and error-prone.

Method used

Using a blockchain-based data processing method, it receives transaction requests through the blockchain system, generates transaction contracts, confirms that the transaction is completed and writes it to the blockchain. The enterprise data processing terminal obtains transaction information, determines financial data and uploads it to the blockchain. , use the Hash tree to assemble financial data and return it to the tax node to achieve automatic accounting and data management.

Benefits of technology

It improves accounting efficiency, reduces erroneous records, reduces audit difficulty and cost, and improves data security through a distributed blockchain system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110675145B
    Figure CN110675145B
Patent Text Reader

Abstract

The present invention provides a data processing method based on blockchain, including: a blockchain system receives a transaction request; the blockchain system generates a transaction contract and transmits it to both parties of the transaction; after detecting that both parties of the transaction have signed the transaction contract, the blockchain system confirms that the transaction is completed and writes the transaction information into the blockchain system; the enterprise data processing terminal obtains the transaction information from the blockchain system and obtains the preset transaction data; the enterprise data processing terminal uploads the financial data to the blockchain system according to the determined financial data; the blockchain system assembles the financial data in the form of a Hash tree and returns the Hash value to the tax node; the tax node obtains the financial data according to the Hash value. The present invention also provides a data processing device, terminal and storage medium based on blockchain. By using the embodiments of the present invention, for a transaction information, the bookkeeping operation is automatically completed, the bookkeeping efficiency is improved, the manual reconciliation link is not required, the error records are reduced, and the audit difficulty is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a blockchain-based data processing method, a blockchain-based data processing device, a terminal, and a computer-readable storage medium. Background Art

[0002] Under the current process, when an enterprise conducts various business activities, merchants need to provide paper bills to the enterprise, and the enterprise also needs to consume a certain amount of physical space to store the relevant bills. Enterprises and government audit departments are prone to make mistakes when auditing paper bills, resulting in wrong accounts; in the process of auditing paper bills, the entry, accounting, statistics, tax reporting, and reporting of bill data require layer-by-layer audits, which takes a long time, resulting in low audit efficiency. Summary of the invention

[0003] In view of this, it is necessary to provide a blockchain-based data processing method, a blockchain-based data processing device, a terminal and a computer-readable storage medium, which can automatically complete the accounting operation for a transaction information, improve the accounting efficiency, and eliminate the need for manual reconciliation, thereby reducing erroneous records and reducing the difficulty of auditing.

[0004] A first aspect of an embodiment of the present invention provides a blockchain-based data processing method, which is applied to a blockchain-based enterprise transaction system, wherein the blockchain-based enterprise transaction system includes a tax node, at least one enterprise data processing terminal, and a blockchain system, and the blockchain-based data processing method includes:

[0005] The blockchain system receives a transaction request output by a transaction initiator, and notifies the transaction request to a corresponding transaction recipient;

[0006] The blockchain system generates a transaction contract according to the transaction request, and transmits the transaction contract to the transaction initiator and the transaction requester;

[0007] After detecting the signatures of the transaction initiator and the transaction recipient on the transaction contract, the blockchain system confirms that the transaction is completed and writes the transaction information corresponding to the transaction into the blockchain system;

[0008] The enterprise data processing terminal obtains transaction information within a preset time period from the blockchain system, and obtains preset transaction data according to the transaction information;

[0009] The enterprise data processing terminal determines financial data according to the preset transaction data, and uploads the financial data to the blockchain system;

[0010] The blockchain system assembles the financial data in the form of a Hash tree and returns a uniquely identified Hash value to the tax node;

[0011] The tax node obtains the financial data from the blockchain system according to the Hash value.

[0012] Furthermore, in the above-mentioned blockchain-based data processing method provided by an embodiment of the present invention, the transaction initiator and the transaction recipient are enterprise data processing terminals that create enterprise blockchain accounts in the blockchain system, and the step of creating an enterprise blockchain account in the blockchain system includes:

[0013] When receiving a registration request, generate the public key and private key corresponding to the enterprise blockchain account;

[0014] The private key corresponding to the enterprise blockchain account is sent to the enterprise data processing terminal, and the public key corresponding to the enterprise blockchain account is broadcast to each accounting node in the blockchain network.

[0015] Furthermore, in the above-mentioned blockchain-based data processing method provided by an embodiment of the present invention, before the step of creating an enterprise blockchain account in the blockchain system, the method further includes:

[0016] Find out whether there is an enterprise blockchain account corresponding to the enterprise in the blockchain system;

[0017] If it is determined that the enterprise has already registered an enterprise blockchain account, it will be prompted that the enterprise has already registered a blockchain account, and the blockchain account that the enterprise has registered will be used as the account currently applied for registration;

[0018] If it is determined that the enterprise's registration information cannot be found, a new enterprise blockchain account is created for the enterprise.

[0019] Furthermore, in the above-mentioned blockchain-based data processing method provided by an embodiment of the present invention, after the step of the blockchain system receiving the transaction request output by the transaction initiator, the method further includes:

[0020] Obtaining signature information of the transaction initiator using the private key corresponding to the blockchain account to sign the transaction information;

[0021] Verifying the signature information through the public key of the transaction initiator to confirm the source of the transaction request;

[0022] Detecting whether the source of the transaction request has passed verification;

[0023] If the detection result is that the source of the transaction request has passed the verification, the blockchain system records the transaction request output by the transaction initiator and notifies the corresponding transaction recipient of the transaction request.

[0024] Furthermore, in the above-mentioned blockchain-based data processing method provided by an embodiment of the present invention, the step of the enterprise data processing terminal obtaining transaction information within a preset time period from the blockchain system, and obtaining preset transaction data according to the transaction information includes:

[0025] Call the timing script to obtain the transaction list within the preset time period;

[0026] Extracting preset keywords from the transaction list;

[0027] Acquire data corresponding to the preset keyword;

[0028] The data corresponding to the preset keyword is determined as preset transaction data.

[0029] Furthermore, in the above-mentioned blockchain-based data processing method provided by an embodiment of the present invention, the step of the enterprise data processing terminal determining the financial data according to the preset transaction data includes:

[0030] Acquire the preset transaction data, and input the preset transaction data as a test sample into a pre-trained financial data processing model;

[0031] A test result output by the financial data processing model is obtained, and the test result is determined as the financial data.

[0032] Furthermore, in the above-mentioned blockchain-based data processing method provided by an embodiment of the present invention, the step of assembling the financial data in the form of a hash tree by the blockchain system includes:

[0033] Obtaining the financial data within different preset time periods;

[0034] Calculate the financial data in different preset time periods using a hash function to obtain corresponding hash values;

[0035] Assemble the corresponding Hash values ​​in the form of a Hash tree.

[0036] A second aspect of an embodiment of the present invention further provides a blockchain-based data processing device, which is applied to a blockchain-based enterprise transaction system, wherein the blockchain-based enterprise transaction system includes a tax node, at least one enterprise data processing terminal, and a blockchain system, and the blockchain-based data processing device includes:

[0037] A transaction request transmission module, used to receive a transaction request output by a transaction initiator through a blockchain system, and notify the transaction request to a corresponding transaction recipient;

[0038] A transaction contract generation module, used to generate a transaction contract according to the transaction request through the blockchain system, and transmit the transaction contract to the transaction initiator and the transaction requester;

[0039] A transaction information recording module, configured to confirm the completion of the transaction after detecting the signatures of the transaction initiator and the transaction recipient on the transaction contract through the blockchain system, and write the transaction information corresponding to the transaction into the blockchain system;

[0040] A transaction data acquisition module, used to acquire transaction information within a preset time period from the blockchain system through an enterprise data processing terminal, and acquire preset transaction data according to the transaction information;

[0041] A financial data determination module, configured to determine financial data according to the preset transaction data through the enterprise data processing terminal, and upload the financial data to the blockchain system;

[0042] A hash value acquisition module, used to assemble the financial data in the form of a hash tree through the blockchain system, and return a uniquely identified hash value to the tax node;

[0043] A financial data acquisition module is used to obtain the financial data from the blockchain system through the tax node according to the hash value.

[0044] A third aspect of an embodiment of the present invention further provides a terminal, comprising a processor, wherein the processor is configured to implement a blockchain-based data processing method as described in any one of the above items when executing a computer program stored in a memory.

[0045] A fourth aspect of an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the blockchain-based data processing method as described in any one of the above items is implemented.

[0046] The embodiment of the present invention provides a data processing method based on blockchain, a data processing device based on blockchain, a terminal and a computer-readable storage medium, wherein the blockchain system receives a transaction request output by a transaction initiator, and notifies the transaction request to a corresponding transaction recipient; the blockchain system generates a transaction contract according to the transaction request, and transmits the transaction contract to the transaction initiator and the transaction requester; after detecting the signatures of the transaction initiator and the transaction recipient on the transaction contract, the blockchain system confirms that the transaction is completed, and writes the transaction information corresponding to the transaction into the blockchain system; the enterprise data processing terminal obtains the transaction information within a preset time period from the blockchain system, and obtains preset transaction data according to the transaction information; the enterprise data processing terminal determines the financial data according to the preset transaction data, and uploads the financial data to the blockchain system; the blockchain system assembles the financial data in the form of a Hash tree, and returns a uniquely identified Hash value to the tax node; the tax node obtains the financial data from the blockchain system according to the Hash value. By utilizing the embodiments of the present invention, the bookkeeping operation can be automatically completed for a transaction information, thereby improving the bookkeeping efficiency, thereby reducing erroneous records and reducing the difficulty of auditing; and because the blockchain itself is a distributed system, it can withstand damage to some nodes, and the data is not easily tampered with or deleted, thereby improving data security; and through the blockchain technology, the transaction data of each enterprise is uniformly managed, thereby reducing the audit cost. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0048] Figure 1 It is a schematic diagram of the application environment architecture of the blockchain-based data processing method provided by the first embodiment of the present invention.

[0049] Figure 2 It is a flowchart of the blockchain-based data processing method provided by the first embodiment of the present invention.

[0050] Figure 3 It is a schematic diagram of the structure of a terminal according to an embodiment of the present invention.

[0051] Figure 4 yes Figure 3 An exemplary functional module diagram of the terminal is shown.

[0052] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION

[0053] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0054] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. The embodiments described are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0056] See also Figure 1 As shown, Figure 1 1 is a schematic diagram of the application environment architecture of the data processing method based on blockchain provided by the first embodiment of the present invention. The data processing method based on blockchain in the present invention is applied to an enterprise transaction system based on blockchain.

[0057] Blockchain is a decentralized storage and computing technology that generates persistent, unmodifiable records by stacking encrypted data blocks in chronological order, and stores the records in various nodes of the blockchain network, so that a reliable database can be collectively maintained in a decentralized manner.

[0058] like Figure 1 As shown, the enterprise transaction system 200 based on blockchain includes a tax node 203, at least one enterprise data processing terminal 202 and a blockchain system 201. The tax node 203 establishes a communication connection with the blockchain system 201 via a wired network or a wireless network, and the enterprise data processing terminal 202 establishes a communication connection with the blockchain system 201 via a wired network or a wireless network.

[0059] The wired network may be any type of conventional wired communication, such as the Internet, a local area network, etc. The wireless network may be any type of conventional wireless communication, such as radio, wireless fidelity (WIFI), cellular, satellite, broadcast, etc. Wireless communication technologies may include, but are not limited to, Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (W-CDMA), CDMA2000, IMT Single Carrier, Enhanced Data Rates for GSM Evolution (EDGE), Long-Term Evolution (LTE), Advanced Long-Term Evolution, Time-Division LTE (TD-LTE), High Performance Radio Local Area Network (HiperLAN), High Performance Radio Wide Area Network (HiperWAN), Local Multipoint Distribution Service (LMDS), Worldwide Interoperability for Microwave Access (WiMAX), ZigBee, Bluetooth, Flash Orthogonal Frequency Division Multiplexing (FDOF), and other technologies. Frequency-Division Multiplexing, Flash-OFDM), High Capacity Spatial Division Multiple Access (HC-SDMA), Universal Mobile Telecommunications System (UMTS), Universal Mobile Telecommunications System Time-Division Duplexing (UMTS-TDD), Evolved High Speed ​​Packet Access (Evolved High Speed ​​Packet Access,HSPA+), Time Division Synchronous Code Division Multiple Access (TD-SCDMA), Evolution-Data Optimized (EV-DO), Digital Enhanced Cordless Telecommunications (DECT), and others.

[0060] The blockchain system 201 includes multiple accounting nodes 2011, and the accounting nodes 2011 are built in a consortium chain to form a blockchain system 201. Among them, the consortium chain refers to a group of members and limited third parties, and multiple pre-selected accounting nodes 2011 are designated as accountants. The generation of each block is jointly determined by all pre-selected accounting nodes 2011. Other access accounting nodes 2011 can participate in transactions, but do not ask about the accounting process. Other third parties can perform limited queries through the open API (Application Programming Interface) of the blockchain. In other embodiments of the present invention, the blockchain system 201 can also be other types of blockchain networks, such as public chains, private chains, etc., and the present invention does not limit this.

[0061] The enterprise data processing terminal 202 is used to implement transactions between the transaction initiator and the transaction recipient, and to process the preset transaction data. The enterprise data terminal 202 can be, but is not limited to, a user's smart phone, tablet computer, desktop computer, etc. The number of the enterprise data processing terminals 202 is multiple, namely enterprise data processing terminals 1-n. Specifically, when enterprise data processing terminal 1 is the transaction initiator and enterprise data processing terminal 2 is the transaction recipient, enterprise data processing terminal 1 and enterprise data processing terminal 2 conduct economic transactions (the type of transaction is not limited, for example, enterprise data processing terminal 1 purchases raw materials from enterprise data processing terminal 2 through the blockchain system, and enterprise data processing terminal 1 outputs a transaction request to the blockchain system. The blockchain system matches the corresponding enterprise data processing terminal 2 according to the transaction request, and notifies the enterprise data processing terminal 2 of the transaction request).

[0062] The enterprise data processing terminal 202 is also used to obtain a transaction list within a preset time period from the blockchain system 201, and obtain a preset keyword based on the transaction list. The preset time period is a time period preset by the terminal user, for example, the preset time period can be 1 quarter. The preset keywords include one or more combinations of the following: transaction time, transaction type, transaction amount, name of the transaction initiator and the transaction recipient. The data corresponding to the preset keyword is obtained, and the data corresponding to the preset keyword is the preset transaction data. The preset transaction data is processed to obtain the enterprise financial data, and the financial data includes asset and liability data, profit data, cash flow data, and owner's equity change data. The financial data is uploaded to the blockchain.

[0063] The tax node 203 is used to obtain the financial data of the corresponding enterprise in the blockchain system 201. Specifically, the tax node 203 obtains the financial data of the corresponding enterprise in the blockchain system 201 through the hash value. The tax node 203 is a server cluster placed in a government audit department such as a tax bureau, or it can be a cloud server. The tax node 203 can correspond to audit departments such as tax bureaus in multiple regions (for example, Anhui Province, Jiangsu Province, Henan Province, etc.).

[0064] Figure 2 1 is a flowchart of a data processing method based on blockchain according to a first embodiment of the present invention. The data processing method based on blockchain can be applied to a terminal, which can be a smart device such as a smartphone, a laptop, a desktop / tablet computer, a smart watch, etc. Figure 2 As shown, the blockchain-based data processing method may include the following steps:

[0065] S21. The blockchain system receives a transaction request output by a transaction initiator, and notifies a corresponding transaction recipient of the transaction request.

[0066] In at least one embodiment of the present invention, the transaction between the transaction initiator and the transaction recipient is conducted through a blockchain system, and the transaction initiator and the transaction recipient are enterprise data processing terminals with accounts registered on the corresponding blockchain (i.e., enterprise blockchain accounts, the blockchain accounts include the identity information of the enterprise, and the identity information of the enterprise can be generated by a hash function based on the enterprise's unified social credit code). The transaction initiator can participate in the purchase of goods, and the transaction recipient can participate in the sale of goods. For example, the transaction initiator purchases raw materials from the transaction recipient through the blockchain system.

[0067] The transaction initiator and the transaction recipient are enterprise blockchain accounts created in the blockchain system. When a blockchain account is created, a public key and a private key corresponding to the enterprise blockchain account are generated. The private key is also a signature key, which is held by each of the transaction parties. The public key can be held by other participants besides itself. For example, the transaction initiator uses its own private key to sign the transaction information during the transaction process, and the transaction recipient uses the public key sent by the transaction initiator to perform signature verification to confirm the source of the information.

[0068] The step of creating an enterprise blockchain account in the blockchain system includes: upon receiving a registration request, generating a public key and a private key corresponding to the enterprise blockchain account; sending the private key corresponding to the enterprise blockchain account to the enterprise data processing terminal, and broadcasting the public key corresponding to the enterprise blockchain account to each accounting node in the blockchain network.

[0069] Before the step of creating an enterprise blockchain account in the blockchain system, the method further includes: searching in the blockchain system whether there is an enterprise blockchain account corresponding to the enterprise; if it is determined that the enterprise has already registered an enterprise blockchain account, prompting the enterprise that it has already registered a blockchain account, and using the enterprise's registered blockchain account as the account currently applied for registration; if it is determined that the enterprise's registration information is not found, creating a new enterprise blockchain account for the enterprise. By searching in the blockchain to see if an enterprise blockchain account already exists, duplicate registration of enterprise users is avoided, and unified management of enterprise users' transaction information is facilitated.

[0070] Preferably, the method for searching whether there is an enterprise blockchain account corresponding to an enterprise in a blockchain system may be: searching whether there is identity information identical to the enterprise identity information in the blockchain; if so, determining that the enterprise has registered an enterprise blockchain account; if not, determining that the enterprise has not registered an enterprise blockchain account.

[0071] After the step of receiving the transaction request output by the transaction initiator, the method further includes: obtaining the signature information of the transaction initiator using the private key corresponding to the blockchain account to sign the transaction information; verifying the signature information by the public key of the transaction initiator to confirm the source of the transaction request; detecting whether the source of the transaction request has passed the verification; if the detection result is that the source of the transaction request has passed the verification, the blockchain system records the transaction request output by the transaction initiator and notifies the transaction request to the corresponding transaction recipient. The transaction request may include the name of the transaction commodity, the quantity of the transaction commodity, and the transaction recipient corresponding to the transaction commodity.

[0072] S22. The blockchain system generates a transaction contract according to the transaction request, and transmits the transaction contract to the transaction initiator and the transaction requester.

[0073] In at least one embodiment of the present invention, the blockchain generates a transaction contract based on the transaction request. The transaction contract is a computer protocol that transmits, verifies or executes a contract in an information-based manner. The transaction contract allows trusted transactions without a third party, and these transactions are traceable and irreversible. The transaction contract is used to transfer funds using the token in the blockchain system to execute the transaction. The transaction contract can be transmitted to the transaction parties via near-field communication or wireless communication network.

[0074] S23. After detecting the signatures of the transaction initiator and the transaction recipient on the transaction contract, the blockchain system confirms that the transaction is completed and writes the transaction information corresponding to the transaction into the blockchain system.

[0075] In at least one embodiment of the present invention, when the transaction initiator confirms receipt of the goods, the transaction initiator and the transaction recipient sign the transaction contract respectively, and the blockchain system collects the signatures of the transaction initiator and the transaction recipient on the transaction contract. After collecting the signatures of both parties on the transaction contract, the payment funds of the transaction initiator are transferred to the transaction recipient, thereby confirming that the transaction is completed. After confirming that the transaction is completed, the transaction information corresponding to the transaction is written into the blockchain system. The transaction information includes information such as the transaction amount and the transaction flow.

[0076] S24. The enterprise data processing terminal obtains transaction information within a preset time period from the blockchain system, and obtains preset transaction data based on the transaction information.

[0077] In at least one embodiment of the present invention, the enterprise data processing terminal includes a transaction initiator and a transaction receiver, and both transaction parties can obtain transaction information from the blockchain system. The enterprise data processing terminal obtains transaction information within a preset time period from the blockchain system, and the step of obtaining preset transaction data according to the transaction information includes: calling a timing script to obtain a transaction list within a preset time period; extracting preset keywords in the transaction list; obtaining data corresponding to the preset keywords; and determining the data corresponding to the preset keywords as preset transaction data. The preset time period is a time period preset by a terminal user, for example, the preset time period is 1 quarter. The transaction information within the preset time period is arranged in the form of a transaction list. The preset keywords are keywords preset by the terminal user.

[0078] S25. The enterprise data processing terminal determines financial data based on the preset transaction data, and uploads the financial data to the blockchain system.

[0079] In at least one embodiment of the present invention, the step of determining the financial data according to the preset transaction data by the enterprise data processing terminal includes: obtaining the preset transaction data, and inputting the preset transaction data as a test sample into a pre-trained financial data processing model; obtaining the test result output by the financial data processing model, and determining the test result as the financial data. Among them, the preset financial data processing model is a pre-trained model for calculating financial data. The financial data can be presented in various forms such as statistical charts, statistical tables, and report files. After determining the financial data according to the preset transaction data, the enterprise data processing terminal uploads the financial data to the blockchain system.

[0080] Furthermore, the training method of the financial data processing model may include: collecting multiple sets of preset transaction data within multiple preset time periods; using the multiple sets of preset transaction data within multiple preset time periods as sample data sets; dividing the sample data sets into training sets and test sets; inputting the training sets into a preset neural network for training to obtain a financial data processing model; inputting the test set into the financial data processing model for testing and calculating the test pass rate; if the test pass rate is greater than a preset pass rate threshold, determining that the training of the financial data processing model is completed; if the test pass rate is lower than the preset pass rate threshold, increasing the number of training sets and retraining the financial data processing model. The preset pass rate threshold is set by the user and is a critical value for evaluating whether the financial data processing model is successfully trained.

[0081] S26. The blockchain system assembles the financial data in the form of a Hash tree and returns a uniquely identified Hash value to the tax node.

[0082] In at least one embodiment of the present invention, the step of assembling the financial data in the form of a Hash tree by the blockchain system includes: obtaining the financial data within different preset time periods; calculating the financial data within different preset time periods using a hash function to obtain corresponding Hash values; and assembling the corresponding Hash values ​​in the form of a Hash tree.

[0083] Among them, a hash function (also known as a hash function) is a method of creating a small digital "fingerprint" from any kind of data. The function shuffles and mixes the data to recreate a fingerprint called a hash value (hash values, hash codes, hash sums, or hashes). In other words, hashing is to transform an input of any length (also called a mapping pre-image) into an output of a fixed length through a hash algorithm, and the output is the hash value. The hash function has the following characteristics: the same original information can always get the same summary information using the same hash function, and any slight change in the original information will hash out a completely unrecognizable summary information, and the original information cannot be reversed from the summary information.

[0084] In this embodiment, in the blockchain system, the financial data is calculated using a hash function to obtain a hash value, and the hash value can achieve the uniqueness of the financial data identification information. The hash tree is a data structure used in the blockchain to organize transaction records, which is also commonly referred to as a hash tree, that is, a tree that stores multiple hash values. The leaves of the hash tree are the hash values ​​of the data blocks. In this embodiment, the hash value is the hash value corresponding to the financial data. The financial data is assembled into a hash tree through the hash value, which improves the efficiency of the tax node in finding financial data.

[0085] S27. The tax node obtains the financial data from the blockchain system according to the Hash value.

[0086] In at least one embodiment of the present invention, the Hash value is the unique identification information of the financial data, and the tax node obtains the financial data in the blockchain through the Hash value, wherein the Hash value can be presented through the ID value of the QR code.

[0087] The above is a detailed description of the method provided by the embodiment of the present invention. According to different requirements, the execution order of the blocks in the flowchart can be changed, and some blocks can be omitted. The terminal 110 provided by the embodiment of the present invention is described below.

[0088] An embodiment of the present invention also provides a terminal 110, including a memory 10, a processor 30, and a computer program stored in the memory 10 and executable on the processor 30, wherein the processor 30 implements the steps of the blockchain-based data processing method described in any of the above embodiments when executing the program.

[0089] Figure 3 is a schematic diagram of the structure of a terminal according to an embodiment of the present invention, such as Figure 3As shown, the terminal 110 includes a memory 10, in which a data processing device 100 based on blockchain is stored. The terminal 110 can be a terminal 110 with an application display function such as a mobile phone, a tablet computer, a personal digital assistant, etc. The data processing device 100 based on blockchain can receive a transaction request output by a transaction initiator through a blockchain system, and notify the transaction request to the corresponding transaction recipient; the blockchain system generates a transaction contract according to the transaction request, and transmits the transaction contract to the transaction initiator and the transaction requester; after detecting the signatures of the transaction initiator and the transaction recipient on the transaction contract, the blockchain system confirms that the transaction is completed, and writes the transaction information corresponding to the transaction into the blockchain system; the enterprise data processing terminal obtains transaction information within a preset time period from the blockchain system, and obtains preset transaction data according to the transaction information; the enterprise data processing terminal determines financial data according to the preset transaction data, and uploads the financial data to the blockchain system; the blockchain system assembles the financial data in the form of a Hash tree, and returns a uniquely identified Hash value to the tax node; the tax node obtains the financial data from the blockchain system according to the Hash value. By utilizing the embodiments of the present invention, the bookkeeping operation can be automatically completed for a transaction information, thereby improving the bookkeeping efficiency and eliminating the need for manual reconciliation, thereby reducing erroneous records and lowering the difficulty of auditing. Furthermore, since the blockchain itself is a distributed system and can withstand damage to some nodes, data is not easily tampered with or deleted, thereby improving data security. Furthermore, the blockchain technology is used to uniformly manage the transaction data of various enterprises, thereby reducing auditing costs.

[0090] In this embodiment, the terminal 110 may further include a display screen 20 and a processor 30. The memory 10 and the display screen 20 may be electrically connected to the processor 30 respectively.

[0091] The memory 10 can be different types of storage devices for storing various types of data. For example, it can be a memory or internal memory of the terminal 110, or a memory card that can be externally connected to the terminal 110, such as a flash memory, a SM card (Smart Media Card), an SD card (Secure Digital Card), etc. In addition, the memory 10 may include a non-volatile memory, such as a hard disk, an internal memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices. The memory 10 is used to store various types of data, for example, various applications installed in the terminal 110, and information such as data set and obtained by applying the above-mentioned blockchain-based data processing method.

[0092] The display screen 20 is installed on the terminal 110 and is used to display information.

[0093] The processor 30 is used to execute the blockchain-based data processing method and various software installed in the terminal 110, such as an operating system and application display software. The processor 30 includes but is not limited to a processor (Central Processing Unit, CPU), a microcontroller unit (Micro Controller Unit, MCU) and other devices used to interpret the computer and process data in the computer software.

[0094] The blockchain-based data processing device 100 may include one or more modules, which are stored in the memory 10 of the terminal 110 and configured to be executed by one or more processors (a processor 30 in this embodiment) to complete the embodiment of the present invention. For example, see Figure 4 As shown, the terminal 110 may include a transaction request transmission module 11, a transaction contract generation module 12, a transaction information recording module 13, a transaction data acquisition module 14, a financial data determination module 15, a hash value acquisition module 16 and a financial data acquisition module 17. The module referred to in the embodiment of the present invention may be a program segment that completes a specific function, which is more suitable for describing the execution process of the software in the processor 30 than a program.

[0095] It is understandable that, corresponding to each implementation of the above-mentioned blockchain-based data processing method, the terminal 110 may include Figure 4The functions of each module will be described in detail below. It should be noted that the same nouns and related nouns and their specific explanations in each implementation of the above blockchain-based data processing method can also be applied to the following functional introduction of each module. In order to save space and avoid repetition, it will not be repeated here.

[0096] The transaction request transmission module 11 can be used to receive a transaction request output by a transaction initiator through the blockchain system, and notify the transaction request to a corresponding transaction recipient.

[0097] The transaction contract generation module 12 can be used to generate a transaction contract according to the transaction request through the blockchain system, and transmit the transaction contract to the transaction initiator and the transaction requester.

[0098] The transaction information recording module 13 can be used to confirm the completion of the transaction after detecting the signatures of the transaction initiator and the transaction recipient on the transaction contract through the blockchain system, and write the transaction information corresponding to the transaction into the blockchain system.

[0099] The transaction data acquisition module 14 can be used to obtain transaction information within a preset time period from the blockchain system through the enterprise data processing terminal, and obtain preset transaction data based on the transaction information.

[0100] The financial data determination module 15 can determine the financial data according to the preset transaction data through the enterprise data processing terminal, and upload the financial data to the blockchain system.

[0101] The hash value acquisition module 16 can be used to assemble the financial data in the form of a hash tree through the blockchain system, and return a uniquely identified hash value to the tax node.

[0102] The financial data acquisition module 17 can be used to obtain the financial data from the blockchain system through the tax node according to the Hash value.

[0103] An embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by the processor 30, the steps of the blockchain-based data processing method in any of the above-mentioned embodiments are implemented.

[0104] If the module / unit integrated by the blockchain-based data processing device 100 / terminal 110 / computer device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned implementation method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor 30, the steps of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), etc.

[0105] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor 30 is the control center of the blockchain-based data processing device 100 / terminal 110, and uses various interfaces and lines to connect various parts of the entire blockchain-based data processing device 100 / terminal 110.

[0106] The memory 10 is used to store the computer program and / or module, and the processor 30 implements various functions of the blockchain-based data processing device 100 / terminal 110 by running or executing the computer program and / or module stored in the memory 10, and calling the data stored in the memory 10. The memory 10 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data (such as audio data, etc.) created according to the use of the terminal 110, etc.

[0107] In the several specific implementations provided by the present invention, it should be understood that the disclosed terminal and method can be implemented in other ways. For example, the system implementation described above is only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0108] It is obvious to those skilled in the art that the embodiments of the present invention are not limited to the details of the exemplary embodiments described above, and that the embodiments of the present invention can be implemented in other specific forms without departing from the spirit or essential features of the embodiments of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the embodiments of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the embodiments of the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. Multiple units, modules or devices stated in the system, device or terminal claims may also be implemented by the same unit, module or device through software or hardware.

[0109] The above implementation modes are only used to illustrate the technical solutions of the embodiments of the present invention and are not intended to limit the present invention. Although the embodiments of the present invention are described in detail with reference to the above preferred implementation modes, those skilled in the art should understand that the technical solutions of the embodiments of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data processing method based on blockchain, applied to an enterprise transaction system based on blockchain, wherein the enterprise transaction system based on blockchain includes a tax node, at least one enterprise data processing terminal and a blockchain system, characterized in that: The data processing method based on blockchain includes: The blockchain system receives a transaction request output by a transaction initiator, and notifies the transaction request to a corresponding transaction recipient; The blockchain system generates a transaction contract according to the transaction request, and transmits the transaction contract to the transaction initiator and the transaction requester; After detecting the signatures of the transaction initiator and the transaction recipient on the transaction contract, the blockchain system confirms that the transaction is completed and writes the transaction information corresponding to the transaction into the blockchain system; The enterprise data processing terminal obtains transaction information within a preset time period from the blockchain system, and obtains preset transaction data according to the transaction information; The enterprise data processing terminal determines the financial data according to the preset transaction data, including: obtaining the preset transaction data, and inputting the preset transaction data as a test sample into a pre-trained financial data processing model; obtaining a test result output by the financial data processing model, determining the test result as the financial data, and uploading the financial data to the blockchain system, wherein the financial data includes asset and liability data, profit data, cash flow data, and owner's equity change data; The blockchain system assembles the financial data in the form of a Hash tree, including: obtaining the financial data in different preset time periods; calculating the financial data in different preset time periods using a hash function to obtain corresponding Hash values; and assembling the corresponding Hash values ​​in the form of a Hash tree; Returning a uniquely identified Hash value to the tax node; The tax node obtains the financial data from the blockchain system according to the Hash value.

2. The data processing method based on blockchain according to claim 1 is characterized in that: The transaction initiator and the transaction receiver are enterprise data processing terminals that create enterprise blockchain accounts in the blockchain system. The step of creating an enterprise blockchain account in the blockchain system includes: When receiving a registration request, generate the public key and private key corresponding to the enterprise blockchain account; The private key corresponding to the enterprise blockchain account is sent to the enterprise data processing terminal, and the public key corresponding to the enterprise blockchain account is broadcast to each accounting node in the blockchain network.

3. The data processing method based on blockchain according to claim 2 is characterized in that: Before the step of creating an enterprise blockchain account in the blockchain system, the method further includes: Searching in the blockchain system whether there is an enterprise blockchain account corresponding to the enterprise; If it is determined that the enterprise has already registered an enterprise blockchain account, it will be prompted that the enterprise has already registered a blockchain account, and the blockchain account that the enterprise has registered will be used as the account currently applied for registration; If it is determined that the enterprise's registration information cannot be found, a new enterprise blockchain account is created for the enterprise.

4. The data processing method based on blockchain according to claim 3 is characterized in that: After the step of the blockchain system receiving the transaction request output by the transaction initiator, the method further includes: Obtaining signature information of the transaction initiator using the private key corresponding to the enterprise blockchain account to sign the transaction information; Verifying the signature information through the public key of the transaction initiator to confirm the source of the transaction request; Detecting whether the source of the transaction request has passed verification; If the detection result is that the source of the transaction request has passed the verification, the blockchain system records the transaction request output by the transaction initiator and notifies the corresponding transaction recipient of the transaction request.

5. The data processing method based on blockchain according to claim 1 is characterized in that: The step of the enterprise data processing terminal acquiring transaction information within a preset time period from the blockchain system, and acquiring preset transaction data according to the transaction information includes: Call the timing script to obtain the transaction list within the preset time period; Extracting preset keywords from the transaction list; Acquire data corresponding to the preset keyword; The data corresponding to the preset keyword is determined as preset transaction data.

6. A data processing device based on blockchain, applied to a corporate transaction system based on blockchain, for implementing the data processing method based on blockchain as claimed in any one of claims 1 to 5, wherein the corporate transaction system based on blockchain comprises a tax node, at least one corporate data processing terminal and a blockchain system, characterized in that: The blockchain-based data processing device comprises: A transaction request transmission module, used to receive a transaction request output by a transaction initiator through a blockchain system, and notify the transaction request to a corresponding transaction recipient; A transaction contract generation module, used to generate a transaction contract according to the transaction request through the blockchain system, and transmit the transaction contract to the transaction initiator and the transaction requester; A transaction information recording module, used to confirm the completion of the transaction after detecting the signatures of the transaction initiator and the transaction recipient on the transaction contract through the blockchain system, and write the transaction information corresponding to the transaction into the blockchain system; A transaction data acquisition module, used to acquire transaction information within a preset time period from the blockchain system through an enterprise data processing terminal, and acquire preset transaction data according to the transaction information; A financial data determination module, configured to determine financial data according to the preset transaction data through the enterprise data processing terminal, and upload the financial data to the blockchain system; A hash value acquisition module, used to assemble the financial data in the form of a hash tree through the blockchain system, and return a uniquely identified hash value to the tax node; A financial data acquisition module is used to obtain the financial data from the blockchain system through the tax node according to the hash value.

7. A terminal, characterized in that: The terminal includes a processor, and the processor is used to implement the blockchain-based data processing method as described in any one of claims 1 to 5 when executing a computer program stored in a memory.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the blockchain-based data processing method as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Tax control method and system based on credit investigation

    CN106355488A

  • Block-chain-based Electronic invoice registering method

    CN108305106A

  • Financial system management method, electronic equipment and storage medium

    CN108711099A

  • Settlement method, device and block chain network based on block chain technology

    CN109472593A

  • Data storage method based on block chain, electronic equipment and storage medium

    CN109525671A