File synchronization result verification method, device, equipment and storage medium

By comparing the modification time of the target file with the historical modification time, the corresponding identification information is obtained to reduce the verification time of the file synchronization result, the problem of the verification of the file synchronization result in the existing technology is solved, and more efficient Verification process.

CN117827779BActive Publication Date: 2025-01-17BEIJING DUYOU INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311715369.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-13
Publication Date
2025-01-17
Estimated Expiration
2043-12-13

AI Technical Summary

Technical Problem

The verification method of existing file synchronization results is long and not intelligent enough to effectively improve verification efficiency.

Method used

By comparing the modification time of the target file with the historical modification time, if the first identification information is obtained from the database, if the second identification information is not obtained from the cache at the same time, and sending a verification request to the server to reduce the time of obtaining the identification information .

Benefits of technology

It improves the verification efficiency of file synchronization results, reduces the time to obtain target file identification information, and improves the verification rate and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117827779B_ABST
    Figure CN117827779B_ABST
Patent Text Reader

Abstract

The present disclosure provides a file synchronization result verification method, device, equipment and storage medium, which relates to the field of computer technology, and specifically to technical fields such as data processing and data analysis. It can be applied to scenarios such as network disk data synchronization and network disk data processing, and the specific implementation scheme includes: obtaining the modification time of the target file in the target directory; when the modification time and the historical modification time are the same, obtaining the first identification information of the target file from the database; when the modification time and the historical modification time are different, obtaining the second identification information of the target file from the cache; sending a verification request to the server; receiving feedback information, and the feedback information is used to indicate the verification result of the file synchronization. The present disclosure can reduce the time for obtaining the identification information of the target file and improve the verification efficiency of the file synchronization result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, specifically to technical fields such as data processing and data analysis, and can be applied to scenarios such as network disk data synchronization and network disk data processing, and in particular to a file synchronization result verification method, device, equipment and storage medium. Background Art

[0002] File synchronization refers to keeping the file contents consistent between multiple devices or systems. For example, synchronizing files stored in a client to a server. After file synchronization, it is usually necessary to verify the result of file synchronization to determine whether the file synchronization succeeded or failed.

[0003] In the prior art, the method for verifying the file synchronization result is: respectively obtaining the identification information of each file in the file directory in the server and the identification information of each file in the file directory in the client, and comparing the identification information of the corresponding files one by one. When there is inconsistency in the identification information of the files, it indicates that the file synchronization has failed.

[0004] However, the above method of verifying the file results is time-consuming and the verification method is not intelligent enough. Summary of the invention

[0005] The present disclosure provides a file synchronization result verification method, device, equipment and storage medium, which can reduce the time for obtaining identification information of a target file and improve the verification efficiency of the file synchronization result.

[0006] According to a first aspect of the present disclosure, a file synchronization result verification method is provided, which is applied to a client, and the method includes: obtaining the modification time of a target file in a target directory, wherein the target directory includes at least one target file; when the modification time and the historical modification time are the same, obtaining first identification information of the target file from a database, and the first identification information is used to indicate the uniqueness of the target file; when the modification time and the historical modification time are different, obtaining second identification information of the target file from a cache, and the second identification information is used to indicate the uniqueness of the target file; sending a verification request to a server, the verification request includes identification information of the target file and target directory indication information, the identification information of each target file is the first identification information or the second identification information, and the target directory indication information is used to indicate the target directory; receiving feedback information, and the feedback information is used to indicate the verification result of the file synchronization.

[0007] According to a second aspect of the present disclosure, a method for verifying a file synchronization result is provided, which is applied to a server, and the method includes: receiving a verification request from a client, the verification request including identification information and target directory indication information, the identification information including at least one of first identification information and second identification information, the target directory indication information being used to indicate a target directory that needs to be verified; determining the target directory according to the target directory indication information; obtaining fourth identification information of a target file in the target directory; determining feedback information according to the identification information and the fourth identification information, the feedback information being used to indicate a verification result of the file synchronization; and sending feedback information to the client.

[0008] According to a third aspect of the present disclosure, a file synchronization result verification device is provided, and the device includes: an acquisition unit and a processing unit.

[0009] The acquisition unit is used to acquire the modification time of a target file in a target directory, where the target directory includes at least one target file.

