[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

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

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

Info

Publication number
CN110599321A
CN110599321A CN201910902074.7A CN201910902074A CN110599321A CN 110599321 A CN110599321 A CN 110599321A CN 201910902074 A CN201910902074 A CN 201910902074A CN 110599321 A CN110599321 A CN 110599321A
Authority
CN
China
Prior art keywords
tax data
tax
data
block
central database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910902074.7A
Other languages
Chinese (zh)
Other versions
CN110599321B (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 device, a server and a storage medium. The tax data processing method comprises the following steps: detecting the number of blocks in the block chain; when detecting that an added block exists in the block chain, updating a central database of the tax management system according to tax data in the added block, wherein a plurality of tax data are stored in the central database; and when a data reading request sent by the terminal is received, sending an access granting instruction to the terminal, wherein the access granting 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. Therefore, when the terminal updates the tax data chart, the latest tax data can be read from the central database, and the tax data information does not need to be read from the block chain, 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, 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 server and a storage medium.
Background
As customers develop, the application of the block chain technology becomes more and more extensive, and in order to ensure data security, the tax department stores tax data in each block of the block chain. When the tax data needs to be acquired, acquiring the tax data from the block chain. For example, a tax management system used by a tax administration department provides a function of a tax data visualization chart, but the data source of the visualization chart is data in a block chain, and each time the chart is updated, the data needs to be acquired from the block chain and then updated, which may lead to a lag in updating the visualization chart and may not reflect the current status of the tax data in real time.
Disclosure of Invention
The embodiment of the invention provides a tax data processing method, a 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 the block chain;
when detecting that a newly added block exists in the block chain, updating a central database of the tax management system according to tax data in the newly added block, wherein a plurality of tax data are stored in the central database;
and when a data reading request sent by a terminal is received, sending an access granting instruction to the terminal, wherein the access granting 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 is detected in the block chain, wherein a plurality of tax data are stored in the central database;
and the data processing module is used for sending an access granting instruction to the terminal when receiving a data reading request sent by the terminal, wherein the access granting 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 third aspect, the present application further 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 including instructions for performing the steps in the tax data processing method according to any of the embodiments.
In a fourth aspect, an embodiment of the present application further provides a computer storage medium, where one or more first instructions are stored, and the one or more first instructions are adapted to be loaded by a processor and perform the tax data processing method according to any of the foregoing embodiments.
In the technical scheme of the embodiment of the application, the server detects the number of blocks in a block chain; when detecting that a newly added block exists in the block chain, updating a central database of the tax management system according to tax data in the newly added block, wherein a plurality of tax data are stored in the central database; and when a data reading request sent by a terminal is received, sending an access granting instruction to the terminal, wherein the access granting 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. Therefore, when the terminal updates the tax data chart, the latest tax data can be read from the central database, and the tax data information does not need to be read from the block chain, so that the tax data chart can be updated more quickly, the instantaneity of the tax data chart displayed by the terminal is ensured, and a worker who performs tax management can monitor 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 invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a data sharing system according to an embodiment of the present application;
FIG. 2 is a block diagram of a data sharing system according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a data structure when a new block is generated in the data sharing system according to an embodiment of the present application;
FIG. 4 is a diagram of a network architecture of an embodiment of the present application;
FIG. 5 is a schematic structural 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 scene schematic diagram of an application scenario related to a tax data processing method according to an embodiment of the present application;
fig. 8 is another scenario diagram of an application scenario related to a tax data processing method according to an embodiment of the present application;
fig. 9 is a schematic view of another application scenario related to the tax data processing method according to the embodiment of the present application;
fig. 10 is a block diagram of a tax data processing device according to an embodiment of the present application.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
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, the data sharing system may include a plurality of nodes 101, and the plurality of nodes 101 may refer to 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 information intercommunication in the data sharing system, information connection can exist between each node in the data sharing system, and information transmission can be carried out between the nodes through the information connection. For example, when an arbitrary 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 shared data, so that the data stored on all the nodes in the data sharing system are consistent.
Each node in the data sharing system has a node identifier corresponding thereto, and each node in the data sharing system may store a node identifier of another node in the data sharing system, so that the generated block is broadcast to the other node in the data sharing system according to the node identifier of the other node in the following. Each node may maintain a node identifier list as shown in the following table, and store the node name and the node identifier in the node identifier list correspondingly. The node identifier may be an IP (Internet Protocol) address and any other information that can be used to identify the node, and table 1 only illustrates the IP address as an example.
Each node in the data sharing system stores one identical blockchain. The block chain is composed of a plurality of blocks, referring to fig. 2, the block chain is composed of a plurality of blocks, the starting block includes a block header and a block main body, the block header stores an input information characteristic value, a version number, a timestamp 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 parent 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 parent 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 is associated with the block data stored in the parent block, and the safety of the input information in the block is ensured.
When each block in the block chain is generated, referring to fig. 3, when the node where the block chain is located receives the input information, the input information is verified, after the verification is completed, the input information is stored in the memory pool, and the hash tree for recording the input information is updated; and then, updating the updating time stamp to the time when the input information is received, trying different random numbers, and calculating the characteristic value for multiple 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 characteristic value algorithm used for calculating a characteristic value; version is version information of the relevant block protocol in the block chain; prev _ hash is a block head characteristic value of a parent block of the current block; merkle _ root is a characteristic value of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, is a fixed value within a period of time, and is determined again after exceeding a fixed time period; x is a random number; TARGET is a feature threshold, which can be determined from nbits.
Therefore, when the random number meeting the formula is obtained through calculation, the information can be correspondingly stored, and the block head and the block main body are generated to obtain the current block. And then, the node where the block chain is located respectively sends the newly generated blocks to other nodes in the data sharing system where the newly generated blocks are located according to the node identifications of the other nodes in the data sharing system, the newly generated blocks are verified by the other nodes, and the newly generated blocks are added to the block chain stored in the newly generated blocks after the verification is completed.
Therefore, the contents in the blocks in the blockchain are related, 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 the blocks in the blockchain can be ensured.
Referring to fig. 4, fig. 4 is a diagram of a network architecture 400 of the present application, which includes 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 diagram of a hardware structure of a server 410 according to an embodiment of the present disclosure. The server 410 includes 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 including instructions to perform the steps of the tax data processing method of any of the following embodiments. Memory 412 includes Random Access Memory (RAM), and disk storage. Communication interface 413 may optionally include a standard wired interface, a wireless interface (e.g., a WI-FI interface).
The terminal 420 may be, for example, but not limited to, a mobile phone, a smart band, a tablet computer, a notebook computer, etc.
In order to ensure data security, the tax department may store tax data in each block of the block chain. The tax data may be, for example, invoice data. For example, when the tax management system generates an electronic invoice, a new block may be created in the block for storing the invoice information of the electronic invoice. Therefore, the data in the blocks of the block chain are difficult to modify, so that the safety of the invoice information can be ensured, and the invoice information is prevented from being modified. However, this also brings about some problems. The tax management system also needs to count and analyze the tax data to form a visual chart, and the visual chart is displayed at the terminal so that the staff can monitor the tax data conveniently. If data is acquired from the blockchain each time the visualization chart is updated, this may cause a lag in updating the visualization chart.
In order to solve the technical problem, the application provides a tax data processing method, and when a server detects that a block chain has updated tax data, the updated tax data is synchronized to a central database of a tax management system. That is, a plurality of pieces of tax data are stored in the central database, and the tax data in the central database is synchronously updated according to the tax data in the block chain. 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 block chain, 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 schematic flow chart illustrating a tax data processing method according to an embodiment of the present application.
601. The server detects the number of blocks in the block chain.
In the embodiment of the application, when the tax data is generated by the tax management system, the tax data is stored in the block chain, and a plurality of pieces of tax data are also stored in the block chain. For example, tax data may include invoice information. When the tax management system generates the electronic invoice, a new block can be created in the block for storing the invoice information of the electronic invoice. The server is a server with access rights to the blockchain, and may be a server of a tax management system, for example.
If the block chain has the updated tax data, the block is added. Then the presence of updated tax data in the blockchain may be detected by detecting the number in the blockchain.
Specifically, the server may detect the number of blocks in real time. That is, the operation of detecting the number of blocks in the block chain is repeated a plurality of times. For example, the server may detect the number of tiles in the tile chain 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 the tax data updated in the block chain can be detected more timely.
Specifically, the server may compare a first height of the block chain with a second height of the central database, and determine whether the first height is consistent with the second height, where each block in the block chain corresponds to a block height, and a block height corresponding to a block with a later creation time is greater than a block height corresponding to a block with an earlier creation time, where the first height is a maximum block height among block heights corresponding to blocks of the block chain when the detection is performed this time, and the second height is a maximum block height among block heights corresponding to blocks of the block chain when the central database is updated last time; and when the first height is not consistent with the second height, confirming that the block chain has a new block.
It will be appreciated that each tile in the chain of tiles corresponds to a tile height, which is generated when the corresponding tile is created. The earlier the block creation time is, the smaller the block height is; the later the block creation time, the greater the block height. Then, the larger the block height, the later the update time of the tax data stored in the block. The first height is the largest block height among the block heights corresponding to the blocks of the block chain in the current detection, and then the block corresponding to the first height is the newly created block. The second height is the maximum block height among the block heights corresponding to the blocks of the block chain when the central database is updated last time, that is, the maximum block height among the block heights corresponding to the blocks of the block chain when the server updates the tax data is stored after synchronizing the updated tax data into the central database of the tax management system each time. In this way, the second height may reflect the time when the central database was last updated. Since the blocks in the block chain can only be added and can not be deleted. Therefore, whether new blocks are added in the block chain after the central database is updated last time can be judged by comparing the first height with the second height, namely whether updated tax data exists in the detection block chain is detected. When the first height and the second height are different, it can be confirmed that there is a new block in the block chain after the central database is last updated. If the first height and the second height are the same, it can be confirmed that there is no new block in the block chain after the central database is updated last time.
Therefore, whether a newly added block exists in the block chain can be detected quickly and accurately to determine whether the newly added tax data exists in the block chain, and the tax data of each block in the block chain does not need to be compared with the tax data in the central database.
Further, the server may detect the number of blocks in the block chain by using a first process according to a first preset time interval, where the first process is independent from 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, so that the tax data in the newly added block in the block chain can be more quickly synchronized to the central database, and the real-time performance of the tax data in the central database is ensured.
The server can also detect whether the first process is abnormal or not, and restart the first process when the first process is abnormal. Therefore, the server can monitor the running state of the first process in real time and restart the first process when the first process is abnormal so as to ensure that the first process can normally detect whether a block chain has a newly added block.
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 the tax data in the new block, wherein a plurality of tax data are stored in the central database.
And the server synchronizes the tax data in the newly added blocks into a central database of the tax management system every time the server detects that the newly added blocks exist in the block chain. It will be appreciated then that the tax data stored in the central database is updated as the tax data in the blockchain is updated. Thus, the tax data stored in the central database is substantially synchronized with the tax data in the blockchain.
Specifically, when detecting that updated tax data exists in the block chain, the server synchronizes the tax data stored in the block with the block height greater than the second height in the block chain to a central database of the tax management system. And the tax data stored in the block with the block height larger than the second height is the updated tax data in the block chain when the central database is updated last time and the updated tax data in the block chain is detected this time.
Therefore, the tax data to be synchronized is directly determined according to the block height, the updated tax data can be synchronized to the block chain more conveniently and quickly, 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 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 management system can display the tax data chart through the terminal. When the terminal needs to update the tax data chart, the tax data needs to be acquired from the 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 at the target web page according to a second time interval, wherein the first time interval is smaller than the second time interval. Therefore, the tax data chart can be updated each time the terminal refreshes the tax data chart, and the situation that the terminal reads tax data from the central database but does not read new tax data to cause resource waste and cause update lag of the tax data chart is avoided.
604. And the server sends an access granting instruction to the terminal, wherein the access granting 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 can 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, the server sends an access grant instruction to the terminal.
Further, each piece of tax data includes data characteristic information. The server can classify and count a plurality of tax data in the central database according to the data characteristic information of each tax data in the updated central database; when a server receives a data reading request sent by a terminal, the terminal is allowed to access the classified and counted multiple pieces of tax data, so that the terminal can update the tax data chart of a target page according to the classified and counted multiple 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 classifies and counts a plurality of tax data according to the regional information of each tax data to obtain first counting data; and classifying the plurality of tax data according to the data source organization information of each tax data to obtain second statistical data. Therefore, the terminal can read the first statistical data, generate a regional classified tax data chart, read the second statistical data, generate a source classified tax data chart, and display the regional classified tax data chart and the source classified tax data chart on the terminal. When the tax data is invoice data, the regional classified tax data chart may be a chart in the form shown in fig. 7, and the source classified tax data chart may be a chart shown in fig. 8.
Certainly, the data feature information is not limited to the region information and the data source organization information, and may further include more data feature information, the server may generate different statistical data according to different data feature information, and the terminal reads different statistical data to generate different classified tax data charts. The terminal can show multiple classification tax data chart like this for tax data's visual chart is abundanter, and visual effect is better, is convenient for carry out tax management's staff's control tax data more.
In the technical scheme of the embodiment of the application, the server detects the number of blocks in a block chain; when detecting that a newly added block exists in the block chain, updating a central database of the tax management system according to tax data in the newly added block, wherein a plurality of tax data are stored in the central database; and when a data reading request sent by a terminal is received, sending an access granting instruction to the terminal, wherein the access granting 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. Therefore, when the terminal updates the tax data chart, the latest tax data can be read from the central database, and the tax data information does not need to be read from the block chain, so that the tax data chart can be updated more quickly, the instantaneity of the tax data chart displayed by the terminal is ensured, and a worker who performs tax management can monitor the tax data more accurately through the tax data chart. The tax data chart may better provide an important reference for the operation of blockchain electronic invoice services when the tax data is an invoice.
In some embodiments, the user may select the target area range by operating the terminal, so that the terminal generates the tax data chart for the 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 the user can select a target area range by operating the terminal to select a region on the map. And after acquiring the target area range, the terminal sends a data reading request to the server, wherein the data reading request comprises the target area range. The server can allow the terminal to access one or more pieces of target tax data corresponding to the target area range.
Referring to fig. 9, the terminal may display a plurality of tax data graphs obtained according to the characteristic data information on the target page, so that the tax data graphs obtained through statistics from multiple angles are displayed on the same page, and the tax manager can know statistics of the tax data from multiple angles, thereby monitoring the tax data 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 has more visual impact, the data is rich in dynamic sense, the real-time change condition of the data can be reflected, and the large-screen display and the external propaganda are facilitated.
Specifically, the server may obtain one or more pieces of target tax data corresponding to a target area range selected by the user from the multiple 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 target tax data according to the regional information to obtain first statistic data; and performing regional classified statistics on the one or more pieces of target tax data according to the information of the data source mechanism to obtain second statistical data. When a data reading request sent by a terminal is received, a server sends an access granting instruction to the terminal, and the access granting instruction is used for indicating the terminal to access first statistical data corresponding to the target area in the first statistical data and second statistical 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 data and updates a second tax data table of the target page according to the second statistical data. Therefore, the user selects the target area according to the requirement, and the terminal displays the tax data chart reflecting the tax data of the target area.
Further, when the server receives a data reading request sent by the terminal, since the first statistical data is statistically classified according to regions, and the statistical classification result is the tax data volume of each region, the server can screen out the first statistical data corresponding to the target region in the first statistical data according to the target region. For example, if the target area is the Guangdong province, the server directly screens out the statistical data of the Guangdong province from the first statistical data to obtain the tax data volume of each region of the Guangdong province. The second statistical data is statistically classified according to the information of the data source institution, the obtained statistical classification result is the tax data from each institution, and then the server can screen out the tax data from each institution in the second statistical target area on the basis of the second statistical data to obtain second statistical subdata. Therefore, the terminal can generate the first tax data table according to the first subdata more quickly, and when the second tax data table is generated according to the second subdata, the terminal does not need to further screen data, so that the data processing amount of the terminal is reduced.
Referring to fig. 10, an embodiment of the invention further provides a tax data processing apparatus 1000, including:
a block detection module 1001 for detecting the number of blocks in a block chain;
an updating module 1002, configured to update a central database of the tax administration system according to tax data in a newly added block when the newly added block is detected in the block chain, where multiple pieces of tax data are stored in the central database;
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 detects the number of blocks in a block chain; when detecting that a newly added block exists in the block chain, updating a central database of the tax management system according to tax data in the newly added block, wherein a plurality of tax data are stored in the central database; and when a data reading request sent by a terminal is received, sending an access granting instruction to the terminal, wherein the access granting 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. Therefore, when the terminal updates the tax data chart, the latest tax data can be read from the central database, and the tax data information does not need to be read from the block chain, so that the tax data chart can be updated more quickly, the instantaneity of the tax data chart displayed by the terminal is ensured, and a worker who performs tax management can monitor the tax data more accurately through the tax data chart. The tax data chart can better provide important reference for the operation of the block chain electronic invoice business.
In some embodiments, the block detection module is specifically configured to:
comparing a first height of the block chain with a second height of the central database, wherein the first height is the largest block height in the block heights corresponding to the blocks of the block chain during the detection, and the second height is the largest block height in the block heights corresponding to the blocks of the block chain during the last update of the central database;
when the first height and the second height are inconsistent, confirming that updated tax data exists in the blockchain.
In some embodiments, the update module is specifically configured to:
and when updated tax data in the block chain is detected, synchronizing the tax data stored in the block with the block height larger than the second height in the block chain into a central database of the tax management system.
In some embodiments, each piece of tax data includes data characteristic information; the tax data processing further comprises:
the statistic module is used for carrying out classified statistics on a plurality of tax data in the central database according to the updated data characteristic information of each tax data in the central database;
the access granting instruction is used for indicating the terminal to access the plurality of tax data after the classified statistics, so that the terminal updates the tax data chart of the target page according to the plurality of tax data after the classified statistics.
In some embodiments, the statistics module is specifically configured to:
performing regional classification statistics on the target tax data according to regional information to obtain first statistic data; and carrying out regional classification statistics on the plurality of target 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:
and detecting the number of blocks in the block chain by using a first process according to a first preset time interval, wherein the first process is independent from 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 the foregoing embodiments of the tax data processing method is also applicable to the tax data processing apparatus in the embodiments of the present application, and is not repeated herein to avoid redundancy.
The embodiment of the invention also provides a computer storage medium (Memory), which is a Memory device in the client and used for storing programs and data. It is understood that the computer storage medium herein may include both a built-in storage medium in the client and, of course, an extended storage medium supported by the client. The computer storage media provides storage space that stores the operating system of the client. Also, one or more instructions, which may be one or more computer programs (including program code), are stored in the memory space for loading and execution by the processor. The computer storage medium may be a high-speed RAM memory, or may be a non-volatile memory (non-volatile memory), such as at least one disk memory; and optionally at least one computer storage medium located remotely from the processor.
In one embodiment, one or more first instructions stored in a computer storage medium may be loaded and executed by a processor to perform 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 the block chain;
when detecting that a newly added block exists in the block chain, updating a central database of the tax management system according to tax data in the newly added block, wherein a plurality of tax data are stored in the central database;
and when a data reading request sent by a terminal is received, sending an access granting instruction to the terminal, wherein the access granting 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 number of blocks in the detection block chain includes:
comparing a first height of the block chain with a second height of the central database, wherein the first height is the largest block height in the block heights corresponding to the blocks of the block chain during the detection, and the second height is the largest block height in the block heights corresponding to the blocks of the block chain during the last update of the central database;
and when the first height is not consistent with the second height, confirming that the block chain has a newly added block.
In some embodiments, the updating the central database of the tax management system according to the tax data in the newly added block when the newly added block is detected in the block chain includes:
and when detecting that a newly added block exists in the block chain, synchronizing the tax data stored in the block with the block height larger than the second height in the block chain into a central database of the tax management system.
In some embodiments, each piece of tax data includes data characteristic information;
before sending the grant access instruction to the terminal, one or more first instructions in a computer storage medium are loaded by a processor and perform the following steps:
according to the updated data characteristic information of each tax data in the central database, carrying out classified statistics on a plurality of tax data in the central database;
the access granting instruction is used for indicating the terminal to access the plurality of tax data after the classified statistics, so that the terminal updates the tax data chart of the target page according to the plurality of tax data after the classified statistics.
In certain embodiments, the data characteristic information includes regional information and data source organization information; the classified statistics of 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 target tax data according to the regional information to obtain first statistic data; and performing regional classified statistics on the one or more pieces of target tax data according to the information of the data source mechanism to obtain second statistical data.
In some embodiments, the number of blocks in the detection block chain includes:
and detecting the number of blocks in the block chain by using a first process according to a first preset time interval, wherein the first process is independent from a second process, and the second process is a system process of the tax management system.
In certain 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, the implementation may be wholly or partially realized 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, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, 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 wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., compact disk), or a semiconductor medium (e.g., solid state disk), among others. In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is merely a logical division, and the actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted or not executed. In addition, the indirect coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, and may be electrical or in other forms.
The units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage media may include, for example: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It is understood that all products controlled or configured to perform the tax data processing method described in the present application, such as the above tax data processing apparatus, server and storage medium, belong to the category of the related products described in the present application.

Claims (10)

1. A tax data processing method is characterized by comprising the following steps:
detecting the number of blocks in the block chain;
when detecting that a newly added block exists in the block chain, updating a central database of the tax management system according to tax data in the newly added block, wherein a plurality of tax data are stored in the central database;
and when a data reading request sent by a terminal is received, sending an access granting instruction to the terminal, wherein the access granting 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.
2. The tax data processing method according to claim 1, wherein the detecting the number of blocks in the block chain comprises:
comparing a first height of the block chain with a second height of the central database, wherein the first height is the largest block height in the block heights corresponding to the blocks of the block chain during the detection, and the second height is the largest block height in the block heights corresponding to the blocks of the block chain during the last update of the central database;
and when the first height is not consistent with the second height, confirming that the block chain has a newly added block.
3. The method of claim 2, wherein updating the core database of the tax administration system according to the tax data in the newly added block when the newly added block is detected in the block chain comprises:
and when detecting that a newly added block exists in the block chain, synchronizing the tax data stored in the block with the block height larger than the second height in the block chain into a central database of the tax management system.
4. A tax data processing method according to any one of claims 1 to 3, wherein each piece of tax data includes data characteristic information;
before the sending the access grant instruction to the terminal, the tax data processing method further includes:
according to the updated data characteristic information of each tax data in the central database, carrying out classified statistics on a plurality of tax data in the central database;
the access granting instruction is used for indicating the terminal to access the plurality of tax data after the classified statistics, so that the terminal updates the tax data chart of the target page according to the plurality of tax data after the classified statistics.
5. A tax data processing method according to claim 4, wherein the data characteristic information comprises regional information and data source agency information; the step of carrying out classification statistics on a plurality of tax data of the central database according to the data characteristic information of each tax data in the updated central database comprises the following steps:
performing regional classification statistics on the target tax data according to regional information to obtain first statistic data; and carrying out regional classified statistics on the plurality of pieces of target tax data according to the information of the data source mechanism to obtain second statistical data.
6. The tax data processing method according to claim 1, wherein the detecting the number of blocks in the block chain comprises:
and detecting the number of blocks in the block chain by using a first process according to a first preset time interval, wherein the first process is independent from a second process, and the second process is a system process of the tax management system.
7. The tax data processing method according to claim 6, wherein the tax data processing method further comprises:
detecting whether the first process is abnormal;
and restarting the first process when the first process is abnormal.
8. A tax data processing apparatus, comprising:
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 is detected in the block chain, wherein a plurality of tax data are stored in the central database;
and the data processing module is used for sending an access granting instruction to the terminal when receiving a data reading request sent by the terminal, wherein the access granting 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.
9. A server comprising a processor, a memory, and one or more programs stored in the memory and configured for execution by the processor, the programs including instructions for performing the steps in the tax data processing method according to any of claims 1-7.
10. A computer storage medium having one or more first instructions stored thereon, the one or more first instructions adapted to be loaded by a processor and to perform the tax data processing method according to any of claims 1-7.
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 true CN110599321A (en) 2019-12-20
CN110599321B 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)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326165A (en) * 2021-08-04 2021-08-31 腾讯科技(深圳)有限公司 Data processing method and device based on block chain and computer readable storage medium
CN114500588A (en) * 2021-12-15 2022-05-13 杭州宇链科技有限公司 Method and system for verifying cloud data by Internet of things terminal based on block chain
US12100025B2 (en) 2019-12-11 2024-09-24 Data Vault Holdings, Inc. Platform for management of user data
US12198201B2 (en) 2019-12-11 2025-01-14 Data Vault Holdings, Inc. Platform and method for preparing a tax return

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 data processing method and device based on a blockchain 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 data processing method and device based on a blockchain system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12100025B2 (en) 2019-12-11 2024-09-24 Data Vault Holdings, Inc. Platform for management of user data
US12198201B2 (en) 2019-12-11 2025-01-14 Data Vault Holdings, Inc. Platform and method for preparing a tax return
CN113326165A (en) * 2021-08-04 2021-08-31 腾讯科技(深圳)有限公司 Data processing method and device based on block chain and computer readable storage medium
CN113326165B (en) * 2021-08-04 2021-11-16 腾讯科技(深圳)有限公司 Data processing method and device based on block chain and computer readable storage medium
CN114500588A (en) * 2021-12-15 2022-05-13 杭州宇链科技有限公司 Method and system for verifying cloud data by Internet of things terminal based on block chain
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

