File processing method and device, electronic equipment and computer readable storage medium
By generating a registration code chain associated with the previous file, the problem of electronic files being easily tampered with is solved, and the security verification and integrity protection of the file is realized.
Patent Information
- Application Number
- CN202410124632.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-30
- Publication Date
- 2025-08-01
AI Technical Summary
It is difficult for the prior art to effectively verify whether the archived electronic files have been tampered with, and the tamperability of electronic files has led to insufficient security.
By generating the registration code of the registration file sequence, encrypting it using the characteristic information of the registration file and the external registration code, forming a registration code chain. The registration code of each registration file is associated with the previous file to ensure the integrity of the file.
It realizes security verification of electronic files, prevents file tampering, ensures the integrity and security of file sequences, and avoids the failure of logical verification during tampering detection.
Smart Images

Figure CN120407517A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technologies, and particularly to technologies such as file anti-tampering and data security. Specifically, the present disclosure relates to a file processing method, an apparatus, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the advent of the digital age, more and more files present information and are archived in electronic form. Due to the easy tampering nature of electronic files, it is particularly important to perform anti-tampering verification on archived electronic files. Summary of the Invention
[0003] The present disclosure provides a file processing method, an apparatus, an electronic device, and a computer-readable storage medium.
[0004] According to a first aspect of the present disclosure, there is provided a file processing method, the method comprising:
[0005] Obtaining feature information of the nth registered file in a registered file sequence, and generating a registration code of the nth registered file according to the registration code of the (n - 1)th registered file in the registered file sequence, a pre-obtained external registration code, and the feature information of the nth registered file;
[0006] Wherein, the registered file sequence includes N registered files, and n is an integer greater than 1 and less than or equal to N.
[0007] According to a second aspect of the present disclosure, there is provided a file processing apparatus, the apparatus comprising:
[0008] A first registration module, configured to obtain feature information of the nth registered file in a registered file sequence, and generate a registration code of the nth registered file according to the registration code of the (n - 1)th registered file in the registered file sequence, a pre-obtained external registration code, and the feature information of the nth registered file;
[0009] Wherein, the registered file sequence includes N registered files, and n is an integer greater than 1 and less than or equal to N.
[0010] According to a third aspect of the present disclosure, there is provided an electronic device, the electronic device comprising:
[0011] At least one processor; and
[0012] A memory communicatively connected to the at least one processor; wherein,
[0013] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the above file processing method.
[0014] According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the above-mentioned file processing method.
[0015] According to a fifth aspect of the present disclosure, there is provided a computer program product including a computer program which, when executed by a processor, implements the above-mentioned file processing method.
[0016] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them:
[0018] Figure 1 is a schematic flowchart of a file processing method provided by an embodiment of the present disclosure;
[0019] Figure 2 is a schematic flowchart of partial steps of another file processing method provided by an embodiment of the present disclosure;
[0020] Figure 3 is a schematic flowchart of partial steps of another file processing method provided by an embodiment of the present disclosure;
[0021] Figure 4 is a schematic flowchart of partial steps of another file processing method provided by an embodiment of the present disclosure;
[0022] Figure 5 is a schematic flowchart of partial steps of another file processing method provided by an embodiment of the present disclosure;
[0023] Figure 6 is a schematic diagram of the process of a specific embodiment of another file processing method provided by an embodiment of the present disclosure;
[0024] Figure 7 is a schematic structural diagram of a file processing device provided by an embodiment of the present disclosure;
[0025] Figure 8 is a block diagram of an electronic device for implementing the file processing method of the embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0026] Exemplary embodiments of the present disclosure will be described below in conjunction with the accompanying drawings. Various details of the embodiments of the present disclosure are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, descriptions of well-known functions and structures are omitted in the following description for clarity and conciseness.
[0027] Embodiments of the present disclosure provide a file processing method, an apparatus, an electronic device, and a computer-readable storage medium.
[0028] The file processing method provided by the embodiments of the present disclosure can be executed by an electronic device such as a terminal device or a server. The terminal device can be a vehicle-mounted device, a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The method can be implemented by a processor calling computer-readable program instructions stored in a memory. Alternatively, the method can be executed by a server.
[0029] Figure 1 A flowchart showing the file processing method provided by the embodiments of the present disclosure is shown. As Figure 1 shown, the file processing method provided by the embodiments of the present disclosure includes step S110.
[0030] In step S110, feature information of the nth registration file in the registration file sequence is obtained, and a registration code of the nth registration file is generated based on the registration code of the (n - 1)th registration file in the registration file sequence, a pre-obtained external registration code, and the feature information of the nth registration file;
[0031] wherein, the registration file sequence includes N registration files, and n is an integer greater than 1 and less than or equal to N.
[0032] For example, in the embodiments of the present disclosure, the registration file sequence can be a set of registration files generated by arranging multiple registration files in a certain order. Among them, the registration file can be an electronic file, specifically referring to all types of files stored on storage media such as a computer, including all binary sequences such as various electronic documents, video data, audio data, executable programs, etc.
[0033] In some possible implementation manners, in step S110, the feature information of the registration file includes, but is not limited to, the hash value of the registration file, and / or the generation time of the registration file, and / or the author of the registration file. That is, the feature information is not limited to the hash value. In some application scenarios with relatively strict requirements, other variables such as the file generation time and the file author can also be combined to generate the feature information.
[0034] In some possible implementation manners, the externally obtained registration code obtained in advance can be a registration code generated according to the signature information of the reviewer, or a registration code generated according to the number of registration file bags included in the registration file sequence and the reviewer information. The externally obtained registration code is used to add external information such as the reviewer-related information to the generated registration code.
[0035] In some possible implementation manners, an encryption algorithm can be used to encrypt the registration code of the (n - 1)-th registration file in the registration file sequence, the externally obtained registration code, and the feature information of the n-th registration file, to obtain the registration code of the n-th registration file.
[0036] In some specific implementation manners, the encryption algorithm can be MD5 (Message-Digest Algorithm).
[0037] MD5 is a widely used cryptographic hash function that can produce a 128-bit (16-byte) hash value, which is used to ensure the integrity and consistency of information transmission.
[0038] Certainly, other encryption algorithms are also within the protection scope of the embodiments of the present disclosure.
[0039] In some possible implementation manners, the n-th registration file can be any one of the 2nd to the N-th registration files in the registration file sequence. In the registration file sequence, there can be multiple registration files that generate the registration code of this registration file according to the registration code of the previous registration file, the feature information of this registration file, and the externally obtained registration code.
[0040] In some possible implementation manners, other registration files in the registration file sequence can use other methods to obtain the corresponding registration code.
[0041] In some possible implementation manners, the 1st registration file in the registration file sequence adopts a randomly generated GUID (Globally Unique Identifier) value, and uses an encryption algorithm with the feature information of the 1st registration file to generate the registration code corresponding to the 1st registration file.
[0042] In the document processing method provided by the embodiments of the present disclosure, a registration code is formed by registering a registration document, and the registration code corresponding to each registration document is associated with the registration code of the previous registration document. Therefore, any registration document in the registration document sequence cannot be tampered with, otherwise it will cause the logical verification of the registration code of the entire registration document sequence to fail, thereby achieving the purpose of verifying whether the registered registration document has been tampered with; in addition, when registering a document, generating a registration code does not require extracting the specific content of the registration document, which can ensure the security of the registration document.
[0043] The following specifically introduces the document processing method provided by the embodiments of the present disclosure.
[0044] As described above, the external registration code can be a registration code generated based on the signature information of the reviewer, or a registration code generated based on the number of registration document bags included in the registration document sequence and the reviewer information.
[0045] Figure 2 The flowchart shows an implementation method for generating an external registration code in the case where the external registration code is a registration code generated based on the signature information of the reviewer, as Figure 2 shown, it may include step S210.
[0046] In step S210, an external registration code is generated based on the registration code of the (n - 1)th registration document in the registration document sequence and the signature information of the reviewer.
[0047] In some possible implementation manners, in step S210, the signature information of the reviewer may be information generated based on the signature of the management personnel (i.e., the reviewer) who registers the registration document. For example, the signature of the reviewer is converted into a picture, and the features of the picture are obtained as the signature information of the reviewer.
[0048] Generating an external registration code through the signature information of the reviewer and generating the registration code of the nth registration document based on the external registration code can add a human intervention trace to the registration code. On the one hand, it can increase the complexity of the registration code, and on the other hand, it can also lock the registration code of the current registration document. As long as the registration code and the document of this registration document have not been tampered with, then the registration code of this registration document can be used to verify whether the registration codes of the registration documents before this registration document in the registration document sequence have been changed.
[0049] In some possible implementation manners, an external registration code and the registration code of the nth registration document can be generated by generating a file from the signature of the reviewer and archiving the file.
[0050] Figure 3 The flowchart shows an implementation method for generating an external registration code and generating the registration code of the nth registration document, as Figure 3As shown, generating the external registration code and the registration code of the nth registration file may include steps S310, S320, S330, and S340.
[0051] In step S310, the registration code of the (n - 1)th registration file in the registration file sequence is displayed on the interaction device for the reviewer to input the reviewer's signature information on the interaction device, and an audit electronic file is generated based on the reviewer's signature information.
[0052] In step S320, the feature information of the audit electronic file is obtained, and the feature information of the audit electronic file is used as the external registration code.
[0053] In step S330, the registration code of the audit electronic file is generated according to the registration code of the (n - 1)th registration file in the registration file sequence and the external registration code.
[0054] In step S340, the registration code of the nth registration file is generated according to the registration code of the audit electronic file and the feature information of the nth registration file.
[0055] In some possible implementation manners, in step S310, the interaction device may be a handwriting board or other devices that can allow the reviewer to input the reviewer's signature.
[0056] In some possible implementation manners, the registration code of the (n - 1)th registration file in the registration file sequence may be displayed on an interaction device such as a handwriting board, and the reviewer reviews the registration code through the handwriting board and forms an audit electronic file with a signature.
[0057] In some possible implementation manners, in step S320, obtaining the feature information of the audit electronic file may include but is not limited to the hash value of the audit electronic file, and / or the generation time of the audit electronic file, and / or the reviewer information. That is, the feature information is not limited to the hash value. In some application scenarios with relatively strict requirements, other variables such as the generation time of the audit electronic file and the reviewer information may also be combined to generate the feature information.
[0058] In some possible implementation manners, in step S330, the registration code of the audit electronic file may be obtained in the same way as obtaining the registration code of the registration files in the registration file sequence, that is, the registration code of the audit electronic file is generated according to the registration code of the (n - 1)th registration file and the feature information of the audit electronic file.
[0059] In some possible implementation manners, in step S340, the audit electronic file may be used as the registration file before the nth registration file, and the registration code of the nth registration file is generated according to the registration code of the audit electronic file and the feature information of the nth registration file.
[0060] Therefore, in some possible implementation manners, the reviewed electronic file can be archived as a registration file included in the registration file sequence, that is to say, the reviewed electronic file can be inserted into the registration file sequence. Specifically, the reviewed electronic file can be inserted between the (n - 1)th registration file and the nth registration file. That is to say, the reviewed electronic file becomes the new nth registration file, and the file serial numbers corresponding to the original nth registration file and the registration files after the nth registration file are all incremented by 1.
[0061] As described above, in some possible implementation manners, an external registration code can be generated according to the number of registration files in the registration file sequence and the reviewer information.
[0062] Figure 4 The flowchart shows an implementation manner of generating an external registration code according to the number of registration files in the registration file sequence and the reviewer information and generating a registration file registration code according to the external registration code, as Figure 4 shown, which may include step S410, step S420, and step S430.
[0063] In step S410, an external registration code is generated according to the number of registration files in the registration file sequence and the reviewer information;
[0064] In step S420, an insertion registration code is generated according to the registration code of the (n - 1)th registration file in the registration file sequence and the external registration code;
[0065] In step S430, the registration code of the nth registration file is generated according to the insertion registration code and the feature information of the nth registration file.
[0066] In some possible implementation manners, in step S410, a string code can be generated as the external registration code according to the number of registration files in the registration file sequence and the reviewer information by using a certain algorithm. The specific process of generating the external registration code can be implemented by a dedicated software.
[0067] In some possible implementation manners, in step S420 and step S430, an encryption algorithm is used to generate an insertion registration code according to the registration code of the (n - 1)th registration file and the external registration code, and an encryption algorithm is used to generate the registration code of the nth registration file according to the insertion registration code and the feature information of the nth registration file.
[0068] Among them, the encryption algorithm can be the MD5 algorithm.
[0069] On the one hand, the external registration code is used for verifying the legitimacy of the reviewer, and on the other hand, it increases the complexity of the registration code to prevent the registration code from being rewritten.
[0070] As described above, in some possible implementation manners, other registration documents in the registration document sequence may use other methods to obtain corresponding registration codes.
[0071] Figure 5 The flowchart shows an implementation manner of obtaining the registration code of other registration documents. As Figure 5 shown, obtaining the registration code of other registration documents may include step S510.
[0072] In step S510, obtain the feature information of the m-th registration document in the registration document sequence, and generate the registration code of the m-th registration document according to the registration code of the (m - 1)-th registration document in the registration document sequence and the feature information of the m-th registration document;
[0073] where m is an integer greater than 1 and less than N, and the values of m and n are different.
[0074] In some possible implementation manners, in step S510, the feature information of the registration document may also include but is not limited to the hash value of the registration document, and / or the generation time of the registration document, and / or the author of the registration document. That is, the feature information is not limited to the hash value. In some application scenarios with relatively strict requirements, other variables such as the file generation time and the file author may also be combined to generate the feature information.
[0075] In some possible implementation manners, an encryption algorithm may also be used to encrypt the registration code of the (m - 1)-th registration document in the registration document sequence and the feature information of the m-th registration document to obtain the registration code of the n-th registration document. In some specific implementation manners, the encryption algorithm may also be MD5.
[0076] That is to say, among multiple registration documents in the registration document sequence, multiple registration documents may use external registration codes to obtain corresponding registration codes, and multiple registration documents may also not use external registration codes to obtain corresponding registration codes.
[0077] In some possible implementation manners, the registration codes of all registration documents included in the registration document sequence may be used to generate a registration data chain in the order of the registration documents.
[0078] The generated registration data is a data chain that is connected before and after and can be used for mutual verification. If any registration code in the registration data chain is changed, it will cause the logical verification of the registration data chain to become invalid, thereby helping to determine whether the registration code of the registration document has been modified.
[0079] In some possible implementation manners, the registration code of the review electronic file generated during the generation of the registration code and / or the inserted registration code can be inserted into the registration data chain to increase the complexity of the registration data chain. Specifically, it can be inserted between the registration code corresponding to the nth registration file and the registration code corresponding to the (n + 1)th registration file.
[0080] By inserting the registration code of the review electronic file and / or the inserted registration code into the registration data chain, external interference information can be added to the registration data chain to lock the registration data chain, so as to prevent the occurrence of a security accident where after a certain registration file is artificially tampered with, a new registration data chain is generated again through calculation to prove the validity of the tampered file.
[0081] In some possible implementation manners, after the registration files in the registration file sequence are archived, if it is desired to verify whether the registration file l (l is an integer greater than 1 and less than or equal to N) in the registration file sequence has been tampered with, the feature information of the lth registration file in the registration file sequence is obtained, and according to the registration data chain, the registration code of the (l - 1)th registration file in the registration file sequence and the registration code of the lth registration file in the registration file sequence are obtained.
[0082] In the case where the external registration code does not participate in the generation of the registration code of the lth registration file, the verification code of the lth registration file is generated according to the registration code of the (l - 1)th registration file in the registration file sequence and the feature information of the lth registration file; the verification code of the lth registration file is compared with the registration code of the lth registration file to determine whether the registration file in the registration file sequence has been tampered with.
[0083] In the case where the external registration code participates in the generation of the registration code of the lth registration file, the verification code of the lth registration file is generated according to the reviewer signature information or reviewer information, the registration code of the (l - 1)th registration file in the registration file sequence, and the feature information of the lth registration file; the verification code of the lth registration file is compared with the registration code of the lth registration file to determine whether the registration file in the registration file sequence has been tampered with.
[0084] In some possible implementation manners, if the verification code is consistent with the registration code, it indicates that the registration file l has not been tampered with.
[0085] Next, a specific embodiment is used to specifically introduce the file processing method provided by the embodiments of the present disclosure.
[0086] Figure 6 The process schematic diagram of a specific embodiment of the file processing method provided by the embodiments of the present disclosure is shown. As Figure 6 shown, the registration file 1, registration file 2, registration file 3... registration file N are arranged in sequence to form a registration file sequence.
[0087] Generate a randomly generated GUID random code R1, and use the hash value H1 of registration file 1. Use the formula V1 = F(R1, H1) to obtain the registration code V1 of registration file 1.
[0088] Use the registration code V1 and the hash value H2 of registration file 2. Use the formula V2 = F(V1, H1) to obtain the registration code V2 of registration file 2.
[0089] Use the registration code V2 and the hash value H3 of registration file 3. Use the formula V3 = F(V2, H3) to obtain the registration code V3 of registration file 3.
[0090] And so on. Use the registration code V(n - 1) of registration file n - 1 and the hash value H(n) of registration file n. Use the formula V(n) = F[V(n - 1), H(n)] to obtain the registration code V(n) of registration file n.
[0091] Where F is the algorithm function of the MD5 algorithm. The hash value H(n) of registration file n can be calculated using the formula H(n) = HashFile[File(n)]. HashFile is the function for calculating the file hash value, and File(n) is the file content of registration file n.
[0092] During the registration and archiving of the registration files, the auditor can randomly add artificial traces to the registration code of the registration file to increase the security of the registration code.
[0093] As Figure 6 shown, after obtaining the registration code of registration file m (1 < m < N), the generated registration code V(m) of the mth file can be displayed on the tablet. After the auditor signs on the tablet, an audited electronic file with a signature is formed, or the registration code of registration file m is printed out, and then scanned into an audited electronic file after being signed by the auditor.
[0094] Archive the audited electronic file as the (m + 1)th file in the registration file sequence, that is, use the formula V(S) = F[V(m), H(S)] to calculate the registration code of the audited electronic file, where H(S) is the hash value of the audited electronic file.
[0095] For the registration files after the audited electronic file, that is, registration file m + 1, use the formula V(m + 1) = F[V(S), H(m + 1)] to calculate. The calculation method for calculating the registration code of the subsequent registration files does not change.
[0096] After obtaining the registration code of the registration document q (1 < q < N), the authorization code Kq (i.e., the external registration code) can be generated using a certain algorithm based on the number of registration documents included in the registration document sequence and the reviewer information. The external voucher lock code Lq (i.e., the inserted registration code) is generated using the authorization code Kq and the registration code of the registration document q. Specifically, the external voucher lock code Lq can be calculated using the formula Lq = F[V(q), Kq], and the registration code of the registration document q + 1 is generated based on the hash value of the registration document q + 1, that is, the registration code of the registration document q + 1 is calculated using the formula V(q + 1) = F[Lq, H(q + 1)].
[0097] After completing the archiving of the registration documents and the review electronic documents (i.e., registration document 1, registration document 2, registration document 3... registration document m, review electronic document, registration document m + 1, registration document m + 2... registration document N) and generating the registration code V(N) of the registration document N, the registration codes of each registration document, the registration code of the review electronic document, and the external voucher lock code are saved as a registration data chain in the generation order, that is, V1, V2, V3... V(m), V(S), V(m + 1), V(m + 2)... V(q), Lq, V(q + 1), V(q + 2)... V(N).
[0098] When anti-tampering verification of the registration document is required, only the registration code S of the file to be verified and the file to be verified need to be provided.
[0099] Specifically, obtain the registration code of the registration document ranked one position before the file to be verified and the hash value of the current file to be verified, and then calculate the verification code of the file to be verified through the algorithm used in the above process and compare it with the registration code of the file to be verified recorded in the system.
[0100] When the registration code found in the registration data chain is consistent with the calculated verification code, it indicates that the file to be verified provided is consistent with the content of the registered registration document archived and has not been tampered with; otherwise, it indicates that the file to be verified provided is inconsistent with the content of the registered registration document archived and has been tampered with.
[0101] Of course, in some occasions with stricter verification requirements, information for registration verification (including but not limited to) the generation time T of the registration document, the author W of the registration document, etc. can also be added to the calculation variables, that is:
[0102] V(n) = F[V(n - 1), H(n), T(n), W(n)……];
[0103] And so on,[[]]END]]
[0104] V(S) = F[V(m), H(S), T(S), W(S)……], where T(S) is the generation time of the reviewed electronic document, and W(S) is the reviewer information;
[0105] V(m + 1) = F[V(S), H(m + 1), T(m + 1), W(m + 1)……];
[0106] Lq = F[V(q), Kq]; V(q + 1) = F[Lq, H(q + 1), T(q + 1), W(q + 1)……];
[0107] ……
[0108] V(1) = F[R1, H(1), T(1), W(1)……].
[0109] Based on the same principle as the method shown in Figure 1 Figure Figure 7 shows a schematic structural diagram of a file processing device provided by an embodiment of the present disclosure. As Figure 7 shown, the file processing device 70 may include:
[0110] The first registration module 710 is configured to obtain the feature information of the nth registration file in the registration file sequence, and generate the registration code of the nth registration file according to the registration code of the (n - 1)th registration file in the registration file sequence, the pre-obtained external registration code, and the feature information of the nth registration file;
[0111] where the registration file sequence includes N registration files, and n is an integer greater than 1 and less than or equal to N.
[0112] In the file processing device provided by the embodiment of the present disclosure, by registering the registration file to form a registration code, the registration code corresponding to each registration file is associated with the registration code of the previous registration file. Therefore, any registration file in the registration file sequence cannot be tampered with, otherwise it will cause the logical verification timeliness of the registration codes of the entire registration file sequence, thereby achieving the purpose of verifying whether the registered registration file has been tampered with; in addition, when registering the file, generating the registration code does not require extracting the specific content of the registration file, which can ensure the security of the registration file.
[0113] In some possible implementation manners, the file processing device 70 further includes: a second registration module, which obtains the feature information of the mth registration file in the registration file sequence, and generates the registration code of the mth registration file according to the registration code of the (m - 1)th registration file in the registration file sequence and the feature information of the mth registration file; where m is an integer greater than 1 and less than N, and the values of m and n are different.
[0114] In some possible implementations, the file processing device 70 further includes: a data chain module, configured to generate a registration data chain according to the registration codes of all the registration files in the registration file sequence in the order of the registration files.
[0115] In some possible implementations, the file processing device 70 further includes: a verification module, configured to obtain the feature information of the l-th registration file in the registration file sequence, and obtain the registration code of the (l - 1)-th registration file in the registration file sequence and the registration code of the l-th registration file in the registration file sequence according to the registration data chain; generate the verification code of the l-th registration file at least according to the registration code of the (l - 1)-th registration file in the registration file sequence and the feature information of the l-th registration file; compare the verification code of the l-th registration file with the registration code of the l-th registration file to determine whether the registration files in the registration file sequence have been tampered with; where l is an integer greater than 1 and less than or equal to N.
[0116] In some possible implementations, the file processing device 70 further includes: a registration code generation module, configured to generate an external registration code according to the registration code of the (n - 1)-th registration file in the registration file sequence and the reviewer's signature information.
[0117] In some possible implementations, the registration code generation module is further configured to: display the registration code of the (n - 1)-th registration file in the registration file sequence on the interaction device for the reviewer to input the reviewer's signature information on the interaction device and generate a reviewed electronic file according to the reviewer's signature information; obtain the feature information of the reviewed electronic file and use the feature information of the reviewed electronic file as the external registration code; the first registration module is further configured to: generate the registration code of the reviewed electronic file according to the registration code of the (n - 1)-th registration file in the registration file sequence and the external registration code; generate the registration code of the n-th registration file according to the registration code of the reviewed electronic file and the feature information of the n-th registration file; archive the reviewed electronic file as the registration file in the registration file sequence.
[0118] In some possible implementations, the file processing device 70 further includes: an authorization code module, configured to generate an external registration code according to the number of registration files in the registration file sequence and the reviewer information; the first registration module is further configured to: generate an inserted registration code according to the registration code of the (n - 1)-th registration file in the registration file sequence and the external registration code; generate the registration code of the n-th registration file according to the inserted registration code and the feature information of the n-th registration file.
[0119] In some possible implementations, the feature information includes the hash value of the registration file, and / or the generation time of the registration file, and / or the author of the registration file.
[0120] In some possible implementations, the file processing device 70 further includes: an initial module, configured to generate a registration code for the first registration file in the registration file sequence using a random value.
[0121] In some possible implementations, the first registration module is further configured to: generate a registration code for the nth registration file using a message digest algorithm based on the registration code of the (n - 1)th registration file in the registration file sequence, a pre-obtained external registration code, and the feature information of the nth registration file.
[0122] It can be understood that the above-mentioned modules of the file processing device in the embodiments of the present disclosure have the functions of implementing the corresponding steps of the file processing method in the embodiments shown in Figure 1 The functions can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. The above modules can be software and / or hardware, and the above-mentioned modules can be implemented separately or multiple modules can be integrated to implement. For the function descriptions of the above-mentioned modules of the file processing device, reference can be specifically made to the corresponding descriptions of the file processing method in the embodiments shown in Figure 1 The corresponding descriptions in the embodiments shown in are not repeated here.
[0123] In the technical solution of the present disclosure, the acquisition, storage, and application of the user's personal information involved all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0124] According to the embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0125] The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the file processing method provided by the embodiments of the present disclosure.
[0126] Compared with the prior art, by registering the registration files to form registration codes, the registration code corresponding to each registration file is associated with the registration code of the previous registration file. Therefore, any registration file in the registration file sequence cannot be tampered with, otherwise it will cause the logical verification time limit of the registration codes of the entire registration file sequence, thereby achieving the purpose of verifying whether the registered registration files have been tampered with; in addition, when registering the files, generating the registration codes does not require extracting the specific content of the registration files, which can ensure the security of the registration files.
[0127] The readable storage medium is a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the file processing method provided by the embodiments of the present disclosure.
[0128] Compared with the prior art, the readable storage medium forms a registration code by registering a registration file, and the registration code corresponding to each registration file is associated with the registration code of the previous registration file. Therefore, any registration file in the registration file sequence cannot be tampered with, otherwise it will cause the logical verification timeliness of the registration codes of the entire registration file sequence, so as to achieve the purpose of verifying whether the registered registration file has been tampered with. In addition, when registering a file, generating a registration code does not require extracting the specific content of the registration file, which can ensure the security of the registration file.
[0129] The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the file processing method provided in the embodiments of the present disclosure.
[0130] Compared with the prior art, the computer program product forms a registration code by registering a registration file, and the registration code corresponding to each registration file is associated with the registration code of the previous registration file. Therefore, any registration file in the registration file sequence cannot be tampered with, otherwise it will cause the logical verification timeliness of the registration codes of the entire registration file sequence, so as to achieve the purpose of verifying whether the registered registration file has been tampered with. In addition, when registering a file, generating a registration code does not require extracting the specific content of the registration file, which can ensure the security of the registration file.
[0131] Figure 8 FIG. shows a schematic block diagram of an exemplary electronic device 800 that can be used to implement the embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as, for example, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, for example, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely exemplary and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0132] As Figure 8 shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0133] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as a keyboard, mouse, etc.; output unit 807, such as various types of displays, speakers, etc.; storage unit 808, such as a disk, optical disc, etc.; and communication unit 809, such as a network card, modem, wireless communication transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0134] Computing unit 801 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of computing unit 801 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Computing unit 801 executes the various methods and processes described above, such as the file processing method. For example, in some embodiments, the file processing method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed onto device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by computing unit 801, one or more steps of the file processing method described above can be executed. Alternatively, in other embodiments, computing unit 801 can be configured to execute the file processing method by any other suitable means (e.g., by means of firmware).
[0135] The various embodiments of the systems and techniques described above in this article can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special or general-purpose programmable processor, and can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0136] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowchart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, executed partially on the machine as an independent software package and partially on a remote machine, or executed entirely on a remote machine or server.
[0137] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0138] In order to provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).
[0139] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.
[0140] A computer system can include a client and a server. The client and the server are generally far from each other and typically interact through a communication network. The client-server relationship is generated by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, can also be a server of a distributed system, or a server incorporating a blockchain.
[0141] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and no limitations are imposed herein.
[0142] The above specific embodiments do not constitute a limitation on the protection scope of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the protection scope of this disclosure.
Claims
1. A file registration method, comprising: Obtaining the feature information of the nth registration file in the registration file sequence, and generating the registration code of the nth registration file based on the registration code of the (n - 1)th registration file in the registration file sequence, the externally obtained registration code, and the feature information of the nth registration file; Wherein, the registration file sequence includes N registration files, and n is an integer greater than 1 and less than or equal to N.
2. The method according to claim 1, the method further comprising: Obtaining the feature information of the mth registration file in the registration file sequence, and generating the registration code of the mth registration file based on the registration code of the (m - 1)th registration file in the registration file sequence and the feature information of the mth registration file; Wherein, m is an integer greater than 1 and less than N, and the values of m and n are different.
3. The method according to claim 2, wherein After generating the registration code of the nth registration file and generating the registration code of the mth registration file, it further includes: Generating a registration data chain by arranging the registration codes of all the registration files in the registration file sequence in the order of the registration files.
4. The method according to claim 3, wherein, After generating the registration data chain, it further includes: Obtaining the feature information of the lth registration file in the registration file sequence, and obtaining the registration code of the (l - 1)th registration file in the registration file sequence and the registration code of the lth registration file in the registration file sequence according to the registration data chain; Generating the verification code of the lth registration file at least based on the registration code of the (l - 1)th registration file in the registration file sequence and the feature information of the lth registration file; Comparing the verification code of the lth registration file with the registration code of the lth registration file to determine whether the registration files in the registration file sequence have been tampered with; Wherein, l is an integer greater than 1 and less than or equal to N.
5. The method according to claim 1, wherein Before obtaining the feature information of the nth registration file in the registration file sequence, it further includes: Generating the externally obtained registration code based on the registration code of the (n - 1)th registration file in the registration file sequence and the reviewer's signature information.
6. The method according to claim 5, wherein, The generating the externally obtained registration code based on the registration code of the (n - 1)th registration file in the registration file sequence and the reviewer's signature information includes: Displaying the registration code of the (n - 1)th registration file in the registration file sequence on an interaction device for the reviewer to input the reviewer's signature information on the interaction device, and generating a review electronic file according to the reviewer's signature information; Obtaining the feature information of the review electronic file, and using the feature information of the review electronic file as the externally obtained registration code; The generating the registration code of the nth registration file based on the registration code of the (n - 1)th registration file in the registration file sequence, the externally obtained registration code, and the feature information of the nth registration file includes: Generating the registration code of the review electronic file based on the registration code of the (n - 1)th registration file in the registration file sequence and the externally obtained registration code; Generating the registration code of the nth registration file based on the registration code of the review electronic file and the feature information of the nth registration file; After generating the registration code of the nth registration file, it further includes: Archiving the review electronic file as a registration file in the registration file sequence.
7. The method according to claim 1, wherein Before obtaining the feature information of the nth registration document in the registration document sequence, it further includes: Generating the external registration code according to the number of registration documents in the registration document sequence and the reviewer information; The generating the registration code of the nth registration document according to the registration code of the (n - 1)th registration document in the registration document sequence, the pre-obtained external registration code, and the feature information of the nth registration document includes: Generating an insertion registration code according to the registration code of the (n - 1)th registration document in the registration document sequence and the external registration code; Generating the registration code of the nth registration document according to the insertion registration code and the feature information of the nth registration document.
8. The method according to claim 1, wherein The feature information includes the hash value of the registration document, and / or the generation time of the registration document, and / or the author of the registration document.
9. The method according to claim 1, the method further includes: Using a random value to generate the registration code of the first registration document in the registration document sequence.
10. The method according to claim 1, wherein, The generating the registration code of the nth registration document according to the registration code of the (n - 1)th registration document in the registration document sequence, the pre-obtained external registration code, and the feature information of the nth registration document includes: Using a message digest algorithm to generate the registration code of the nth registration document according to the registration code of the (n - 1)th registration document in the registration document sequence, the pre-obtained external registration code, and the feature information of the nth registration document.
11. A file registration device, including: A first registration module, configured to obtain the feature information of the nth registration document in the registration document sequence, and generate the registration code of the nth registration document according to the registration code of the (n - 1)th registration document in the registration document sequence, the pre-obtained external registration code, and the feature information of the nth registration document; Wherein, the registration document sequence includes N registration documents, and n is an integer greater than 1 and less than or equal to N.
12. An electronic device, including: At least one processor; And A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method according to any one of claims 1 - 10.
13. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the method according to any one of claims 1 - 10.
14. A computer program product, including a computer program, where the computer program implements the method according to any one of claims 1 - 10 when executed by a processor.