[0010] A processing unit is used to obtain first identification information of a target file from a database when the modification time and the historical modification time are the same, the first identification information is used to indicate the uniqueness of the target file; when the modification time and the historical modification time are different, obtain second identification information of the target file from a cache, the second identification information is used to indicate the uniqueness of the target file; send a verification request to a server, the verification request includes identification information of the target file and target directory indication information, the identification information of each target file is the first identification information or the second identification information, the target directory indication information is used to indicate the target directory; receive feedback information, the feedback information is used to indicate the verification result of file synchronization.

[0011] According to a fourth aspect of the present disclosure, a file synchronization result verification device is provided, and the device includes: a receiving unit and a determining unit.

[0012] The receiving unit is used to receive a verification request from a client, the verification request includes identification information and target directory indication information, the identification information includes at least one of first identification information and second identification information, and the target directory indication information is used to indicate a target directory that needs to be verified.

[0013] The determination unit is used to determine the target directory according to the target directory indication information; obtain the fourth identification information of the target file in the target directory; determine feedback information according to the identification information and the fourth identification information, the feedback information is used to indicate the verification result of file synchronization; and send the feedback information to the client.

[0014] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising: 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 so that the at least one processor can execute the method of the first aspect.

[0015] According to a sixth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, the computer instructions being used to cause a computer to execute the method according to the first aspect.

[0016] According to a seventh aspect of the present disclosure, there is provided a computer program product, comprising a computer program, wherein the computer program implements the method according to the first aspect when executed by a processor.

[0017] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended 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

[0018] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0019] Figure 1 A flowchart of a method for verifying file synchronization results provided by an embodiment of the present disclosure;

[0020] Figure 2 Another flowchart of the file synchronization result verification method provided by the embodiment of the present disclosure;

[0021] Figure 3 Another flowchart of the file synchronization result verification method provided by the embodiment of the present disclosure;

[0022] Figure 4 Another flowchart of the file synchronization result verification method provided by the embodiment of the present disclosure;

[0023] Figure 5 Another flowchart of the file synchronization result verification method provided by the embodiment of the present disclosure;

[0024] Figure 6 A schematic diagram of the composition of a file synchronization result verification device provided by an embodiment of the present disclosure;

[0025] Figure 7 Another schematic diagram of the composition of the file synchronization result verification device provided by the embodiment of the present disclosure;

[0026] Figure 8The present disclosure is provided as a schematic block diagram of an example electronic device 800 that can be used to implement the present disclosure. DETAILED DESCRIPTION

[0027] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0028] It should be understood that in the embodiments of the present disclosure, the character " / " generally indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", etc. are used only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features.

[0029] File synchronization refers to keeping the file contents consistent between multiple devices or systems. For example, synchronizing files stored in a client to a server. After file synchronization, it is usually necessary to verify the result of file synchronization to determine whether the file synchronization succeeded or failed.

[0030] Exemplarily, file synchronization refers to the process of keeping the file content and status consistent between multiple devices to ensure file consistency. File synchronization can be applied in multiple scenarios such as multi-device synchronization, file backup and recovery, team collaboration, cross-platform synchronization, online storage and sharing, and network disk file synchronization. After the file synchronization is completed, the result of the file synchronization can be verified to ensure that the result of the file synchronization is successful. The verification of the file synchronization result can keep the file consistent.

[0031] For example, taking the file synchronization application in the network disk file synchronization as an example, after the user modifies the file on the client, the modified file is uploaded to the client. After the client synchronizes the file to the client, the synchronization result needs to be verified to ensure the consistency of the file in the client and the server.

[0032] In the prior art, the method for verifying the file synchronization result is: respectively obtaining the identification information of each file in the file directory in the server and the identification information of each file in the file directory in the client, and comparing the identification information of the corresponding files one by one. When there is inconsistency in the identification information of the files, it indicates that the file synchronization has failed.

[0033] For example, taking the file synchronization application in the network disk file synchronization as an example, after the file synchronization is completed, the file synchronization result needs to be verified to ensure the consistency of the files in the server and the client. The way to verify the file synchronization result is: upload the identification information of the file in the client to the server, and compare it one by one with the identification information of the corresponding file in the server. When the identification information of all files is the same, it can be confirmed that the result of file synchronization is successful. When the identification information of one file is different, it means that the result of file synchronization is failed.

[0034] However, the above method of verifying the file synchronization result is time-consuming and the verification method is not smart enough.

[0035] Under this background technology, the present disclosure provides a file synchronization result verification method, which can reduce the time for obtaining identification information of a target file and improve the verification efficiency of the file synchronization result.

[0036] Exemplarily, the execution subject of the file synchronization result verification method may be a computer or a server, or may be other devices with data processing capabilities. The execution subject of the method is not limited here.

[0037] In some embodiments, the server may be a single server, or a server cluster composed of multiple servers. In some implementations, the server cluster may also be a distributed cluster. The present disclosure does not limit the specific implementation of the server.

[0038] Figure 1 The following is a flow chart of a method for verifying file synchronization results provided by an embodiment of the present disclosure. Figure 1 As shown, the method may include steps S101 to S106.

[0039] S101. Obtain modification time of a target file in a target directory, where the target directory includes at least one target file.

[0040] Exemplarily, the target directory may be a target directory selected by the user, or may be a system default target directory that needs to be updated. The target directory may include at least one file, and correspondingly, all files in the target directory may be target files, or some of them may be target files. The selection of specific target files may be determined according to actual conditions.

[0041] For example, the target directory may include three files, namely, file A, file B, and file C. The target files may be file A, file B, and file C; the target files may also be file A and file B. Taking the target files as file A, file B, and file C as an example, the modification time of file A in the target directory may be 15:48:45 on November 2, 2023, the modification time of file B in the target directory may be 15:49:05 on November 2, 2023, and the modification time of file C in the target directory may be 15:49:23 on November 2, 2023.

[0042] S102: Compare the modification time with the historical modification time of the target file in the database.

[0043] Exemplarily, the target file in the target directory may be stored in a database, and the database may store various information of the target file, including the historical modification time of the target file. The historical modification time of the target file may be the time when the target file was last modified.

[0044] For example, the target files stored in the database may be: file A, file B, file C, and the corresponding historical modification times may be: November 2, 2023 15:48:45, November 2, 2023 15:49:05, November 2, 2023 15:53:34.

[0045] Optionally, S102 may not be a step actually performed, or Figure 1 In the process shown, S102 may also be omitted, and it is only necessary to execute the corresponding conditions according to the execution logic of S103 or S104.

[0046] S103: When the modification time and the historical modification time are the same, obtain first identification information of the target file from the database, where the first identification information is used to indicate the uniqueness of the target file.

[0047] Exemplarily, the first identification information of the target file can be used to indicate the uniqueness of the target file, such as identification information such as the MD5 value and hash value of the target file. The first identification information of the target file can be stored in a database or in a local server, and there is no restriction on the storage location of the first identification information of the target file.

[0048] For example, the modification time of file A may be 15:48:45 on November 2, 2023, and the historical modification time of file A stored in the database may be 15:48:45 on November 2, 2023; the modification time of file B may be 15:49:05 on November 2, 2023, and the historical modification time of file B stored in the database may be 15:49:05 on November 2, 2023. The modification time and historical modification time of file A and file B are the same, and the first identification information of file A and file B can be obtained. For example, the first identification information of file A obtained may be: Nah8Khgdnakhud; the first identification information of file B obtained may be JHd3hdaKJLdqdad.

[0049] S104: When the modification time and the historical modification time are different, obtain second identification information of the target file from the cache, where the second identification information is used to indicate the uniqueness of the target file.

[0050] Exemplarily, the second identification information of the target file can be used to indicate the uniqueness of the target file, such as identification information such as the MD5 value and hash value of the target file. When the modification time and the historical modification time are different, the second identification information of the target file can be obtained from the cache according to the storage path of the target file or the file name of the target file. Cache is a technology for temporarily storing data. In this embodiment, the second identification information of the target file can be stored in the cache so as to quickly obtain the corresponding second identification information of the target file from the cache.

[0051] For example, the modification time of file A may be 15:48:45 on November 2, 2023, and the historical modification time of file A stored in the database may be 16:01:16 on November 2, 2023; the modification time of file B may be 15:49:05 on November 2, 2023, and the historical modification time of file B stored in the database may be 16:01:23 on November 2, 2023. The modification time and historical modification time of file A and file B are different, and the first identification information of file A and file B can be obtained. For example, the first identification information of file A obtained from the cache according to the storage path of the target file may be: Lhuiadwun90d; the first identification information of file B obtained from the cache according to the file name of the target file may be: KJdiajdad92daj.

