CN109726184B - File synchronization method, device, network node and storage medium - Google Patents
File synchronization method, device, network node and storage medium Download PDFInfo
- Publication number
- CN109726184B CN109726184B CN201811588984.4A CN201811588984A CN109726184B CN 109726184 B CN109726184 B CN 109726184B CN 201811588984 A CN201811588984 A CN 201811588984A CN 109726184 B CN109726184 B CN 109726184B
- Authority
- CN
- China
- Prior art keywords
- synchronized
- file
- network node
- transmission priority
- highest transmission
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Computer And Data Communications (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application discloses a file synchronization method, a device, a network node and a storage medium, wherein the method comprises the following steps: the network node identifies a file to be synchronized with highest transmission priority in the network node according to a set time interval, wherein the transmission priority of the file to be synchronized is determined according to a storage priority corresponding to a storage position of the file to be synchronized; transmitting the file to be synchronized with the highest transmission priority to a network node to be synchronized, so that the network node to be synchronized synchronizes the file to be synchronized with the highest transmission priority. In the embodiment of the application, the network node transmits the file to be synchronized with the highest transmission priority in the current synchronization moment to the network node to be synchronized according to the set time interval, thereby realizing the refinement of file synchronization from the folder level to the file level, realizing the transmission of the file to be synchronized according to the priority, avoiding the overlarge resource occupation of the network node and ensuring the timeliness of file synchronization.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a file synchronization method, a device, an electronic device, and a storage medium.
Background
With the continuous development of computer technology, the degree of informatization is continuously improved, and the number of files generated in production and life is also increasing, so as to meet the business requirements in production and life, the requirement of synchronizing the files in a certain network node to one or more other network nodes (network nodes to be synchronized) is often faced. In the process of file synchronization, how to ensure the synchronization efficiency and meet the service requirements of the network nodes to be synchronized on the files becomes a serious issue of file synchronization.
In the prior art, when folder synchronization is performed, folder-level file synchronization is generally performed, that is, a certain network node sends all files to be synchronized of the network node to be synchronized together in the form of folders according to a set period. However, the service of the network node to be synchronized has a difference in the demand level of the files to be synchronized in the network node for file synchronization, and part of the files need higher synchronization instantaneity, and part of the files do not need real-time synchronization, even do not need synchronization, if the files in the next period are synchronized according to the existing folder level, the file to be synchronized with high instantaneity requirement generated in the next period can occur, and the problem that the file to be synchronized which does not need real-time synchronization and is generated in the previous period is not transmitted yet and cannot be transmitted is solved, so that service processing is influenced, and the problem that the occupation amount of network node resources is too large and normal service processing of the network node is influenced when the files in the existing folder level are synchronized is also caused.
Disclosure of Invention
The application provides a file synchronization method, a device, a network node and a storage medium, which are used for solving the problems of excessive resource occupation amount of the network node and untimely file synchronization in the prior art.
In a first aspect, the present application discloses a file synchronization method, applied to a network node, the method comprising:
identifying a file to be synchronized with highest transmission priority in the network node according to a set time interval, wherein the transmission priority of the file to be synchronized is determined according to the position priority corresponding to the storage position of the file to be synchronized;
transmitting the file to be synchronized with the highest transmission priority to a network node to be synchronized, so that the network node to be synchronized synchronizes the file to be synchronized with the highest transmission priority.
In an alternative design, before the identifying the file to be synchronized with the highest transmission priority in the network node, the method further includes:
judging whether the current moment is in a preset synchronous period or not;
if yes, the step of identifying the file to be synchronized with the highest transmission priority in the network node is carried out.
In an alternative design, before the identifying the file to be synchronized with the highest transmission priority in the network node, the method further includes:
judging whether a file to be synchronized exists in the network node;
if yes, the step of identifying the file to be synchronized with the highest transmission priority in the network node is carried out.
In an alternative design, the transmitting the file to be synchronized with the highest transmission priority to the network node to be synchronized includes:
and calling a File Transfer Protocol (FTP) tool to transmit the file to be synchronized with the highest transmission priority to a network node to be synchronized.
In an alternative design, the identifying the file to be synchronized with the highest transmission priority in the network node according to the set time interval includes:
and identifying the file to be synchronized with the highest transmission priority in the network node according to the set time interval by using a continuous integration tool Jenkins.
In a second aspect, the present application discloses a file synchronization device, applied to a network node, the device comprising:
the identifying module is used for identifying the file to be synchronized with highest transmission priority in the network node according to a set time interval, wherein the transmission priority of the file to be synchronized is determined according to the position priority corresponding to the storage position of the file to be synchronized;
and the transmission module is used for transmitting the file to be synchronized with the highest transmission priority to a network node to be synchronized, so that the network node to be synchronized synchronizes the file to be synchronized with the highest transmission priority.
In an alternative design, the apparatus further comprises:
the judging module is used for judging whether the current moment is in a preset synchronous period or not, and if the current moment is in the preset synchronous period, the judging module is triggered.
In an optional design, the judging module is further configured to judge whether a file to be synchronized exists in the network node, and if so, trigger the identifying module.
In an alternative design, the transmission module is specifically configured to invoke a file transfer protocol FTP tool to transmit the file to be synchronized with the highest transmission priority to the network node to be synchronized.
In an alternative design, the identifying module is specifically configured to identify, by the persistent integration tool Jenkins, a file to be synchronized with a highest transmission priority in the network node according to a set time interval.
In a third aspect, the present application discloses a network node comprising: the device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory has stored therein a computer program which, when executed by the processor, causes the processor to perform the method described in the first aspect or any of the alternative designs of the first aspect.
In a fourth aspect, the application discloses a computer readable storage medium storing a computer program executable by a network node, the program, when run on the network node, causing the network node to perform the method as described in the first aspect or any of the alternative designs of the first aspect.
The application has the following beneficial effects:
according to the embodiment of the application, the network nodes transmit the files to be synchronized with the highest priority to the network nodes to be synchronized for synchronization according to the set time interval when each synchronization time arrives according to the priority of the files to be synchronized, the file synchronization is refined from the folder level to the file level, the transmission of the files to be synchronized according to the priority is realized, the problem that the resource occupation of the network nodes is overlarge in the existing method based on the folder level synchronization is avoided, the timeliness of the file synchronization is ensured, the service requirement of the network nodes to be synchronized is ensured, and the synchronization efficiency is improved. Meanwhile, the files which do not need to be synchronized can be not provided with priority, and waste of network node resources and redundancy of transmission are avoided.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a synchronization process according to an embodiment of the present application;
FIG. 2 is a second schematic diagram of a synchronization process according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a file synchronization device according to an embodiment of the present application;
fig. 4 is a schematic diagram of a network node structure according to an embodiment of the present application;
fig. 5 is a second schematic diagram of a network node structure according to an embodiment of the present application.
Detailed Description
For the purpose of promoting an understanding of the principles and advantages of the application, reference will now be made in detail to the drawings, in which embodiments illustrated in the drawings are intended to illustrate, but not limit the application to the specific embodiments illustrated. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In addition, it should be understood that, in the description of the present application, "and/or" describing the association relationship of the association objects means that there may be three relationships, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
Example 1:
fig. 1 is a schematic diagram of a file synchronization process according to an embodiment of the present application, where the process includes:
s101: and identifying the file to be synchronized with highest transmission priority in the network node according to the set time interval.
The transmission priority of the file to be synchronized is determined according to the position priority corresponding to the storage position of the file to be synchronized.
The synchronization method provided by the embodiment of the application is applied to network nodes, wherein the network nodes can be devices such as personal computers and tablet computers, and can also be servers, server clusters and the like.
In the operation process of the network node, the network node stores the files generated and/or received in the operation process into the corresponding folders according to a certain storage rule; for example: storing the generated and/or received files into corresponding folders according to a certain storage rule according to the types of the files; or storing the generated and/or received files to the folders of the corresponding users according to the users corresponding to the files. In addition, during the operation of the network node, modification of a part of the files stored in the network node may be involved.
When the files are synchronized, the user has difference in the synchronizing demands of the files under different folders in the network node, and the files in the folders need higher synchronizing instantaneity, namely after the files in the folders are stored in new files or the files are modified, the files need to be synchronized to other network nodes to be synchronized in time; the files in the folders need lower synchronization instantaneity, namely after the files in the folders are stored in new files or the files are modified, the files do not need to be synchronized to other network nodes to be synchronized in time; it is of course also possible that files in part of the folder do not need to be synchronized from the network node into the network node to be synchronized.
Therefore, in order to improve the efficiency of synchronization and timeliness of synchronization, in the embodiment of the present application, a location priority is set in advance for a storage location of a file. For example: the location priority of the storage location is/home/ubuntu/Jenkins >/home/ubuntu/Desktop >/home/ubuntu/Music …, that is, the location priority of the file stored in the/home/ubuntu/Jenkins storage location (path), the location priority of the file stored in the/home/ubuntu/Desktop storage location is greater than the location priority of the file stored in the/home/ubuntu/Desktop storage location, and the location priority of the file stored in the/home/ubuntu/Music storage location is greater than the location priority …. In addition, for the folder which does not need to be synchronized, the storage position of the folder is not required to be set with position priority, so that the file under the folder is prevented from being synchronized. When file synchronization is carried out, the network node determines the transmission priority of the file to be synchronized according to the position priority corresponding to the storage position, wherein the higher the transmission priority of the position corresponding to the storage position of the file to be synchronized is, the higher the transmission priority of the file to be synchronized is.
In the embodiment of the present application, the file to be synchronized refers to a file that needs to be synchronized with the network node to be synchronized but is not yet transmitted to the network node to be synchronized, such as a file stored in a storage location of a location priority set by a user but not yet transmitted to the network node to be synchronized, a file modified but not yet transmitted to the network node to be synchronized, and the like.
Exemplary: file 1, file 2 and file 3 are stored in the name order under the storage position of/home/ubuntu/Jenkins; files 4, 5, 6 and 7 are stored in the name order under the/home/ubuntu/Desktop storage position; files 8, 9 and 10 are stored in the name order under the/home/ubuntu/Music storage position; the files 2, 5, 6 and 10 are files to be synchronized, and the file 2 is determined to be the file to be synchronized with the highest transmission priority according to the storage priority/home/ubuntu/Jenkins >/home/ubuntu/Desktop >/home/ubuntu/Music … of the storage location. The location priority of the files stored in the same storage location may be determined according to the order of the modification time, size and name of the files, which is not described in detail.
S102: transmitting the file to be synchronized with the highest transmission priority to a network node to be synchronized, so that the network node to be synchronized synchronizes the file to be synchronized with the highest transmission priority.
Specifically, the network node identifies the file to be synchronized with the highest transmission priority in the network node according to a set time interval, such as 1s, 2s, 5s, and the like, and after identifying the file to be synchronized with the highest transmission priority, transmits the file to be synchronized with the highest transmission priority to the network node to be synchronized, so that the network node to be synchronized receives the file to be synchronized with the highest transmission priority and stores the file to be synchronized, thereby realizing synchronization.
Optionally, identifying, according to the set time interval, the file to be synchronized with the highest transmission priority in the network node includes:
and identifying the file to be synchronized with the highest transmission priority in the network node according to the set time interval through a continuous integration tool (Jenkins).
Jenkins is a continuous integration tool developed based on Java and used for monitoring continuous repeated work, and in the embodiment of the application, a network node can monitor a time interval through Jenkins so as to identify a file to be synchronized with highest transmission priority in the network node according to the set time interval, and transmit the file to be synchronized with highest transmission priority to the network node to be synchronized, so that the network node to be synchronized synchronizes the file to be synchronized with highest transmission priority, and file synchronization control is realized.
In addition, in the embodiment of the application, the file to be synchronized with the highest transmission priority can be transmitted to the network node to be synchronized by calling a file transfer protocol (File Transfer Protocol, FTP) tool.
For example, taking a storage priority of 1s at a set time interval and corresponding to a storage location of/home/ubuntu/Jenkins >/home/ubuntu/Desktop >/home/ubuntu/Music … as an example, the following description will be given: the network node 1 starts a file synchronization task through Jenkins according to a time interval of 1s, and the file 2 to be synchronized is stored in a/home/ubuntu/Jenkins storage position at the current synchronization moment; the file 5 to be synchronized is stored in a/home/ubuntu/Desktop storage position; and storing the file to be synchronized 10 in a storage position of/home/ubuntu/Desktop, wherein the storage priority corresponding to the file to be synchronized 2 is highest, determining that the file to be synchronized 2 is the file to be synchronized with the highest transmission priority, and calling an FTP tool to transmit the file to be synchronized 2 to the network node to be synchronized so as to synchronize the network node to be synchronized.
At the corresponding synchronization time of the next time interval (after 1 s), the file synchronization task is started again through Jenkins, but before that, the file 11 to be synchronized is newly stored in the storage position of/home/ubuntu/Jenkins, at this time, the file 11 to be synchronized is the file to be synchronized with the highest transmission priority, and the FTP tool is called to transmit the file 11 to be synchronized to the network node to be synchronized, so that the network node to be synchronized is synchronized.
According to the embodiment of the application, the network nodes transmit the files to be synchronized with the highest priority to the network nodes to be synchronized for synchronization according to the set time interval when each synchronization time arrives according to the priority of the files to be synchronized, the file synchronization is refined from the folder level to the file level, the transmission of the files to be synchronized according to the priority is realized, the problem that the resource occupation of the network nodes is overlarge in the existing method based on the folder level synchronization is avoided, the timeliness of the file synchronization is ensured, the service requirement of the network nodes to be synchronized is ensured, and the synchronization efficiency is improved. Meanwhile, the files which do not need to be synchronized can be not provided with priority, and waste of network node resources and redundancy of transmission are avoided.
Example 2:
in order to ensure reasonable utilization of network node resources, in the embodiment of the present application, before identifying the file to be synchronized with the highest transmission priority in the network node, the method further includes:
judging whether the current moment is in a preset synchronous period or not;
if yes, the step of identifying the file to be synchronized with the highest transmission priority in the network node is carried out.
In the embodiment of the application, the network node is also provided with an interface and/or an interface for the user to set the synchronization period, and the user can set the synchronization period of the network node for file synchronization through the interface and/or the interface provided by the network node. The user can set the same or different synchronous time periods for each day according to the requirement of the user. For example: the user can synchronize the resource occupancy rate of the network node and the file according to the time requirement of 2:00-4:00 is set as a synchronization period; 12:00-13:00, 20:00-21:00 of each day of working day are set as synchronous periods, 00:00-24:00 of each day of non-working day are set as synchronous periods, etc.
Specifically, before identifying a file to be synchronized with highest priority in the network node according to a set time interval, the network node firstly judges whether the current moment is in a preset synchronization period, if so, the current moment is indicated to allow file synchronization, and the process of subsequently identifying the file to be synchronized with highest priority in the network node and transmitting the file to be synchronized to the network node to be synchronized is carried out; if not, the file synchronization is not allowed at the current moment, and the step of subsequently identifying the file to be synchronized with the highest transmission priority in the network node is not performed, so that the resources of the network node are saved.
Example 3:
based on the foregoing embodiments, in an embodiment of the present application, before the identifying the file to be synchronized with the highest transmission priority in the network node, the method further includes:
judging whether a file to be synchronized exists in the network node;
if yes, the step of identifying the file to be synchronized with the highest transmission priority in the network node is carried out.
In the embodiment of the application, the network node can record the information of the synchronized file and the file to be synchronized in the network node in a mode of synchronizing the log, wherein the information of the synchronized file and the file to be synchronized in the synchronizing log is updated along with each time of transmitting the file to the network node to be synchronized in the network node and the writing and modification of the file in the network node. The network node can identify whether the file to be synchronized exists in the network node or not through the information of the file to be synchronized recorded in the synchronization log, and when the file to be synchronized does not exist in the network node, the step of identifying the priority of the file to be synchronized in the network node and the step of identifying the file to be synchronized with the highest transmission priority are not performed any more, so that the processing resources of the network node are saved.
As shown in fig. 2, a network node starts a transmission task according to a set time interval through Jenkins, judges whether the current moment is within a preset synchronization period, if so, judges whether a file to be synchronized exists in the network node, if so, identifies a file to be synchronized with highest transmission priority in the network node, calls an FTP tool, and transmits the file to be synchronized with highest transmission priority to the network node to be synchronized, so that the network node to be synchronized synchronizes the file to be synchronized with highest transmission priority.
Example 4:
fig. 3 is a schematic structural diagram of a file synchronization device according to an embodiment of the present application, which is applied to a network node, and the device includes:
the identifying module 31 is configured to identify, according to a set time interval, a file to be synchronized with a highest transmission priority in the network node, where the transmission priority of the file to be synchronized is determined according to a location priority corresponding to a storage location of the file to be synchronized;
and the transmission module 32 is configured to transmit the file to be synchronized with the highest transmission priority to a network node to be synchronized, so that the network node to be synchronized synchronizes the file to be synchronized with the highest transmission priority.
The apparatus further comprises:
and the judging module 33 is configured to judge whether the current time is within a preset synchronization period, and if yes, trigger the identifying module.
The judging module 33 is further configured to judge whether a file to be synchronized exists in the network node, and if yes, trigger the identifying module.
The transmission module 32 is specifically configured to invoke an FTP tool to transmit the file to be synchronized with the highest transmission priority to a network node to be synchronized.
The identifying module 31 is specifically configured to identify, according to a set time interval, a file to be synchronized with a highest transmission priority in the network node.
Example 5:
based on the same inventive concept, the embodiment of the present application further provides a network node, and since the principle of solving the problem of the network node is similar to that of the file synchronization method, implementation of the network node can refer to implementation of the method, and repeated parts are not repeated.
As shown in fig. 4, which is a schematic diagram of a network node according to an embodiment of the present application, in fig. 4, a bus architecture may include any number of buses and bridges interconnected, and specifically one or more processors 41 represented by the processor 41 and various circuits of the memory 43 represented by the memory 43 are linked together. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, power management circuits, etc., which are well known in the art and, therefore, will not be described further herein. The bus interface provides an interface. Transceiver 42 may be a number of elements, including a transmitter and a transceiver, providing a means for communicating with various other apparatus over a transmission medium. The processor 41 is responsible for managing the bus architecture and general processing, and the memory 43 may store data used by the processor 41 in performing operations.
In the network node provided by the embodiment of the application:
the processor 41 is configured to read the program in the memory 43, and execute the following procedures: identifying a file to be synchronized with highest transmission priority in a network node according to a set time interval, wherein the transmission priority of the file to be synchronized is determined according to the position priority corresponding to the storage position of the file to be synchronized; and transmitting the file to be synchronized with the highest transmission priority to a network node to be synchronized through a transceiver 42, so that the network node to be synchronized synchronizes the file to be synchronized with the highest transmission priority.
Preferably, the processor 41 is further configured to determine whether the current time is within a preset synchronization period; if yes, the step of identifying the file to be synchronized with the highest transmission priority in the network node is carried out.
Preferably, the processor 41 is further configured to determine whether a file to be synchronized exists in the network node; if yes, the step of identifying the file to be synchronized with the highest transmission priority in the network node is carried out.
Preferably, the processor 41 is specifically configured to invoke an FTP tool to transmit the file to be synchronized with the highest transmission priority to the network node to be synchronized.
Preferably, the processor 41 is specifically configured to identify, by Jenkins, a file to be synchronized with a highest transmission priority in the network node according to a set time interval.
Example 6:
on the basis of the above embodiments, the embodiment of the present application further provides a network node, as shown in fig. 5, including: the processor 51, the communication interface 52, the memory 53 and the communication bus 54, wherein the processor 51, the communication interface 52 and the memory 53 complete communication with each other through the communication bus 54;
the memory 53 stores a computer program which, when executed by the processor 51, causes the processor 51 to perform the file synchronization method described in the above embodiment.
On the basis of the above embodiments, the present application further provides a computer storage readable storage medium, where a computer program executable by a network node is stored, and when the program runs on the network node, the network node is caused to perform the file synchronization method described in the above embodiments.
For system/device embodiments, the description is relatively simple as it is substantially similar to method embodiments, with reference to the description of method embodiments in part.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.
Claims (10)
1. A method of file synchronization, for use with a network node, the method comprising:
identifying a file to be synchronized with highest transmission priority in the network node according to a set time interval, wherein the transmission priority of the file to be synchronized is determined according to the position priority corresponding to the storage position of the file to be synchronized;
transmitting the file to be synchronized with the highest transmission priority to a network node to be synchronized, so that the network node to be synchronized synchronizes the file to be synchronized with the highest transmission priority;
before the identifying the file to be synchronized with the highest transmission priority in the network node, the method further includes:
judging whether the current moment is in a preset synchronous period or not;
if yes, the step of identifying the file to be synchronized with the highest transmission priority in the network node is carried out.
2. The method of claim 1, wherein prior to identifying the file to be synchronized with the highest transmission priority in the network node, the method further comprises:
judging whether a file to be synchronized exists in the network node;
if yes, the step of identifying the file to be synchronized with the highest transmission priority in the network node is carried out.
3. The method of claim 1, wherein transmitting the file to be synchronized with the highest transmission priority to a network node to be synchronized comprises:
and calling a File Transfer Protocol (FTP) tool to transmit the file to be synchronized with the highest transmission priority to a network node to be synchronized.
4. The method of claim 1, wherein the identifying the file to be synchronized with the highest transmission priority in the network node at the set time interval comprises:
and identifying the file to be synchronized with the highest transmission priority in the network node according to the set time interval by using a continuous integration tool Jenkins.
5. A file synchronization device for use in a network node, the device comprising:
the identifying module is used for identifying the file to be synchronized with highest transmission priority in the network node according to a set time interval, wherein the transmission priority of the file to be synchronized is determined according to the position priority corresponding to the storage position of the file to be synchronized;
the transmission module is used for transmitting the file to be synchronized with the highest transmission priority to a network node to be synchronized, so that the network node to be synchronized synchronizes the file to be synchronized with the highest transmission priority;
wherein the apparatus further comprises:
the judging module is used for judging whether the current moment is in a preset synchronous period or not, and if the current moment is in the preset synchronous period, the judging module is triggered.
6. The apparatus of claim 5, wherein the determining module is further configured to determine whether a file to be synchronized exists in the network node, and if so, trigger the identifying module.
7. The apparatus according to claim 5, wherein the transmission module is specifically configured to invoke a file transfer protocol FTP tool to transmit the file to be synchronized with the highest transmission priority to the network node to be synchronized.
8. The apparatus of claim 5, wherein the identifying module is specifically configured to identify, by the persistent integration tool Jenkins, a file to be synchronized with a highest transmission priority in the network node at a set time interval.
9. A network node, comprising: the device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory has stored therein a computer program which, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1-4.
10. A computer readable storage medium, characterized in that it stores a computer program executable by a network node, which program, when run on the network node, causes the network node to perform the steps of the method according to any of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811588984.4A CN109726184B (en) | 2018-12-25 | 2018-12-25 | File synchronization method, device, network node and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811588984.4A CN109726184B (en) | 2018-12-25 | 2018-12-25 | File synchronization method, device, network node and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109726184A CN109726184A (en) | 2019-05-07 |
CN109726184B true CN109726184B (en) | 2023-08-22 |
Family
ID=66297203
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811588984.4A Active CN109726184B (en) | 2018-12-25 | 2018-12-25 | File synchronization method, device, network node and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109726184B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9749412B1 (en) * | 2016-09-21 | 2017-08-29 | International Business Machines Corporation | Predictive file synchronization |
CN108021698A (en) * | 2017-12-21 | 2018-05-11 | 努比亚技术有限公司 | Delet method, device and the computer-readable storage medium of storage file |
CN108124002A (en) * | 2017-12-01 | 2018-06-05 | 北京明朝万达科技股份有限公司 | A kind of data transmission method for uplink and device |
CN108399046A (en) * | 2017-02-06 | 2018-08-14 | 百度在线网络技术(北京)有限公司 | File operation requests treating method and apparatus |
-
2018
- 2018-12-25 CN CN201811588984.4A patent/CN109726184B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9749412B1 (en) * | 2016-09-21 | 2017-08-29 | International Business Machines Corporation | Predictive file synchronization |
CN108399046A (en) * | 2017-02-06 | 2018-08-14 | 百度在线网络技术(北京)有限公司 | File operation requests treating method and apparatus |
CN108124002A (en) * | 2017-12-01 | 2018-06-05 | 北京明朝万达科技股份有限公司 | A kind of data transmission method for uplink and device |
CN108021698A (en) * | 2017-12-21 | 2018-05-11 | 努比亚技术有限公司 | Delet method, device and the computer-readable storage medium of storage file |
Non-Patent Citations (1)
Title |
---|
面向多应用的文件同步方法;曾珊等;《计算机应用与软件》;20161015(第10期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN109726184A (en) | 2019-05-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109819048B (en) | Data synchronization method, device, terminal and storage medium | |
WO2017167100A1 (en) | Data migration method and device | |
CN106790092B (en) | Remote procedure call server control system and method | |
CN113641511A (en) | Message communication method and device | |
CN112416969B (en) | Parallel task scheduling system in distributed database | |
CN103324592A (en) | Data migration control method, data migration method and data migration device | |
CN110609738A (en) | Adaptive data synchronization | |
WO2016101799A1 (en) | Service allocation method and device based on distributed system | |
CN111460038A (en) | Quasi-real-time data synchronization method and device | |
CN114301980A (en) | Method, device and system for scheduling container cluster and computer readable medium | |
CN110233791B (en) | Data deduplication method and device | |
CN109726184B (en) | File synchronization method, device, network node and storage medium | |
CN108874699B (en) | Method and device for using MTP (Multi-time transfer protocol) function by multiple systems and electronic equipment | |
CN104486215A (en) | Message transmitting method and equipment | |
CN112540966A (en) | File synchronization method and device | |
CN110063050B (en) | Service scheduling method and system | |
CN109614242A (en) | A kind of computing capability sharing method, device, equipment and medium | |
CN114726711A (en) | Method and system for cooperative processing service between devices | |
CN112134887B (en) | Data synchronization method and device for nodes in distributed cluster | |
CN103595631A (en) | Method and device for setting up route | |
CN111858184A (en) | Disaster recovery system, disaster recovery method, storage medium and computing device | |
CN104468674A (en) | Data migration method and device | |
CN115686813A (en) | Resource scheduling method and device, electronic equipment and storage medium | |
CN113472638A (en) | Edge gateway control method, system, device, electronic equipment and storage medium | |
CN110677497A (en) | Network medium distribution method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |