A system, method, and medium for improving file update efficiency

By employing file segmentation and caching mechanisms, the problems of network resource consumption and missing file content in the file management system are solved, enabling efficient file updates and loading.

CN113792015BActive Publication Date: 2026-03-31ZHITU NETWORK TECH (JIANGSU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-10
Publication Date
2026-03-31

Smart Images

  • Figure CN113792015B_ABST
    Figure CN113792015B_ABST
Patent Text Reader

Abstract

The application discloses a system, method and medium for improving file updating efficiency, and the system comprises an initialization module, a file management module, a business module and a request response module; the initialization module is used for acquiring files and file segmentation rules; the file management module is used for performing file segmentation operation on the files according to the file segmentation rules; uploading the files to a file server, and performing modification operation and synchronization operation on the files; the business module is used for saving file cache information of the stored files, sending a file acquisition request to the file server, and performing file information display operation according to the result of the file acquisition request; the request response module is used for performing request response operation on the file request of the business module, acquiring the cache information of the files, and saving the cache information to the business module; through the above mode, the application can segment the files, only update the corresponding changed file segments when the files are updated, and improve the efficiency of file updating.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer application technology, and in particular to a system, method and medium for improving file update efficiency. Background Technology

[0002] File management is a crucial part of application systems, especially when there are many files and each file contains a lot of content. How to manage files is a key factor that tests the performance of an application system.

[0003] The existing file management solution for application systems is to store files on corresponding file servers. When a file needs to be modified, it is first downloaded from the file server, then the content of the file is edited and modified, and finally the file is uploaded.

[0004] This approach is relatively easy to implement when there are few files and their content is limited. However, when there are many files and their content is large, modifying a single file and uploading the entire file will consume a significant amount of network resources, putting considerable pressure on the server. File uploads will be slow, and large files are prone to buffering, resulting in incomplete uploads and missing content. Summary of the Invention

[0005] The present invention mainly addresses the problems of existing file management solutions consuming network resources, increasing server pressure, slow file upload and update, and causing missing file content when managing a large number of files with large content.

[0006] To address the above problems, one technical solution adopted by the present invention is to provide a system for improving file update efficiency, comprising: an initialization module, a file management module, a business module, and a request-response module;

[0007] The initialization module is used to obtain files and file segmentation rules;

[0008] The file management module is used to upload the file to the file server, perform file segmentation operations on the file according to the file segmentation rules, and perform modification and synchronization operations on the file.

[0009] The business module is used to save the file cache information of the file, send a file retrieval request to the file server, and perform a file content information display operation based on the result of the file retrieval request.

[0010] The request-response module is used to perform request-response operations on file requests from the business module, obtain cache information of the file, and save the cache information to the business module.

[0011] Furthermore, the file management module includes a file upload unit, a file segmentation unit, a file modification unit, and a file synchronization unit;

[0012] The file upload unit is used to upload the file to the file server to obtain a stored file;

[0013] The file segmentation unit is used to perform the file segmentation operation on the stored file according to the file segmentation rules to obtain several sub-stored files;

[0014] The file modification unit is used to perform modification operations on the file to obtain a modified file;

[0015] The file synchronization unit is used to synchronize the modified file to the file server, and to perform a file content information comparison operation on the stored file and the modified file; based on the result of the file content information comparison operation, to modify several of the sub-stored files, and to synchronize the cache information of the modified several sub-stored files to the business module.

[0016] Furthermore, the file segmentation rules include a first file segmentation rule built into the file server and a second file segmentation rule set in the configuration.

[0017] When the second file segmentation rule does not exist, the file segmentation unit calls the first file segmentation rule to perform the file segmentation operation on the storage file to obtain several sub-storage files;

[0018] When the second file segmentation rule exists, the file segmentation unit calls the second file segmentation rule to perform the file segmentation operation on the storage file to obtain several sub-storage files;

[0019] The file segmentation unit assigns numbers to the various sub-storage files to obtain a number of file numbers; the file segmentation unit obtains storage space from the file server and performs sub-storage file storage operations on the various sub-storage files.

[0020] Furthermore, the file synchronization unit performs a file content information comparison operation on the stored file and the modified file, including:

[0021] If the file content information of the stored file and the modified file is the same, then it is not necessary to modify the sub-stored files;

[0022] If the content information of the stored file and the modified file is different, the differences are recorded, and the sub-stored file is located according to the file number; the sub-stored file is modified according to the content of the modified file to obtain the modified sub-stored file;

[0023] When the sub-storage file is modified, the file synchronization unit sends a file modification message to the request response module; the request response module then sends a file change message to the business module based on the file modification message.

[0024] Furthermore, the business module sends a file retrieval request to the request response module based on the file change message, and updates the saved file cache information.

[0025] Furthermore, the request response module reads the modified sub-storage file in the file server according to the file acquisition request, obtains the modified sub-storage file cache, and updates the modified sub-storage file cache to the business module.

[0026] Furthermore, the first file segmentation rule includes a first segmentation capacity, a first segmentation threshold, and a first reserved capacity, and the second file segmentation rule includes a second segmentation capacity, a second segmentation threshold, a second reserved capacity, and an effective identifier;

[0027] If the second file segmentation rule does not exist or the validity flag is invalid, the file segmentation unit invokes the first file segmentation rule, reads the information of the stored file, obtains the first stored file capacity, and compares the first stored file capacity with the first segmentation threshold.

[0028] If the capacity of the first storage file is not greater than the first segmentation threshold, then the file segmentation operation does not need to be performed on the storage file;

[0029] If the capacity of the first storage file is greater than the first segmentation threshold, the file segmentation unit calculates the number of first file segments based on the capacity of the first storage file and the capacity of the first segmentation; the file segmentation unit segments the storage file according to the number of first file segments to obtain the sub-storage files corresponding to the number of the first file segments.

[0030] The file segmentation unit selects a first storage space from the file server with a capacity equal to the sum of the first segment capacity and the first reserved capacity multiplied by the number of the first file segments; the file segmentation unit performs a storage space partitioning operation on the first storage space according to the number of the first file segments to obtain a first sub-storage space segment corresponding to the number of the sub-storage files; the file segmentation unit stores the sub-storage files in the first sub-storage space segment;

[0031] The file segmentation unit performs a file numbering operation on the sub-storage file.

[0032] Furthermore, if the validity flag is valid, the file segmentation unit calls the second file segmentation rule to perform the file segmentation operation; if the validity flag is invalid, the file segmentation unit calls the first file segmentation rule to perform the file segmentation operation.

[0033] The file segmentation unit calls the second file segmentation rule to perform the file segmentation operation. The file segmentation unit reads the information of the stored file to obtain the second stored file capacity; and compares the second stored file capacity with the second segmentation threshold.

[0034] If the size of the second storage file is not greater than the second segmentation threshold, then the file segmentation operation does not need to be performed on the storage file;

[0035] If the capacity of the second storage file is greater than the second segmentation threshold, the file segmentation unit calculates the number of second file segments based on the capacity of the second storage file and the capacity of the second segmentation; the file segmentation unit segments the storage file according to the number of second file segments to obtain the sub-storage file corresponding to the number of the number of second file segments.

[0036] The file segmentation unit selects a second storage space from the file server with a capacity equal to the sum of the second segment capacity and the second reserved capacity multiplied by the number of the second file segments; the file segmentation unit performs the storage space partitioning operation on the second storage space according to the number of the second file segments to obtain a second sub-storage space segment corresponding to the number of the sub-storage files; the file segmentation unit stores the sub-storage files in the second sub-storage space segment;

[0037] The file segmentation unit performs the file numbering operation on the sub-stored file.

[0038] A method for improving file update efficiency includes the following steps:

[0039] Get the file and file segmentation rules;

[0040] The file is segmented according to the file segmentation rules; the file is uploaded to the file server, and modification and synchronization operations are performed on the file.

[0041] Perform a file retrieval operation on the file server, and perform a file cache information saving operation based on the result of the file retrieval operation.

[0042] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method for improving file update efficiency.

[0043] The beneficial effects of this invention are:

[0044] The system for improving file update efficiency described in this invention can segment files, and when a business module retrieves a file, it can obtain the cache information of each segmented sub-file according to the segmented file, and save the cache information locally in the business module, thereby improving the efficiency of file update loading.

[0045] 2. The method for improving file update efficiency described in this invention can synchronize only the cached information of the changed sub-files to the business module after a file is modified, which takes less time and improves file update efficiency.

[0046] 3. The medium described in this invention for improving file update efficiency can enable rapid updates of large files, while storing the cache locally in the business module, thereby improving the efficiency of file update and loading. Attached Figure Description

[0047] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0048] Figure 1 This is a schematic diagram of a system for improving file update efficiency as described in Embodiment 1 of the present invention;

