A data reporting method, device, system, electronic device, and medium
Patent Information
- Application Number
- CN202611219733.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-12
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]本申请实施例提供了一种数据上报方法、装置、系统、电子设备及介质,以至少解决相关技术中离线数据上报方式下数据来源难以核实、数据易被篡改且难以检测、数据易泄露的技术问题
[0036]上述第二方面、第四方面、第六方面至第八方面所获得的技术效果与第一方面、第三方面中对应的技术手段获得的技术效果近似,在这里不再赘述。
Smart Images

Figure CN122933191A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data security technology, and more specifically, to a data reporting method, apparatus, system, electronic device, and medium. Background Technology
[0002] In scenarios such as government statistics, industry surveys, and information auditing, subordinate units often need to report data to superior units. Current technology typically employs online data entry systems, where reporting units directly access a central server via the network to input data. However, in many real-world scenarios, the reporting units face limitations in network conditions or are completely offline (e.g., remote areas, military enterprises, institutions with isolated internal networks), or the information itself is sensitive and unsuitable for online transmission, rendering online data entry solutions unsuitable. In such cases, a common practice is for the central server to distribute electronic spreadsheet templates, which the reporting units complete offline and then submit via USB drive, email, or other methods.
[0003] However, when reporting data using the above methods, the central terminal cannot effectively verify the true source of the reported data, posing a risk of falsified reports. Furthermore, the data is easily tampered with during transmission, and the central terminal cannot detect such tampering. The data is also susceptible to unauthorized acquisition and copying during transmission, leading to leakage. In other words, the offline data reporting methods in these technologies cannot simultaneously guarantee the authenticity, integrity, and confidentiality of the reported data. Summary of the Invention
[0004] This application provides a data reporting method, apparatus, system, electronic device, and medium to at least solve the technical problems in related technologies where offline data reporting methods are difficult to verify the data source, data is easily tampered with and difficult to detect, and data is easily leaked.
[0005] In a first aspect, embodiments of this application provide a data reporting method applied to a client. The method includes: acquiring the data to be reported; performing a hash operation on an identity factor and a random seed to obtain an encryption key and a verification key, wherein the identity factor is a factor generated based on the server's private key and the unique identifier of the reporting unit and pre-stored in the client; encrypting the data using the encryption key to obtain ciphertext; generating an integrity check code for the ciphertext based on the verification key; generating an encrypted data packet based on the digital envelope, the integrity check code, and the ciphertext, and outputting the encrypted data packet to report the data to the central terminal, wherein the digital envelope is an envelope obtained by encrypting the random seed using a pre-stored server public key.
[0006] In this embodiment, the encryption key and verification key are obtained by hashing the identity factor and the random seed. The identity factor is generated based on the server's private key and the unique identifier of the reporting unit and is bound to the reporting unit. The encrypted data packet only carries the random seed encrypted by the server's public key and does not carry the key itself. This ensures that only the party holding the server's private key and the identity factor can recover the encryption key and verification key. Thus, the encryption protection and integrity verification of the reported data are achieved without the need for online key transmission between the client and the central terminal. Furthermore, the encryption data packet is bound to the identity of the reporting unit, ensuring the authenticity, integrity, and confidentiality of the reported data source.
[0007] In conjunction with the first aspect, in one optional implementation of the embodiments of this application, performing a hash operation on the identity factor and the random seed to obtain an encryption key and a verification key includes: performing a hash operation on the identity factor and the random seed to obtain a hash value; using the first part of the hash value as the encryption key; and using the second part of the hash value as the verification key.
[0008] Using this implementation, both the encryption key and the verification key can be obtained simultaneously through a single hash operation. The key acquisition process is simple and efficient, and different parts of the hash value are used for encryption and integrity verification, thus achieving key separation for encryption and verification purposes.
[0009] In conjunction with the first aspect, in one optional implementation of the embodiments of this application, encrypting the data to obtain ciphertext using an encryption key includes: compressing the data to obtain plaintext data; and symmetrically encrypting the plaintext data using an encryption key and a random number to obtain ciphertext.
[0010] By using this implementation method, the data to be filled in is first compressed, which can reduce the amount of data to be encrypted, and thus reduce the size of the encrypted data packet; random numbers are introduced in the symmetric encryption process, which can make the same plaintext data produce different ciphertexts in different encryptions, thereby improving the ciphertext's resistance to analysis.
[0011] In conjunction with the first aspect, in one optional implementation of the embodiments of this application, generating an integrity verification code for ciphertext based on a verification key includes: performing a hash operation on the verification key, a random number, and the ciphertext to obtain the integrity verification code.
[0012] Using this implementation, the integrity check code is obtained by hashing the check key, random number, and ciphertext together. The integrity check code is bound to the current encryption process. Any change to either the ciphertext or the random number will result in inconsistency in the check, which can effectively detect whether the data has been tampered with.
[0013] In conjunction with the first aspect, in an optional implementation of this application embodiment, the encrypted data packet further includes a random number and the length information of the digital envelope, wherein the random number and the length information of the digital envelope are used by the central end to parse the encrypted data packet for verification and decryption.
[0014] Using this implementation method, the encrypted data packet carries a random number and the length information of the digital envelope. The central terminal can use this information to parse the digital envelope, integrity check code, and ciphertext from the encrypted data packet, ensuring the smooth execution of the verification and decryption process.
[0015] In conjunction with the first aspect, in one optional implementation of the embodiments of this application, the hash operation is based on the SM3 cryptographic hash algorithm, the symmetric encryption is based on the SM4 block cipher algorithm, and the digital envelope is an envelope obtained by encrypting the random seed based on the SM2 elliptic curve public key cryptography algorithm.
[0016] In this implementation, the hashing, symmetric encryption, and asymmetric encryption steps are all based on domestically developed commercial cryptographic algorithms, meeting the requirements of highly sensitive and high-security application scenarios for the use of domestically developed commercial cryptographic algorithms.
[0017] In conjunction with the first aspect, in an optional implementation of this application embodiment, the method further includes: receiving and storing identity factors issued by the central terminal, wherein the identity factors correspond one-to-one with the reporting unit; and performing two-factor authentication based on the identity factors and login password in response to a login operation for the client.
[0018] Using this implementation method, the identity factor corresponds one-to-one with the reporting unit, achieving one code per unit; when the client logs in, it performs two-factor authentication based on the identity factor and login password, which improves the security of client login authentication compared to single credential authentication and ensures the legitimacy of the client's user.
[0019] In conjunction with the first aspect, in one optional implementation of the embodiments of this application, obtaining the data to be reported includes: importing the reporting rules and verification rules issued by the central terminal; generating and exporting an electronic spreadsheet template file based on the reporting rules and verification rules, wherein the electronic spreadsheet template file contains embedded verification rules; importing the reporting file obtained by filling in the data based on the electronic spreadsheet template file; verifying the data in the reporting file based on the verification rules, and using the data that passes the verification as the reporting data.
[0020] Using this implementation method, the filling rules and verification rules are issued by the central terminal and can be updated by importing. The verification rules are embedded in the spreadsheet template file, and the client performs verification again based on the verification rules after importing the filling file. Only the data that passes the verification is used as the filling data to be reported, thus ensuring that the filling data meets the requirements of the verification rules from the data source.
[0021] Secondly, embodiments of this application provide a data reporting device, which includes: an acquisition unit for acquiring data to be reported; a key derivation unit for performing a hash operation on an identity factor and a random seed to obtain an encryption key and a verification key, wherein the identity factor is a factor generated and pre-stored based on a server private key and a unique identifier of the reporting unit; a data encryption unit for encrypting the data using the encryption key to obtain ciphertext; a verification code generation unit for generating an integrity verification code of the ciphertext based on the verification key; and an encapsulation output unit for generating an encrypted data packet based on a digital envelope, the integrity verification code, and the ciphertext, and outputting the encrypted data packet, wherein the digital envelope is an envelope obtained by encrypting the random seed using a pre-stored server public key.
[0022] Thirdly, embodiments of this application provide a data processing method applied to a central terminal. The method includes: acquiring an encrypted data packet reported by a reporting unit, wherein the encrypted data packet includes a digital envelope, an integrity check code, and ciphertext; decrypting the digital envelope using a server-side private key to obtain a random seed; performing a hash operation on an identity factor and the random seed to obtain an encryption key and a verification key, wherein the identity factor is a factor generated based on the server-side private key and the unique identifier of the reporting unit and pre-distributed to the reporting unit; and, if the verification check code of the ciphertext obtained based on the verification key matches the integrity check code, decrypting the ciphertext using the encryption key to obtain the reported data.
[0023] In this embodiment, the central terminal uses the server's private key to decrypt the random seed from the digital envelope and, combined with its own stored identity factors, re-obtains the encryption key and verification key. Only when the reporting party possesses the identity factor corresponding to the reporting unit will the recalculated verification code match the integrity verification code in the encrypted data packet. Therefore, the matching verification indicates that the data originates from a legitimate reporting unit and has not been tampered with. Based on this, decryption is then performed, thus realizing the verification of the authenticity and integrity of the reported data source and secure transmission.
[0024] In conjunction with the third aspect, in an optional implementation of the embodiments of this application, the method further includes: generating an identity factor based on the server's private key and the unique identifier of the reporting unit; and distributing the identity factor to the reporting unit, wherein the identity factor corresponds one-to-one with the reporting unit.
[0025] Using this implementation method, the identity factor is generated and distributed by the central terminal based on the server's private key and the unique identifier of the reporting unit, and corresponds one-to-one with the reporting unit to achieve one code per unit, which provides a basis for subsequent login authentication and key derivation to be bound to the unit's identity.
[0026] In conjunction with the third aspect, in an optional implementation of the embodiments of this application, the method further includes: configuring filling rules and verification rules; distributing the filling rules and verification rules to the filling units; after obtaining the filling data, verifying the filling data based on the filling rules, and storing the verified filling data into the database.
[0027] Using this implementation method, the central end can configure and issue reporting rules and verification rules as needed. After decrypting the reported data, it can perform verification again based on the reporting rules, which can avoid non-compliant data from being entered into the database due to abnormal situations such as the reporting unit's rules not being updated in time, thus ensuring the compliance and accuracy of the data entered into the database.
[0028] Fourthly, embodiments of this application provide a data processing apparatus, comprising: an acquisition unit for acquiring encrypted data packets reported by reporting units, wherein the encrypted data packets include a digital envelope, an integrity check code, and ciphertext; an envelope decryption unit for decrypting the digital envelope using a server-side private key to obtain a random seed; a key derivation unit for performing a hash operation on an identity factor and the random seed to obtain an encryption key and a verification key, wherein the identity factor is a factor generated based on the server-side private key and the unique identifier of the reporting unit and pre-distributed to the reporting unit; and a data decryption unit for decrypting the ciphertext using the encryption key, provided that the verification check code of the ciphertext obtained based on the verification key matches the integrity check code, to obtain the reported data.
[0029] Fifthly, embodiments of this application provide a data reporting system, which includes a central terminal and a client terminal. The central terminal is used to distribute an identity factor to the reporting unit, wherein the identity factor is a factor generated based on the server's private key and the unique identifier of the reporting unit. The client terminal is used to perform a hash operation on the identity factor and a random seed to obtain an encryption key and a verification key, encrypt the reporting data to be reported using the encryption key to obtain ciphertext, generate an integrity verification code for the ciphertext based on the verification key, and output an encrypted data packet including a digital envelope, an integrity verification code, and ciphertext, wherein the digital envelope is an envelope obtained by encrypting the random seed using the server's public key. The central terminal is also used to decrypt the digital envelope using the server's private key after obtaining the encrypted data packet to obtain a random seed, re-obtain the encryption key and verification key based on the identity factor and the random seed, and after verifying the integrity verification code based on the verification key, decrypt the ciphertext using the encryption key to obtain the reporting data.
[0030] In this embodiment, the client and the central terminal derive the same encryption key and verification key based on the same identity factor and random seed, respectively. The key itself is not transmitted through the transmission channel. The encrypted data packet is bound to the identity of the reporting unit. The central terminal can simultaneously confirm the data source and data integrity by verifying the integrity check code, forming a complete closed loop of authentication, reporting, verification, encryption, validation and database entry, which ensures the security and accuracy of data reporting in network-restricted environments.
[0031] In conjunction with the fifth aspect, in one optional implementation of the embodiments of this application, the central terminal includes an authentication and authorization module, a rule engine module, a data verification module, and a server-side encryption and decryption processing module. The authentication and authorization module generates and distributes identity factors; the rule engine module configures and distributes data entry rules and verification rules to the reporting units; the server-side encryption and decryption processing module decrypts the digital envelope, re-obtains the encryption key and verification key, and decrypts the ciphertext; and the data verification module verifies the decrypted data entry data. The client includes an offline authentication module, a rule import and template generation module, a data entry verification module, and a client-side encryption and decryption processing module. The offline authentication module performs login authentication based on identity factors; the rule import and template generation module imports the distributed data entry rules and verification rules and generates an electronic spreadsheet template file; the data entry verification module verifies the data entered based on the electronic spreadsheet template file; and the client-side encryption and decryption processing module obtains the encryption key and verification key, encrypts the data entry data, and generates an encrypted data packet.
[0032] Using this implementation method, the central end and the client end each have their own functional modules for authentication, rules, verification and encryption / decryption processing. Each module has a clear division of labor and responsibilities, which facilitates the deployment and maintenance of the system.
[0033] According to a sixth aspect of the embodiments of this application, an electronic device is provided, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the methods of the first aspect, the third aspect, or any corresponding embodiment thereof.
[0034] According to a seventh aspect of the present application, the present application provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the method as described in any of the preceding claims.
[0035] According to an eighth aspect of the embodiments of this application, the embodiments of this application provide a computer program product or a computer program, the computer program product including a computer program stored in a computer-readable storage medium; a processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program to implement the method as described in any of the preceding claims.
[0036] The technical effects achieved by the second, fourth, sixth to eighth aspects mentioned above are similar to the technical effects achieved by the corresponding technical means in the first and third aspects, and will not be repeated here. Attached Figure Description
[0037] Figure 1 This is a flowchart illustrating a data reporting method provided in an embodiment of this application; Figure 2 This is a detailed flowchart illustrating a data reporting method provided in an embodiment of this application; Figure 3 This is a flowchart illustrating a data processing method provided in an embodiment of this application; Figure 4 This is a structural block diagram of a data reporting system provided in an embodiment of this application; Figure 5 This is a schematic diagram of key derivation and message encryption / decryption processing provided in the embodiments of this application; Figure 6 This is a schematic diagram of the structure of a data reporting device provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application.
[0038] Figure 4 In the middle: 100 - Central terminal system; 200 - Authentication and authorization module; 300 - Rule engine module; 400 - Data verification module; 500 - Server-side encryption and decryption processing module; 600 - Offline data entry client; 700 - Offline authentication module; 800 - Rule import and template generation module; 900 - Data entry verification module; 1000 - Client-side encryption and decryption processing module. Figure 6 In the middle: 601 - Acquisition unit; 602 - Key derivation unit; 603 - Data encryption unit; 604 - Verification code generation unit; 605 - Encapsulation output unit. Figure 7 In the middle: 701 - Acquisition unit; 702 - Envelope decryption unit; 703 - Key derivation unit; 704 - Data decryption unit. Figure 8In Chinese: 100 – Processor; 200 – Communication bus; 300 – User interface; 400 – External communication interface; 500 – Memory. Detailed Implementation
[0039] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0040] It should be understood that "multiple" as mentioned herein refers to two or more. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. In addition, to facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first," "second," etc., are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or execution order, and the terms "first," "second," etc., do not necessarily imply that they are different.
[0041] Furthermore, the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, such that a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or apparatus.
[0042] To facilitate understanding of the embodiments of this application, some terms involved in the embodiments of this application will be explained below. Identity factor refers to factor data corresponding to the reporting unit, generated based on the server's private key and the unique identifier of the reporting unit. The identity factor can serve as authentication credentials (also known as offline authentication codes) for the reporting unit to log in to the client, and can also serve as the basic data for derived keys. Hash operation refers to the operation of mapping input data of arbitrary length to output data of fixed length. Hash operation is unidirectional; it is difficult to deduce the input from the output. Symmetric encryption refers to an encryption method that uses the same key for encryption and decryption; asymmetric encryption refers to an encryption method that uses a public key and a private key, respectively, for encryption and decryption. Digital envelope refers to data obtained by encrypting key-type data with a public key using an asymmetric encryption method. Only the party holding the corresponding private key can decrypt the encapsulated content from the digital envelope. Integrity check code refers to a check value obtained by hashing data based on the key, used to verify whether the data has been tampered with during transmission.
[0043] As described in the background section, in related technologies, offline data reporting methods cannot effectively verify the true source of the reported data at the central end. Data is easily tampered with and difficult to detect during transmission, and there is also a risk of data leakage. Therefore, there is an urgent need to provide a data reporting method that meets the requirements of identity security authentication, data confidentiality, integrity, and availability in offline data reporting scenarios. Based on the above inventive concept, the data reporting method provided in the embodiments of this specification is described below as an example.
[0044] The data reporting method provided in this application embodiment can be applied to, for example, Figure 4 The data reporting system shown includes a central terminal (e.g., a central terminal system 100 deployed at the superior unit) and a client (e.g., an offline reporting client 600 deployed at the reporting unit). The central terminal and client do not rely on a direct network connection. Identity factors, reporting rules, etc., are distributed from the central terminal to the reporting unit. The reported data is submitted to the central terminal offline in the form of encrypted data packets, such as through one or more methods including USB flash drive copying, email transmission, and CD burning. This application embodiment does not limit the specific transmission method for submitting encrypted data packets. The reporting unit can be an enterprise, subordinate organization, or other unit that needs to report data to the central terminal. This application embodiment does not limit the specific type of reporting unit. The method provided in this application embodiment is applicable to various highly sensitive and high-security intranet data reporting scenarios such as government affairs, military, and finance. While ensuring data security, it also takes into account the convenience of data reporting through electronic spreadsheet files.
[0045] The following is combined Figure 1 This application describes the data reporting method provided in its embodiments. This method is applied to a client, such as... Figure 1As shown, the method includes the following steps.
[0046] S101: Obtain the data to be submitted.
[0047] In practice, the data to be filled in refers to the data that the reporting unit needs to report to the central terminal, such as statistical data, survey data, audit data, etc. The client can obtain the data to be filled in by importing the data entry file, or by other data entry methods. This application embodiment does not limit the method of obtaining the data to be filled in.
[0048] In one possible implementation, obtaining the data to be reported includes: importing the reporting rules and validation rules issued by the central authority; generating and exporting an electronic spreadsheet template file based on the reporting rules and validation rules, wherein the electronic spreadsheet template file contains the validation rules; importing the reporting file obtained by filling in the data based on the electronic spreadsheet template file; validating the data in the reporting file based on the validation rules, and using the data that passes the validation as the reporting data. For a detailed implementation, please refer to the relevant descriptions in S203 to S206 below.
[0049] S102: Perform a hash operation on the identity factor and the random seed to obtain the encryption key and the verification key.
[0050] In practice, the identity factor is generated based on the server's private key and the unique identifier of the reporting unit, and is pre-stored on the client. The server's private key is the private key in the asymmetric key pair held by the central terminal, and the unique identifier of the reporting unit is identification information that can uniquely determine the identity of the reporting unit, such as the enterprise social credit code. Since the generation of the identity factor depends on both the server's private key and the unique identifier of the reporting unit, the identity factor is bound to the reporting unit, and it is difficult for an entity that does not hold the server's private key to forge the identity factor. The random seed is randomly generated data, for example, it can be randomly generated each time an encrypted data packet is exported, ensuring that the derived key is different each time a report is submitted, achieving one-time one-key encryption. The client performs a hash operation on the identity factor and the random seed, obtaining an encryption key and a verification key from the hash result. The encryption key is used to encrypt the reported data, and the verification key is used to generate an integrity verification code.
[0051] In one possible implementation, hashing the identity factor and the random seed to obtain an encryption key and a verification key includes: hashing the identity factor and the random seed to obtain a hash value; using the first part of the hash value as the encryption key; and using the second part of the hash value as the verification key.
[0052] S103: Encrypt the data entered using an encryption key to obtain ciphertext.
[0053] In practice, the client uses an encryption key to encrypt the data entered, obtaining the ciphertext corresponding to the data entered. This ensures that the data entered exists in ciphertext form during subsequent transmission, preventing plaintext data from being illegally obtained and leaked.
[0054] In one possible implementation, the data is encrypted using an encryption key to obtain ciphertext, including: compressing the data to obtain plaintext data; and symmetrically encrypting the plaintext data using an encryption key and a random number to obtain ciphertext.
[0055] S104: Generate an integrity check code for the ciphertext based on the check key.
[0056] In practice, the client performs a hash operation on the ciphertext based on the verification key to obtain an integrity check code. The integrity check code is bound to the verification key and the ciphertext. If the ciphertext is tampered with during transmission, the check code recalculated at the central end will be inconsistent with the integrity check code, thereby detecting whether the data has been tampered with.
[0057] In one possible implementation, generating an integrity check code based on a check key involves performing a hash operation on the check key, a random number, and the ciphertext to obtain the integrity check code.
[0058] S105: Generate an encrypted data packet based on the digital envelope, integrity check code, and ciphertext, and output the encrypted data packet to report the data to the central terminal.
[0059] In practice, the digital envelope is obtained by encrypting the random seed using a pre-stored server public key, which corresponds to the server private key. Since the random seed is encrypted and encapsulated in the digital envelope using the server public key, only the central terminal holding the server private key can decrypt the random seed from the digital envelope. This decryption is then combined with the identity factors stored at the central terminal to derive a new encryption key and verification key. The client generates and outputs an encrypted data packet based on the digital envelope, integrity check code, and ciphertext. The reporting unit submits the output encrypted data packet to the central terminal, thus completing the data submission.
[0060] In one possible implementation, the encrypted data packet also includes a random number and the length information of the digital envelope, which are used by the central terminal to parse the encrypted data packet for verification and decryption.
[0061] In one possible implementation, the hashing operations are all based on the SM3 cryptographic hash algorithm, the symmetric encryption is based on the SM4 block cipher algorithm, and the digital envelope is an envelope obtained by encrypting the random seed using the SM2 elliptic curve public-key cryptography algorithm.
[0062] Through the above steps S101 to S105, the encryption key and verification key are derived from the identity factor and random seed bound to the reporting unit. The key itself is not transmitted with the encrypted data packet. The encrypted data packet only carries the random seed, integrity verification code and ciphertext encrypted by the server's public key. This allows the reported data to be encrypted and protected in terms of integrity without the need for online transmission of the key. Furthermore, the encrypted data packet is bound to the identity of the reporting unit, which solves the problems in the background technology of data source being difficult to verify, data being easily tampered with and difficult to detect, and data being easily leaked.
[0063] In one possible implementation, the method further includes: receiving and storing identity factors issued by the central terminal, with each identity factor corresponding one-to-one with the reporting unit; and performing two-factor authentication based on the identity factor and login password in response to a login operation on the client. For a detailed implementation, please refer to the relevant descriptions in S201 and S202 below.
[0064] The following is combined Figure 2 Taking an enterprise as the reporting entity as an example, this application provides a detailed description of the data reporting method provided in its embodiments. This detailed process is a complete implementation of the schemes shown in S101 to S105 above in a real-world reporting scenario, and further includes rule distribution, login authentication, local verification, and other steps. Figure 2 As shown, the process includes the following steps.
[0065] S201: The central terminal generates the authentication code and reporting rules for the reporting unit.
[0066] In practice, the central terminal manages the reporting units and maintains information on valid reporting units. The central terminal generates an identity factor based on the server's private key and the unique identifier of the reporting unit, and sends the identity factor as the offline authentication code to the reporting unit. The identity factor corresponds one-to-one with the reporting unit, realizing one code per unit.
[0067] Specifically, in combination Figure 5 The generation and storage of the identity factor are explained. The server stores the server's private key, the unique identifier of the reporting unit, and the identity factor, while the client stores the server's public key, the unique identifier of the reporting unit, and the identity factor. The server's private key and public key can be a key pair based on the SM2 elliptic curve public key cryptography algorithm. The unique identifier of the reporting unit can be an 18-digit enterprise social credit code. This embodiment does not limit the algorithm type of the asymmetric key pair or the specific form of the unique identifier; here, an SM2 key pair and an enterprise social credit code are used as examples. The central terminal uses the server's private key and the enterprise social credit code as input to generate the enterprise's identity factor through an algorithm. Since the server's private key is held only by the central terminal, it is difficult for an entity that does not hold the server's private key to forge the identity factor, thus ensuring the binding relationship between the identity factor and the enterprise's identity.
[0068] In addition, the central system configures data entry rules and corresponding data validation rules through the rules engine module, and then distributes these rules to the reporting units. When the entry rules are updated, the central system updates the rule file and distributes it to the reporting units, who then import it into their clients to complete the rule upgrade, ensuring the maintainability of the entry rules.
[0069] S202: The reporting unit logs in to the client using the authentication code.
[0070] In practice, the reporting unit receives the identity factor issued by the central terminal and stores it on the client. When the reporting unit logs into the client for the first time, it uses the identity factor for authentication and configures a login password. On subsequent logins, the client responds to the login operation for the client by performing two-factor authentication based on the identity factor and the login password to ensure that the user of the client is legitimate.
[0071] S203: The reporting unit exports the template file of the electronic form to be filled in.
[0072] In practice, the client-side has built-in data entry rules. When the central terminal updates and distributes the entry rules to the reporting units, the reporting units import the distributed entry rule file to update the entry rules. After importing the entry and verification rules distributed by the central terminal, the client generates and exports an electronic spreadsheet template file based on the entry and verification rules. The electronic spreadsheet template file can be, for example, an Excel file; this embodiment does not limit the specific format of the electronic spreadsheet template file. The electronic spreadsheet template file contains embedded verification rules distributed by the central terminal, supporting verification of various data types such as text, numbers, dates, and amounts, as well as verification of data formats such as enterprise social credit codes, ID card numbers, and dates of birth.
[0073] S204: Import the completed spreadsheet file into the client.
[0074] In practice, after the reporting unit completes the data entry based on the spreadsheet template file in an offline environment, the completed data entry file is then imported into the client.
[0075] S205: The client verifies the validity of the entered data.
[0076] In practice, the client performs a second validation on the data in the form based on the validation rules. The validation includes format validation and logical validation. Format validation includes checking field type, field length, value range, required fields, date format, encoding standards, and data format standardization. Logical validation includes cross-field association validation, business compliance validation, and data consistency validation. This prevents users from violating the format restrictions in the spreadsheet template file, arbitrarily modifying the template structure, or filling in data with incorrect format or out-of-bounds enumeration values, which could cause the server to be unable to parse or fail to perform statistics. It also prevents erroneous data from entering the system and causing the form data to be distorted.
[0077] S206: If the verification fails, an error message will be displayed, and the reporting unit should modify the data and import it again.
[0078] In practice, when submitted data fails validation, the client displays specific error messages. The submitting unit modifies the submitted data file according to the error messages and then re-imports the file into the client until validation passes. The client then uses the validated data as the submitted data to be reported.
[0079] S207: Export the signed and encrypted data file.
[0080] In practical implementation, after the client's submitted data passes verification, it generates and exports an encrypted data packet. This process is one specific implementation of S102 to S105 mentioned above. Specifically, combined with Figure 5 The message encryption process is described below. The client generates a random seed, which can be, for example, 32 bits of random data. This embodiment does not limit the length of the random seed; 32 bits are used as an example here. The client performs a hash operation on the identity factor and the random seed to obtain a hash value. The first part of the hash value is used as the encryption key, and the second part is used as the verification key. For example, the hash operation can be based on the SM3 cryptographic hash algorithm, using the first 16 bits of the hash value as the encryption key and the last 16 bits as the verification key. This embodiment does not limit the specific type of hash algorithm or the method of splitting the hash value; the SM3 algorithm and the method of splitting the first and last 16 bits are used as examples here.
[0081] In this scenario, the client first compresses the various data files to be reported, for example, using ZIP format to obtain plaintext data. Other compression formats can also be used, and this embodiment does not limit this. Then, the client uses an encryption key and a random number to perform symmetric encryption on the plaintext data to obtain ciphertext. The random number can be, for example, 16-bit random data, and the symmetric encryption can be, for example, encryption based on the SM4 block cipher algorithm. This embodiment does not limit the length of the random number or the specific type of the symmetric encryption algorithm. Next, the client performs a hash operation on the verification key, the random number, and the ciphertext to obtain an integrity check code. At the same time, the client uses the server's public key to encrypt the random seed to obtain a digital envelope, for example, using encryption based on the SM2 elliptic curve public key cryptography algorithm. This embodiment does not limit this.
[0082] Furthermore, the client generates an encrypted data packet based on the digital envelope, integrity check code, and ciphertext. The encrypted data packet also includes a random number and the length information of the digital envelope. In other words, the encrypted data packet can include the length information of the digital envelope, the digital envelope itself, a random number, an integrity check code, and ciphertext. The random number and the length information of the digital envelope are used by the central terminal to parse the encrypted data packet for verification and decryption. The client exports the encrypted data packet to local storage, such as to the desktop of the client's device; this embodiment does not limit the export location. The reporting unit submits the exported encrypted data packet to the central terminal via offline transmission, such as through USB flash drive copying, email transmission, or CD burning; this embodiment does not limit this method.
[0083] S208: The central terminal verifies the signature of the submitted data to check its compliance.
[0084] In practice, the central user imports the encrypted data packet into the server and then combines it with... Figure 5 The server uses its private key to decrypt the digital envelope in the encrypted data packet, obtaining a random seed. The server then hashes its stored identity factor with the decrypted random seed to regenerate the encryption and verification keys, effectively opening the digital envelope to obtain the dual keys. Since the identity factor is held only by the central server and the corresponding reporting unit, only encrypted data packets generated by legitimate reporting units can match the keys derived from the central server.
[0085] S209: The central terminal decrypts the entered data and performs anti-tampering verification.
[0086] In practice, the server performs a hash operation based on the newly obtained verification key, the random number in the encrypted data packet, and the ciphertext to obtain a verification code. If the verification code matches the integrity verification code in the encrypted data packet, it indicates that the data comes from a legitimate reporting unit and that the digital envelope is intact and undamaged, and the ciphertext has not been tampered with. The server then uses the newly obtained encryption key to decrypt the ciphertext to obtain the plaintext data, and then decompresses the plaintext data to obtain the various data files corresponding to the reported data.
[0087] S210: The central terminal will input the data into the database.
[0088] In practice, after the server decrypts the data, it verifies the data again based on the data entry rules to prevent abnormal situations such as the data entry rules on the reporting unit side not being updated in time. The verified data is then stored in the database to ensure the compliance and accuracy of the data.
[0089] It should be noted that the client can be built based on a cross-platform application framework, such as Vue and Electron technologies, while the server can be implemented using J2EE technology. Both the client and server can run on various common software and hardware environments, supporting deployment in Windows environments as well as domestic operating system environments such as Kylin and UnionTech. This application does not limit the specific implementation technology and deployment environment of the client and server.
[0090] The above describes the data reporting process from the client side. The following section will combine... Figure 3 The data processing method provided in this application embodiment will be described from the perspective of the central end. This method corresponds to the processing described in S208 to S210 above. This method is applied to the central end, such as... Figure 3 As shown, the method includes the following steps.
[0091] S301: Obtain the encrypted data packet reported by the reporting unit.
[0092] In practice, the encrypted data packet includes a digital envelope, an integrity check code, and ciphertext. The encrypted data packet is generated by the client of the reporting unit and submitted to the central terminal via offline transmission. The central terminal user imports the encrypted data packet into the server, thus completing the acquisition of the encrypted data packet.
[0093] S302: Use the server's private key to decrypt the digital envelope and obtain a random seed.
[0094] In practice, the digital envelope is obtained by the client encrypting the random seed using the server's public key, while the central terminal holds the server's private key corresponding to the server's public key, thus enabling it to decrypt the random seed from the digital envelope.
[0095] S303: Perform a hash operation on the identity factor and the random seed to obtain the encryption key and the verification key.
[0096] In practice, the identity factor is generated based on the server's private key and the unique identifier of the reporting unit, and is pre-distributed to the reporting unit. The central terminal also stores this identity factor. The central terminal performs the same hash operation on the identity factor and random seed as the client to obtain the encryption key and verification key again, without requiring the client to transmit the key itself.
[0097] S304: If the verification code of the ciphertext obtained based on the verification key is consistent with the integrity verification code, the ciphertext is decrypted using the encryption key to obtain the data to be filled in.
[0098] In practice, the central terminal performs a hash operation on the ciphertext based on the verification key to obtain a verification code. This verification code is then compared with the integrity verification code in the encrypted data packet. If they match, it indicates that the encrypted data packet originated from a legitimate reporting unit holding the corresponding identity factor, and the ciphertext has not been tampered with. The central terminal then decrypts the ciphertext using the encryption key to obtain the reported data. If they do not match, it indicates that the encrypted data packet originated illegally or the data has been tampered with.
[0099] In one possible implementation, the method further includes: generating an identity factor based on the server's private key and the unique identifier of the reporting unit; and distributing the identity factor to the reporting unit, wherein the identity factor corresponds one-to-one with the reporting unit.
[0100] In one possible implementation, the method further includes: configuring data entry rules and verification rules; distributing the data entry rules and verification rules to the data entry units; after receiving the data entry data, verifying the data entry data based on the data entry rules, and storing the verified data entry data into the database. The specific implementation of the above process can be found in the relevant descriptions of S201 and S210 above, and will not be repeated here.
[0101] In the above embodiments of this application, the descriptions of each embodiment have their own emphasis. Parts not described in detail in a certain embodiment can be referred to in the relevant descriptions of other embodiments. The steps illustrated in the related flowcharts can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in a different order than that shown here. In other words, the order of steps described in the foregoing embodiments is merely an example. Reasonable adjustments to the order of steps based on the content of the embodiments of this application are also within the protection scope of the embodiments of this application.
[0102] The methods provided in the embodiments of this application have been illustrated above. The apparatus provided in the embodiments of this application will now be described. In an exemplary embodiment of this specification, a data reporting apparatus is also provided, such as... Figure 6 As shown, it includes: The acquisition unit 601 is used to acquire the data to be reported. The key derivation unit 602 is used to perform a hash operation on the identity factor and the random seed to obtain the encryption key and the verification key. The identity factor is a factor generated and pre-stored based on the server's private key and the unique identifier of the reporting unit. The data encryption unit 603 is used to encrypt the filled data using an encryption key to obtain ciphertext; The verification code generation unit 604 is used to generate an integrity verification code for the ciphertext based on the verification key; The encapsulation output unit 605 is used to generate an encrypted data packet based on the digital envelope, the integrity check code, and the ciphertext, and output the encrypted data packet. The digital envelope is an envelope obtained by encrypting a random seed using a pre-stored server public key.
[0103] In one implementation, the key derivation unit 602 is specifically used to: perform a hash operation on the identity factor and the random seed to obtain a hash value; use the first part of the hash value as an encryption key; and use the second part of the hash value as a verification key.
[0104] In one implementation, the data encryption unit 603 is specifically used to: compress the filled-in data to obtain plaintext data; and use an encryption key and a random number to perform symmetric encryption on the plaintext data to obtain ciphertext.
[0105] In one implementation, the verification code generation unit 604 is specifically used to: perform hash operations on the verification key, random number and ciphertext to obtain an integrity verification code.
[0106] In one implementation, the encrypted data packet further includes a random number and the length information of the digital envelope, wherein the random number and the length information of the digital envelope are used by the central end to parse the encrypted data packet for verification and decryption.
[0107] In one implementation, the hashing operations are all based on the SM3 cryptographic hash algorithm, the symmetric encryption is based on the SM4 block cipher algorithm, and the digital envelope is an envelope obtained by encrypting the random seed using the SM2 elliptic curve public key cryptography algorithm.
[0108] In one embodiment, the data reporting device further includes an offline authentication unit, which is used to: receive and store identity factors issued by the central terminal, wherein the identity factors correspond one-to-one with the reporting unit; and perform two-factor authentication based on the identity factors and login password in response to a login operation for the client.
[0109] In one implementation, the acquisition unit 601 is specifically used for: importing the filling rules and verification rules issued by the central terminal; generating and exporting an electronic spreadsheet template file based on the filling rules and verification rules, wherein the electronic spreadsheet template file contains embedded verification rules; importing the filling file obtained based on the electronic spreadsheet template file; verifying the data in the filling file based on the verification rules, and using the data that passes the verification as the filling data.
[0110] In terms of connectivity, the acquisition unit 601, data encryption unit 603, verification code generation unit 604, and encapsulation output unit 605 are sequentially connected. The key derivation unit 602 is connected to both the data encryption unit 603 and the verification code generation unit 604. In terms of data flow, the data acquired by the acquisition unit 601 is input to the data encryption unit 603. The encryption key derived by the key derivation unit 602 is input to the data encryption unit 603, and the verification key is input to the verification code generation unit 604. The ciphertext output by the data encryption unit 603 is input to both the verification code generation unit 604 and the encapsulation output unit 605. The integrity verification code output by the verification code generation unit 604 is input to the encapsulation output unit 605. The encapsulation output unit 605 combines with the digital envelope to generate and output an encrypted data packet. In terms of hardware and logic mapping, each of the above units can be implemented by the processor of the client device loading and executing program instructions in memory. The import of the data entry file and the export of the encrypted data packet can be achieved through the device's file read / write interface.
[0111] The data reporting device provided in this embodiment belongs to the same application concept as the data reporting method provided in the above embodiments of this application. It can execute the data reporting method provided in any of the above embodiments of this application and has the corresponding functional modules and beneficial effects for executing the data reporting method. Technical details not described in detail in this embodiment can be found in the specific processing content of the data reporting method provided in the above embodiments of this application, and will not be repeated here.
[0112] In one exemplary embodiment of this specification, a data processing apparatus is also provided, such as... Figure 7 As shown, it includes: The acquisition unit 701 is used to acquire the encrypted data packet reported by the reporting unit, wherein the encrypted data packet includes a digital envelope, an integrity check code and ciphertext; The envelope decryption unit 702 is used to decrypt the digital envelope using the server's private key to obtain a random seed; The key derivation unit 703 is used to perform a hash operation on the identity factor and the random seed to obtain the encryption key and the verification key. The identity factor is a factor generated based on the server's private key and the unique identifier of the reporting unit and pre-issued to the reporting unit. The data decryption unit 704 is used to decrypt the ciphertext using the encryption key to obtain the data to be filled in, provided that the verification code and integrity code of the ciphertext obtained based on the verification key are consistent.
[0113] In one embodiment, the data processing device further includes a factor management unit, which is used to: generate an identity factor based on the server's private key and the unique identifier of the reporting unit; and distribute the identity factor to the reporting unit, wherein the identity factor corresponds one-to-one with the reporting unit.
[0114] In one embodiment, the data processing device further includes a rule management unit, which is used to: configure filling rules and verification rules; distribute the filling rules and verification rules to the filling units; after obtaining the filling data, verify the filling data based on the filling rules, and store the verified filling data into the database.
[0115] In terms of connectivity, the acquisition unit 701, envelope decryption unit 702, key derivation unit 703, and data decryption unit 704 are sequentially connected. In terms of data flow, the digital envelope in the encrypted data packet acquired by the acquisition unit 701 is input to the envelope decryption unit 702; the random seed obtained by the envelope decryption unit 702 is input to the key derivation unit 703; the verification key and encryption key obtained by the key derivation unit 703 are input to the data decryption unit 704; and the data decryption unit 704 decrypts the data after verification to obtain the data to be filled in. In terms of hardware and logic mapping, each of the above units can be implemented by the processor of the server device loading and executing program instructions from memory, and the decrypted data to be filled in can be stored in the database through the database interface.
[0116] The data processing apparatus provided in this embodiment belongs to the same concept as the data processing method provided in the above embodiments of this application. It can execute the data processing method provided in any of the above embodiments of this application and has the corresponding functional modules and beneficial effects for executing the data processing method. Technical details not described in detail in this embodiment can be found in the specific processing content of the data processing method provided in the above embodiments of this application, and will not be repeated here.
[0117] In one exemplary embodiment of this specification, a data reporting system is also provided, such as... Figure 4As shown, the system includes a central terminal (such as central terminal system 100) and a client (such as offline data entry client 600). The central terminal is used to distribute the identity factor to the data entry unit. The identity factor is a factor generated based on the server's private key and the unique identifier of the data entry unit. The client is used to perform a hash operation on the identity factor and a random seed to obtain an encryption key and a verification key. The client uses the encryption key to encrypt the data to be submitted to obtain ciphertext. Based on the verification key, it generates an integrity verification code for the ciphertext and outputs an encrypted data packet including a digital envelope, an integrity verification code, and the ciphertext. The digital envelope is an envelope obtained by encrypting the random seed using the server's public key. The central terminal is also used to decrypt the digital envelope using the server's private key after obtaining the encrypted data packet to obtain a random seed. Based on the identity factor and the random seed, it re-obtains the encryption key and the verification key. After verifying the integrity verification code based on the verification key, it uses the encryption key to decrypt the ciphertext to obtain the data entry.
[0118] Specifically, such as Figure 4 As shown, the central system 100 includes an authentication and authorization module 200, a rule engine module 300, a data verification module 400, and a server-side encryption / decryption processing module 500. The authentication and authorization module 200 generates and distributes identity factors; the rule engine module 300 configures and distributes data entry and verification rules to the data entry units; the data verification module 400 verifies the decrypted data entry data; and the server-side encryption / decryption processing module 500 decrypts the digital envelope, re-obtains the encryption and verification keys, decrypts the ciphertext, and performs secure encryption / decryption processing on the distributed data entry rules and identity factors serving as authorization credentials. The offline data entry client 600 includes an offline authentication module... The system comprises a block 700, a rule import and template generation module 800, a data entry verification module 900, and a client encryption / decryption processing module 1000. The offline authentication module 700 performs login authentication based on identity factors. The rule import and template generation module 800 imports the issued data entry rules and verification rules and generates an electronic spreadsheet template file. The data entry verification module 900 verifies the data entered based on the electronic spreadsheet template file. The client encryption / decryption processing module 1000 obtains the encryption key and verification key, encrypts the data entry and generates an encrypted data packet, and performs secure encryption / decryption processing on the issued data entry rules and identity factors used as authorization credentials. The central system 100 and the offline data entry client 600 communicate via an isolated network to distribute credentials and rules and to securely report encrypted data entry. Technical details not described in detail here are provided in the relevant descriptions of the above-described method embodiments of this application and will not be repeated here.
[0119] This application also provides a computer program product including computer program instructions that, when executed by a processor, cause the processor to perform the steps of the data reporting method or data processing method according to various embodiments of this specification as described in the "Exemplary Methods" section above.
[0120] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this specification. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages.
[0121] This application also provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor of the steps in the data reporting method or data processing method according to various embodiments of this specification as described in the "Exemplary Methods" section above.
[0122] This application also provides an electronic device, including a memory and a processor. The memory stores a data reporting method and / or a data processing method, and the processor is used to employ the methods of the above embodiments when executing the data reporting method and / or the data processing method.
[0123] Specifically, such as Figure 8 As shown, the electronic device includes a processor 100, at least one communication bus 200, a user interface 300, at least one external communication interface 400, and a memory 500. The communication bus 200 is configured to enable communication between these components. The user interface 300 may include a display screen, and the external communication interface 400 may include standard wired and wireless interfaces. The memory 500 stores data reporting methods and / or data processing methods. The processor 100 is used to employ the aforementioned methods when executing the data reporting and / or data processing methods stored in the memory 500.
[0124] The descriptions of the above computer program products, computer-readable storage media, and electronic devices are similar to those of the above method embodiments, and have similar beneficial effects. For any technical details not disclosed in the computer program products, computer-readable storage media, and electronic devices of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0125] The sequence numbers or order of description of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0126] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0127] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0128] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0129] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital versatile disc (DVD)), or a semiconductor medium (e.g., solid state disk (SSD)). It is worth noting that the computer-readable storage medium mentioned in the embodiments of this application can be a non-volatile storage medium; in other words, it can be a non-transient storage medium. It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in the embodiments of this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0130] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A data reporting method, characterized in that, Applied to a client, the method includes: Obtain the data to be submitted; The identity factor and the random seed are hashed to obtain the encryption key and the verification key. The identity factor is a factor generated based on the server's private key and the unique identifier of the reporting unit and pre-stored in the client. The data entered is encrypted using the encryption key to obtain ciphertext; Generate an integrity check code for the ciphertext based on the verification key; An encrypted data packet is generated based on the digital envelope, the integrity check code, and the ciphertext, and the encrypted data packet is output to report the data to the central terminal. The digital envelope is an envelope obtained by encrypting the random seed using a pre-stored server public key.
2. The method according to claim 1, characterized in that, The process of hashing the identity factor and the random seed to obtain the encryption key and the verification key includes: Perform a hash operation on the identity factor and the random seed to obtain a hash value; The first part of the hash value is used as the encryption key; The second part of the hash value is used as the verification key.
3. The method according to claim 1, characterized in that, The step of encrypting the submitted data using the encryption key to obtain ciphertext includes: The submitted data is compressed to obtain plaintext data; The plaintext data is symmetrically encrypted using the encryption key and a random number to obtain the ciphertext.
4. The method according to claim 3, characterized in that, The step of generating the integrity check code of the ciphertext based on the check key includes: The integrity verification code is obtained by performing a hash operation on the verification key, the random number, and the ciphertext.
5. The method according to claim 3, characterized in that, The encrypted data packet also includes the random number and the length information of the digital envelope, wherein the random number and the length information of the digital envelope are used by the central terminal to parse the encrypted data packet for verification and decryption.
6. The method according to claim 4, characterized in that, The hash operations are all based on the SM3 cryptographic hash algorithm, the symmetric encryption is based on the SM4 block cipher algorithm, and the digital envelope is an envelope obtained by encrypting the random seed using the SM2 elliptic curve public key cryptography algorithm.
7. The method according to claim 1, characterized in that, The method further includes: The identity factor sent by the central terminal is received and stored, wherein the identity factor corresponds one-to-one with the reporting unit; In response to a login operation for the client, two-factor authentication is performed based on the identity factor and the login password.
8. The method according to claim 1, characterized in that, The process of obtaining the data to be reported includes: Import the reporting rules and verification rules issued by the central terminal; A spreadsheet template file is generated and exported based on the filling rules and the verification rules, wherein the verification rules are embedded in the spreadsheet template file; Import the form file obtained by filling in the form file based on the spreadsheet template file; The data in the data entry file is validated based on the validation rules, and the validated data is used as the data to be entered.
9. A data reporting device, characterized in that, include: The acquisition unit is used to acquire the data to be submitted. The key derivation unit is used to perform a hash operation on the identity factor and the random seed to obtain the encryption key and the verification key. The identity factor is a factor generated and pre-stored based on the server's private key and the unique identifier of the reporting unit. A data encryption unit is used to encrypt the data entered using the encryption key to obtain ciphertext; A verification code generation unit is used to generate an integrity verification code for the ciphertext based on the verification key. An encapsulation output unit is used to generate an encrypted data packet based on the digital envelope, the integrity check code, and the ciphertext, and to output the encrypted data packet, wherein the digital envelope is an envelope obtained by encrypting the random seed using a pre-stored server public key.
10. A data processing method, characterized in that, Applied to the central end, the method includes: Obtain the encrypted data packet reported by the reporting unit, wherein the encrypted data packet includes a digital envelope, an integrity check code, and ciphertext; The digital envelope is decrypted using the server's private key to obtain a random seed; The identity factor is hashed with the random seed to obtain an encryption key and a verification key. The identity factor is a factor generated based on the server's private key and the unique identifier of the reporting unit and pre-issued to the reporting unit. If the verification code of the ciphertext obtained based on the verification key is consistent with the integrity verification code, the ciphertext is decrypted using the encryption key to obtain the data to be filled in.
11. The method according to claim 10, characterized in that, The method further includes: The identity factor is generated based on the server's private key and the unique identifier of the reporting unit; The identity factor is distributed to the reporting unit, wherein the identity factor corresponds one-to-one with the reporting unit.
12. The method according to claim 10, characterized in that, The method further includes: Configure the data entry rules and validation rules; The reporting rules and the verification rules are distributed to the reporting unit; After obtaining the data to be filled in, the data is verified based on the filling rules, and the data that passes the verification is stored in the database.
13. A data processing apparatus, characterized in that, include: The acquisition unit is used to acquire the encrypted data packet reported by the reporting unit, wherein the encrypted data packet includes a digital envelope, an integrity check code, and ciphertext; The envelope decryption unit is used to decrypt the digital envelope using the server's private key to obtain a random seed; A key derivation unit is used to perform a hash operation on the identity factor and the random seed to obtain an encryption key and a verification key, wherein the identity factor is a factor generated based on the server private key and the unique identifier of the reporting unit and pre-issued to the reporting unit; The data decryption unit is used to decrypt the ciphertext using the encryption key when the verification check code of the ciphertext obtained based on the verification key is consistent with the integrity check code, thereby obtaining the data to be filled in.
14. A data reporting system, characterized in that, Including the central terminal and the client terminal; The central terminal is used to distribute the identity factor to the reporting unit, wherein the identity factor is a factor generated based on the server's private key and the unique identifier of the reporting unit; The client is used to perform a hash operation on the identity factor and the random seed to obtain an encryption key and a verification key. It uses the encryption key to encrypt the data to be reported to obtain ciphertext. Based on the verification key, it generates an integrity verification code for the ciphertext and outputs an encrypted data packet including a digital envelope, the integrity verification code and the ciphertext. The digital envelope is an envelope obtained by encrypting the random seed with the server's public key. The central terminal is also used to, after obtaining the encrypted data packet, decrypt the digital envelope using the server private key to obtain the random seed, re-obtain the encryption key and the verification key based on the identity factor and the random seed, and after verifying the integrity check code based on the verification key, decrypt the ciphertext using the encryption key to obtain the data to be filled in.
15. The system according to claim 14, characterized in that, The central terminal includes an authentication and authorization module, a rules engine module, a data verification module, and a server-side encryption and decryption processing module. The authentication and authorization module is used to generate and distribute the identity factor. The rules engine module is used to configure the reporting rules and verification rules and distribute them to the reporting unit. The server-side encryption and decryption processing module is used to decrypt the digital envelope, obtain the encryption key and the verification key again, and decrypt the ciphertext. The data verification module is used to verify the decrypted reporting data. The client includes an offline authentication module, a rule import and template generation module, a data entry verification module, and a client encryption / decryption processing module. The offline authentication module is used for login authentication based on the identity factor. The rule import and template generation module is used to import the issued data entry rules and verification rules and generate an electronic spreadsheet template file. The data entry verification module is used to verify the data entered based on the electronic spreadsheet template file. The client encryption / decryption processing module is used to obtain the encryption key and the verification key, encrypt the data entry data, and generate the encrypted data packet.
16. An electronic device, characterized in that, include: A memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, the processor executing the computer instructions to perform the method of any one of claims 1 to 8, 10 to 12.
17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the method of any one of claims 1 to 8 and 10 to 12.