A distributed tax data processing method and system
By setting up multiple nodes in the tax data processing system and scattering tax data, and determining communication rules and data processing rules, the problem that traditional centralized systems are difficult to realize real-time data analysis and processing is solved, and efficient tax data processing and analysis is achieved.
Patent Information
- Application Number
- CN202410661573.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-05-27
AI Technical Summary
When the amount of tax data increases, it is difficult for traditional centralized tax data processing systems to realize real-time data analysis and processing, and cannot respond to changes and needs of tax data in a timely manner.
Using a distributed tax data processing method, by setting up multiple nodes in the tax data processing system, each node has independent data storage and processing capabilities, scattering tax data on different nodes, determining the communication rules used by each node, and determining the data processing rules and control rules based on these rules, so as to achieve efficient processing and analysis of large-scale tax data.
It realizes efficient processing and analysis of large-scale tax data, improves data processing efficiency and system performance, and can respond to changes and needs of tax data in a timely manner to ensure data security and consistency.
Smart Images

Figure CN118606403B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a distributed tax data processing method and system. Background Art
[0002] The tax service hall of the local tax bureau receives a large number of tax-paying enterprises, individuals, etc. every day, which generates a large amount of business data. These business data can be summarized into historical business volume data. The format of historical business volume data is: city code, tax service hall code, date, channel code, tax-related matter code, and business quantity. By analyzing these business data, we can understand the tax business characteristics of the tax service hall in a region.
[0003] The traditional centralized tax data processing system has the problem of centralized data storage. Once the system fails or is attacked, it may lead to the risk of data leakage or damage. Large-scale tax data processing usually requires massive computing resources and storage space. The traditional single-machine processing method often cannot meet the processing requirements, resulting in low data processing efficiency. The scalability of traditional centralized systems is limited. Once the amount of data increases or the number of users increases, it is difficult for the system to make effective expansion, resulting in a decline in system performance. In addition, traditional systems often cannot achieve real-time data analysis and processing, and cannot respond to changes and needs in tax data in a timely manner. Summary of the invention
[0004] The embodiments of the present invention provide a distributed tax data processing method and system, which can at least solve the technical problem in the prior art that when the amount of tax data increases, the system is difficult to achieve real-time data analysis and processing and cannot respond to changes and demands of tax data in a timely manner.
[0005] A first aspect of an embodiment of the present invention provides a distributed tax data processing method, including:
[0006] Setting up multiple nodes in the tax data processing system, wherein each node has independent data storage and processing capabilities;
[0007] The tax data is stored in different nodes to achieve distributed storage of data;
[0008] Determine the communication rules used by each node;
[0009] Determine data processing rules and control rules based on the communication rules used by each node;
[0010] Each node is optimized based on the data processing rules and control rules to perform data analysis on large-scale tax data.
[0011] Optionally, the step of determining the data processing rules and the control rules based on the communication rules used by each node includes:
[0012] Determine data processing rules based on the communication rules used by each node;
[0013] The control rules are determined based on the communication rules used by each node.
[0014] Optionally, the step of determining the data processing rule based on the communication rule used by each node includes:
[0015] If the node uses the first encryption communication rule, then obtaining the tax data corresponding to the first encryption communication rule and encrypting the encrypted data;
[0016] determining a first data processing rule based on the tax data corresponding to the first encrypted communication rule and the encrypted data;
[0017] If the node uses the second encryption communication rule, then obtaining the tax data corresponding to the second encryption communication rule and encrypting the encrypted data;
[0018] determining a second data processing rule based on the tax data corresponding to the first encrypted communication rule and the encrypted data;
[0019] A data processing rule is generated according to the first data processing rule and the second data processing rule.
[0020] Optionally, the data processing rule includes a first encrypted communication rule and a second encrypted communication rule, and the step of optimizing each node based on the data processing rule and the control rule includes:
[0021] Assuming that the tax data is D and the encrypted data is D_{encrypted}, the encryption process of the first encryption communication rule can be expressed by the following formula:
[0022] D_{encrypted}=\text{AES_encrypt}(D,\text{key});
[0023] Among them, \text{AES_encrypt} represents the AES encryption algorithm, and key is the generated key;
[0024] Parsing the second encryption communication rule, and determining that the second encryption communication rule includes an initialization vector encryption mode;
[0025] The communication rule of each node is encrypted and optimized based on the first encryption communication rule and the second encryption communication rule.
[0026] Optionally, the step of encrypting and optimizing the communication rule of each node based on the first encryption communication rule and the second encryption communication rule includes:
[0027] The tax data on the node is encrypted based on the AES encryption algorithm, key and initialization vector encryption mode. The expression is as follows:
[0028] D_{encrypted}=\text{AES_encrypt}(D,\text{key},\text{IV});
[0029] Wherein, \text{AES_encrypt} represents the AES encryption algorithm, key is the generated key, IV is the generated initialization vector, and the expression of the initialization vector IV is as follows;
[0030] D_{encrypted}=\text{AES_C_encrypt}(D,\text{key},\text{IV});
[0031] AES_C_encrypt refers to encryption using the AES algorithm in C mode, where C mode includes several encryption modes.
[0032] Optionally, the C mode includes a CBC and CTR hybrid encryption mode, and the expression of the step of encrypting the tax data on the node based on the AES encryption algorithm and key and initialization vector encryption mode is as follows:
[0033] C_i=\text{AES_encrypt}\left((P_i\oplus C_{i-1})\oplus\text{AES_encrypt}(IV_{CTR}+i,\text{key}),\text{key}\right)
[0034] Where Ci is the i-th ciphertext block, Pi is the i-th plaintext block, and Ci-1 is the previous ciphertext block IV of the i-th ciphertext block. CTR is the initialization vector of CTR mode, i is the counter value\text{AES_encrypt} is the AES encryption algorithm.
[0035] Optionally, it also includes:
[0036] When tax data changes, the tax data will be automatically updated to all nodes to ensure the consistency and accuracy of the data stored in each node;
[0037] When the data changes, assuming that N nodes need to perform data synchronization update, the data change amount is Δdata, the synchronization update data amount is Δsync_data, and the synchronization update time is Tsync, then the data synchronization update formula is:
[0038] Δsync_data=Δdata / N Tsync=Tprocessing+Ttransmission;
[0039] Among them, Tprocessing is the data processing time, and Ttransmission is the data transmission time;
[0040] When using incremental update of tax data, assuming that the data version is V, the amount of new data is Δnew_data, the amount of old data is Δold_data, and the amount of incremental update data is Δincrement_data, then the incremental update formula is: Δincrement_data=Δnew_data-Δold_dataV=V+1.
[0041] In a second aspect, an embodiment of the present invention provides a distributed tax data processing system, including:
[0042] A setting module, used to set up multiple nodes in the tax data processing system, wherein each node has independent data storage and processing capabilities;
[0043] The division module is used to store tax data in different nodes to achieve distributed storage of data;
[0044] A determination module, used to determine the communication rules used by each node;
[0045] A use module for determining data processing rules and control rules based on the communication rules used by each node;
[0046] The optimization module is used to optimize each node based on the data processing rules and control rules to perform data analysis on large-scale tax data.
[0047] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the distributed tax data processing as described in any one of the first aspects.
[0048] In a fourth aspect, an embodiment of the present invention further provides a readable storage medium, wherein the readable storage medium stores a computer program, wherein the computer program includes a program code for controlling a process to execute a process, wherein the process includes any of the distributed tax data processing methods described in the first aspect.
[0049] The embodiment of the present invention sets multiple nodes in a tax data processing system, wherein each node has independent data storage and processing capabilities; stores tax data in different nodes in a dispersed manner to achieve distributed storage of data; determines the communication rules used by each node; determines data processing rules and control rules based on the communication rules used by each node; optimizes each node based on the data processing rules and control rules to perform data analysis on large-scale tax data to efficiently process and analyze large-scale tax data. By adopting a distributed tax data processing method and system, the distributed system can disperse and store data on multiple nodes, realize parallel processing of data, and improve data processing efficiency.
[0050] The beneficial effects of the embodiments of the present invention can refer to the technical effects corresponding to the technical features in the specific implementation methods, which will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A schematic diagram of a distributed tax data processing flow provided by an embodiment of the present invention;
[0052] Figure 2 A schematic diagram of the process of step S4 provided in an embodiment of the present invention;
[0053] Figure 3 A schematic diagram of the process of step S41 provided in an embodiment of the present invention;
[0054] Figure 4 A schematic diagram of a distributed tax data processing system module provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0056] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0057] First, an embodiment of the present invention provides a distributed tax data processing method, such as Figure 1 As shown, including:
[0058] Step S1, setting a plurality of nodes in the tax data processing system, wherein each node has independent data storage and processing capabilities;
[0059] In the embodiment of the present invention, this step is to create multiple nodes in a distributed system, each node having independent data storage and processing capabilities, so as to realize distributed storage and processing of the system.
[0060] Step S2, distributing and storing the tax data on different nodes to achieve distributed storage of data;
[0061] In the embodiment of the present invention, this step stores the tax data in different nodes in a dispersed manner to realize the distributed storage and management of data, which can reduce the pressure of data storage and improve the reliability and security of data.
[0062] Step S3, determining the communication rules used by each node;
[0063] In the embodiment of the present invention, this step is to determine the communication rules between the nodes to ensure the normal data exchange and communication between the nodes. The communication rules can generally be understood as communication protocols and data conversion rules.
[0064] Step S4, determining data processing rules and control rules based on the communication rules used by each node;
[0065] In the embodiment of the present invention, this step is to determine the data processing and control rules based on the characteristics of the communication rules between the nodes to ensure the stability of the system and the security of the data.
[0066] Step S5, optimizing each node based on the data processing rules and control rules to perform data analysis on large-scale tax data.
[0067] In the embodiment of the present invention, this step is to optimize each node based on the data processing rules and control rules determined in the previous steps to perform data analysis and processing on large-scale tax data. Specific embodiment:
[0069] Suppose there is a tax company that needs to process a large amount of tax data. In order to improve the performance and throughput of the system, a distributed tax data processing system is designed. The system includes multiple nodes, each of which has independent data storage and processing capabilities. First, the tax data is stored in different nodes to achieve distributed storage of data. Then, the communication rules between the nodes are determined to ensure the normal data exchange and communication between the nodes. Next, according to the communication rules used by each node, the data processing rules and control rules are determined to ensure the stability of the system and the security of the data. Finally, each node is optimized based on the data processing rules and control rules to perform data analysis and processing on large-scale tax data.
[0070] Technical effects:
[0071] The distributed tax data processing method can effectively reduce the pressure of data storage and improve the reliability and security of data. At the same time, the data processing rules and control rules are determined based on the communication rules used by each node, which can ensure the stability of the system and the security of data. Finally, by optimizing each node based on the data processing rules and control rules, large-scale tax data can be analyzed and processed, improving the performance and throughput of the system.
[0072] In practical applications, since tax data involves a large amount of sensitive information, attention should be paid to privacy protection and data security. In addition to conventional encryption technology, a solution based on homomorphic encryption can be introduced to realize the calculation and analysis of data in an encrypted state, so as to achieve effective data processing while protecting privacy. Therefore, the tax data with different communication rules on each node may have different encryption protocols. Based on this, the embodiment of the present invention needs to uniformly arrange the communication rules on all nodes to ensure that there will be no data errors in the subsequent retrieval of tax data. Compared with traditional distributed nodes, the method of simply calling the communication rule format corresponding to the tax data to parse the data can provide a faster processing method for subsequent repeated calls and replication of large-scale data. Based on this, the embodiment of the present invention provides step S4 to further refine how to determine the data processing rules and control rules based on the communication rules. It is specifically divided into two steps S41 and S42. Figure 2 As shown:
[0073] Step S41, determining a data processing rule based on the communication rule used by each node;
[0074] In this step, the system determines the data processing rules based on the communication rules used by each node. The communication rules may affect the way, speed, and security of data transmission, so different processing strategies need to be adopted according to different protocols when processing data. This may include data encryption, compression, segmentation and other processing methods to ensure the integrity and security of the data.
[0075] Step S42, determining a control rule based on the communication rule used by each node;
[0076] In this step, the system determines the control rules based on the communication rules used by each node to ensure the stability and security of the system. This may involve controlling the frequency of communication between nodes, the number of concurrent connections, error handling mechanisms, etc. By determining these rules, the system can better manage the communication between nodes, prevent data loss, error transmission and other problems, and ensure the normal operation of the system.
[0077] Furthermore, the control rule in step S42 may be different according to different communication rules. The following is a specific example:
[0078] Assume that in a distributed tax data processing system, nodes communicate using TCP / IP protocol. Based on the TCP / IP protocol, the following control rules can be determined:
[0079] Connection limit: Since the TCP / IP protocol can only transmit a certain amount of data each time, in order to ensure the stability of the system, it is necessary to limit the number of concurrent connections. You can set an upper limit for the number of connections. When this limit is exceeded, the system will reject new connection requests.
[0080] Timeout processing: During data transmission, network delays or node failures may occur, resulting in connection timeouts. In order to avoid errors caused by connection timeouts, the system needs to set up a timeout processing mechanism. When the connection does not respond for a certain period of time, the system will automatically close the connection or re-initiate a connection request.
[0081] Error handling: During data transmission, data loss, corruption, duplication, and other problems may occur. In order to prevent these problems from affecting the system, it is necessary to set up error handling mechanisms, such as retransmission mechanisms, checksum verification, etc., to ensure the integrity and accuracy of the data.
[0082] Load balancing: In order to improve the performance and throughput of the system, a load balancing mechanism can be used to evenly distribute requests to different nodes for processing, thus avoiding system bottlenecks caused by excessive load on a certain node.
[0083] Through the above control rules, the stability and security of the system can be guaranteed, the reliability and security of data can be improved, and the performance and throughput of the system can be improved, and the efficiency and availability of the system can be improved.
[0084] Further, with respect to step S41, the embodiment of the present invention also provides a specific implementation example. Figure 3 As shown:
[0085] Step S411, if the node uses the first encryption communication rule, then obtain the tax data corresponding to the first encryption communication rule and encrypt the encrypted data;
[0086] Step S412, determining a first data processing rule based on the tax data corresponding to the first encryption communication rule and the encrypted data;
[0087] Step S413, if the node uses the second encryption communication rule, then obtaining the tax data corresponding to the second encryption communication rule and encrypting the encrypted data;
[0088] Step S414, determining a second data processing rule based on the tax data corresponding to the first encryption communication rule and the encrypted data;
[0089] Step S415: Generate a data processing rule according to the first data processing rule and the second data processing rule.
[0090] Each of the above steps is to determine the data processing rules according to the communication rules used by each node, among which, step S411: when the node uses the first encryption communication rule, the system will obtain the tax data corresponding to the protocol and encrypt it to obtain the encrypted data. This step ensures the security and confidentiality of the data during transmission.
[0091] Step S412: Based on the tax data and the encrypted data corresponding to the first encryption communication rule, the system determines a first data processing rule, which may involve decrypting and decompressing the encrypted data so that the system can correctly process and analyze the data.
[0092] Step S413: If the node uses the second encrypted communication rule, the system will obtain the tax data corresponding to the protocol and encrypt it to obtain encrypted data. This step is similar to S411, but is for different communication rules.
[0093] Step S414: Based on the tax data and the encrypted data corresponding to the second encryption communication rule, the system determines the second data processing rule. Similarly, this step may require decryption, decompression, etc. of the encrypted data to meet the system's data requirements.
[0094] Step S415: Finally, according to the first data processing rule and the second data processing rule, the system generates the final data processing rule. These rules may include operations such as data format conversion, data cleaning, and data merging to ensure that the system can effectively process and utilize tax data.
[0095] Through these steps, the system can flexibly determine data processing rules according to different communication rules, thereby adapting to various data transmission needs and security requirements.
[0096] Furthermore, the data processing rules include a first encrypted communication rule and a second encrypted communication rule, and the step of optimizing each node based on the data processing rules and the control rules includes:
[0097] Assuming that the tax data is D and the encrypted data is D_{encrypted}, the encryption process of the first encryption communication rule can be expressed by the following formula:
[0098] D_{encrypted}=\text{AES_encrypt}(D,\text{key});
[0099] Among them, \text{AES_encrypt} represents the AES encryption algorithm, and key is the generated key.
[0100] In actual application, when processing tax data in a node:
[0101] First, you need to select an encryption algorithm: select a suitable symmetric encryption algorithm, such as AES. AES is a popular symmetric encryption algorithm with high security and efficiency, and is widely used in the field of data encryption;
[0102] Then generate the key: before data transmission, generate a random key. For the AES algorithm, the key length can be 128 bits, 192 bits, or 256 bits. Select the appropriate key length based on security requirements;
[0103] Secondly, encrypt the data: Use the generated key to encrypt the tax data. Assuming the tax data is D, the encrypted data is D_{encrypted}, the encryption process can be expressed by the following formula:
[0104] D_{encrypted}=\text{AES_encrypt}(D,\text{key});
[0105] Among them, \text{AES_encrypt} represents the AES encryption algorithm, and key is the generated key;
[0106] Transmit encrypted data: Transmit the encrypted data D_{encrypted} through the selected communication rules. Since the data has been encrypted, even if it is intercepted during transmission, the original plaintext data cannot be obtained, ensuring the security of the data;
[0107] Finally, the receiving end decrypts: At the receiving end, the same key is used to decrypt the received encrypted data and restore the original tax data. The decryption process can be expressed by the following formula:
[0108] D=\text{AES_decrypt}(D_{encrypted},\text{key});
[0109] Among them, \text{AES_decrypt} represents the AES decryption algorithm, and key is the key generated previously.
[0110] Through the above steps, the security of tax data during transmission can be ensured. Only authorized recipients can correctly decrypt the data, thus protecting the confidentiality and integrity of the data.
[0111] However, different tax data on different nodes also means different communication rules. Therefore, the embodiment of the present invention proposes to unify the communication rules of each node before processing the tax data allocated on the node. At the same time, the security of tax data processing on the node can be increased. Based on this, the second encrypted communication rule can be further parsed to determine that the second encrypted communication rule includes an initialization vector encryption mode.
[0112] Encryption optimization is performed on the communication rules of each node based on the first encryption communication rule and the second encryption communication rule;
[0113] In order to enhance the complexity and security of the encryption process, a more complex encryption scheme can be used, such as adding an initialization vector (IV) and using a password mode. The following is the improved encryption process:
[0114] Select encryption algorithm and cipher mode: Select a suitable symmetric encryption algorithm and cipher mode. Generate key and initialization vector: During the encryption process, not only do you need to generate a key, you also need to generate a random initialization vector (IV). The generation of both the key and IV should be random and unpredictable.
[0115] Encrypt data: Encrypt the tax data using the generated key and IV. The encryption process can be expressed by the following formula:
[0116] D_{encrypted}=\text{AES_encrypt}(D,\text{key},\text{IV});
[0117] Wherein, \text{AES_encrypt} represents the AES encryption algorithm, keykey is the generated key, and IVIV is the generated initialization vector.
[0118] Transmit encrypted data: The encrypted data D_{encrypted} is transmitted through the selected communication rules. Due to the use of initialization vectors and encryption modes, even if the same plaintext is encrypted multiple times, different ciphertexts will be generated, increasing the difficulty of cracking.
[0119] Decryption at the receiving end: At the receiving end, the received encrypted data is decrypted using the same key and IV to restore the original tax data. The decryption process can be expressed by the following formula:
[0120] D=\text{AES_decrypt}(D_{encrypted},\text{key},\text{IV});
[0121] Where, \text{AES_decrypt} represents the AES decryption algorithm, key is the previously generated key, and IV is the same initialization vector.
[0122] Through the above improvements, the encryption process is more secure and the confidentiality and integrity of data are improved.
[0123] Furthermore, IV is the generated initialization vector, and the expression of the initialization vector IV is as follows;
[0124] D_{encrypted}=\text{AES_C_encrypt}(D,\text{key},\text{IV});
[0125] AES_C_encrypt refers to encryption using the AES algorithm in C mode, where C mode includes several encryption modes.
[0126] The C mode includes CBC and CTR mixed encryption modes. The expression of the steps of encrypting the tax data on the node based on the AES encryption algorithm, key and initialization vector encryption mode is as follows:
[0127] C_i=\text{AES_encrypt}\left((P_i\oplusC_{i-1})\oplus\text{AES_encrypt}(IV_{CTR}+i,\text{key}),\text{key}\right);
[0128] Where Ci is the i-th ciphertext block, Pi is the i-th plaintext block, Ci-1 is the previous ciphertext block of the i-th ciphertext block, IVCTR is the initialization vector of the CTR mode, and i is the counter value\text{AES_encrypt} is the AES encryption algorithm.
[0129] In the embodiment of the present invention, the length of IV is usually the same as the block size of the encryption algorithm. For the AES algorithm, the block size is 128 bits (16 bytes). IV can be generated by a random function provided by the encryption library to ensure its randomness and uniqueness. For example, in one possible case, the expression of the initialization vector IV is as follows:
[0130] \text{IV}=\text{generate_random_bytes}(16)
[0131] Where generate_random_bytes(16) means generating 16 bytes of random data. When using CBC or CTR mode, the encryption process will include IV as a parameter. Taking CBC mode as an example, the encryption formula can be expressed as:
[0132] D_{encrypted}=\text{AES_CBC_encrypt}(D,\text{key},\text{IV});
[0133] Among them, CBC (CipherBlock Chaining) and CTR (Counter) modes are two commonly used working modes in symmetric encryption algorithms, which are used to encrypt data. They can be used in combination with block encryption algorithms such as AES.
[0134] CBC mode (CipherBlock Chaining): In CBC mode, each plaintext block is XORed with the previous ciphertext block before encryption. The purpose of this is to make each ciphertext block dependent on the previous ciphertext block, thereby introducing forward dependency in the ciphertext and increasing security. CBC mode requires an initialization vector (IV) as the starting value.
[0135] Encryption process:
[0136] The first plaintext block is XORed with the IV and then encrypted.
[0137] The first ciphertext block is XORed with the second plaintext block and then encrypted.
[0138] And so on, until all plaintext blocks have been processed.
[0139] The decryption process is similar to the encryption process, except that the encryption operation is replaced by the decryption operation and the ciphertext block is XORed with the previous ciphertext block.
[0140] Specific encryption formula:
[0141] C_i=\text{AES_encrypt}(P_i\oplus C_{i-1},\text{key})
[0142] Where Ci is the i-th ciphertext block, Pi is the i-th plaintext block, Ci-1 is the previous ciphertext block of the i-th ciphertext block (for the first block, IV is used), and \text{AES_encrypt} is the AES encryption algorithm.
[0143] CTR mode (Counter): CTR mode uses an increasing counter and a random number (or IV) to generate an encryption stream. This encryption stream is XORed with the plaintext to obtain the ciphertext. The advantage of CTR mode is that it can support parallel encryption and decryption because the encryption stream can be generated in advance.
[0144] Encryption process:
[0145] Each counter value (or IV) is encrypted, resulting in an encrypted "pseudo-random stream".
[0146] Perform XOR operation on the plaintext and the encrypted "pseudo-random stream" to obtain the ciphertext.
[0147] Specific encryption formula:
[0148] C_i=P_i\oplus\text{AES_encrypt}(\text{IV}+i,\text{key})
[0149] Where Ci is the i-th ciphertext block, Pi is the i-th plaintext block, IV is the initialization vector, i is the counter value, and \text{AES_encrypt} is the AES encryption algorithm.
[0150] However, both CBC and CTR modes are commonly used symmetric encryption algorithms, and they each have their own shortcomings:
[0151] Disadvantages of CBC mode:
[0152] For short data blocks, the security of CBC mode will be reduced and it will be vulnerable to attacks.
[0153] Encryption and decryption need to be performed serially and cannot be processed in parallel, which results in low efficiency.
[0154] During the encryption process, the encryption of each block depends on the ciphertext of the previous block. Therefore, if there is an error in the ciphertext of the previous block, it will affect the encryption and decryption of subsequent blocks.
[0155] Disadvantages of CTR mode:
[0156] The counter used in CTR mode must be unique; otherwise, the ciphertext will be repeated, thus reducing security.
[0157] If the counter used in the encryption process is hijacked or tampered with, the entire encryption process will be compromised.
[0158] Combining the CBC and CTR modes can overcome their respective shortcomings. Furthermore, the embodiment of the present invention provides the expression after fusion:
[0159] C_i=\text{AES_encrypt}\left((P_i\oplus C_{i-1})\oplus\text{AES_encrypt}(IV_{CTR}+i,\text{key}),\text{key}\right)
[0160] Where Ci is the i-th ciphertext block, Pi is the i-th plaintext block, and Ci-1 is the previous ciphertext block IV of the i-th ciphertext block. CTR is the initialization vector of CTR mode, i is the counter value\text{AES_encrypt} is the AES encryption algorithm.
[0161] In the embodiment of the present invention, the CBC mode uses the ciphertext of the previous block as the XOR input of the current block, while the CTR mode uses the encryption result of the counter and the key as the XOR input. Combining them can improve efficiency while maintaining security, and also avoid the security problem of the CBC mode on short data blocks.
[0162] In the fused encryption scheme, the encryption of each block no longer depends on the ciphertext of the previous block, but on the encryption result of the counter and key. This method avoids the impact of the previous block ciphertext error on the subsequent block encryption in CBC mode, and also avoids the problem of counter tampering in CTR mode.
[0163] For tax data processing, the encryption scheme that combines CBC and CTR modes can effectively protect data security and avoid the risk of data leakage and tampering. At the same time, since the fusion scheme can improve encryption efficiency, it can also improve the speed and efficiency of data processing, making tax data processing faster and more accurate.
[0164] In addition, in another embodiment provided by the present invention, the steps of implementing the real-time synchronization and update mechanism of data include:
[0165] When data changes, it will automatically synchronize and update the data to all nodes to ensure the consistency and accuracy of the data stored in each node;
[0166] Incremental update and data version control technology are used to achieve real-time update and management of data to ensure the system's ability to process and analyze the latest data.
[0167] Specific implementation: First, when data changes, the system automatically detects the data update and synchronizes the updated data to all nodes. Through the real-time synchronization mechanism, the data stored in each node is ensured to maintain consistency and accuracy, avoiding data inconsistency and erroneous analysis.
[0168] Secondly, incremental updates and data version control technologies are used to update and manage data in real time. When data changes, the system only transmits the changed data instead of all the data, so as to reduce data transmission costs and improve update efficiency. At the same time, data version control technology is used to record the update history and changes of data, so as to ensure the system's ability to process and analyze the latest data and reflect data changes in a timely manner.
[0169] Furthermore, when the data changes, the data is automatically synchronized and updated to all nodes to ensure the consistency and accuracy of the data stored in each node. When the data changes, assuming that N nodes need to perform data synchronization updates, the data change amount is Δdata, the synchronization update data amount is Δsync_data, and the synchronization update time is Tsync, then the data synchronization update formula is: Δsync_data = Δdata / N Tsync = Tprocessing + Ttransmission, where Tprocessing is the data processing time and Ttransmission is the data transmission time;
[0170] Incremental update and data version control technology are used to achieve real-time update and management of data to ensure the system's ability to process and analyze the latest data. The incremental update and data version control formula is: assuming that the data version is V, the amount of new data is Δnew_data, the amount of old data is Δold_data, and the amount of incremental update data is Δincrement_data, then the incremental update formula is: Δincrement_data=Δnew_data-Δold_dataV=V+1.
[0171] In a distributed tax data processing system, assume that there are three nodes (A, B, and C) storing tax data. When the data of a node (for example, node A) changes, the data needs to be synchronously updated to other nodes B and C to maintain data consistency and accuracy.
[0172] Design reason:
[0173] In a distributed system, data synchronization and update is one of the important measures to ensure data consistency. When data changes on one node, it is necessary to synchronize the changed data to other nodes in a timely manner to avoid data inconsistency and errors. Using data synchronization and incremental update methods can effectively reduce data transmission volume and update time, and improve system efficiency and stability.
[0174] Specific implementation steps:
[0175] When the data of node A changes, the data change amount Δdata is calculated;
[0176] Distribute Δdata evenly to other nodes according to the number of nodes N (here 3), and calculate the amount of synchronous update data Δsync_data = Δdata / N;
[0177] At the same time, record the synchronization update time Tsync=Tprocessing+Ttransmission, where Tprocessing is the data processing time and Ttransmission is the data transmission time;
[0178] Node A sends the updated data to nodes B and C to synchronize the data.
[0179] After receiving the data, Node B and Node C process and update the data to maintain the consistency and accuracy of the data.
[0180] Through the above implementation steps, automatic synchronous update and incremental update of data can be achieved to ensure the consistency and accuracy of data stored in each node. The design is to improve the data processing efficiency and reliability of the system, reduce the amount of data transmission and update time, and ensure the system's ability to process and analyze the latest data. This design can effectively cope with distributed environments with frequent data changes and a large number of nodes, and improve the stability and performance of the system.
[0181] Therefore, the distributed tax data processing method and system for realizing the real-time synchronization and update mechanism of data described in the embodiments of the present invention can ensure the consistency and accuracy of data through automatic synchronization update and incremental update technology, improve the system's processing and analysis capabilities of the latest data, and meet the needs of real-time data update and management.
[0182] Implement data security encryption and access control mechanisms, including:
[0183] Encrypted storage and transmission of tax data to ensure the security and privacy of data during storage and transmission;
[0184] Establish access control policies and permission management mechanisms to authenticate and authorize user and application access to protect data from unauthorized access and tampering;
[0185] Implement data auditing and monitoring functions, record and track data access and operations, so as to timely discover and respond to security vulnerabilities and risks.
[0186] Specific implementation: First, the tax data is encrypted for storage and transmission, and the data is encrypted using an encryption algorithm to ensure the security and privacy of the data during storage and transmission. Only authorized users can decrypt the data to protect the confidentiality and integrity of the data.
[0187] Secondly, establish access control policies and permission management mechanisms to authenticate and authorize access to users and applications. Through identity authentication and permission control, ensure that only legitimate users can access data to avoid unauthorized access and tampering. At the same time, set different permissions for different users to limit their scope of operation and permissions on data, and protect the security and integrity of data.
[0188] Finally, data auditing and monitoring functions are implemented to record and track data access and operations. User access records, operation records, and system events are recorded to promptly detect abnormal operations and security vulnerabilities, and timely measures are taken to deal with risks to ensure data security and reliability.
[0189] A distributed tax data processing system, comprising:
[0190] Setting module 01, used to set up multiple nodes in the tax data processing system, wherein each node has independent data storage and processing capabilities;
[0191] Division module 02 is used to disperse and store tax data on different nodes to achieve distributed storage of data;
[0192] Determination module 03, used to determine the communication rules used by each node;
[0193] Using module 04, for determining data processing rules and control rules based on the communication rules used by each node;
[0194] The optimization module 05 is used to optimize each node based on the data processing rules and control rules to perform data analysis on large-scale tax data.
[0195] An embodiment of the present invention further provides an electronic device, including:
[0196] processor;
[0197] a memory for storing processor-executable instructions;
[0198] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0199] According to a fourth aspect of the embodiments of the present invention,
[0200] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0201] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0202] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A distributed tax data processing method, characterized in that: include: Setting up multiple nodes in the tax data processing system, wherein each node has independent data storage and processing capabilities; The tax data is stored in different nodes to achieve distributed storage of data; Determine the communication rules used by each node; Determine data processing rules and control rules based on the communication rules used by each node; Optimizing each node based on the data processing rules and control rules to perform data analysis on large-scale tax data; The step of determining data processing rules and control rules based on the communication rules used by each node includes: Determine data processing rules based on the communication rules used by each node; Determining control rules based on the communication rules used by each node; The step of determining a data processing rule based on the communication rule used by each node comprises: If the node uses the first encryption communication rule, then obtaining the tax data corresponding to the first encryption communication rule and encrypting the encrypted data; determining a first data processing rule based on the tax data corresponding to the first encrypted communication rule and the encrypted data; If the node uses the second encryption communication rule, then obtaining the tax data corresponding to the second encryption communication rule and encrypting the encrypted data; determining a second data processing rule based on the tax data corresponding to the second encrypted communication rule and the encrypted data; generating a data processing rule according to the first data processing rule and the second data processing rule; The data processing rules include a first encrypted communication rule and a second encrypted communication rule. The step of optimizing each node based on the data processing rules and the control rules includes: Assume that the tax data is D, the encrypted data is D1_{encrypted}, and the encryption process of the first encryption communication rule is expressed by the following formula: D1_{encrypted} = \text{AES_encrypt}(D, \text{key}); Among them, \text{AES_encrypt} represents the AES encryption algorithm, and key is the generated key; Parsing the second encryption communication rule, and determining that the second encryption communication rule includes an initialization vector encryption mode; Encryption optimization is performed on the communication rules of each node based on the first encryption communication rule and the second encryption communication rule; The step of encrypting and optimizing the communication rules of each node based on the first encryption communication rule and the second encryption communication rule includes: The tax data on the node is encrypted based on the AES encryption algorithm, key and initialization vector encryption mode. The expression is as follows: D2_{encrypted} = \text{AES_encrypt}(D, \text{key}, \text{IV}); Where, \text{AES_encrypt} represents the AES encryption algorithm, key is the generated key, and IV is the generated initialization vector; In the C mode, the tax data on the node is encrypted based on the AES encryption algorithm, key and initialization vector encryption mode, and the expression is as follows: D3_{encrypted} = \text{AES_C_encrypt}(D, \text{key}, \text{IV}); AES_C_encrypt refers to encryption using the AES algorithm in C mode, where C mode includes CBC and CTR hybrid encryption modes.
2. The distributed tax data processing method according to claim 1, characterized in that: Also includes: When tax data changes, the tax data will be automatically updated to all nodes to ensure the consistency and accuracy of the data stored in each node; When the data changes, assuming that N nodes need to perform data synchronization update, the data change amount is Δdata, the synchronization update data amount is Δsync_data, and the synchronization update time is Tsync, then the data synchronization update formula is: Δsync_data=Δdata / N Tsync = Tprocessing + Ttransmission; Among them, Tprocessing is the data processing time, and Ttransmission is the data transmission time.
3. A distributed tax data processing system, characterized in that: include: A setting module, used to set up multiple nodes in the tax data processing system, wherein each node has independent data storage and processing capabilities; The division module is used to store tax data in different nodes to achieve distributed storage of data; A determination module, used to determine the communication rules used by each node; A use module for determining data processing rules and control rules based on the communication rules used by each node; An optimization module, used for optimizing each node based on the data processing rules and control rules to perform data analysis on large-scale tax data; The step of determining data processing rules and control rules based on the communication rules used by each node includes: Determine data processing rules based on the communication rules used by each node; Determining control rules based on the communication rules used by each node; The step of determining a data processing rule based on the communication rule used by each node comprises: If the node uses the first encryption communication rule, then obtaining the tax data corresponding to the first encryption communication rule and encrypting the encrypted data; determining a first data processing rule based on the tax data corresponding to the first encrypted communication rule and the encrypted data; If the node uses the second encryption communication rule, then obtaining the tax data corresponding to the second encryption communication rule and encrypting the encrypted data; determining a second data processing rule based on the tax data corresponding to the second encrypted communication rule and the encrypted data; generating a data processing rule according to the first data processing rule and the second data processing rule; The data processing rules include a first encrypted communication rule and a second encrypted communication rule. The step of optimizing each node based on the data processing rules and the control rules includes: Assume that the tax data is D, the encrypted data is D1_{encrypted}, and the encryption process of the first encryption communication rule is expressed by the following formula: D1_{encrypted} = \text{AES_encrypt}(D, \text{key}); Among them, \text{AES_encrypt} represents the AES encryption algorithm, and key is the generated key; Parsing the second encryption communication rule, and determining that the second encryption communication rule includes an initialization vector encryption mode; Encryption optimization is performed on the communication rules of each node based on the first encryption communication rule and the second encryption communication rule; The step of encrypting and optimizing the communication rules of each node based on the first encryption communication rule and the second encryption communication rule includes: The tax data on the node is encrypted based on the AES encryption algorithm, key and initialization vector encryption mode. The expression is as follows: D2_{encrypted} = \text{AES_encrypt}(D, \text{key}, \text{IV}); Where, \text{AES_encrypt} represents the AES encryption algorithm, key is the generated key, and IV is the generated initialization vector; In the C mode, the tax data on the node is encrypted based on the AES encryption algorithm, key and initialization vector encryption mode, and the expression is as follows: D3_{encrypted} = \text{AES_C_encrypt}(D, \text{key}, \text{IV}); AES_C_encrypt refers to encryption using the AES algorithm in C mode, where C mode includes CBC and CTR hybrid encryption modes.
4. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the distributed tax data processing according to claim 1 or 2.
5. A readable storage medium, characterized in that: The readable storage medium has stored therein a computer program including a program code for controlling a process to execute a process including the distributed tax data processing according to claim 1 or 2.
Citation Information
Patent Citations
Key management system and key service node
CN110120869A
Method and apparatus for data security on home networksystem
KR1020060058789A