[0049] Figure 2 This is a schematic diagram of a file management module of a system for improving file update efficiency as described in Embodiment 1 of the present invention;

[0050] Figure 3 This is a flowchart of a method for improving file update efficiency as described in Embodiment 2 of the present invention. Detailed Implementation

[0051] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0052] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, terms such as "initialization," "file management," "business module," "request response," "file segmentation rule," "segmentation operation," "synchronization operation," "file cache information," "file retrieval request," "file content information display," "stored file," "modified file," "comparison operation," "first file segmentation rule," "second file segmentation rule," "sub-stored file," "file number," "correspondence relationship," "file change message," "modify sub-stored file cache," "segmentation capacity," "segmentation threshold," "reserved capacity," "storage space segment," and "stored file capacity" should be interpreted broadly. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0053] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Example

[0054] This invention provides a system for improving file update efficiency. Please refer to [link / reference]. Figure 1 and Figure 2 It includes: an initialization module, a file management module, a business module, and a request-response module;

[0055] Initialize module:

[0056] The initialization module is used to obtain files and file segmentation rules;

[0057] Specifically, the initialization module retrieves the file and its segmentation rules, which are then used to segment the file. These segmentation rules can be universal for all files or customized for the current file.

[0058] The file segmentation rule can be the first file segmentation rule built into the file server, or it can be the second file segmentation rule set by the user. If the user sets the second file segmentation rule, the first file segmentation rule will automatically become invalid. If the user does not set the second file segmentation rule, the first file segmentation rule will be used.

[0059] File management module:

[0060] The file management module is used to perform file segmentation operations on files according to file segmentation rules; upload files to the file server; and perform modification and synchronization operations on the files. The file management module includes a file upload unit, a file segmentation unit, a file modification unit, and a file synchronization unit.

[0061] File upload unit:

[0062] The file upload unit is used to upload files to the file server to obtain stored files;

[0063] Specifically, the file upload unit uploads the file to the file server and stores the file in a specified location, thus obtaining the stored file.

[0064] File segmentation unit:

[0065] The file segmentation unit is used to perform file segmentation operations on the stored file according to the file segmentation rules to obtain several sub-stored files;

[0066] Specifically, the file segmentation unit obtains the effective identifier from the second file segmentation rule:

[0067] If the effectiveness flag is ineffective, the file segmentation unit calls the first file segmentation rule to segment the stored file; the file segmentation unit obtains the size of the stored file, i.e., the capacity of the first stored file, and compares the capacity of the first stored file with the first segmentation threshold in the first file segmentation rule:

[0068] If the size of the first storage file is not greater than the first segmentation threshold, it means that the size of the storage file is small and does not need to be segmented.

[0069] If the capacity of the first storage file is greater than the first segmentation threshold, the file segmentation unit performs a file segmentation operation on the storage file. That is, it divides the capacity of the first storage file by the capacity of the first segmentation rule. If the result is an integer, it means that the file is completely segmented. If the result is a decimal, it is rounded up. The final integer is the number of segments in the storage file. The storage file is segmented according to this number of segments to obtain sub-storage files corresponding to the number of segments. The file segmentation unit selects a first storage space from the file server, which is the sum of the first segment capacity and the first reserved capacity multiplied by the number of segments. The file segmentation unit segments the first storage space according to the number of segments in the storage file to obtain a number of first sub-storage space segments corresponding to the number of segments in the storage file. The sub-storage files are stored in the first sub-storage space segments in a one-to-one correspondence.