[0052] S105. Send a verification request to the server, where the verification request includes identification information of the target file and target directory indication information. The identification information of each target file is the first identification information or the second identification information, and the target directory indication information is used to indicate the target directory.

[0053] Exemplarily, when the modification time and the historical modification time of the target file in the target directory are the same, the identification information may only include the first identification information; when the modification time and the historical modification time of the target file in the target directory are different, the identification information may only include the second identification information; when the modification time and the historical modification time of the target file in the target directory are the same and different, the identification information may include both the first identification information and the second identification information.

[0054] For example, taking the modification time and historical modification time of the target file in the target directory as the same, the modification time of file A may be 15:48:45 on November 2, 2023, and the historical modification time of file A stored in the database may be 15:48:45 on November 2, 2023; the modification time of file B may be 15:49:05 on November 2, 2023, and the historical modification time of file B stored in the database may be 15:49:05 on November 2, 2023. The first identification information included in the identification information in the verification request may be: Nah8Khgdnakhud, JHd3hdaKJLdqdad.

[0055] For another example, the modification time of file A may be 15:48:45 on November 2, 2023, and the historical modification time of file A stored in the database may be 16:01:16 on November 2, 2023; the modification time of file B may be 15:49:05 on November 2, 2023, and the historical modification time of file B stored in the database may be 16:01:23 on November 2, 2023. The second identification information included in the identification information in the verification request may be: Lhuiadwun90d, KJdiajdad92daj.

[0056] For another example, the modification time of file A may be 15:48:45 on November 2, 2023, and the historical modification time of file A stored in the database may be 15:48:45 on November 2, 2023; the modification time of file B may be 15:49:05 on November 2, 2023, and the historical modification time of file B stored in the database may be 16:01:23 on November 2, 2023. The first identification information included in the identification information in the verification request may be: Nah8Khgdnakhud, and the second identification information included in the identification information in the verification request may be: KJdiajdad92daj.

[0057] S106: Receive feedback information, where the feedback information is used to indicate a verification result of the file synchronization.

[0058] For example, when the verification result of the file synchronization is successful, the feedback information can be used to indicate that the verification result of the file synchronization is successful; when the verification result of the file synchronization is failed, the feedback information can be used to indicate that the verification result of the file synchronization is failed.

[0059] The present invention obtains the modification time of a target file in a target directory, wherein the target directory includes at least one target file; compares the modification time with the historical modification time of the target file in a database, and can determine whether the modification time and the historical modification time of the target file in the database are consistent by comparison; when the modification time and the historical modification time are the same, obtains first identification information of the target file; when the modification time and the historical modification time are different, obtains second identification information of the target file; sends a verification request to a server; and receives feedback information, wherein the feedback information is used to indicate the verification result of file synchronization, and when the modification time and the historical modification time are different, the second identification information of the target file can be quickly obtained from the cache, thereby reducing the time for obtaining the identification information of the file and improving the verification efficiency of the file synchronization result.

[0060] In some embodiments, Figure 1 Step S104 includes: obtaining second identification information from the cache according to the file path of the target file.

[0061] Exemplarily, the second identification information of the target file can be stored in the cache. When the modification time and the historical modification time of the target file are different, the second identification information of the target file can be directly obtained from the address corresponding to the file path according to the file path of the target file.

[0062] For example, the target file may be file B, the modification time of file B may be 15:49:05 on November 2, 2023, the historical modification time of file B stored in the database may be 16:01:23 on November 2, 2023, and the file path of file B may be: C:\File_1.data. When the modification time of file B and the historical modification time of file B are different, the second identification information of file B may be obtained from the cache according to the modification path of file B. For example, the obtained second identification information of file B may be: KJdiajdad92daj.

[0063] This embodiment obtains the second identification information from the cache according to the file path of the target file, and can obtain the second identification information of the target file from the cache, thereby accurately determining the second identification information of the target file according to the storage path of the target file, reducing the time for obtaining the identification information of the file, and further improving the verification rate of the file synchronization result.

[0064] In some embodiments, the file synchronization result verification method further includes: modifying the first identification information in the database into the second identification information.

[0065] Exemplarily, the first identification information and the second identification information are stored in different locations. When the modification time and the historical modification time of the target file are different, the first identification information of the target file in the database may be modified to the second identification information.

