CN110599321B - Tax data processing method and device, server and storage medium - Google Patents

Tax data processing method and device, server and storage medium Download PDF

Info

Publication number
CN110599321B
CN110599321B CN201910902074.7A CN201910902074A CN110599321B CN 110599321 B CN110599321 B CN 110599321B CN 201910902074 A CN201910902074 A CN 201910902074A CN 110599321 B CN110599321 B CN 110599321B
Authority
CN
China
Prior art keywords
tax data
data
tax
central database
block
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.)
Active
Application number
CN201910902074.7A
Other languages
Chinese (zh)
Other versions
CN110599321A (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 CN201910902074.7A priority Critical patent/CN110599321B/en
Publication of CN110599321A publication Critical patent/CN110599321A/en
Application granted granted Critical
Publication of CN110599321B publication Critical patent/CN110599321B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/10Tax strategies

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Computing Systems (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a tax data processing method, a tax data processing device, a server and a storage medium. The tax data processing method comprises the following steps: detecting the number of blocks in a block chain; when detecting that a new block exists in the block chain, updating a central database of the tax management system according to tax data in the new block, wherein a plurality of pieces of tax data are stored in the central database; when a data reading request sent by the terminal is received, sending an access grant instruction to the terminal, wherein the access grant instruction is used for indicating the terminal to access the updated central database, so that the terminal updates the tax data chart of the target page according to the updated central database. When the terminal updates the tax data chart, the latest tax data can be read from the central database without reading tax data information from the blockchain, so that the tax data chart can be updated more quickly, and the real-time performance of the tax data chart displayed by the terminal is ensured.

Description

Tax data processing method and device, server and storage medium
Technical Field
The invention relates to the technical field of information security, in particular to a tax data processing method, a tax data processing device, a tax data processing server and a tax data storage medium.
Background
With the development of clients, the application of blockchain technology is becoming more and more widespread, and tax departments will store tax data in each block of the blockchain in order to ensure data security. When tax data is required to be acquired, the tax data is acquired from the blockchain. For example, a tax management system used by a tax administration department may provide a function of visualizing a chart of tax data, but a data source of the visualized chart is data in a blockchain, and each time the chart is updated, the data needs to be obtained from the blockchain and then updated, which results in a lag in updating the visualized chart, and cannot reflect the current status of tax data in real time.
Disclosure of Invention
The embodiment of the invention provides a tax data processing method, a tax data processing device, a server and a storage medium.
In one aspect, an embodiment of the present invention provides a tax data processing method, including:
detecting the number of blocks in a block chain;
when detecting that an added block exists in the block chain, updating a central database of a tax management system according to tax data in the added block, wherein a plurality of pieces of tax data are stored in the central database;
and when a data reading request sent by the terminal is received, sending an access grant instruction to the terminal, wherein the access grant instruction is used for indicating the terminal to access the updated central database so that the terminal updates the tax data chart of the target page according to the updated central database.
In a second aspect, an embodiment of the present application further provides a tax data processing apparatus, including:
the block detection module is used for detecting the number of blocks in the block chain;
the updating module is used for updating a central database of the tax management system according to tax data in the newly added block when the newly added block exists in the block chain, wherein a plurality of pieces of tax data are stored in the central database;
and the data processing module is used for sending an access grant instruction to the terminal when receiving a data reading request sent by the terminal, wherein the access grant instruction is used for indicating the terminal to access the updated central database so as to enable the terminal to update the tax data chart of the target page according to the updated central database.
In a third aspect, the present application also provides a server comprising a processor, a memory, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the tax data processing method according to any of the embodiments described above.
In a fourth aspect, embodiments of the present application further provide a computer storage medium storing one or more first instructions adapted to be loaded by a processor and to perform the tax data processing method according to any of the embodiments above.
In the technical scheme of the embodiment of the application, a server detects the number of blocks in a block chain; when detecting that an added block exists in the block chain, updating a central database of a tax management system according to tax data in the added block, wherein a plurality of pieces of tax data are stored in the central database; and when a data reading request sent by the terminal is received, sending an access grant instruction to the terminal, wherein the access grant instruction is used for indicating the terminal to access the updated central database so that the terminal updates the tax data chart of the target page according to the updated central database. When the terminal updates the tax data chart, the latest tax data can be read from the central database without reading tax data information from the blockchain, so that the tax data chart can be updated more quickly, the real-time performance of the tax data chart displayed by the terminal is ensured, and a worker who performs tax management can monitor and control the tax data more accurately through the tax data chart.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a data sharing system according to an embodiment of the present application;
FIG. 2 is a schematic block diagram of a data sharing system according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a data structure when generating a new block in the data sharing system according to the embodiment of the present application;
FIG. 4 is a network architecture diagram of an embodiment of the present application;
FIG. 5 is a schematic diagram of a server according to an embodiment of the present application;
FIG. 6 is a flow chart of a tax data processing method according to an embodiment of the present application;
FIG. 7 is a schematic view of an application scenario involved in a tax data processing method according to an embodiment of the present application;
FIG. 8 is another schematic view of an application scenario involved in a tax data processing method according to an embodiment of the present application;
FIG. 9 is a further schematic view of an application scenario involved in a tax data processing method according to an embodiment of the present application;
FIG. 10 is a block diagram of a tax data processing apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.
Referring to the data sharing system shown in fig. 1, the data sharing system 100 refers to a system for performing data sharing between nodes, and may include a plurality of nodes 101, where the plurality of nodes 101 may be respective clients in the data sharing system. Each node 101 may receive input information while operating normally and maintain shared data within the data sharing system based on the received input information. In order to ensure the information intercommunication in the data sharing system, information connection can exist between each node in the data sharing system, and the nodes can transmit information through the information connection. For example, when any node in the data sharing system receives input information, other nodes in the data sharing system acquire the input information according to a consensus algorithm, and store the input information as data in the shared data, so that the data stored on all nodes in the data sharing system are consistent.
Each node in the data sharing system has a node identifier corresponding to the node identifier, and each node in the data sharing system can store the node identifiers of other nodes in the data sharing system, so that the generated block can be broadcast to other nodes in the data sharing system according to the node identifiers of other nodes. Each node can maintain a node identification list shown in the following table, and the node names and the node identifications are correspondingly stored in the node identification list. The node identifier may be an IP (Internet Protocol, protocol of interconnection between networks) address, and any other information that can be used to identify the node, and the IP address is only illustrated in table 1.
TABLE 1
Each node in the data sharing system stores one and the same blockchain. The blockchain is composed of a plurality of blocks, referring to fig. 2, the blockchain is composed of a plurality of blocks, the starting block comprises a block head and a block main body, the block head stores an input information characteristic value, a version number, a time stamp and a difficulty value, and the block main body stores input information; the next block of the starting block takes the starting block as a father block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the father block, the version number, the timestamp and the difficulty value, and the like, so that the block data stored in each block in the block chain are associated with the block data stored in the father block, and the safety of the input information in the block is ensured.
When each block in the blockchain is generated, referring to fig. 3, when the node where the blockchain is located receives input information, checking the input information, after the checking is completed, storing the input information into a memory pool, and updating a hash tree used for recording the input information; then, updating the update time stamp to the time of receiving the input information, trying different random numbers, and calculating the characteristic value for a plurality of times, so that the calculated characteristic value can meet the following formula:
SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x))<TARGET,
wherein SHA256 is a eigenvalue algorithm used to calculate eigenvalues; version (version number) is version information of the related block protocol in the block chain; the prev_hash is the block header characteristic value of the parent block of the current block; the merkle_root is a characteristic value of input information; ntime is the update time of the update timestamp; the nbits is the current difficulty, is a fixed value in a period of time, and is determined again after exceeding a fixed period of time; x is a random number; TARGET is a eigenvalue threshold that can be determined from nbits.
Thus, when the random number meeting the formula is calculated, the information can be correspondingly stored to generate the block head and the block main body, and the current block is obtained. And then, the node where the blockchain is located sends the newly generated blocks to other nodes in the data sharing system where the newly generated blocks are located according to the node identification of other nodes in the data sharing system, the other nodes verify the newly generated blocks, and the newly generated blocks are added into the blockchain stored in the newly generated blocks after the verification is completed.
Therefore, the contents in each block in the blockchain are associated, and the same blockchain is stored in each node of the blockchain system, so that once the blocks in the blockchain are created, the contents in the blocks cannot be modified, and the security of the data in each block in the blockchain can be ensured.
Referring to fig. 4, fig. 4 is a diagram of a network architecture 400 of the present application, the network architecture 400 including a server 410, a terminal 420, and a communication link 430. The terminal 420 and the server 410 may communicate via a communication link 430.
Referring to fig. 5, fig. 5 is a schematic hardware structure of a server 410 according to an embodiment of the application. The server 410 comprises a processor 411, a memory 412, a communication interface 413, and one or more programs stored in the memory 412 and configured to be executed by the processor 411, the programs comprising instructions to implement the steps of the tax data processing method of any of the following embodiments. Memory 412 includes Random Access Memory (RAM), and disk memory. Communication interface 413 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface).
The terminal 420 may be, for example, but not limited to, a cell phone, smart bracelet, tablet computer, notebook computer, etc.
Tax authorities may store tax data in various segments of a blockchain in order to secure the data. The tax data may be invoice data, for example. For example, when the tax management system generates an electronic invoice, a new tile may be created in the tile for storing invoice information for the electronic invoice. Therefore, the data in the block of the block chain is difficult to modify, so that the safety of invoice information can be ensured, and the invoice information is prevented from being modified. However, this also presents some problems. The tax management system also needs to count and analyze tax data to form a visual chart, and the visual chart is displayed on the terminal, so that staff can monitor and control the tax data conveniently. If the visual chart is updated each time data is acquired from the blockchain, this results in a late update of the visual chart.
In order to solve the technical problems, the application provides a tax data processing method, which is used for synchronizing updated tax data into a central database of a tax management system when a server detects that a blockchain has updated tax data. That is, a plurality of pieces of tax data are stored in the central database, and the tax data in the central database are synchronously updated according to the tax data in the blockchain. Therefore, the terminal can form a visual tax data chart according to the tax data in the central database without acquiring the tax data from the blockchain, so that the tax data chart can be updated more quickly, and the instantaneity of the tax data chart is ensured.
Referring to fig. 6, fig. 6 is a flow chart illustrating a tax data processing method according to an embodiment of the application.
601. The server detects the number of tiles in the blockchain.
In the embodiment of the application, when the tax management system generates tax data, the tax data is stored in the blockchain, and a plurality of pieces of tax data are stored in the blockchain. For example, tax data may include invoice information. When the tax management system generates an electronic invoice, a new chunk may be created in the chunk for storing invoice information for the electronic invoice. The server is a server with blockchain access rights, for example, a server of a tax administration system.
If the updated tax data exists in the blockchain, a block is newly added. Then it may be detected whether updated tax data exists in the blockchain by detecting the number in the blockchain.
Specifically, the server may detect the number of blocks in real time. That is, the act of detecting the number of blocks in the blockchain is repeated multiple times. For example, the server may detect the number of tiles in the blockchain at a first time interval. The first time interval may be, for example, but not limited to, 1s, 0.8s,0.5s, etc. Thus, the first time interval is less than or equal to 1s, and updated tax data in the blockchain can be detected more timely.
Specifically, the server may compare the first height of the blockchain with the second height of the central database, determine whether the first height is identical to the second height, where each block in the blockchain corresponds to a block height, the block height corresponding to a block with a late creation time is greater than the block height corresponding to a block with an early creation time, where the first height is the largest block height of the block heights corresponding to the blocks of the blockchain when the detection is performed, and the second height is the largest block height of the block heights corresponding to the blocks of the blockchain when the central database is updated last time; and when the first height is inconsistent with the second height, confirming that a new block exists in the block chain.
It is understood that each block in the blockchain corresponds to a block height that is generated when the corresponding block is created. The earlier the block creation time, the smaller the block height; the later the block creation time, the greater the block height. Then the greater the tile height, the later the update time of the tax data stored in the tile. When the first height is the maximum block height in the block heights corresponding to all blocks of the block chain in the detection, the block corresponding to the first height is the newly created block. The second height is the maximum block height in the block heights corresponding to the blocks of the blockchain when the central database is updated last time, that is, after the server synchronizes the updated tax data to the central database of the tax management system each time, the maximum block height in the block heights corresponding to the blocks of the blockchain when the server updates the tax data each time is stored. Thus, the second height may reflect the time when the central database was last updated. Since blocks in the blockchain can only be added and cannot be deleted. Thus, by comparing the first height to the second height, it can be determined whether a new chunk has been added to the blockchain after the last update of the central database, i.e., whether updated tax data exists in the blockchain. When the first height and the second height are different, it can be confirmed that there is a newly added block in the blockchain after the last update of the central database. If the first height is the same as the second height, it can be confirmed that there are no newly added blocks in the blockchain after the last update of the central database.
Therefore, whether the newly added block exists in the blockchain can be rapidly and accurately detected to confirm whether the newly added tax data exists in the blockchain, and the tax data of each block in the blockchain is not required to be compared with the tax data in the central database.
Further, the server may detect, according to a first preset time interval, the number of blocks in the blockchain using a first process, where the first process is independent of a second process, and the second process is a system process of the tax management system. Therefore, the server detects whether the newly added block exists in the block chain by using the first process independent of the system process, and can synchronize tax data in the newly added block in the block chain to the central database more quickly, so that the instantaneity of the tax data in the central database is ensured.
The server may also detect if the first process is abnormal and restart the first process when the first process is abnormal. Therefore, the server can monitor and control the running condition of the first process in real time, and restart the first process when the first process is abnormal, so that whether the first process can normally detect whether newly added blocks exist in the block chain or not is ensured.
602. When detecting that a new block exists in the block chain, the server updates a central database of the tax management system according to tax data in the new block, and a plurality of pieces of tax data are stored in the central database.
And the server synchronizes tax data in the newly added block to a central database of the tax management system every time the server detects that the newly added block exists in the block chain. Then, it will be appreciated that the tax data stored in the central database is updated as the tax data in the blockchain is updated. In this way, tax data stored in the central database is substantially synchronized with tax data in the blockchain.
Specifically, when the updated tax data in the blockchain is detected, the server synchronizes the tax data stored in the blockchain with the blockheight greater than the second height in the blockchain to a central database of the tax management system. The tax data stored in the block with the block height larger than the second height is updated tax data in the block chain within the period from the last update of the central database to the detection of the updated tax data in the block chain.
Therefore, the tax data to be synchronized is directly determined according to the height of the block, updated tax data can be more conveniently and quickly synchronized into the block chain, the tax data in each block does not need to be compared with the tax data in the central database, and the data to be synchronized is not required to be determined according to the time stamp after the time stamp of each block in the block chain is read.
603. The terminal sends a data reading request to the server.
The tax administration system may display tax data charts through the terminal. When the terminal needs to update the tax data chart, tax data needs to be acquired from a central database. The terminal may then send a data read request to the server.
Specifically, the terminal can access a target web page corresponding to the tax management system to display a tax data chart. And the terminal refreshes the tax data chart according to a second time interval on the target web page, wherein the first time interval is smaller than the second time interval. Therefore, the tax data chart can be updated every time the terminal refreshes the tax data chart, and the phenomenon that the terminal reads tax data from the central database, but does not read new tax data, so that resource waste is caused, and the update of the tax data chart is lagged is avoided.
604. And the server sends an access grant instruction to the terminal, wherein the access grant instruction is used for indicating the terminal to access the updated central database so that the terminal updates the tax data chart of the target page according to the updated central database.
The server allows the terminal to access the updated central database so that the terminal can read the latest tax data.
The server may send an access grant instruction to the terminal after verifying the access right of the terminal. Specifically, the data reading request sent by the terminal may carry a user identifier, and after the server confirms that the user corresponding to the user identifier has the access right of the central database, an access grant instruction is sent to the terminal.
Further, each piece of tax data includes data characteristic information. The server can classify and count a plurality of pieces of tax data of the central database according to the data characteristic information of each piece of tax data in the updated central database; and when the server receives a data reading request sent by the terminal, allowing the terminal to access the classified and counted pieces of tax data, so that the terminal updates the tax data chart of the target page according to the classified and counted pieces of tax data.
605. And the terminal updates the tax data chart of the target page according to the updated central database.
For example, the data characteristic information may include regional information and data source organization information. The server carries out classified statistics on a plurality of pieces of tax data according to the regional information of each piece of tax data to obtain first statistics data; and classifying the plurality of pieces of tax data according to the data source organization information of each piece of tax data to obtain second statistical data. The terminal can read the first statistical data to generate a regional classification tax data chart, read the second statistical data to generate a source classification tax data chart, and display the regional classification tax data chart and the source classification tax data chart on the terminal. When the tax data is invoice data, the locale classification tax data chart may be a chart of the form shown in fig. 7 and the source classification tax data chart may be a chart shown in fig. 8.
Of course, the data characteristic information is not limited to the regional information and the data source organization information, more data characteristic information can be included, the server can generate different statistic data according to different data characteristic information, and the terminal reads different statistic data to generate different classified tax data charts. Therefore, the terminal can display various classified tax data charts, so that the visual charts of tax data are richer, the visual effect is better, and workers for tax management can monitor and control the tax data more conveniently.
In the technical scheme of the embodiment of the application, a server detects the number of blocks in a block chain; when detecting that an added block exists in the block chain, updating a central database of a tax management system according to tax data in the added block, wherein a plurality of pieces of tax data are stored in the central database; and when a data reading request sent by the terminal is received, sending an access grant instruction to the terminal, wherein the access grant instruction is used for indicating the terminal to access the updated central database so that the terminal updates the tax data chart of the target page according to the updated central database. When the terminal updates the tax data chart, the latest tax data can be read from the central database without reading tax data information from the blockchain, so that the tax data chart can be updated more quickly, the real-time performance of the tax data chart displayed by the terminal is ensured, and a worker who performs tax management can monitor and control the tax data more accurately through the tax data chart. The tax data graph may better provide an important reference for the operation of blockchain electronic invoice business when the tax data is an invoice.
In some embodiments, the user may select the target area range in conjunction with operating the terminal such that the terminal generates a tax data chart for tax data corresponding to the target area range selected by the user.
For example, in the example shown in fig. 9, a target page 900 of the terminal is displayed with a map 901, and a user can select a target area range by operating the terminal to select a region on the map. After the terminal acquires the target area range, a data reading request is sent to the server, wherein the data reading request comprises the target area range. The server may allow the terminal to access one or more pieces of tax data corresponding to the scope of the target area.
With continued reference to fig. 9, the terminal may display a plurality of tax data charts obtained according to a plurality of feature data information on the target page, so that tax data charts obtained by statistics from a plurality of angles are displayed on the same page, so that tax manager can know statistics of tax data from a plurality of angles, and thus the tax data can be monitored and controlled more accurately. And the terminal refreshes the chart according to the second time interval, so that the terminal can provide the dynamically updated chart on the target page, the display effect is more visual impact, the data is rich in dynamic, the real-time change condition of the data can be reflected, and the large-screen display and external propaganda are facilitated.
Specifically, the server may obtain one or more pieces of tax data corresponding to the target area range selected by the user from the plurality of pieces of tax data in the central database according to the data characteristic information of each piece of tax data in the central database; performing regional classification statistics on the one or more pieces of tax data according to regional information to obtain first statistics; and carrying out regional classification statistics on the one or more pieces of tax data according to the data source organization information to obtain second statistical data. When a data reading request sent by a terminal is received, a server sends an access grant instruction to the terminal, wherein the access grant instruction is used for instructing the terminal to access first statistical sub-data corresponding to the target area in the first statistical data and second statistical sub-data corresponding to the target area in the second statistical data, so that the terminal updates a first tax data table of a target page according to the first statistical sub-data and updates a second tax data table of the target page according to the second statistical sub-data. Thus, the user selects the target area according to the requirement, and the terminal displays a tax data chart reflecting the tax data of the target area.
Further, when the server receives the data reading request sent by the terminal, since the first statistical data is statistically classified according to the regions, and the statistical classification result is the tax data amount of each region, the server can screen out the first statistical sub-data corresponding to the target region in the first statistical data according to the target region. For example, if the target area is Guangdong province, the server directly screens out the statistical data of Guangdong province from the first statistical data to obtain tax data amounts of all areas of Guangdong province. The second statistical data is statistically classified according to the information of the data source institutions, and the obtained statistical classification result is tax data from each institution, so that the server can screen the tax data from each institution in the second statistical target area on the basis of the second statistical data to obtain second statistical sub-data. Therefore, the terminal can generate the first tax data table according to the first sub-data more quickly, and when the second tax data table is generated according to the second sub-data, the terminal does not need to further conduct data screening, so that the data processing capacity of the terminal is reduced.
Referring to fig. 10, an embodiment of the present invention further provides a tax data processing apparatus 1000, including:
A block detection module 1001 for detecting the number of blocks in a blockchain;
the updating module 1002 is configured to update a central database of the tax management system according to tax data in the newly added chunk when the newly added chunk is detected in the chunk chain, where a plurality of pieces of tax data are stored in the central database;
and the data processing module 1003 is configured to send an access grant instruction to the terminal when receiving a data reading request sent by the terminal, where the access grant instruction is used to instruct the terminal to access the updated central database, so that the terminal updates the tax data chart of the target page according to the updated central database.
The tax data processing device of the embodiment of the application firstly detects the number of blocks in a block chain; when detecting that an added block exists in the block chain, updating a central database of a tax management system according to tax data in the added block, wherein a plurality of pieces of tax data are stored in the central database; and when a data reading request sent by the terminal is received, sending an access grant instruction to the terminal, wherein the access grant instruction is used for indicating the terminal to access the updated central database so that the terminal updates the tax data chart of the target page according to the updated central database. When the terminal updates the tax data chart, the latest tax data can be read from the central database without reading tax data information from the blockchain, so that the tax data chart can be updated more quickly, the real-time performance of the tax data chart displayed by the terminal is ensured, and a worker who performs tax management can monitor and control the tax data more accurately through the tax data chart. The tax data graph can better provide an important reference for the operation of the blockchain electronic invoice service.
In some embodiments, the block detection module is specifically configured to:
comparing the first height of the block chain with the second height of the central database, wherein the first height is the largest block height in the block heights corresponding to all blocks of the block chain in the detection, and the second height is the largest block height in the block heights corresponding to all blocks of the block chain in the last update of the central database;
and when the first height is inconsistent with the second height, confirming that updated tax data exists in the blockchain.
In some embodiments, the update module is specifically configured to:
and synchronizing the tax data stored in the subarea with the subarea height larger than the second height in the subarea chain to a central database of the tax management system when the updated tax data in the subarea chain is detected.
In some embodiments, each piece of tax data includes data characteristic information; the tax data processing further comprises:
the statistics module is used for carrying out classified statistics on a plurality of pieces of tax data of the central database according to the data characteristic information of each piece of tax data in the updated central database;
And the access agreement instruction is used for indicating the terminal to access the classified and counted pieces of tax data so that the terminal updates the tax data chart of the target page according to the classified and counted pieces of tax data.
In some embodiments, the statistics module is specifically configured to:
performing regional classification statistics on the multi-item tax data according to regional information to obtain first statistics data; and carrying out regional classification statistics on the multiple items of tax data according to the data source organization information to obtain second statistical data.
In some embodiments, the block detection module is specifically configured to:
detecting the number of blocks in the blockchain by using a first process according to a first preset time interval, wherein the first process is independent of a second process, and the second process is a system process of the tax management system.
In some embodiments, the tax data processing apparatus further comprises:
the process detection module is used for detecting whether the first process is abnormal or not;
and the process processing module is used for restarting the first process when the first process is abnormal.
It should be noted that, the explanation of each embodiment of the tax data processing method is also applicable to the tax data processing device of the embodiment of the present application, and in order to avoid redundancy, the description is omitted here.
The embodiment of the invention also provides a computer storage medium (Memory), which is a Memory device in the client, and is used for storing programs and data. It is understood that the computer storage media herein may include both built-in storage media in the client and extended storage media supported by the client. The computer storage media provides storage space that stores the operating system of the client. Also stored in the memory space are one or more instructions, which may be one or more computer programs (including program code), adapted to be loaded and executed by the processor. The computer storage medium herein may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory; optionally, at least one computer storage medium remote from the processor may be present.
In one embodiment, one or more first instructions stored in a computer storage medium may be loaded and executed by a processor to implement the corresponding steps performed by the first client in the data processing embodiments described above; in particular implementations, one or more first instructions in a computer storage medium are loaded by a processor and perform the steps of:
Detecting the number of blocks in a block chain;
when detecting that an added block exists in the block chain, updating a central database of a tax management system according to tax data in the added block, wherein a plurality of pieces of tax data are stored in the central database;
and when a data reading request sent by the terminal is received, sending an access grant instruction to the terminal, wherein the access grant instruction is used for indicating the terminal to access the updated central database so that the terminal updates the tax data chart of the target page according to the updated central database.
In some embodiments, the detecting the number of blockchain tiles includes:
comparing the first height of the block chain with the second height of the central database, wherein the first height is the largest block height in the block heights corresponding to all blocks of the block chain in the detection, and the second height is the largest block height in the block heights corresponding to all blocks of the block chain in the last update of the central database;
and when the first height is inconsistent with the second height, confirming that a new block exists in the block chain.
In some embodiments, when detecting that there is an added chunk in the blockchain, updating a central database of a tax management system based on tax data in the added chunk includes:
And synchronizing tax data stored in a block with the block height larger than the second height in the block chain to a central database of the tax management system when detecting that the newly added block exists in the block chain.
In some embodiments, each piece of tax data includes data characteristic information;
before sending the access grant instruction to the terminal, one or more first instructions in a computer storage medium are loaded by a processor and execute the following steps:
according to the data characteristic information of each piece of tax data in the updated central database, classifying and counting a plurality of pieces of tax data in the central database;
and the access agreement instruction is used for indicating the terminal to access the classified and counted pieces of tax data so that the terminal updates the tax data chart of the target page according to the classified and counted pieces of tax data.
In certain embodiments, the data characteristic information comprises regional information and data source agency information; the step of classifying and counting the tax data of the central database according to the data characteristic information of each piece of tax data in the updated central database comprises the following steps:
performing regional classification statistics on the one or more pieces of tax data according to regional information to obtain first statistics; and carrying out regional classification statistics on the one or more pieces of tax data according to the data source organization information to obtain second statistical data.
In some embodiments, the detecting the number of blockchain tiles includes:
detecting the number of blocks in the blockchain by using a first process according to a first preset time interval, wherein the first process is independent of a second process, and the second process is a system process of the tax management system.
In some embodiments, one or more first instructions in a computer storage medium are loaded by a processor and perform the steps of: detecting whether the first process is abnormal;
and restarting the first process when the first process is abnormal.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., optical disk), or a semiconductor medium (e.g., solid state disk), etc. In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, such as the division of the units, merely a logical function division, and there may be additional divisions of actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the indirect coupling or direct coupling or communication connection between the illustrated or discussed devices and units may be through some interfaces, devices or units, and may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units described above may be implemented either in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on this understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. The aforementioned storage medium may include, for example: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It will be appreciated that any product that is controlled or configured to perform the tax data processing method described herein, such as the tax data processing apparatus, server, and storage medium described above, falls within the scope of the related products described herein.