[0070] The first reserved capacity is a reserved capacity value for subsequent sub-storage files to prevent overflow and file incompleteness when the changed capacity exceeds the capacity of the existing sub-storage files and cannot be stored according to the specified capacity.

[0071] If the effective flag is active, the file segmentation unit calls the second file segmentation rule to segment the stored file; the file segmentation unit obtains the size of the stored file, i.e., the second stored file capacity, and compares the second stored file capacity with the second segmentation threshold in the second file segmentation rule:

[0072] If the size of the second storage file is not greater than the second segmentation threshold, it means that the size of the storage file is small and does not need to be segmented.

[0073] If the capacity of the second storage file is greater than the second segmentation threshold, the file segmentation unit performs a file segmentation operation on the storage file. This involves dividing the second storage file capacity by the second segmentation capacity according to the second file segmentation rule. If the result is an integer, it indicates a complete segmentation; if the result is a decimal, it is rounded up. The resulting integer is the number of segments in the storage file. The storage file is then segmented according to this number of segments to obtain sub-storage files corresponding to the number of segments. The file segmentation unit selects a second storage space from the file server, which is the sum of the second segmentation capacity and the second reserved capacity multiplied by the number of segments. The file segmentation unit then segments the second storage space according to the number of segments in the storage file segmentation, obtaining a number of second sub-storage space segments corresponding to the number of segments in the storage file segmentation. The sub-storage files are then stored in the second sub-storage space segments in a one-to-one correspondence.

[0074] The second reserved capacity is a reserved capacity value for subsequent sub-storage files to prevent overflow and file incompleteness when the changed capacity exceeds the capacity of the existing sub-storage files and cannot be stored according to the specified capacity.

[0075] The file segmentation unit numbers several sub-storage files, and the specific numbering rules can be set according to requirements.

[0076] To explain this invention more clearly, it is assumed here that the second file segmentation rule is invoked, and the second segmentation capacity of the second file segmentation rule is set to 1M, the second segmentation threshold to 10M, and the second reserved capacity to 512Kb. File information is obtained; assuming the size of the stored file is 15.6M, it can be calculated that the stored file needs to be divided into 16 segments. 15.6 divided by 1 equals 15.6, rounded up to get 16. The stored file is then segmented to obtain 16 sub-stored files. The file segmentation unit selects a segment of size (1M + 512Kb) * 16 from the file server. The storage space is used to store the 16 segmented sub-files. Each sub-file occupies 1M + 512Kb of storage space, which is 1.5M. The first 15 sub-files are 1M in size, and the 16th sub-file is 0.6M in size. The extra 512Kb of storage space is reserved to prevent the sub-files from exceeding the 1M limit when they are modified later, which would cause them to overflow and become incomplete. The corresponding file numbers are 1, 2, 3, 4...16.

[0077] File modification unit:

[0078] The file modification unit is used to perform modification operations on a file to obtain a modified file;

[0079] Specifically, the file modification unit modifies the file according to actual needs. The modification can be made in multiple places or in a single place, resulting in a modified file.

[0080] File synchronization unit:

[0081] The file synchronization unit is used to synchronize modified files to the file server and perform file content information comparison operations on the stored files and modified files; based on the results of the file content information comparison operations, it modifies several sub-stored files and synchronizes the information of the modified sub-stored files to the business module.

[0082] Specifically, the file synchronization unit synchronizes the modified file to the file server and compares the contents of the stored file and the modified file:

[0083] If the contents of the stored file and the modified file are the same, it means that the file has not been changed and no further synchronization is needed;

[0084] If the contents of the stored file differ from those of the modified file, it indicates that the file has been changed. Record the location and content of the changes.

[0085] The file synchronization unit obtains the corresponding file number based on the location of the file modification, locates the corresponding sub-storage file based on the file number, and modifies the sub-storage file according to the modified content to obtain the modified sub-storage file. It also needs to determine whether the size of the modified sub-storage file exceeds the set storage capacity. If it does, the file synchronization unit needs to send re-segmentation information to the file segmentation unit to re-segment the modified file.

[0086] When the file synchronization unit detects that a sub-storage file has been modified, it sends a file modification message to the request and response module. After receiving the file modification message, the request and response module sends a file change message to the business module to remind the business module to update the file.

[0087] To explain this invention more clearly, it is set here that when a file is modified, the modified file is compared with the stored file to obtain the location and content of the file modification. Based on the location of the file modification, it is found that the content of the 12th sub-stored file has been modified. Then, the content of the 12th sub-stored file is modified according to the file modification content to obtain the modified sub-stored file. The file synchronization unit detects that the 12th sub-stored file has been changed and sends a modification message of the 12th sub-stored file to the request response module. After receiving the modification message of the 12th sub-stored file, the request response module pushes the file change message to the business module.

[0088] Request and response module:

[0089] The request and response module is used to perform request and response operations on file requests from business modules, obtain file cache information, and save the cache information to the business modules;

[0090] Specifically, the request-response module is used to respond to file retrieval requests from business modules or to forward file modification messages from the file synchronization unit;

[0091] When the request-response module receives a file modification message from the file synchronization unit, it transforms the file modification message into a file change message and pushes the file change message to the business module, reminding the business module that the stored file on the file server has changed and that the local file cache information needs to be updated.

[0092] When the request response module receives a file retrieval request from the business module, it sends the file retrieval request to the file synchronization unit, reads the cache information of several sub-storage files in the file synchronization unit, and updates the local file cache information.

[0093] The file modification message and file change message record the file number of the sub-stored file that has been modified. You can request the corresponding sub-stored file based on the file number. If the file modification message and file change message do not contain a file number, then all sub-stored files are requested.

[0094] Business modules:

[0095] The business module is used to save the file cache information of the stored files, send a file retrieval request to the file server, and perform file content information display operations based on the result of the file retrieval request.

[0096] Specifically, the business module sends a file retrieval request to the request-response module. The request-response module retrieves cache information from several sub-storage files in the file synchronization unit and sends this cache information back to the business module. The business module then stores the cache information locally. When a file needs to be loaded, the local cache information can be quickly read and displayed.

[0097] It should be noted that the above settings and examples are only for explaining the execution process of the present invention and should not be used to limit the scope of protection of the present invention. Example

[0098] This invention also provides a method for improving file update efficiency; please refer to [link / reference]. Figure 3 This includes the following steps:

[0099] S100, Obtaining Files and File Segmentation Rules:

[0100] Specifically, the file is retrieved, along with its segmentation rules. The file can then be segmented according to these rules. These segmentation rules can be universal for all files or can be customized for the current file.

[0101] The file segmentation rule can be the first file segmentation rule built into the file server, or it can be the second file segmentation rule set by the user. If the user sets the effective flag of the second file segmentation rule to be effective, the first file segmentation rule will automatically become invalid. If the user does not set the second file segmentation rule or sets the effective flag of the second file segmentation rule to be invalid, the first file segmentation rule will be invoked.

[0102] S200: Perform file segmentation operation on the file according to the file segmentation rules; upload the file to the file server, and perform modification and synchronization operations on the file.

[0103] Specifically, the file is uploaded to the file server and stored in the specified location to obtain the stored file.

[0104] The stored file is segmented according to file segmentation rules, dividing it into several sub-stored files; and these sub-stored files are numbered, with the specific numbering rules set according to requirements.

[0105] File segmentation rules include the first file segmentation rule built into the file server and the second file segmentation rule set by the user.