[0066] For example, the storage location of the first identification information may be a database, and the storage location of the second identification information may be a cache. The target file may be file B, the modification time of file B may be 15:49:05 on November 2, 2023, the historical modification time of file B stored in the database may be 16:01:23 on November 2, 2023, the first identification information of file B stored in the database may be: HhdUud8gaudb, and the second identification information of file B stored in the cache may be: KJdiajdad92daj. The modification time of file B is different from the historical modification time, and the first identification information stored in the database may be modified to: KJdiajdad92daj.

[0067] This embodiment can maintain the uniqueness and consistency of the identification information of the target file by modifying the first identification information in the database to the second identification information when the modification time of the target file is different from the historical modification time, thereby improving the stability of the system.

[0068] Figure 2 Another flowchart of the file synchronization result verification method provided by the embodiment of the present disclosure is shown in FIG. Figure 2 As shown, Figure 1 Step S105 may also include: step S201-step S202.

[0069] S201. Splice identification information of different target files according to a preset splicing rule to obtain third identification information.

[0070] S202: Send a verification request to the server, where the verification request includes third identification information and target directory indication information.

[0071] Exemplarily, the preset splicing rule may be manually set or may be a default sorting method of the system.

[0072] For example, the preset splicing rule may be: sort in ascending order, and splice different identification information with the symbol "+". The identification information may include two identification information, namely Nah8Khgdnakhud and KJdiajdad92daj. The identification information is spliced ​​according to the preset splicing rule, and the determined third identification information may be "KJdiajdad92daj+Nah8Khgdnakhud". After obtaining the third identification information, the third identification information and the target directory indication information may be sent to the server as verification information.

[0073] This embodiment splices the identification information according to preset splicing rules, obtains the third identification information, and sends a verification request to the server, wherein the verification request includes the third identification information and the target directory indication information. This can ensure the integrity and credibility of the data transmission process, reduce the number of verification requests sent to the server, thereby reducing the cost and comparison logic of the server-side verification task, and further improving work efficiency.

[0074] In some embodiments, Figure 1 Before step S101, the file synchronization result verification method further includes: receiving target directory determination information input by a user, and determining the target directory.

[0075] For example, a target directory determination page may be provided for the user on the client, and the user may determine the target directory determination information by text input, selection, etc. on the target directory determination page, and the target directory determination information is sent to the client. The client may receive the target directory determination information input by the user, and determine the target directory according to the target directory determination information.

[0076] For example, in the client, the user can enter the target directory determination information by handwriting, such as: C:\Program Files\Realtek, or, in the target directory determination page, all file directories in the system can be displayed, and the user can confirm the target directory determination information by clicking the mouse, for example, the confirmed target directory determination information can be: C:\Program Files(x86)\Microsoft Office. The client can determine the target directory as "C:\Program Files\Realtek" according to the target directory determination information "C:\Program Files\Realtek", and determine the target directory as "C:\Program Files(x86)\Microsoft Office" according to the target directory determination information "C:\Program Files(x86)\Microsoft Office".

[0077] This embodiment determines the target directory by receiving target directory determination information input by the user, which can improve the flexibility of data synchronization, ensure the security of user data, reduce system burden and response time, and improve system stability and processing efficiency.

[0078] Figure 3 Another flowchart of the file synchronization result verification method provided by the embodiment of the present disclosure. Figure 3 As shown, the method may include steps S301 to S305.

[0079] S301. Receive a verification request from a client, where the verification request includes identification information and target directory indication information, where the identification information includes at least one of first identification information and second identification information, and the target directory indication information is used to indicate a target directory that needs to be verified.

[0080] For the explanation of step S301, please refer to step S105, which will not be elaborated here.

[0081] S302: Determine the target directory according to the target directory indication information.

[0082] Exemplarily, the target directory indication information is used to indicate the target directory that needs to be verified, and the target directory can be determined according to the target directory indication information.

[0083] For example, the target directory indication information may be: C:\Program Files(x86)\Microsoft Office. According to the target directory indication information, the target directory that can be determined is: C:\Program Files(x86)\Microsoft Office.

[0084] S303: Obtain fourth identification information of the target file in the target directory.

[0085] Exemplarily, all files in the target directory may be target files, or only some of them may be target files, and the selection of specific target files may be determined according to actual conditions. The fourth identification information of all target files in the target directory may be obtained.

