File integrity and file repetition processing method, system, equipment and medium

The message digest algorithm is used to encrypt and verify the certificate files to be stored in property management, which solves the problems of file integrity and duplicate certificate storage, improves the credibility and efficiency of certificate storage, saves storage space, and enhances the system's robustness. Great sex.

CN118740828APending Publication Date: 2024-10-01GUANGDONG FISHERMANS GUIDE ECOLOGICAL BIG DATA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411006395.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In the document storage process in the property management industry, there are problems such as difficulty in ensuring file integrity and repeated storage, resulting in wasted storage space and low work efficiency.

Method used

The message digest algorithm is used to encrypt the file to be stored, and the message digest generated by the client and server is used for verification to determine whether the file is complete and whether it has been uploaded repeatedly to avoid repeated storage of certificates.

Benefits of technology

It improves the credibility and efficiency of file storage, ensures the originality of files and the accuracy of the upload process, saves storage space, and enhances the robustness of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740828A_ABST
    Figure CN118740828A_ABST
Patent Text Reader

Abstract

The invention relates to a file integrity and file repetition processing method, system and device and a medium, and relates to the technical field of property management, and the method comprises the steps: carrying out the calculation through a message digest algorithm, and generating a first message digest generated by a to-be-stored file uploaded to a client by a user; submitting the to-be-stored file and the first message digest to a server side, and obtaining a second message digest generated by calculation in the server side; according to the first message digest and the second message digest, judging whether an error occurs in the uploading process of the to-be-stored file or not; if no error occurs, verifying the file to be stored through the existing file in the storage library; judging whether the to-be-stored file is uploaded repeatedly or not; and if the to-be-stored file is uploaded for the first time, storing the to-be-stored file. According to the method and the device, the to-be-stored file is not easily tampered in the uploading process, repeated storage is avoided as much as possible, and the file storage efficiency and accuracy in property management work are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of property management technology, and in particular to a method, system, device and medium for processing file integrity and file duplication. Background Art

[0002] In the property management industry, document storage for daily work is an important part of ensuring service quality, handling disputes and conducting work audits. However, in the current storage process, there are problems such as difficulty in ensuring document integrity and repeated storage, which not only wastes storage space but also reduces work efficiency.

[0003] Currently, the property management industry usually uses traditional document management systems for evidence storage. Most of these systems lack the functions of document integrity verification and duplicate evidence detection.

[0004] Since traditional methods cannot effectively ensure the integrity of the documents to be deposited, nor can they avoid duplicate deposits, this leads to data redundancy in the documents and inefficient property management. Summary of the invention

[0005] The first purpose of this application is to provide a method for processing file integrity and file duplication, which can prevent the files to be stored from being tampered with during the upload process, avoid duplicate storage as much as possible, and improve the efficiency and accuracy of file storage in property management work.

[0006] This application provides a method for processing file integrity and file duplication, which adopts the following technical solutions: A method for processing file integrity and file duplication, comprising: Using a message digest algorithm, a first message digest generated by the file to be stored uploaded by the user to the client is calculated; Submit the file to be stored and the first message digest to the server, obtain the second message digest generated by calculation in the server, and execute A1; A1: judging whether an error occurs during the upload of the file to be stored according to the first message digest and the second message digest; if an error occurs during the upload of the file to be stored, executing A2; if no error occurs during the upload of the file to be stored, executing A3; A2: Prompt the user to re-upload; A3: Verify the existing files in the evidence library with the file to be stored, and determine whether the file to be stored is uploaded repeatedly. If it is uploaded repeatedly, execute A4; if it is uploaded for the first time, execute A5; A4: Prompt the user to save the certificate again; A5: Store the document to be stored as evidence.

[0007] By adopting the above technical solution, a message digest algorithm is used to encrypt the file to be stored, thereby improving the credibility of the file storage. The file to be stored is verified based on the first message digest calculated on the client side and the second message digest generated on the server side. This effectively detects errors or tampering in the upload process of the file to be stored. The file to be stored is verified with the existing files in the storage library to avoid duplicate storage, thereby improving the efficiency and accuracy of file storage in property management work.