[0106] The first file segmentation rule includes the first segment capacity, the first segmentation threshold, and the first reserved capacity. The second file segmentation rule includes the second segment capacity, the second segmentation threshold, the second reserved capacity, and the effective flag. When the effective flag in the second file segmentation rule is effective, the second file segmentation rule is invoked to segment the stored file. When the user has not set the second file segmentation rule or the effective flag in the second file segmentation rule is invalid, the first file segmentation rule is invoked to segment the stored file.

[0107] If the size of the stored file is not greater than the first segmentation threshold or the second segmentation threshold, the stored file does not need to be segmented.

[0108] If the size of the stored file exceeds the first segmentation threshold or the second segmentation threshold, the corresponding first file segmentation rule or second file segmentation rule is invoked to segment the stored file.

[0109] If the first file segmentation rule is selected to segment the stored file, the first storage file capacity is obtained. This first storage file capacity is divided by the first segment capacity of the first file segmentation rule. If the result is an integer, it means the segmentation is complete. If the result is a decimal, it is rounded up. The final integer is the number of segments in the stored file. The stored file is then segmented according to this number of segments to obtain sub-storage files corresponding to the number of segments. Storage space equal to the sum of the first segment capacity and the first reserved capacity multiplied by the number of segments is selected from the file server to store the segmented sub-storage files. The first reserved capacity is a reserved capacity value for subsequent modifications to the sub-storage files to prevent overflow and file incompleteness if the modified capacity exceeds the existing sub-storage file capacity.

[0110] If the second file segmentation rule is selected to segment the stored file, the second storage file capacity is obtained. This second storage file capacity is then divided by the second segmentation capacity of the second file segmentation rule. If the result is an integer, it means the segmentation is complete; if the result is a decimal, it is rounded up. The final integer is the number of segments in the stored file. The stored file is then segmented according to this number of segments, resulting in sub-storage files corresponding to the number of segments. Storage space equal to the sum of the second segmentation capacity and the second reserved capacity, multiplied by the number of segments, is selected from the file server to store the segmented sub-storage files. The second reserved capacity is a reserved capacity value for subsequent modifications to the sub-storage files to prevent overflow and file incompleteness if the modified capacity exceeds the existing sub-storage file capacity.

[0111] To explain this invention more clearly, it is assumed here that the second file segmentation rule is invoked, and the second segmentation capacity of the second file segmentation rule is set to 1M, the second segmentation threshold to 10M, and the second reserved capacity to 512Kb. File information is obtained; assuming the size of the stored file is 15.6M, it can be calculated that the stored file needs to be divided into 16 segments. 15.6 divided by 1 equals 15.6, rounded up to get 16. The stored file is then segmented to obtain 16 sub-stored files. The file segmentation unit selects a segment of size (1M + 512Kb) * 16 from the file server. The storage space is used to store the 16 segmented sub-files. Each sub-file occupies 1M + 512Kb of storage space, which is 1.5M. The first 15 sub-files are 1M in size, and the 16th sub-file is 0.6M in size. The extra 512Kb of storage space is reserved to prevent the sub-files from exceeding the 1M limit when they are modified later, which would cause them to overflow and become incomplete. The corresponding file numbers are 1, 2, 3, 4...16.

[0112] Modify the file according to the actual needs. The modification can be made in multiple places or in a single place to obtain the modified file.

[0113] The modified file is synchronized to the file server, and the contents of the stored file and the modified file are compared: if the contents of the stored file and the modified file are the same, it means that the file has not been changed and no further synchronization is needed; if the contents of the stored file and the modified file are different, it means that the file has been changed, and the location and content of the file modification are recorded.

[0114] The file synchronization unit obtains the corresponding file number based on the location of the file modification, locates the corresponding sub-storage file based on the file number, and modifies the sub-storage file according to the modified content to obtain the modified sub-storage file. It also needs to determine whether the size of the modified sub-storage file exceeds the set storage capacity. If it does, the file synchronization unit needs to send re-segmentation information to the file segmentation unit to re-segment the modified file.