[0086] For example, the target directory may include three files, namely, file A, file B, and file C. The target files may be file A, file B, and file C; or file A and file B. When the target files are file A and file B, the fourth identification information of file A may be: Lhuiadwun90d, and the fourth identification information of file B may be: KJdiajdad92daj.

[0087] S304: Determine feedback information according to the identification information and the fourth identification information, where the feedback information is used to indicate a verification result of the file synchronization.

[0088] Exemplarily, the feedback information can be determined based on the identification information and the fourth identification information: the fourth identification information and the identification information of the target file corresponding to the fourth identification information are compared by character strings. Correspondingly, when the identification information is the third identification information, the fourth identification information needs to be spliced ​​according to the preset splicing rule to obtain the fifth identification information, and the feedback information is determined based on the fifth identification information and the identification information (that is, the third identification information); the feedback information can be determined by comparing the fifth identification information with the identification information (that is, the third identification information). When the comparison result is the same, the feedback information is used to indicate that the verification result of the file synchronization is successful, and when the comparison result is different, the feedback information is used to indicate that the verification result of the file synchronization is failed.

[0089] For example, the fourth identification information may be: Lhuiadwun90d, KJdiajdad92daj, and the identification information may be: Lhuiadwun90d, KJdiajdad92daj. Lhuiadwun90d is compared with the identification information Lhuiadwun90d of the corresponding target file, and KJdiajdad92daj is compared with the identification information KJdiajdad92daj of the corresponding target file. When the comparison results are all the same, the corresponding feedback information is used to indicate that the verification result of the file synchronization is successful.

[0090] For another example, the fourth identification information may be: Lhuiadwun90d, KJdiajdad92daj, and the identification information may be: Lhuiadwun90d, HhdUud8gaudb. Lhuiadwun90d is compared with the identification information Lhuiadwun90d of the corresponding target file, and KJdiajdad92daj is compared with the identification information HhdUud8gaudb of the corresponding target file. If the comparison result is not completely the same, the corresponding feedback information is used to indicate that the verification result of file synchronization is failed.

[0091] For another example, the identification information may be: Lhuiadwun90d+HhdUud8gaudb. Correspondingly, the fourth identification information is spliced ​​according to the preset splicing rule, and the fifth identification information obtained may be: Lhuiadwun90d+KJdiajdad92daj. Lhuiadwun90d+HhdUud8gaudb and Lhuiadwun90d+KJdiajdad92daj are compared by string comparison. When the comparison result is the same, the corresponding feedback information is used to indicate that the verification result of the file synchronization is successful.

[0092] S305: Send feedback information to the client.

[0093] This embodiment receives a verification request from the client, determines the target directory according to the target directory indication information, obtains the fourth identification information of the target file in the target directory, determines feedback information according to the identification information and the fourth identification information, and the feedback information is used to indicate the verification result of the file synchronization. The feedback information is sent to the client, and the accurate target directory can be determined according to the verification request, and the accurate feedback information can be determined according to the fourth identification information of the target file in the target directory. It can quickly determine whether the result of file synchronization is successful, thereby improving work efficiency.