[0008] In a preferred example, the present application may be further configured as follows: submitting the to-be-stored file and the first message digest to the server, obtaining the second message digest generated by calculation in the server, and executing step A1, including: Obtain the file to be stored by the server based on the file uploaded by the client; The second message digest calculated and generated by the server according to the file to be stored uploaded by the client is obtained through a message digest algorithm consistent with the one used to calculate the first message digest.

[0009] By adopting the above technical solution, both the client and the server use the same message digest algorithm to effectively detect any errors or tampering in the file upload process, ensuring the originality of the file and the accuracy of the upload process, while making data processing consistent and verifiable, thereby improving the security of file storage.

[0010] In a preferred example, the present application can be further configured as follows: A1 includes: The first message digest and the second message digest are matched to determine whether the contents of the first message digest and the second message digest are consistent. If they are consistent, it is determined that an error occurred during the upload of the file to be stored, and A2 is executed. If they are inconsistent, it is determined that no error occurred during the upload of the file to be stored, and A3 is executed.

[0011] By adopting the above technical solution, the contents of the first message digest and the second message digest generated by the same message digest algorithm are compared as the unique identification of the file to be stored. By comparing the first message digest and the second message digest, it is determined whether an error occurs during the upload of the file to be stored. This allows detection of errors or tampering during the upload process, thereby ensuring the originality of the file and the accuracy of the upload process.

[0012] In a preferred example, the present application can be further configured as follows: A3 includes: Determine whether there is a file consistent with the file to be stored in the evidence repository. If there is a file consistent with the file to be stored in the evidence repository, execute A4; if there is no record in the evidence repository that is completely consistent with the first message digest, execute A5.

[0013] By adopting the above technical solution, when there is a file in the evidence library that is consistent with the file to be stored, it means that the same file content has been stored before. Therefore, it can be determined that the current file to be stored is a duplicate. Duplicate storage will take up additional storage space, resulting in a waste of storage resources. Duplicate storage should be avoided as much as possible.

[0014] In a preferred example, the present application may be further configured as follows: the step of determining whether there is a file in the evidence repository that is consistent with the file to be stored, if there is a file in the evidence repository that is consistent with the file to be stored, executing step A4; if there is no record in the evidence repository that is completely consistent with the first message digest, executing step A5 includes: Determining whether there is a message digest consistent with the first message digest in the evidence repository; If there is a file with a message digest that is consistent with the first message digest in the evidence repository, execute A4; if there is no file with a message digest that is consistent with the first message digest in the evidence repository, execute A5.

[0015] By adopting the above technical solution, before the file to be stored is stored, a first message digest with a small data volume is used to retrieve a file with a message digest consistent with the first message digest in the storage library, so that when the data transmission volume is small, it is possible to determine whether the file to be stored is uploaded repeatedly, thereby reducing data redundancy caused by repeated uploading of the file to be stored, avoiding repeated storage as much as possible, and saving storage space.

[0016] In a preferred example, the present application can be further configured as follows: after A4, it also includes: Determine whether the evidence storage rules used by the file to be stored are consistent with the files in the evidence library. If the evidence storage rules are inconsistent with the files in the evidence library, prompt the user whether the operation is wrong.

[0017] By adopting the above technical solution and introducing the matching judgment of evidence regulations, the accuracy of evidence operations can be further improved, potential problems caused by inconsistent evidence regulations can be identified and handled, the system can be protected from erroneous operations, and the robustness of the system can be enhanced.

[0018] In a preferred example, the present application can be further configured as follows: the step of determining whether the evidence storage rules used by the to-be-stored file are consistent with the files in the evidence storage library, and if the evidence storage rules are inconsistent with the files in the evidence storage library, prompting the user whether the operation is wrong, includes: Based on the first message digest, determine whether the source of the file to be stored is the same as the source of the file with the same message digest in the storage library. If they are the same, it is determined that the storage regulations used by the file to be stored are consistent with the files in the storage library, and the user is prompted whether the operation is wrong.

[0019] By adopting the above technical solution, the source of the file is used as the evidence, which can reduce the problem of errors in uploading files due to conflicts in the sources obtained by users, and enhance the robustness of the system.