Claims (9)

1. A tax data processing method, comprising:
detecting the number of blocks in the block chain according to a first preset time interval;
when detecting that an added block exists in the block chain, updating a central database of a tax management system according to tax data in the added block, wherein a plurality of pieces of tax data are stored in the central database, and each piece of tax data comprises data characteristic information;
classifying and counting a plurality of pieces of tax data in the central database according to the updated data characteristic information of each piece of tax data in the central database;
when a data reading request sent by a terminal is received, sending an access grant instruction to the terminal, wherein the access grant instruction is used for indicating the terminal to access the classified and counted pieces of tax data in the updated central database, so that the terminal updates a tax data chart of a target page according to the classified and counted pieces of tax data at a second preset time interval, and the first preset time interval is smaller than the second preset time interval.
2. The tax data processing method of claim 1, wherein detecting the number of blockchain chunks comprises:
Comparing the first height of the block chain with the second height of the central database, wherein the first height is the largest block height in the block heights corresponding to all blocks of the block chain in the detection, and the second height is the largest block height in the block heights corresponding to all blocks of the block chain in the last update of the central database;
and when the first height is inconsistent with the second height, confirming that a new block exists in the block chain.
3. The tax data processing method of claim 2, wherein updating the central database of the tax management system based on tax data in the newly added chunk when the newly added chunk is detected in the blockchain comprises:
and synchronizing tax data stored in a block with the block height larger than the second height in the block chain to a central database of the tax management system when detecting that the newly added block exists in the block chain.
4. A tax data processing method according to any one of claims 1-3, wherein said data characteristic information comprises regional information and data source authority information; the classifying and counting the tax data in the central database according to the data characteristic information of each piece of tax data in the updated central database comprises the following steps:
Performing regional classification statistics on the tax data according to regional information to obtain first statistics data; and carrying out regional classification statistics on the tax data according to the data source organization information to obtain second statistical data.
5. The tax data processing method of claim 1, wherein detecting the number of blockchain chunks comprises:
detecting the number of blocks in the blockchain by using a first process according to a first preset time interval, wherein the first process is independent of a second process, and the second process is a system process of the tax management system.
6. The tax data processing method of claim 5, further comprising:
detecting whether the first process is abnormal;
and restarting the first process when the first process is abnormal.
7. A tax data processing apparatus, comprising:
the block detection module is used for detecting the number of blocks in the block chain according to a first preset time interval;
the updating module is used for updating a central database of the tax management system according to tax data in the newly added block when the newly added block exists in the block chain, wherein a plurality of pieces of tax data are stored in the central database, and each piece of tax data comprises data characteristic information;
The statistics module is used for carrying out classified statistics on a plurality of pieces of tax data of the central database according to the updated data characteristic information of each piece of tax data in the central database;
the data processing module is used for sending an access grant instruction to the terminal when receiving a data reading request sent by the terminal, wherein the access grant instruction is used for indicating the terminal to access the classified and counted pieces of tax data in the updated central database so that the terminal updates a tax data chart of a target page according to the classified and counted pieces of tax data at a second preset time interval, and the first preset time interval is smaller than the second preset time interval.
8. A server comprising a processor, a memory, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the tax data processing method of any of claims 1-6.
9. A computer storage medium storing one or more first instructions adapted to be loaded by a processor and to perform the tax data processing method of any one of claims 1-6.
CN201910902074.7A 2019-09-20 2019-09-20 Tax data processing method and device, server and storage medium Active CN110599321B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910902074.7A CN110599321B (en) 2019-09-20 2019-09-20 Tax data processing method and device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910902074.7A CN110599321B (en) 2019-09-20 2019-09-20 Tax data processing method and device, server and storage medium