[0094] Figure 4 Another flowchart of the file synchronization result verification method provided by the embodiment of the present disclosure. Figure 4 As shown, in a specific embodiment, the client can traverse all folders in the system, select a target directory that needs to be synchronized, and obtain the modification time of the target directory; the client can send the modification time and identification information of the target directory to the client file cache database (that is, Figure 4 The client file cache database can determine whether the modification time of the target directory has changed according to the modification time and identification information of the received target directory, and return the identification information of the target directory whose modification time has not changed to the client.

[0095] After receiving the identification information of the target directory whose modification time has not changed, the client recalculates the identification information of the target directory whose modification time has changed, and sends the recalculated identification information of the target directory whose modification time has changed to the client file cache database to update the client file cache database. The client can splice the identification information of the target directory whose modification time has not changed and the recalculated identification information of the target directory whose modification time has changed according to a preset rule to obtain spliced ​​string identification information. The client can send the spliced ​​string identification information to the server.

[0096] After receiving the spliced ​​string identification information, the server can obtain the identification information of the corresponding directory from the server file database, and splice the identification information of the directory obtained in the server file database according to the preset rules to obtain the spliced ​​string identification information of the directory in the server file database. The server can compare the spliced ​​string identification information received from the client with the spliced ​​string identification information of the directory in the server file database, and obtain the verification result of the file synchronization as success or failure.

[0097] Figure 5 Another flowchart of the file synchronization result verification method provided by the embodiment of the present disclosure. Figure 5 As shown, in a specific embodiment, the client can traverse all the files in the target directory that needs to be synchronized, and obtain the file names and identification information of all the files in the target directory. The client can send the file names and identification information of all the files in the target directory to the server. The server can obtain the file names and identification information of all the files in the directory with the same file name as the target directory in the file information database of the server, and compare the file names and identification information of all the files in the target directory in the client and the file names and identification information of all the files in the directory with the same file name as the target directory in the file information database of the server to see if they are consistent, so as to obtain the verification result of the file synchronization as success or failure.

[0098] In an exemplary embodiment, the present disclosure also provides a file synchronization result verification device, which can be used to implement the file synchronization result verification method as described in the above-mentioned embodiment. Figure 6 The following is a schematic diagram of the composition of the file synchronization result verification device provided by the embodiment of the present disclosure. Figure 6 As shown, the device may include: an acquisition unit 601 and a processing unit 602.

[0099] The acquisition unit 601 is used to acquire the modification time of a target file in a target directory, where the target directory includes at least one target file.

[0100] Processing unit 602 is used to obtain first identification information of the target file from the database when the modification time and the historical modification time are the same, and the first identification information is used to indicate the uniqueness of the target file; when the modification time and the historical modification time are different, obtain second identification information of the target file from the cache, and the second identification information is used to indicate the uniqueness of the target file; send a verification request to the server, the verification request includes the identification information of the target file and the target directory indication information, the identification information of each target file is the first identification information or the second identification information, and the target directory indication information is used to indicate the target directory; receive feedback information, and the feedback information is used to indicate the verification result of the file synchronization.

[0101] Optionally, the processing unit 602 is specifically configured to: obtain the second identification information from the cache according to the file path of the target file.

[0102] Optionally, the processing unit 602 is further configured to: modify the first identification information in the database into the second identification information.

[0103] Optionally, the processing unit 602 is specifically used to: splice the identification information of different target files according to a preset splicing rule to obtain third identification information; and send a verification request to the server, where the verification request includes the third identification information and target directory indication information.

[0104] Optionally, before obtaining the modification time of the target file in the target directory, the obtaining unit 601 is further used to: receive target directory determination information input by a user, and determine the target directory.

[0105] In an exemplary embodiment, the present disclosure also provides a file synchronization result verification device, which can be used to implement the file synchronization result verification method as described in the above-mentioned embodiment. Figure 7 Another schematic diagram of the file synchronization result verification device provided by the embodiment of the present disclosure. Figure 7 As shown, the device may include: a receiving unit 701 and a determining unit 702.

[0106] The receiving unit 701 is used to receive a verification request from a client, the verification request includes identification information and target directory indication information, the identification information includes at least one of first identification information and second identification information, and the target directory indication information is used to indicate a target directory that needs to be verified.

[0107] The determination unit 702 is used to determine the target directory according to the target directory indication information; obtain the fourth identification information of the target file in the target directory; determine feedback information according to the identification information and the fourth identification information, the feedback information is used to indicate the verification result of the file synchronization; and send the feedback information to the client.

[0108] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0109] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0110] In an exemplary embodiment, an 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 method described in the above embodiments.

[0111] In an exemplary embodiment, the readable storage medium may be a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method according to the above embodiments.

[0112] In an exemplary embodiment, a computer program product includes a computer program, and when the computer program is executed by a processor, the method according to the above embodiments is implemented.

[0113] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0114] like Figure 8 As shown, the electronic 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 electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0115] Multiple components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0116] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the 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, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as the file synchronization result verification method. For example, in some embodiments, the file synchronization result verification method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the file synchronization result verification method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the file synchronization result verification method in any other appropriate manner (e.g., by means of firmware).

[0117] Various implementations of the systems and techniques described above herein 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 chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations 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 purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0118] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0119] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0120] 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 pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types 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, voice input, or tactile input).