[0020] In the second aspect, the present application provides a file integrity and file duplication processing system, which adopts the following technical solutions: First message digest calculation module: The first message digest calculation module is used to calculate and generate a first message digest generated by the file to be stored uploaded by the user to the client through a message digest algorithm; Second message digest calculation module: The second message digest calculation module is used to submit the file to be stored and the first message digest to the server, obtain the second message digest generated by calculation in the server, and execute A1; Message digest matching module: The message digest matching module is used to execute A1: judging whether an error occurs during the uploading process of the file to be stored according to the first message digest and the second message digest; if an error occurs during the uploading process of the file to be stored, executing A2; if no error occurs during the uploading process of the file to be stored, executing A3; First prompt module: The first prompt module is used to execute A2: prompt the user to re-upload; File duplication judgment module: The file duplication judgment module executes A3: verifies the file to be stored with the existing files in the evidence library to determine whether the file to be stored is uploaded repeatedly. If it is uploaded repeatedly, execute A4; if it is uploaded for the first time, execute A5; Second prompting module: The second prompting module is used to execute A4: prompt the user to store the evidence again; File storage module: The file storage module is used to execute A5: store the file to be stored.

[0021] In a third aspect, the present application provides an electronic device, which adopts the following technical solution: An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for processing file integrity and file duplication when executing the computer program.

[0022] In a fourth aspect, the present application provides a computer storage medium, the following technical solution: A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned file integrity and file duplication processing method are implemented.

[0023] In summary, this application has the following beneficial technical effects: This application uses a message digest algorithm to encrypt the file to be stored, thereby improving the credibility of the file storage, and matches and verifies the first message digest calculated by the client with the second message digest generated by the server, so as to avoid errors or tampering that may occur in the upload process of the file to be stored. In addition, by verifying the existing files in the storage library with the file to be stored, duplicate storage is avoided as much as possible, thereby improving the efficiency and accuracy of file storage in property management work. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a flowchart of a file integrity and file duplication processing method structure in one embodiment of the present application.

[0025] Figure 2 It is a sub-step flow chart of step S2 in one embodiment of the present application.

[0026] Figure 3 It is a sub-step flow chart of step A1 in one embodiment of the present application.

[0027] Figure 4 It is a sub-step flow chart of step A3 in one embodiment of the present application.

[0028] Figure 5 It is a sub-step flow chart of step A30 in one embodiment of the present application.

[0029] Figure 6 This is a flowchart of the steps added after step A4 in one of the embodiments of the present application.

[0030] Figure 7 It is a sub-step flow chart of step A40 in one embodiment of the present application.

[0031] Figure 8 It is a structural diagram of a file integrity and file duplication processing system according to one embodiment of the present application.

[0032] Fig. 9 It is a principle block diagram of an electronic device in one embodiment of the present application.

[0033] Figure numerals: 1. First message digest calculation module; 2. Second message digest calculation module; 3. Message digest matching module; 4. First prompt module; 5. File duplication judgment module; 6. Second prompt module; 7. File evidence module. DETAILED DESCRIPTION

[0034] The following is combined with Figure 1-9 This application is described in further detail.

[0035] refer to Figure 1 , a method for processing file integrity and file duplication, specifically comprising: A method for processing file integrity and file duplication, comprising: S1: Calculate and generate a first message digest of the file to be stored uploaded by the user to the client through a message digest algorithm.

[0036] Specifically, it can receive and process various types of files including documents, pictures, and videos to meet a wide range of evidence needs, such as property service contracts, elevator maintenance photos, and photos of hazard warning signs. After the user uploads the file to be stored to the client, the first message digest is generated by calculation in the client, which is essentially an encryption of the file content. The message digest calculated by the message digest algorithm is highly sensitive. Even if there are slight changes in the file to be stored, the generated first message digest will be completely different. Therefore, the first message digest can be used as a unique identifier to verify the file and ensure the integrity and authenticity of the file to be stored.

[0037] S2: Submit the file to be stored and the first message digest to the server, obtain the second message digest generated by calculation in the server, and execute A1.