Also Published As

Publication number Publication date
CN110599321B (en) 2023-09-29

Similar Documents

Publication Publication Date Title
US11659098B2 (en) Information reminding method and apparatus, and electronic terminal
US10708289B2 (en) Secured event monitoring leveraging blockchain
CN110599321A (en) Tax data processing method, device, server and storage medium
CN113220715B (en) Data processing method, system, computer and readable storage medium
CN111597388B (en) Sample collection method, device, equipment and medium based on distributed system
CN110826799B (en) Service prediction method, device, server and readable storage medium
CN112929720A (en) Screen projection method and device, electronic equipment and readable storage medium
CN110933152B (en) Preheating method, device and system and electronic equipment
CN115001967B (en) Data acquisition method and device, electronic equipment and storage medium
US8745101B2 (en) Terminal and method for identifying contents
CN112135199B (en) Video playing method based on multiple types of video sources and related equipment
WO2023065900A1 (en) Device state message processing method and message distribution system
US20230063599A1 (en) Edge computing network, data transmission method and apparatus, device and storage medium
US9813927B2 (en) Mobile terminal flow identification method and apparatus
CN110392104B (en) Data synchronization method, system, server and storage medium
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
CN107783852B (en) Dump file generation method and terminal
CN111327666A (en) Service management method, device and system, computer equipment and storage medium
CN112256654A (en) Document sharing method and device
CN118921509B (en) Short video playing recommendation method and device based on big data
CN116032751A (en) Resource synchronization method, device, electronic equipment and storage medium
CN117251868A (en) Construction engineering cost information management method and device
CN117370396A (en) Asset processing method, device, equipment, medium and product based on block chain
CN113438310A (en) IP current limiting method, device, system, computer equipment and storage medium

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