Publications (2)

Publication Number Publication Date
CN110599321A CN110599321A (en) 2019-12-20
CN110599321B true CN110599321B (en) 2023-09-29

Family

ID=68862477

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910902074.7A Active CN110599321B (en) 2019-09-20 2019-09-20 Tax data processing method and device, server and storage medium

Country Status (1)

Country Link
CN (1) CN110599321B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326165B (en) * 2021-08-04 2021-11-16 腾讯科技(深圳)有限公司 Data processing method and device based on block chain and computer readable storage medium
CN114500588B (en) * 2021-12-15 2023-09-19 杭州宇链科技有限公司 Method and system for verifying cloud data by using IOT (Internet of things) terminal based on blockchain

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107730375A (en) * 2017-11-29 2018-02-23 河北智用信息技术有限公司 A kind of method, system and the terminal device of tax management map
CN108881160A (en) * 2018-05-07 2018-11-23 北京信任度科技有限公司 Medical treatment & health data managing method and system based on block chain intelligence contract
CN109033841A (en) * 2018-07-12 2018-12-18 杨城 It is a kind of to write the weak center's trusted data storage system and management method for testing separation
WO2018228331A1 (en) * 2017-06-12 2018-12-20 腾讯科技(深圳)有限公司 Service data storage method, device, storage medium, and electronic device
CN109086325A (en) * 2018-06-29 2018-12-25 阿里巴巴集团控股有限公司 Data processing method and device based on block chain
CN109636492A (en) * 2018-12-07 2019-04-16 深圳市智税链科技有限公司 Tax administration method, apparatus, medium and electronic equipment based on block catenary system
CN109857727A (en) * 2019-03-02 2019-06-07 杭州复杂美科技有限公司 A kind of local data base reconstructing method, equipment and storage medium
CN109919691A (en) * 2019-02-27 2019-06-21 腾讯科技(深圳)有限公司 A kind of system of data processing, method and device
CN110008206A (en) * 2019-03-22 2019-07-12 深圳前海微众银行股份有限公司 A kind of data processing method and device based on block catenary system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018228331A1 (en) * 2017-06-12 2018-12-20 腾讯科技(深圳)有限公司 Service data storage method, device, storage medium, and electronic device
CN107730375A (en) * 2017-11-29 2018-02-23 河北智用信息技术有限公司 A kind of method, system and the terminal device of tax management map
CN108881160A (en) * 2018-05-07 2018-11-23 北京信任度科技有限公司 Medical treatment & health data managing method and system based on block chain intelligence contract
CN109086325A (en) * 2018-06-29 2018-12-25 阿里巴巴集团控股有限公司 Data processing method and device based on block chain
CN109033841A (en) * 2018-07-12 2018-12-18 杨城 It is a kind of to write the weak center's trusted data storage system and management method for testing separation
CN109636492A (en) * 2018-12-07 2019-04-16 深圳市智税链科技有限公司 Tax administration method, apparatus, medium and electronic equipment based on block catenary system
CN109919691A (en) * 2019-02-27 2019-06-21 腾讯科技(深圳)有限公司 A kind of system of data processing, method and device
CN109857727A (en) * 2019-03-02 2019-06-07 杭州复杂美科技有限公司 A kind of local data base reconstructing method, equipment and storage medium
CN110008206A (en) * 2019-03-22 2019-07-12 深圳前海微众银行股份有限公司 A kind of data processing method and device based on block catenary system