[0115] When a modification to a sub-store file is detected, a file modification message is sent to remind the user to update the file. The file modification message records the file number of the modified sub-store file, and the user can request the corresponding sub-store file based on the file number. If the file modification message does not contain a file number, then all sub-store files are requested.

[0116] To explain this invention more clearly, it is set here that when a file is modified, the modified file is compared with the stored file to obtain the location and content of the file modification. Based on the location of the file modification, it is found that the content of the 12th sub-stored file has been modified. Then, the content of the 12th sub-stored file is modified according to the file modification content to obtain the modified sub-stored file. If the 12th sub-stored file is detected to have been modified, a 12th sub-stored file modification message is sent to remind the user to update the file.

[0117] S300: Perform a file retrieval operation on the file server, and based on the result of the file retrieval operation, perform a file cache information saving operation.

[0118] Specifically, upon receiving a file modification message, a file retrieval request is initiated. The cache information of the modified sub-storage file or the cache information of all sub-storage files is read, and the read cache information is updated to the local cache information storage location. When the file needs to be loaded, the local cache information can be quickly read and displayed.

[0119] It should be noted that the above settings and examples are only for explaining the execution process of the present invention and should not be used to limit the scope of protection of the present invention. Example

[0120] This embodiment 3 includes a computer-readable storage medium for storing computer software instructions used to implement the method for improving file update efficiency described in embodiment 2 above. The storage medium includes a program set up for the method for improving file update efficiency. Specifically, the executable program can be built into the system for improving file update efficiency described in embodiment 1. In this way, the system for improving file update efficiency can implement the method for improving file update efficiency of embodiment 2 by executing the built-in executable program.

[0121] The embodiment numbers disclosed in the above embodiments of the present invention are merely for description and do not represent the superiority or inferiority of the embodiments.

[0122] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing related hardware to implement the program, which can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0123] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A system for improving efficiency of file updates, the system comprising: The application relates to a file management method and device. The application comprises an initialization module, a file management module, a service module and a request response module. The initialization module is used for acquiring a file and a file segmentation rule. The file management module is used for uploading the file to a file server, performing a file segmentation operation on the file according to the file segmentation rule, performing a modification operation on the file and performing a synchronization operation. The service module is used for saving file cache information of the file, sending a file acquisition request to the file server and performing a file content information display operation according to a result of the file acquisition request. The request response module is used for performing a request response operation on a file request of the service module, acquiring cache information of the file and saving the cache information to the service module. The file segmentation rule comprises a first file segmentation rule built in the file server and a second file segmentation rule set. When the second file segmentation rule does not exist, a file segmentation unit calls the first file segmentation rule to perform a file segmentation operation on a storage file, and a plurality of sub-storage files are obtained. When the second file segmentation rule exists, the file segmentation unit calls the second file segmentation rule to perform a file segmentation operation on the storage file, and the plurality of sub-storage files are obtained. The file segmentation unit numbers the plurality of sub-storage files to obtain a plurality of file numbers, acquires a storage space from the file server and performs a sub-storage file storage operation on the plurality of sub-storage files. The first file segmentation rule comprises a first segmentation capacity, a first segmentation threshold and a first reserved capacity, and the second file segmentation rule comprises a second segmentation capacity, a second segmentation threshold, a second reserved capacity and an effective identifier. When the second file segmentation rule does not exist or the effective identifier is not effective, the file segmentation unit calls the first file segmentation rule, reads information of the storage file to obtain a first storage file capacity. The first storage file capacity is compared with the first segmentation threshold. If the first storage file capacity is not greater than the first segmentation threshold, the file segmentation operation does not need to be performed on the storage file. If the first storage file capacity is greater than the first segmentation threshold, the file segmentation unit calculates a first file segmentation number according to the first storage file capacity and the first segmentation capacity. The file segmentation unit segments the storage file according to the first file segmentation number to obtain sub-storage files corresponding to the number of the first file segmentation number. The file segmentation unit selects a first storage space with a capacity of the sum of the first segmentation capacity and the first reserved capacity multiplied by the first file segmentation number from the file server, performs a storage space division operation on the first storage space according to the first file segmentation number to obtain first sub-storage space segments corresponding to the number of the sub-storage files, and stores the sub-storage files into the first sub-storage space segments. The file segmentation unit performs a file numbering operation on the sub-storage files.