[0038] A1: According to the first message digest and the second message digest, determine whether an error occurs during the upload of the file to be stored; if an error occurs during the upload of the file to be stored, execute A2; if no error occurs during the upload of the file to be stored, execute A3.

[0039] Specifically, a double insurance mechanism can be implemented in which the client generates a file digest and verifies it with the server, thereby ensuring the integrity and security of file transmission.

[0040] A2: Prompt the user to re-upload.

[0041] A3: Verify the existing files in the evidence library with the files to be stored to determine whether the files to be stored are uploaded repeatedly. If they are uploaded repeatedly, execute A4; if they are uploaded for the first time, execute A5.

[0042] Specifically, before the file enters the evidence storage process, it is automatically detected whether the uploaded file to be stored already exists in the evidence storage library, so as to avoid duplicate storage as much as possible and save storage space.

[0043] A4: Prompt the user to save the evidence again.

[0044] A5: Store the documents to be stored.

[0045] Specifically, once it is determined that the file to be stored uploaded by the user is a new evidence, the subsequent evidence process will be automatically executed, including long-term storage configuration, evidence record update, etc., which will be reflected in the form of software code or workflow.

[0046] In this embodiment, the entire interactive process from the user uploading the file to be stored to the feedback of the storage result, including the feedback mechanism of error prompts and correct storage, embodies a complete user interaction process. Instant feedback of the upload status, whether it is a duplicate file or an upload error, can quickly notify the user, try to avoid invalid operations, and improve user satisfaction.

[0047] First, the message digest algorithm is used to encrypt the evidentiary files to improve the credibility of the file evidence. When uploading the spreadsheet data of the property service contract, the contract number, service type, and service object are calculated through the message digest algorithm to generate the first message digest. Specifically, the contract number is composed of numbers, and the service type has a fixed service type number in the client. The contract number and service type number need to be converted into strings. Since the service object is a variable non-ASCII character composed of Chinese characters, it is necessary to encode it to generate a string first, and then merge the above strings into a single byte sequence in a preset unified order, and generate the first message digest through the message digest algorithm. The second message digest is generated in the same way.

[0048] Verification is performed based on the first message digest calculated on the client side and the second message digest generated on the server side for the file to be stored, so as to effectively detect errors or tampering in the upload process of the file to be stored. When an error occurs in uploading the file to be stored, the erroneous file to be stored has not yet entered the storage process. Therefore, the user is promptly prompted to re-upload the file, which can increase the rate at which the user uploads the correct file to be stored.

[0049] After the file to be deposited has been verified without any error, the file to be deposited is verified with the existing files in the evidence library to find out whether there is any duplicate upload of the file, so as to avoid duplicate deposits as much as possible, thereby improving the efficiency and accuracy of file deposits in property management. When duplicate uploads of files to be deposited occur, the erroneous files to be deposited have not yet entered the evidence process, so the user is promptly prompted to repeat the file steps, which can inform the user that there was no data tampering when uploading the file to be deposited, but the same file has already been uploaded.

[0050] When uploading an image file, in addition to determining whether the file to be stored is the same image, it is also necessary to determine whether the content of the uploaded image is repeated. For example, a user is to upload a picture of a property service contract, but there may be pictures of property service contracts with the same information content but taken from different angles in the storage library. In this case, the picture of the property service contract to be uploaded is regarded as a duplicate stored picture.

[0051] In order to determine whether the image to be uploaded is the same image and whether the content of the image is repeated, it is necessary to extract the effective information of the image and generate a message digest for comparison. The client needs to obtain the geographical location and time information of the shooting, and identify the feature points in the image through the image recognition algorithm and the optical recognition algorithm, obtain the object type or text content of the current image, and generate the first message digest based on the object type or text content, the geographical location and time information of the shooting. The generated message digest is not only more complex, but also enhances the encryption of the first message digest. It also carries the characteristic information of the image. In step A3, when the first message digest and the message digest in the evidence library are different, it is judged that the current image has been stored, including the image with the same characteristic information as the file to be stored, thereby reducing the repeated storage of images with the same content and improving the efficiency and accuracy of document storage in property management.