Also Published As

Publication number Publication date
CN110599321A (en) 2019-12-20

Similar Documents

Publication Publication Date Title
US10708289B2 (en) Secured event monitoring leveraging blockchain
CN113282603B (en) Block chain consensus node checking method, device, equipment and storage medium
CN110572480B (en) Method, device and equipment for realizing calibration of test equipment
CN109522363B (en) Cloud platform synchronization method, system, equipment and storage medium based on block chain
US9176798B2 (en) Computer-readable recording medium, failure prediction device and applicability determination method
CN110599321B (en) Tax data processing method and device, server and storage medium
CN109919142B (en) Personnel monitoring method, device, server and storage medium
CN110808839B (en) Processing method, device, equipment and medium for block chain abnormal data
CN112328448A (en) Zookeeper-based monitoring method, monitoring device, equipment and storage medium
US20220239668A1 (en) Blockchain-based message processing method and apparatus, device, and storage medium
CN115001967A (en) Data acquisition method and device, electronic equipment and storage medium
US11556120B2 (en) Systems and methods for monitoring performance of a building management system via log streams
CN108737184B (en) Management method and device of disaster recovery system
WO2023065900A1 (en) Device state message processing method and message distribution system
CN114598680B (en) Domain name management method, device and storage medium
CN116233125A (en) Method, device, equipment and medium for storing data related to nucleic acid detection
CN114398994A (en) Method, device, equipment and medium for detecting business abnormity based on image identification
CN115086347A (en) Data synchronization method and device, electronic equipment and storage medium
CN113221151A (en) Data processing method and device based on block chain and storage medium
US11157381B2 (en) Display control method and display control device
CN112800130A (en) Data uplink method, system, device, equipment and storage medium
CN107783852B (en) Dump file generation method and terminal
CN111327666A (en) Service management method, device and system, computer equipment and storage medium
US20240193254A1 (en) Systems, devices, and methods for tracking remote equipment location and utilization of computing devices
US20240244083A1 (en) Centralized compliance management platform for security objects

Legal Events

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