[0121] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0122] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0123] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0124] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A file synchronization result verification method, applied to a client, comprising: Obtain modification time of a target file in a target directory, wherein the target directory includes at least one target file; When the modification time and the historical modification time are the same, obtaining first identification information of the target file from a database, where the first identification information is used to indicate the uniqueness of the target file; When the modification time and the historical modification time are different, obtaining second identification information of the target file from the cache, where the second identification information is used to indicate the uniqueness of the target file; Sending a verification request to a server, the verification request including identification information of the target file and target directory indication information, the identification information of each target file is the first identification information or the second identification information, and the target directory indication information is used to indicate the target directory; Feedback information is received, where the feedback information is used to indicate a verification result of the file synchronization.

2. The method according to claim 1, wherein when the modification time and the historical modification time are different, obtaining the second identification information of the target file from the cache comprises: The second identification information is obtained from a cache according to the file path of the target file.

3. The method according to claim 1 or 2, further comprising: The first identification information in the database is modified into the second identification information.

4. The method according to claim 1, wherein sending a verification request to a server comprises: splicing the identification information of different target files according to a preset splicing rule to obtain third identification information; A verification request is sent to the server, where the verification request includes the third identification information and the target directory indication information.

5. The method according to claim 1, before obtaining the modification time of the target file in the target directory, the method further comprises: Receive target directory determination information input by a user, and determine the target directory.

6. A file synchronization result verification method, applied to a server, the method comprising: receiving a verification request from a client, the verification request including identification information and target directory indication information, the identification information including at least one of first identification information and second identification information, the target directory indication information is used to indicate a target directory to be verified, the first identification information is used to indicate uniqueness of a target file, and the first identification information is information obtained by the client from a database when a modification time of the target file and a historical modification time are the same; The second identification information is used to indicate the uniqueness of the target file, and the second identification information is information obtained by the client from the cache when the modification time and the historical modification time are different; Determine the target directory according to the target directory indication information; Acquire fourth identification information of the target file in the target directory; Determining feedback information according to the identification information and the fourth identification information, wherein the feedback information is used to indicate a verification result of file synchronization; The feedback information is sent to the client.

7. A file synchronization result verification device, applied to a client, comprising: An acquiring unit, configured to acquire a modification time of a target file in a target directory, wherein the target directory includes at least one target file; A processing unit, configured to, when the modification time and the historical modification time are the same, obtain first identification information of the target file from a database, the first identification information being used to indicate the uniqueness of the target file; and when the modification time and the historical modification time are different, obtain second identification information of the target file from a cache, the second identification information being used to indicate the uniqueness of the target file; Sending a verification request to a server, the verification request including identification information of the target file and target directory indication information, the identification information of each target file is the first identification information or the second identification information, and the target directory indication information is used to indicate the target directory; Feedback information is received, where the feedback information is used to indicate a verification result of the file synchronization.

8. The device according to claim 7, wherein the processing unit is specifically configured to: The second identification information is obtained from a cache according to the file path of the target file.

9. The device according to claim 7 or 8, wherein the processing unit is further configured to: The first identification information in the database is modified into the second identification information.

10. The device according to claim 7, wherein the processing unit is specifically configured to: splicing the identification information of different target files according to a preset splicing rule to obtain third identification information; A verification request is sent to the server, where the verification request includes the third identification information and the target directory indication information.

11. The device according to claim 7, before obtaining the modification time of the target file in the target directory, the obtaining unit is further used to: Receive target directory determination information input by a user, and determine the target directory.

12. A file synchronization result verification device, applied to a client, comprising: a receiving unit, configured to receive a verification request from a client, the verification request including identification information and target directory indication information, the identification information including at least one of first identification information and second identification information, the target directory indication information being used to indicate a target directory to be verified, the first identification information being used to indicate uniqueness of a target file, the first identification information being information obtained by the client from a database when a modification time of the target file is the same as a historical modification time; The second identification information is used to indicate the uniqueness of the target file, and the second identification information is information obtained by the client from the cache when the modification time and the historical modification time are different; a determining unit, configured to determine a target directory according to the target directory indication information; Acquire fourth identification information of the target file in the target directory; determine feedback information according to the identification information and the fourth identification information, wherein the feedback information is used to indicate a verification result of file synchronization; The feedback information is sent to the client.

13. An electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1 to 6.

14. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method according to any one of claims 1 to 6.

15. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • File synchronizing method, device, server, terminal and system

    CN104348859A

  • File synchronization method and device and local terminal

    CN111190962A