[0052] refer to Figure 2 Further, in one embodiment, step S2 is refined into the following sub-steps: S20: Obtain the file to be stored uploaded by the server according to the client.

[0053] S21: Obtain a second message digest generated by the server according to the file to be stored uploaded by the client, using a message digest algorithm consistent with the one used to calculate the first message digest.

[0054] Specifically, for different types of files, a specific message digest algorithm is used to perform calculations, and the same type of files use the same message digest algorithm.

[0055] For example, if the MD5 algorithm digest is used on the client to generate the first message digest and the third message digest for the evidence file, the MD5 algorithm is also used on the server to generate the second message digest and the fourth message digest. Similarly, the client and server use the SHA-1 algorithm digest, SHA-256 algorithm digest, etc. to generate message digests.

[0056] When the message digest algorithm of the client or server is changed, the message digests generated by the two will be inconsistent, so the message digests of the client and server must be unified.

[0057] In this embodiment, both the client and the server use the same message digest algorithm to calculate the generated message digest. When there is no error or tampering in the file to be stored, the message digest content generated on the client and the server is consistent and verifiable, which provides a reliable data basis for subsequent verification of whether there is any error or tampering in the upload process of the file to be stored, thereby improving the accuracy and security of file storage.

[0058] In addition, reference Figure 3 Further, in one embodiment, step A1 is refined into the following sub-steps: A10: Match the first message digest with the second message digest to determine whether the contents of the first message digest and the second message digest are consistent. If they are consistent, it is determined that an error occurred during the upload of the file to be stored, and A2 is executed. If they are inconsistent, it is determined that no error occurred during the upload of the file to be stored, and A3 is executed.

[0059] In this embodiment, the message digest of the file to be stored is unique. By comparing the first message digest and the second message digest generated by the same message digest algorithm on the client and the server, it can be effectively determined whether the file to be stored is erroneous or tampered with during the upload process, so that the content of the file to be stored is original and accurate when uploading, thereby ensuring the integrity and credibility of the file to be stored.

[0060] In addition, reference Figure 4 Further, in one embodiment, step A3 is further divided into the following sub-steps: A30: Determine whether there is a file in the evidence repository that is consistent with the file to be stored. If there is a file in the evidence repository that is consistent with the file to be stored, execute A4. If there is no record in the evidence repository that is completely consistent with the first message digest, execute A5.

[0061] In this embodiment, the evidence library structure and algorithm are designed to construct an evidence library to achieve rapid retrieval and accurate matching of a large number of file summaries. After confirming that no errors or tampering are found in the files to be stored during the upload process, the evidence library is used to perform rapid summary comparison, which can effectively identify duplicate files and reduce unnecessary storage resource consumption.

[0062] When a record with the same content as the current file to be stored already exists in the evidence library, it indicates that the file information has been stored before, and the current evidence request can be determined to be a duplicate evidence. Duplicate evidence not only takes up storage space, but may also cause unnecessary waste of storage resources. Therefore, taking measures to avoid duplicate evidence as much as possible helps optimize storage efficiency and save resources, making reasonable use of storage space, and improving the management efficiency of the resources of the file to be stored.

[0063] In addition, reference Figure 5 Further, in one embodiment, step A30 is further divided into the following sub-steps: A300: Determine whether there is a message digest consistent with the first message digest in the evidence repository.

[0064] A301: If there is a file with a message digest that is consistent with the first message digest in the evidence repository, execute A4; if there is no file with a message digest that is consistent with the first message digest in the evidence repository, execute A5.

[0065] In this embodiment, before the file to be stored is stored, a message digest algorithm is used to accurately match a first message digest with a small amount of data generated based on the file to be stored with the message digest of the file already stored in the storage library, so as to quickly search whether there is a file with a message digest consistent with the current file to be stored. In this way, in a scenario where the amount of data transmission is limited, it is possible to quickly determine whether the file to be stored has been uploaded repeatedly, avoid data redundancy and waste of storage space caused by repeated storage, optimize the storage process, improve the utilization efficiency of storage resources, and avoid unnecessary storage operations as much as possible.