2. The system for improving efficiency of file updates of claim 1, wherein: The file management module comprises a file uploading unit, a file segmentation unit, a file modification unit and a file synchronization unit. The file uploading unit is used for uploading the file to the file server to obtain a storage file. The file segment unit is configured to perform the file segment operation on the storage file according to the file segment rule, to obtain a plurality of sub-storage files; The file modification unit is configured to perform a modification operation on the file to obtain a modified file; The file synchronization unit is configured to synchronize the modified file to the file server, and perform a file content information comparison operation on the storage file and the modified file; according to a result of the file content information comparison operation, modify a plurality of the sub-storage files, and synchronize cache information of the modified plurality of the sub-storage files to the service module.

3. The system for improving file update efficiency according to claim 2, wherein: The file synchronization unit performs a file content information comparison operation on the storage file and the modified file, including: If the file content information of the storage file and the modified file is the same, the plurality of the sub-storage files do not need to be modified; If the file content information of the storage file and the modified file is different, the different points are recorded, and the sub-storage file is found according to the file number; the sub-storage file is modified according to the content of the modified file to obtain a modified sub-storage file; When the sub-storage file is changed, the file synchronization unit sends a file modification message to the request response module; the request response module sends a file change message to the service module according to the file modification message.

4. The system for improving file update efficiency according to claim 3, wherein: The service module sends the file acquisition request to the request response module according to the file change message, to update the saved file cache information.

5. The system for improving file update efficiency according to claim 4, wherein: The request response module reads the modified sub-storage file in the file server according to the file acquisition request to obtain a modified sub-storage file cache, and updates the modified sub-storage file cache to the service module.

6. The system for improving file update efficiency according to claim 5, wherein: If the validity identifier is valid, the file segment unit calls the second file segment rule to perform the file segment operation; if the validity identifier is invalid, the file segment unit calls the first file segment rule to perform the file segment operation; The file segment unit calls the second file segment rule to perform the file segment operation, and reads the information of the storage file to obtain a second storage file capacity; The second storage file capacity is compared with the second segment threshold value: If the second storage file capacity is not greater than the second segment threshold value, the file segment operation does not need to be performed on the storage file; If the second storage file capacity is greater than the second segmentation threshold, the file segmentation unit calculates a second file segmentation number according to the second storage file capacity and the second segmentation capacity; the file segmentation unit segments the storage file according to the second file segmentation number, and obtains the sub-storage files corresponding to the number of the second file segmentation number; The file segmentation unit selects a second storage space with a capacity of the sum of the second segmentation capacity and the second reserved capacity multiplied by the second file segmentation number from the file server; the file segmentation unit performs the storage space division operation on the second storage space according to the second file segmentation number, and obtains the second sub-storage space segments corresponding to the number of the sub-storage files; and the file segmentation unit stores the sub-storage files into the second sub-storage space segments. The file segmentation unit performs the file numbering operation on the sub-storage files.

7. A method for improving file updating efficiency, based on the system for improving file updating efficiency according to claim 1, characterized in that, The method comprises the following steps: Obtaining a file and a file segmentation rule; Performing a file segmentation operation on the file according to the file segmentation rule; uploading the file to a file server, and performing a modification operation and a synchronization operation on the file; Performing a file obtaining operation on the file server, and performing a file cache information saving operation according to the result of the file obtaining operation.

8. A computer-readable storage medium storing a computer program, the computer-readable storage medium comprising: The computer program is executed by a processor to realize the method steps for improving the file updating efficiency according to claim 7. The computer program is executed by a processor to realize the method steps for improving the file updating efficiency according to claim 7.

Citation Information

Patent Citations

  • System and method for transferring files

    CN102571952A

  • File processing method and device, equipment and computer readable storage medium

    CN110457260A