[0066] In addition, reference Figure 6 Further, in one embodiment, after step A4, there is added step A40: A40: Determine whether the evidence storage rules used by the file to be stored are consistent with the files in the evidence library. If the evidence storage rules are inconsistent with the files in the evidence library, prompt the user whether the operation is wrong.

[0067] In this embodiment, based on the matching of the file to be stored with the file in the storage library, that is, the occurrence of duplicate file uploads, a consistency check of the storage regulations is added, and when the storage regulations are inconsistent with the files in the storage library, the user is prompted whether the operation is wrong, thereby improving the rigor of the storage process, identifying and handling potential problems caused by inconsistent storage regulations, reducing the impact of errors in the storage regulations on operations, and enhancing the robustness of the system.

[0068] In addition, reference Figure 7 Further, in one embodiment, step A40 is further divided into the following sub-steps: A400: Based on the first message digest, determine whether the source of the file to be stored is the same as the source of the file with the same message digest in the evidence library. If they are the same, it is determined that the evidence regulations used by the file to be stored are consistent with those of the files in the evidence library, and the user is prompted whether the operation is wrong.

[0069] In this embodiment, the source of the file is used as the evidence storage rule to reduce the problem of file upload operation errors caused by conflicts in the sources obtained by users, and enhance the robustness of the system. For example, the user has two other certificates, a firefighter certificate and an electrician certificate. When the file enters the evidence storage process, the user must not only upload the file to be stored, but also upload the ID card and one other certificate. When it is recognized that the same person has two other certificates at the same time, and the ID card is repeated, the other certificate used by the user when uploading the file to be stored is determined, and a first message digest is generated. Then, it is determined whether the type of the other certificate uploaded is the same as the other certificate type of the file with the same message digest in the evidence library. If the same, it is determined that the evidence storage rule used by the file to be stored is consistent with the file in the evidence library, and the user is prompted whether the operation is wrong.

[0070] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0071] The embodiment of the present application also provides a file integrity and file duplication processing system, which corresponds one-to-one to the file integrity and file duplication processing method in the embodiment.

[0072] refer to Figure 8 A file integrity and file duplication processing system includes: a first message digest calculation module 1, a second message digest calculation module 2, a message digest matching module 3, a first prompt module 4, a file duplication judgment module 5, a second prompt module 6, and a file evidence storage module 7. The functional modules are described in detail as follows: First message digest calculation module 1: The first message digest calculation module 1 is used to calculate and generate a first message digest of the file to be stored uploaded by the user to the client through a message digest algorithm.

[0073] Second message digest calculation module 2: The second message digest calculation module 2 is used to submit the file to be stored and the first message digest to the server, obtain the second message digest generated by calculation in the server, and execute A1.

[0074] Message digest matching module 3: Message digest matching module 3 is used to execute A1: determine whether an error occurs during the upload of the file to be stored based on the first message digest and the second message digest. If an error occurs during the upload of the file to be stored, execute A2; if no error occurs during the upload of the file to be stored, execute A3.

[0075] The first prompting module 4: The first prompting module 4 is used to execute A2: prompt the user to re-upload.

[0076] File duplication judgment module 5: The file duplication judgment module 5 executes A3: verifies the existing files in the evidence library with the files to be stored, and determines whether the files to be stored are uploaded repeatedly. If they are uploaded repeatedly, execute A4; if they are uploaded for the first time, execute A5.

[0077] The second prompt module 6: The second prompt module 6 is used to execute A4: prompt the user to store the evidence again.

[0078] File storage module 7: File storage module 7 is used to execute A5: store the file to be stored.

[0079] Among them, the first message digest calculation module 1 first calculates the file to be stored uploaded to the client based on the message digest algorithm to generate a first message digest. At the same time, the second message digest calculation module 2 uploads the file to be stored of the client to the server, and generates a second message digest on the server. Through the message digest matching module 3 and the obtained first message digest and second message digest, it is judged whether there is an error in the uploading process of the file to be stored. If an error occurs, the first prompt module 4 prompts the user to re-upload the file. If the message digest matching module 3 determines that there is no error in the uploading of the file to be stored, the file duplication judgment module 5 judges whether there is a duplicate storage of the file to be stored. If the file to be stored is uploaded repeatedly, the second prompt module 6 prompts the user to repeat the storage. If the file to be stored is uploaded for the first time, the file to be stored is stored, so as to achieve the purpose of protecting the file to be stored, so that the file to be stored is not easily tampered with during the uploading process, and duplicate storage is avoided as much as possible, thereby improving the efficiency and accuracy of file storage in property management work.

[0080] For the specific definition of the file integrity and file duplication processing system, please refer to the definition of the file integrity and file duplication processing method in the context, which will not be repeated here. Each module in the above-mentioned file integrity and file duplication processing system can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules. In one embodiment, an electronic device is provided, which is a user terminal. Reference Fig. 9, the electronic device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the electronic device is used to store a detection data table. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for processing file integrity and file duplication is implemented.

[0081] In one embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: S1: Calculate and generate a first message digest of the file to be stored uploaded by the user to the client through a message digest algorithm.

[0082] S2: Submit the file to be stored and the first message digest to the server, obtain the second message digest generated by calculation in the server, and execute A1.

[0083] A1: According to the first message digest and the second message digest, determine whether an error occurs during the upload of the file to be stored; if an error occurs during the upload of the file to be stored, execute A2; if no error occurs during the upload of the file to be stored, execute A3.

[0084] A2: Prompt the user to re-upload.

[0085] A3: Verify the existing files in the evidence library with the files to be stored to determine whether the files to be stored are uploaded repeatedly. If they are uploaded repeatedly, execute A4; if they are uploaded for the first time, execute A5.

[0086] A4: Prompt the user to save the evidence again.

[0087] A5: Store the documents to be stored.

[0088] In one embodiment, the sub-steps of step S2 include: S20: Obtain the file to be stored uploaded by the server according to the client.

[0089] S21: Obtain a second message digest generated by the server according to the file to be stored uploaded by the client, using a message digest algorithm consistent with the one used to calculate the first message digest.

[0090] In one embodiment, the sub-steps of step A1 include: A10: Match the first message digest with the second message digest to determine whether the contents of the first message digest and the second message digest are consistent. If they are consistent, it is determined that an error occurred during the upload of the file to be stored, and A2 is executed. If they are inconsistent, it is determined that no error occurred during the upload of the file to be stored, and A3 is executed.

[0091] In one embodiment, the sub-steps of step A3 include: A30: Determine whether there is a file in the evidence repository that is consistent with the file to be stored. If there is a file in the evidence repository that is consistent with the file to be stored, execute A4. If there is no record in the evidence repository that is completely consistent with the first message digest, execute A5.

[0092] In one embodiment, the sub-steps of step A30 include: A300: Determine whether there is a message digest consistent with the first message digest in the evidence repository.

[0093] A301: If there is a file with a message digest that is consistent with the first message digest in the evidence repository, execute A4; if there is no file with a message digest that is consistent with the first message digest in the evidence repository, execute A5.

[0094] In one embodiment, the steps added after step A4 include: A40: Determine whether the evidence storage rules used by the file to be stored are consistent with the files in the evidence library. If the evidence storage rules are inconsistent with the files in the evidence library, prompt the user whether the operation is wrong.

[0095] In one embodiment, the sub-steps of step A40 include: A400: Based on the first message digest, determine whether the source of the file to be stored is the same as the source of the file with the same message digest in the evidence library. If they are the same, it is determined that the evidence regulations used by the file to be stored are consistent with those of the files in the evidence library, and the user is prompted whether the operation is wrong.

[0096] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0097] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

Claims

1. A method for processing file integrity and file duplication, characterized in that: include: Using a message digest algorithm, a first message digest generated by the file to be stored uploaded by the user to the client is calculated; Submit the file to be stored and the first message digest to the server, obtain the second message digest generated by calculation in the server, and execute A1; A1: judging whether an error occurs during the upload of the file to be stored according to the first message digest and the second message digest; if an error occurs during the upload of the file to be stored, executing A2; if no error occurs during the upload of the file to be stored, executing A3; A2: Prompt the user to re-upload; A3: Verify the existing files in the evidence library with the file to be stored, and determine whether the file to be stored is uploaded repeatedly. If it is uploaded repeatedly, execute A4; if it is uploaded for the first time, execute A5; A4: Prompt the user to save the certificate again; A5: Store the document to be stored as evidence.

2. The method according to claim 1, characterized in that: The step of submitting the to-be-stored file and the first message digest to the server, obtaining the second message digest generated by calculation in the server, and executing step A1 includes: Obtain the file to be stored by the server based on the file uploaded by the client; The second message digest calculated and generated by the server according to the file to be stored uploaded by the client is obtained through a message digest algorithm consistent with the one used to calculate the first message digest.

3. The method according to claim 2, characterized in that The A1 includes: The first message digest and the second message digest are matched to determine whether the contents of the first message digest and the second message digest are consistent. If they are consistent, it is determined that an error occurred during the upload of the file to be stored, and A2 is executed. If they are inconsistent, it is determined that no error occurred during the upload of the file to be stored, and A3 is executed.

4. The method according to claim 1, characterized in that: The A3 includes: Determine whether there is a file consistent with the file to be stored in the evidence repository. If there is a file consistent with the file to be stored in the evidence repository, execute A4; if there is no record in the evidence repository that is completely consistent with the first message digest, execute A5.

5. The method according to claim 4, characterized in that The step of determining whether there is a file in the evidence repository that is consistent with the file to be stored, if there is a file in the evidence repository that is consistent with the file to be stored, executing A4, and if there is no record in the evidence repository that is completely consistent with the first message digest, executing A5, includes: Determining whether there is a message digest consistent with the first message digest in the evidence repository; If there is a file with a message digest that is consistent with the first message digest in the evidence repository, execute A4; if there is no file with a message digest that is consistent with the first message digest in the evidence repository, execute A5.

6. The method according to claim 1, characterized in that After A4, it also includes: Determine whether the evidence storage rules used by the file to be stored are consistent with the files in the evidence library. If the evidence storage rules are inconsistent with the files in the evidence library, prompt the user whether the operation is wrong.

7. The method according to claim 1, characterized in that The step of judging whether the evidence storage rules used by the to-be-stored file are consistent with the files in the evidence storage library, and if the evidence storage rules are inconsistent with the files in the evidence storage library, prompting the user whether the operation is wrong, comprises: Based on the first message digest, determine whether the source of the file to be stored is the same as the source of the file with the same message digest in the storage library. If they are the same, it is determined that the storage regulations used by the file to be stored are consistent with the files in the storage library, and the user is prompted whether the operation is wrong.

8. A file integrity and file duplication processing system, characterized in that: include: First message digest calculation module (1): The first message digest calculation module (1) is used to calculate and generate a first message digest generated by the file to be stored uploaded by the user to the client through a message digest algorithm; Second message digest calculation module (2): The second message digest calculation module (2) is used to submit the file to be stored and the first message digest to the server, obtain the second message digest generated by calculation in the server, and execute A1; Message digest matching module (3): the message digest matching module (3) is used to execute A1: judging whether an error occurs during the uploading process of the file to be stored according to the first message digest and the second message digest; if an error occurs during the uploading process of the file to be stored, executing A2; if no error occurs during the uploading process of the file to be stored, executing A3; First prompting module (4): the first prompting module (4) is used to execute A2: prompting the user to re-upload; File duplication judgment module (5): the file duplication judgment module (5) executes A3: verifies the file to be stored with the existing files in the evidence storage library to determine whether the file to be stored is uploaded repeatedly. If it is uploaded repeatedly, execute A4; if it is uploaded for the first time, execute A5; Second prompting module (6): the second prompting module (6) is used to execute A4: prompt the user to store the evidence again; File storage module (7): The file storage module (7) is used to execute A5: store the file to be stored.

9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executes the file integrity and file duplication processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and executes the file integrity and file duplication processing method according to any one of claims 1 to 7.