CN116527691B - Method, device, equipment and medium for synchronizing ship-shore data - Google Patents

Method, device, equipment and medium for synchronizing ship-shore data Download PDF

Info

Publication number
CN116527691B
CN116527691B CN202310762354.9A CN202310762354A CN116527691B CN 116527691 B CN116527691 B CN 116527691B CN 202310762354 A CN202310762354 A CN 202310762354A CN 116527691 B CN116527691 B CN 116527691B
Authority
CN
China
Prior art keywords
file
target
data
block information
state
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
Application number
CN202310762354.9A
Other languages
Chinese (zh)
Other versions
CN116527691A (en
Inventor
权国志
李成星
路巍
于斌
黄山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin Cosco Marine Bulk Transportation Digital Technology Co ltd
Original Assignee
Tianjin Cosco Marine Bulk Transportation Digital Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Tianjin Cosco Marine Bulk Transportation Digital Technology Co ltd filed Critical Tianjin Cosco Marine Bulk Transportation Digital Technology Co ltd
Priority to CN202310762354.9A priority Critical patent/CN116527691B/en
Publication of CN116527691A publication Critical patent/CN116527691A/en
Application granted granted Critical
Publication of CN116527691B publication Critical patent/CN116527691B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • H04L67/108Resource delivery mechanisms characterised by resources being split in blocks or fragments
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application relates to the technical field of data synchronization, in particular to a method, a device, equipment and a medium for synchronizing ship-shore data, wherein the method comprises the following steps: when the file state is the target state, the file at the transmitting equipment end is characterized as being changed, and the file at the receiving equipment end needs to be adjusted in time according to the changing condition, so that the disk address corresponding to the target file in the target state is subjected to blocking processing, and blocking information is obtained. And further, the block information is sent to the target receiving device, and when a synchronization request sent by the target receiving device is received, file data reading is performed based on the block information, and each target file data is sequentially sent to the target receiving device. Compared with the prior art that all file data in the folder need to be retransmitted after each interruption, the method and the device have the advantages that under the condition that a communication link is extremely unstable, data is continuously transmitted backwards from the target file data which is failed to be transmitted, and the time for synchronizing the ship-shore data is shortened.

Description

Method, device, equipment and medium for synchronizing ship-shore data
Technical Field
The present application relates to the field of data synchronization, and in particular, to a method, an apparatus, a device, and a medium for synchronizing shore data.
Background
With the high-speed development of economy, large-scale development of shipping industry also occurs, and in the actual shipping process, two ends of the ship bank communicate through the public internet, however, the transmission process of data between the two ends of the ship bank is abnormal due to extremely unstable communication links and serious insufficient network bandwidth. Abnormal transmission process not only can seriously affect the data monitoring of the ship end by the shore end, but also the ship end cannot timely and accurately acquire file data sent by the shore end, so that the data at the two ends of the ship shore are inconsistent.
In the related art, data transmission at two ends of a ship bank is realized by adopting a message transmission or mail transmission mode, the message or mail carries more data information, when transmission between the two ends of the ship bank is abnormal, the data transmission at the two ends is interrupted, and after the transmission between the two ends of the ship bank is recovered to be normal, the data in the folder where the message or mail is positioned is required to be completely retransmitted so as to complete data synchronization at the two ends of the ship bank. However, when data synchronization is performed for large file data using the related art, all file data in the folder needs to be retransmitted every time interruption, so that it takes a lot of time to perform data synchronization in the case where the communication link is extremely unstable.
Thus, how to shorten the time for shore data synchronization in the case of extremely unstable communication links is a problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a method, a device, equipment and a medium for synchronizing ship shore data, which are used for solving at least one technical problem.
The above object of the present application is achieved by the following technical solutions:
in a first aspect, the present application provides a method for synchronizing shore data, which adopts the following technical scheme:
a method of synchronizing shore data, comprising:
acquiring a file state in a folder, and when the file state is a target state, performing blocking processing on a disk address corresponding to a target file in the target state to obtain blocking information, wherein the target state comprises: newly added files and modified files;
the blocking information is sent to target receiving equipment, wherein the blocking information is used for informing the target receiving equipment of the division condition of target files;
when a synchronization request sent by the target receiving equipment is received, file data reading is carried out based on the block information to obtain target file data, and each target file data is sequentially sent to the target receiving equipment to complete the synchronization of ship-shore data.
By adopting the technical scheme, when the file state is the target state, the file at the transmitting equipment end is characterized as being changed, and the file at the receiving equipment end is required to be adjusted in time according to the change condition, so that the disk address corresponding to the target file in the target state is subjected to blocking processing, and blocking information is obtained. And further, the block information is sent to the target receiving device, and when a synchronization request sent by the target receiving device is received, file data reading is performed based on the block information, and each target file data is sequentially sent to the target receiving device. Compared with the prior art that all file data in the folder need to be retransmitted in each interruption, the method and the device for transmitting the file data continuously backwards from the target file data with the transmission failure in the case that the communication link is extremely unstable, and the time for synchronizing the ship-shore data is shortened.
The present application may be further configured in a preferred example to: when the file state is a modified file, the method further comprises the steps of:
acquiring block information before modification corresponding to a modification state file, comparing the block information corresponding to the modification state file with the block information before modification, and determining difference block information, wherein the difference block information is a part of the block information which is different from the block information before modification, and the modification state file is a target file with a file state being a modification file state;
Correspondingly, the reading of the file data based on the block information to obtain the target file data includes:
and reading file data based on the difference block information to obtain target file data.
The present application may be further configured in a preferred example to: the file state further includes: the file is deleted and the file is deleted,
the step of sequentially sending each target file data to the target receiving device includes:
in the process of sending the target file data to the target receiving equipment, monitoring the state of the target receiving equipment in real time;
when the state of the target receiving equipment is updated from offline to online, the target receiving equipment is recorded as a re-online receiving equipment, and whether the file state of the target file is a deleted file is judged;
if not, acquiring the first blocking information of the online receiving equipment and the current blocking information of the sending equipment;
determining target block information based on the current block information of the sending equipment and the first block information of the online receiving equipment again, wherein the target block information is the block information which is retransmitted after being transmitted by a transmission terminal corresponding to a target file;
And sending the target file data corresponding to the target block information to the target receiving equipment.
The present application may be further configured in a preferred example to: after the determining whether the file state of the target file is the deleted file, the method further includes:
if yes, acquiring second blocking information of the online receiving equipment again, and determining current deleting blocking information based on the second blocking information of the online receiving equipment again;
and sending the current deletion block information to the online re-receiving equipment, wherein the current deletion block information is used for controlling the online re-receiving equipment to delete the file data corresponding to the current deletion block information in the target receiving equipment.
The present application may be further configured in a preferred example to: after the state of the target receiving device is monitored in real time, the method further comprises the following steps:
when the offline time length of the target receiving equipment exceeds an offline time length threshold, marking the target receiving equipment as offline receiving equipment, acquiring monitoring information of the offline receiving equipment, and judging whether the offline receiving equipment has danger or not based on the monitoring information;
when the offline receiving equipment is dangerous, danger early warning information is generated and sent to the danger monitoring terminal, wherein the danger early warning information is convenient for a user to take emergency treatment for the offline receiving equipment in a dangerous condition.
The present application may be further configured in a preferred example to: after the file state is obtained, the method further comprises:
when the file state is a deleted file, performing blocking processing on a disk address corresponding to a target file in the deleted file state to obtain deleted blocking information;
and sending the deleting block information to target receiving equipment, wherein the deleting block information is used for controlling the target receiving equipment to delete file data corresponding to the deleting block information in the target receiving equipment.
The present application may be further configured in a preferred example to: the method comprises the steps of performing block processing on a disk address corresponding to a target file in the target state, and before obtaining block information, further comprising:
acquiring network quality information and distance between two ends, wherein the distance between the two ends is the distance between the sending equipment and the target receiving equipment;
determining a preset size based on the network quality information, the distance between two ends and a block size adjustment rule;
correspondingly, the block processing is performed on the disk address corresponding to the target file in the target state to obtain block information, which includes:
and performing blocking processing on the disk address corresponding to the target file in the target state according to the preset size to obtain blocking information.
In a second aspect, the present application provides a device for synchronizing shore data, which adopts the following technical scheme:
a synchronization apparatus for ship-shore data, comprising:
the device comprises a blocking module, a storage module and a storage module, wherein the blocking module is used for acquiring a file state in a folder, and when the file state is a target state, blocking processing is carried out on a disk address corresponding to a target file in the target state to obtain blocking information, wherein the target state comprises: newly added files and modified files;
the sending module is used for sending the blocking information to the target receiving equipment, wherein the blocking information is used for informing the target receiving equipment of the division condition of the target file;
and the data reading module is used for reading the file data based on the block information when receiving the synchronous request sent by the target receiving equipment to obtain target file data, and sequentially sending each target file data to the target receiving equipment to complete the synchronization of the ship-shore data.
In a third aspect, the present application provides a transmitting apparatus, which adopts the following technical scheme:
at least one processor;
a memory;
at least one application program, wherein the at least one application program is stored in the memory and configured to be executed by the at least one processor, the at least one application program configured to: and executing the method for synchronizing the ship-shore data.
In a fourth aspect, the present application provides a computer readable storage medium, which adopts the following technical scheme:
a computer-readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the above-described method of synchronizing ship-shore data.
In summary, the present application includes at least one of the following beneficial technical effects:
when the file state is the target state, the file at the transmitting equipment end is characterized as being changed, and the file at the receiving equipment end needs to be adjusted in time according to the changing condition, so that the disk address corresponding to the target file in the target state is subjected to blocking processing, and blocking information is obtained. And further, the block information is sent to the target receiving device, and when a synchronization request sent by the target receiving device is received, file data reading is performed based on the block information, and each target file data is sequentially sent to the target receiving device. Compared with the prior art that all file data in the folder need to be retransmitted in each interruption, the method and the device for transmitting the file data continuously backwards from the target file data with the transmission failure in the case that the communication link is extremely unstable, and the time for synchronizing the ship-shore data is shortened.
Comparing the block information corresponding to the modified state file with the block information before modification to determine difference block information, and further reading file data based on the difference block information to obtain target file data, and performing data synchronization by using a difference part transmission mode, so that not only is the occupation amount of communication resources reduced, but also the data synchronization time is shortened.
Drawings
FIG. 1 is a flow chart of a method for synchronizing shore data according to an embodiment of the present application;
FIG. 2 is a flow chart of sending target file data to the target receiving device according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a shore data synchronizing device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a transmitting apparatus according to an embodiment of the present application.
Detailed Description
The application is described in further detail below in connection with fig. 1 to 4.
The present embodiment is merely illustrative of the present application and is not intended to limit the present application, and those skilled in the art, after having read the present specification, may make modifications to the present embodiment without creative contribution as necessary, but are protected by patent laws within the scope of the present application.
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. 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, the term "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In this context, unless otherwise specified, the term "/" generally indicates that the associated object is an "or" relationship.
Embodiments of the application are described in further detail below with reference to the drawings.
The embodiment of the application provides a method for synchronizing ship-shore data, which is executed by a transmitting device, as shown in fig. 1, and comprises the steps of S101, S102 and S103, wherein:
Step S101: acquiring file states in a folder, and when the file states are target states, performing blocking processing on disk addresses corresponding to target files in the target states to obtain blocking information, wherein the target states comprise: newly added files and modified files.
For the embodiment of the application, a method for bidirectional mutual transmission at two ends of a ship shore is provided to realize synchronization of file data at two ends of the ship shore, namely, the sending equipment can be ship end equipment or shore end equipment, and it is easy to understand that when the sending equipment is ship end equipment, the receiving equipment is shore end equipment; when the transmitting device is a shore device, the receiving device is a ship device. The transmitting equipment is internally provided with a plurality of folders, each folder is internally provided with a plurality of files, in order to ensure the synchronization of data at two ends of the ship shore, the transmitting equipment can monitor the file states in the folders in real time, when the file states are target states, the files at the transmitting equipment are characterized as being changed, and the files at the receiving equipment are required to be adjusted in time according to the changing conditions so as to ensure the synchronization of the data at two ends of the ship shore. File states include, but are not limited to: the method comprises the steps of adding a file, modifying the file, deleting the file and unchanged the file, wherein when the file state is the added file, the sending device is characterized in that the file data which is not added by the receiving device is added, and therefore the added file needs to be sent to the receiving device. When the file status is the modified file, the sending device is characterized to modify the file data, so that the files stored by the sending device and the receiving device are inconsistent, and therefore, the modified file needs to be sent to the receiving device. When the file status is deleted, it is characterized that the transmitting device has deleted the target file data, but the target file data is still stored in the receiving device, and thus, the target file data in the receiving device needs to be deleted. When the file state is unchanged, the file in the sending equipment is unchanged, and the files stored in the sending equipment and the receiving equipment are identical, so that file transmission operation is not needed.
Before the transmission device and the receiving device transmit file data, the transmission device and the receiving device are preferentially transmitted with block information to inform the receiving device to receive the file data, so that when the file state is the target state, the block processing is performed on the disk address corresponding to the target file in the target state to obtain block information, wherein the block information also marks the file information and the position information of the block in the total block, the block information is stored in a local database, and because the volume of the target file is large, more disk addresses are occupied on the disk, and further, the block information obtained after the block processing of the target file is multiple. Preferably, the target file is segmented according to 128K bytes, and the blocking information is determined based on the disk address of each block, wherein the size of the target file block is not limited.
Step S102: the method comprises the steps of sending blocking information to target receiving equipment, wherein the blocking information is used for informing the target receiving equipment of the division condition of target files;
step S103: when a synchronization request sent by target receiving equipment is received, file data reading is carried out based on the block information to obtain target file data, and each target file data is sequentially sent to the target receiving equipment to complete the synchronization of ship-shore data.
For the embodiment of the application, the ship-shore correspondence exists between the sending device and the receiving device, so that the target receiving device is determined from all the sending devices based on the preset ship-shore correspondence, wherein the number of the target receiving devices can be one, two or more, further, the blocking information corresponding to the target file is sent to the target receiving device, and the target receiving device also stores the blocking information in the local database. Preferably, before the block information is sent to the target receiving device, the block information is encrypted to ensure the security of the transmission of the block information, and the target receiving device performs decryption after receiving the block information, where the encryption operation corresponds to the decryption, and a specific manner of the encryption operation and the decryption is not limited. When the target receiving device is ready to receive the file data, the target receiving device sends a synchronization request to the sending device, the synchronization request is used for notifying the sending device to transmit the file data, and then the sending device reads the target file data from the magnetic disk based on the block information, wherein the block information and the target file data have a one-to-one relationship, and therefore the target file data are multiple. Finally, each target file data is sequentially sent to target receiving equipment so as to complete the synchronization of the ship-shore data, and the sending sequence of the target file data is the same as the arrangement sequence of the block information, wherein when the target file data is sent, header information is added to the target file data, and the header information is convenient for the target receiving equipment to determine the detailed information of the target file data, namely, the file to which the target file data belongs and the position of the target file data in the file. It should be noted that, after receiving the target file data, the target receiving device performs status marking on the block information corresponding to the target file data, where the status marking is used to determine the receiving condition of the target file.
When two ends of the ship bank communicate, the transmission process of the target file data between the two ends of the ship bank is abnormal because of extremely unstable communication links and seriously insufficient network bandwidth. Compared with the prior art that all file data in the folder need to be retransmitted every time of interruption, the method and the device shorten the time for synchronizing the ship-shore data under the condition that a communication link is extremely unstable.
Therefore, in the embodiment of the application, when the file state is the target state, the file at the transmitting equipment end is characterized to be changed, and the file at the receiving equipment end is required to be adjusted in time according to the change condition, so that the disk address corresponding to the target file in the target state is subjected to the blocking processing to obtain the blocking information. And further, the block information is sent to the target receiving device, and when a synchronization request sent by the target receiving device is received, file data reading is performed based on the block information, and each target file data is sequentially sent to the target receiving device. Compared with the prior art that all file data in the folder need to be retransmitted in each interruption, the method and the device for transmitting the file data continuously backwards from the target file data with the transmission failure in the case that the communication link is extremely unstable, and the time for synchronizing the ship-shore data is shortened.
Further, in order to reduce the occupation amount of communication resources and shorten the time of data synchronization, in the embodiment of the present application, when the file state is a modified file, the method further includes, after obtaining the blocking information, performing a blocking process on a disk address corresponding to the target file in the target state:
acquiring block information before modification corresponding to a modification state file, comparing the block information corresponding to the modification state file with the block information before modification, and determining difference block information, wherein the difference block information is a part of the block information, which is different from the block information before modification, and the modification state file is a target file with a file state being a modification file state;
correspondingly, reading file data based on the block information to obtain target file data, including:
and reading file data based on the difference block information to obtain target file data.
For the embodiment of the application, when the file state is the modified file, the content of the file is indicated to be modified, and in order to ensure the synchronization of the data at two ends of the ship shore, the corresponding file in the target receiving equipment needs to be controlled to be modified identically. In one case, the transmitting device transmits the modified modification file to the target receiving device, and replaces the original file with the modified modification file to complete the synchronization of the ship-shore data. However, the target file needs to be retransmitted every time the transmitting device modifies, and the data synchronization in this way not only occupies larger communication resources, but also consumes longer transmission time.
Specifically, the target file before modification is stored in the sending device and the target receiving device in advance, so that the block information before modification is also stored in the sending device and the target receiving device in advance, and the block information is obtained after the block processing is performed on the disk address corresponding to the target file in the state of the modified file, wherein the block information is the block information of the modified file. Furthermore, the difference block information is determined by comparing the block information corresponding to the modification status file with the block information before modification, and it is easy to understand that the difference exists before and after modification of the file, so that the difference exists between the block information before and after modification, and the difference of the file data corresponds to the difference of the block information. And then, reading file data based on the difference block information to obtain target file data, wherein the target file data is partial data with differences between the files before and after modification, and sending the target file data with the differences to target receiving equipment, and the target receiving equipment modifies the target file based on the target file data so as to realize the synchronization of ship-shore data.
Therefore, in the embodiment of the application, the block information corresponding to the modification state file is compared with the block information before modification to determine the difference block information, and further, file data reading is performed based on the difference block information to obtain target file data, and the data synchronization is performed by using a difference part transmission mode, so that not only is the occupation amount of communication resources reduced, but also the data synchronization time is shortened.
Further, in order to shorten the time for synchronizing the shore data, in the embodiment of the present application, as shown in fig. 2, the file status further includes: the file is deleted and the file is deleted,
sequentially transmitting each target file data to a target receiving device, including: step S1031 to step S1035, wherein:
step S1031: and in the process of sending the target file data to the target receiving equipment, monitoring the state of the target receiving equipment in real time.
For the embodiment of the application, communication is carried out between two ends of the ship shore through the public internet in the actual shipping process, however, the transmission process of data between the two ends of the ship shore is often abnormal due to extremely unstable communication links and seriously insufficient network bandwidth, so that the state of the target receiving equipment is monitored in real time in the process of transmitting the target file data to the target receiving equipment so as to determine whether the target file data is successfully transmitted. The method for monitoring the state of the target receiving device is various, the embodiment of the application is not limited any more, and preferably, the state of the target receiving device is determined by utilizing ping (Packet Internet Groper, network diagnostic tool), namely, based on a preset monitoring period, the sending device wants the target receiving device to send a ping message, and when information returned by the target receiving device is received within a preset period, the state of the target receiving device is determined to be online; and when the information returned by the target receiving device is not received within the preset period, determining that the state of the target receiving device is offline. And then marking the offline target receiving equipment, continuously monitoring whether the offline target receiving equipment is on line, preferably, adding the offline target receiving equipment into a dialing queue every time the offline target receiving equipment is detected to exist, and continuously sending ping messages according to the sequence of the offline target receiving equipment in the dialing queue.
Step S1032: when the state of the target receiving device is updated from offline to online, the target receiving device is marked as a re-online receiving device, and whether the file state of the target file is a deleted file is judged.
For the embodiment of the application, when the state of the target receiving equipment is updated from offline to online, the state indicates that communication is restored between the target receiving equipment and the transmitting equipment, and in order to ensure the synchronization of data at two ends of a ship shore, the data of the target file which is not successfully transmitted needs to be transmitted to the target receiving equipment. Of course, the state of the target file in the transmitting device may change during a period in which the target receiving device and the transmitting device interrupt communication, and thus, it is necessary to adjust the target file in the target receiving device based on the change of the target file in the transmitting device. Therefore, aiming at the online receiving device again, judging whether the file state of the target file is a deleted file, and when the file state of the target file is the deleted file, the part of the target file which is not successfully transmitted is not required to be continuously transmitted, but the target receiving device is required to be controlled to delete the target file; when the file state of the target file is not the deleted file, the part of the target file which is not successfully transmitted needs to be continuously transmitted.
Step S1033: if not, acquiring first blocking information of the online receiving equipment and current blocking information of the sending equipment again;
step S1034: determining target block information based on current block information of the sending equipment and first block information of the online receiving equipment again, wherein the target block information is the block information of the sending equipment which retransmits the target file;
step S1035: and sending the target file data corresponding to the target block information to target receiving equipment.
For the embodiment of the application, when the file state of the target file is not deleted, the data synchronization at both sides of the ship is performed by using a breakpoint continuous transmission rule, specifically, the target block information is determined based on the current block information of the sending device and the first block information of the online receiving device again, wherein if the sending device does not adjust the target file, the current block information of the sending device is the same as the block information before the transmission interruption of the target file. The interruption of communication during the file transfer may cause a portion of the target file data of the transmitting device to be unsuccessfully transmitted to the target receiving device, and thus, based on the flag state of the first block information of the re-online receiving device, wherein the flag state includes: and determining the first unsuccessfully transmitted target file data and retransmission block information corresponding to the first unsuccessfully transmitted target file data. And further, determining target blocking information in the current blocking information of the sending equipment based on the retransmission blocking information of the online receiving equipment again, reading file data based on the target blocking information, and sending target file data corresponding to the target blocking information to the target receiving equipment so as to complete synchronization of data at two ends of a ship after communication is restored. The data at two ends of the ship is synchronized by using the breakpoint continuous transmission rule, and compared with the condition that all file data in the file folder need to be retransmitted in each interruption of the related technology, the method and the device for synchronizing the data of the ship shorten the time for synchronizing the data of the ship under the condition that a communication link is extremely unstable.
Therefore, in the embodiment of the application, in the process of sending the target file data to the target receiving device, the state of the target receiving device is monitored in real time to determine whether the target file data is successfully sent. When the state of the target receiving equipment is updated from offline to online, judging whether the file state of the target file is a deleted file, if not, carrying out data synchronization at two ends of a ship bank by using a breakpoint continuous transmission rule, determining target block information based on current block information of the transmitting equipment and first block information of the online receiving equipment again, and transmitting target file data corresponding to the target block information to the target receiving equipment. Compared with the prior art that all file data in the folder need to be retransmitted in each interruption, the method and the device for transmitting the file data continuously backwards from the target file data with the transmission failure in the case that the communication link is extremely unstable, and the time for synchronizing the ship-shore data is shortened.
Further, in order to reduce the probability of different data at two ends of the ship shore, in the embodiment of the present application, after determining whether the file state of the target file is the deleted file, the method further includes:
if yes, acquiring second block information of the online receiving equipment again, and determining current deleted block information based on the second block information of the online receiving equipment again;
And sending the current deletion block information to the online re-receiving equipment, wherein the current deletion block information is used for controlling the target receiving equipment to delete the file data corresponding to the current deletion block information in the online re-receiving equipment.
For the embodiment of the application, when the file state of the target file is the deleted file, the sending device and the target receiving device are characterized in that the sending device deletes the target file in the period of transmission interruption, but the target receiving device already receives part of the target data file, so that the target receiving device needs to be controlled to delete the part of the received target data file in order to ensure the synchronization of the data at two ends of the ship shore. Further, second block information of the re-online receiving device is acquired, and the condition that the re-online receiving device receives the target file data is determined based on the marking state of the second block information of the re-online receiving device, wherein the marking state comprises the following steps: the synchronized and unsynchronized, i.e., the re-online receiving device marks the chunk information of the received target file data as synchronized and the chunk information of the non-received target file data as unsynchronized. Then, the block information marked as synchronized in the second block information is determined as the current deleted block information, and the current deleted block information is transmitted to the re-online receiving apparatus. After receiving the current deleting block information, the online receiving device deletes the file data corresponding to the current deleting block information so as to complete synchronization of the data at two ends of the ship bank.
It can be seen that, in the embodiment of the present application, when the file status of the target file is the deleted file, the current deleted block information is determined based on the second block information of the online re-receiving device, and the current deleted block information is sent to the online re-receiving device, so that the probability of different data at two ends of the ship shore is reduced.
Further, in order to reduce the loss caused by the danger, in the embodiment of the present application, after monitoring the state of the target receiving device in real time, the method further includes:
when the offline time length of the target receiving equipment exceeds the offline time length threshold, the target receiving equipment is marked as offline receiving equipment, monitoring information of the offline receiving equipment is obtained, and whether the offline receiving equipment has danger or not is judged based on the monitoring information;
when the offline receiving equipment is dangerous, danger early warning information is generated and sent to the danger monitoring terminal, wherein the danger early warning information is convenient for a user to take emergency treatment for the offline receiving equipment in dangerous conditions.
For the embodiment of the application, the transmission process of the data between the two ends of the ship shore is abnormal due to the extremely unstable communication link and the serious shortage of the network bandwidth, however, the offline time of the target receiving equipment is shorter due to the communication, and if the target receiving equipment is in an offline state for a long time, the danger exists in the target receiving equipment, so that the loss caused by the danger can be reduced by adopting emergency treatment aiming at the dangerous situation. Furthermore, in the embodiment of the application, after the offline state of the target receiving device is monitored, the state of the target receiving device is continuously monitored, and the offline time of the target receiving device is also monitored. When the offline time is not greater than the offline time threshold, the offline state of the target receiving device is characterized in a normal condition, and the state of the target device is only required to be continuously monitored, and special processing is not required; and when the offline time length is greater than the offline time length threshold, characterizing that the target receiving equipment is in a dangerous state, thus marking the target receiving equipment as offline receiving equipment, and carrying out special treatment of dangerous early warning aiming at the offline receiving equipment. The offline time threshold is determined by a person skilled in the art based on a large amount of experimental data, and of course, a user can set the offline time threshold according to actual situations, and the embodiment of the application is not limited any more.
Further, the monitoring information of the offline receiving device is obtained based on the image acquisition device, wherein the monitoring information includes but is not limited to: the off-line receiving device comprises an off-line receiving device, an off-line receiving device and a transmitting device, wherein the off-line receiving device is connected with the off-line receiving device in a wireless mode. Furthermore, whether the offline receiving device is dangerous or not is judged based on the monitoring information, preferably, monitoring standard information is set in the sending device according to each aspect of the monitoring information, and dangerous monitoring is carried out based on the monitoring information and each monitoring standard information, for example, standard operation parameters of the offline receiving device are stored in the sending device in advance, and then, matching is carried out based on the operation parameters of the offline receiving device and the standard operation parameters, and when matching fails, the danger of the offline receiving device is determined; and when the matching is successful, determining the safety of the offline receiving equipment. The process of performing risk determination for other aspects is similar to the above-described process, and the embodiments of the present application will not be repeated. Then, when the offline receiving device has danger, generating danger early warning information and sending the danger early warning information to the danger monitoring terminal, wherein the danger early warning information can only comprise danger early warning content, and of course, the method can also comprise the following steps: the danger detailed information, the danger level, the position of the off-line receiving device and the like are not limited any more with respect to the specific content of the danger early warning information.
It can be seen that, in the embodiment of the present application, when the offline time length of the target receiving device exceeds the offline time length threshold, whether the offline receiving device has a hazard is determined based on the monitoring information, and when the offline receiving device has a hazard, hazard early warning information is generated and sent to the hazard monitoring terminal, and the hazard loss can be reduced by adopting emergency treatment for the hazard condition.
Further, in the embodiment of the present application, after acquiring the file status, the method further includes:
when the file state is the deleted file, performing blocking processing on a disk address corresponding to the target file in the deleted file state to obtain deleted blocking information;
and sending the deleting block information to the target receiving device, wherein the deleting block information is used for controlling the target receiving device to delete the file data corresponding to the deleting block information in the target receiving device.
In the embodiment of the application, a plurality of files are stored in the sending device, however, in the actual application process, a situation of deleting files often exists, when files are deleted in the sending device, in order to ensure synchronization of data at two ends of a ship shore, the files need to be deleted correspondingly in the target receiving device, and it is easy to understand that the deleted files are files which have been transmitted from the sending device to the target receiving device. When the file state is the deleted file, the disk address corresponding to the target file in the deleted file state is subjected to blocking processing to obtain deleted blocking information, and the deleted blocking information is sent to the target receiving device, wherein the deleted blocking information is used for notifying the target receiving device to delete the file corresponding to the deleted blocking information. After receiving the deleting block information, the target receiving device selects a file corresponding to the deleting block information from the disk and deletes the file so as to complete synchronization of data at two ends of the ship bank.
Therefore, in the embodiment of the application, when the file state is the deleted file, the disk address corresponding to the target file in the deleted file state is subjected to the blocking processing to obtain the deleted blocking information, and the deleted blocking information is sent to the target receiving device, so that the synchronization of the data at two ends of the ship side is completed.
Further, in the embodiment of the present application, the method further includes, before performing a block processing on a disk address corresponding to a target file in a target state to obtain block information:
acquiring network quality information and distance between two ends, wherein the distance between two ends is the distance between the sending equipment and the target receiving equipment;
determining a preset size based on network quality information, the distance between two ends and a block size adjustment rule;
correspondingly, the method for partitioning the disk address corresponding to the target file in the target state to obtain partitioning information comprises the following steps:
and performing blocking processing on the disk address corresponding to the target file in the target state according to the preset size to obtain blocking information.
For the embodiment of the application, the network quality information and the distance between two ends can influence the transmission of the target file data, and the size of the target file data is determined by the blocking information, so that the size of the blocking is critical to the transmission of the target file, and the preset size of the blocking is determined before the blocking is performed. The network quality information is used to characterize the network conditions of the communication between the sending device and the target receiving device, including, but not limited to: network speed, network fluctuation conditions, network stuck conditions, etc. And determining a preset size based on the network quality information, the distance between two ends and the block size adjustment rule, specifically scoring the network quality information based on a network scoring standard to obtain a network score, for example, setting a score interval based on each information item in the network quality information, and summing up partial scores based on each information item to obtain the network score. The distance between two ends is scored based on a distance scoring standard, different scores are set for different distances in the distance scoring standard, so that a distance score is obtained, wherein the network scoring standard and the distance scoring standard are both preset and stored in a transmitting device, the specific content of the scoring standard is not limited any more, and compared with standard network information, the worse the network quality is, the lower the network score is; the larger the end pitch, the lower the pitch fraction compared to the optimal pitch. Then, determining a preset size based on the network score, the spacing score and the block size adjustment rule, wherein the block size adjustment rule is as follows: preset dimensions = network fraction + pitch fraction, the magnitudes of the network and pitch coefficients are determined by one skilled in the art based on a number of experimental verifications.
Further, according to the preset size, the disk address corresponding to the target file in the target state is subjected to blocking processing to obtain blocking information, and the preset size is preferably 128 kbytes. In this way, the preset size is reduced under the condition that the distance between two ends is large and/or the network quality is poor, so that the condition that the data transmission of the target file fails is reduced; under the condition of small distance between two ends and/or good network quality, the preset size is increased, and the transmission of invalid data is effectively reduced.
It can be seen that, in the embodiment of the present application, based on the network quality information, the distance between two ends and the block size adjustment rule, a preset size is determined, and according to the preset size, the block processing is performed on the disk address corresponding to the target file in the target state, so as to obtain the block information. Reducing the preset size under the condition of large distance between two ends and/or poor network quality so as to reduce the occurrence of failure of data transmission of the target file; under the condition of small distance between two ends and/or good network quality, the preset size is increased, and the transmission of invalid data is effectively reduced.
The above embodiments describe a method for synchronizing ship-shore data from the viewpoint of a method flow, and the following embodiments describe a device for synchronizing ship-shore data from the viewpoint of a virtual module or a virtual unit, which are described in detail in the following embodiments.
The embodiment of the application provides a device for synchronizing ship-shore data, as shown in fig. 3, the device for synchronizing ship-shore data may specifically include:
the blocking module 210 is configured to obtain a file state in a folder, and when the file state is a target state, perform blocking processing on a disk address corresponding to a target file in the target state to obtain blocking information, where the target state includes: newly added files and modified files;
a sending module 220, configured to send blocking information to a target receiving device, where the blocking information is used to notify the target receiving device of a partition condition of a target file;
the data reading module 230 is configured to, when receiving a synchronization request sent by the target receiving device, read file data based on the partition information to obtain target file data, and sequentially send each target file data to the target receiving device to complete synchronization of ship-shore data.
For the embodiment of the present application, when the file state is the target state, the blocking module 210 characterizes that the file at the transmitting device end is changed, and needs to adjust the file at the receiving device end in time according to the change condition, so that the blocking processing is performed on the disk address corresponding to the target file in the target state, and blocking information is obtained. Further, the transmitting module 220 transmits the blocking information to the target receiving apparatus, and the data reading module 230 reads the file data based on the blocking information and sequentially transmits each target file data to the target receiving apparatus when receiving the synchronization request transmitted from the target receiving apparatus. Compared with the prior art that all file data in the folder need to be retransmitted in each interruption, the method and the device for transmitting the file data continuously backwards from the target file data with the transmission failure in the case that the communication link is extremely unstable, and the time for synchronizing the ship-shore data is shortened.
In one possible implementation manner of the embodiment of the present application, when the file status is a modified file, the synchronization device for ship-shore data further includes:
the difference block information determining module is used for acquiring block information before modification corresponding to the modification state file, comparing the block information corresponding to the modification state file with the block information before modification, and determining difference block information, wherein the difference block information is a part of the block information which is different from the block information before modification, and the modification state file is a target file with a file state being the modification file state;
accordingly, when executing file data reading based on the partition information, the data reading module 230 is configured to:
and reading file data based on the difference block information to obtain target file data.
In one possible implementation manner of the embodiment of the present application, the file state further includes: the deleting file, the data reading module 230 is configured to, when executing the sequential transmission of each target file data to the target receiving device:
in the process of sending the target file data to the target receiving equipment, monitoring the state of the target receiving equipment in real time;
when the state of the target receiving equipment is updated from offline to online, the target receiving equipment is marked as a re-online receiving equipment, and whether the file state of the target file is a deleted file is judged;
If not, acquiring first blocking information of the online receiving equipment and current blocking information of the sending equipment again;
determining target block information based on current block information of the sending equipment and first block information of the online receiving equipment again, wherein the target block information is the block information which is transmitted again after a transmission terminal corresponding to a target file;
and sending the target file data corresponding to the target block information to target receiving equipment.
In one possible implementation manner of the embodiment of the present application, the device for synchronizing ship-shore data further includes:
the interrupt deleting module is used for acquiring the second block information of the online receiving equipment again if yes, and determining the current deleting block information based on the second block information of the online receiving equipment again;
and sending the current deleting block information to the online re-receiving device, wherein the current deleting block information is used for controlling the online re-receiving device to delete the file data corresponding to the current deleting block information in the target receiving device.
In one possible implementation manner of the embodiment of the present application, the device for synchronizing ship-shore data further includes:
the off-line monitoring module is used for marking the target receiving equipment as off-line receiving equipment when the off-line time length of the target receiving equipment exceeds an off-line time length threshold value, acquiring monitoring information of the off-line receiving equipment and judging whether the off-line receiving equipment has danger or not based on the monitoring information;
When the offline receiving equipment is dangerous, danger early warning information is generated and sent to the danger monitoring terminal, wherein the danger early warning information is convenient for a user to take emergency treatment for the offline receiving equipment in dangerous conditions.
In one possible implementation manner of the embodiment of the present application, the device for synchronizing ship-shore data further includes:
the file deleting module is used for carrying out blocking processing on the disk address corresponding to the target file in the file deleting state when the file state is the file deleting state, so as to obtain the blocking deleting information;
and sending the deleting block information to the target receiving device, wherein the deleting block information is used for controlling the target receiving device to delete the file data corresponding to the deleting block information in the target receiving device.
In one possible implementation manner of the embodiment of the present application, the device for synchronizing ship-shore data further includes:
the device comprises a preset size determining module, a target receiving device and a network quality information acquiring module, wherein the preset size determining module is used for acquiring network quality information and distance between two ends, and the distance between the two ends is the distance between the transmitting device and the target receiving device;
determining a preset size based on network quality information, the distance between two ends and a block size adjustment rule;
correspondingly, when executing the blocking processing to the disk address corresponding to the target file in the target state, the blocking module is used for obtaining blocking information:
And performing blocking processing on the disk address corresponding to the target file in the target state according to the preset size to obtain blocking information.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, a specific working process of the above-described ship-shore data synchronizing device may refer to a corresponding process in the foregoing method embodiment, which is not described herein again.
In an embodiment of the present application, as shown in fig. 4, there is provided a transmitting apparatus, a transmitting apparatus 300 shown in fig. 4 includes: a processor 301 and a memory 303. Wherein the processor 301 is coupled to the memory 303, such as via a bus 302. Optionally, the transmitting device 300 may also include a transceiver 304. It should be noted that, in practical applications, the transceiver 304 is not limited to one, and the structure of the transmitting device 300 is not limited to the embodiment of the present application.
The processor 301 may be a CPU (Central Processing Unit ), general purpose processor, DSP (Digital Signal Processor, data signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic device, transistor logic device, hardware components, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules and circuits described in connection with this disclosure. Processor 301 may also be a combination that implements computing functionality, e.g., comprising one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
Bus 302 may include a path to transfer information between the components. Bus 302 may be a PCI (Peripheral Component Interconnect, peripheral component interconnect Standard) bus or an EISA (Extended Industry Standard Architecture ) bus, or the like. Bus 302 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 4, but not only one bus or type of bus.
The Memory 303 may be, but is not limited to, a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory ) or other type of dynamic storage device that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory ), a CD-ROM (Compact Disc Read Only Memory, compact disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
The memory 303 is used for storing application program codes for executing the inventive arrangements and is controlled to be executed by the processor 301. The processor 301 is configured to execute the application code stored in the memory 303 to implement what is shown in the foregoing method embodiments.
Wherein the transmitting device includes, but is not limited to: mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. But may also be a server or the like. The transmitting apparatus shown in fig. 4 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present application.
Embodiments of the present application provide a computer-readable storage medium having a computer program stored thereon, which when run on a computer, causes the computer to perform the corresponding method embodiments described above. Compared with the related art, in the embodiment of the application, when the file state is the target state, the file at the transmitting equipment end is characterized to be changed, and the file at the receiving equipment end is required to be adjusted in time according to the change condition, so that the disk address corresponding to the target file in the target state is subjected to the blocking processing to obtain the blocking information. And further, the block information is sent to the target receiving device, and when a synchronization request sent by the target receiving device is received, file data reading is performed based on the block information, and each target file data is sequentially sent to the target receiving device. Compared with the prior art that all file data in the folder need to be retransmitted in each interruption, the method and the device for transmitting the file data continuously backwards from the target file data with the transmission failure in the case that the communication link is extremely unstable, and the time for synchronizing the ship-shore data is shortened.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
The foregoing is only a partial embodiment of the present application, and it should be noted that it will be apparent to those skilled in the art that modifications and adaptations can be made without departing from the principles of the present application, and such modifications and adaptations should and are intended to be comprehended within the scope of the present application.

Claims (9)

1. A method of synchronizing ship-shore data, performed by a transmitting device, comprising:
acquiring a file state in a folder, and when the file state is a target state, performing blocking processing on a disk address corresponding to a target file in the target state to obtain blocking information, wherein the target state comprises: newly added files and modified files;
The blocking information is sent to target receiving equipment, wherein the blocking information is used for informing the target receiving equipment of the division condition of target files;
when a synchronization request sent by the target receiving equipment is received, file data reading is carried out based on the block information to obtain target file data, and each target file data is sequentially sent to the target receiving equipment to complete the synchronization of ship-shore data;
when the file state is a modified file, the method further comprises the steps of:
acquiring block information before modification corresponding to a modification state file, comparing the block information corresponding to the modification state file with the block information before modification, and determining difference block information, wherein the difference block information is a part of the block information which is different from the block information before modification, and the modification state file is a target file with a file state being a modification file state;
correspondingly, the reading of the file data based on the block information to obtain the target file data includes:
and reading file data based on the difference block information to obtain target file data.
2. The method of synchronizing shore data according to claim 1, wherein the file status further comprises: the file is deleted and the file is deleted,
the step of sequentially sending each target file data to the target receiving device includes:
in the process of sending the target file data to the target receiving equipment, monitoring the state of the target receiving equipment in real time;
when the state of the target receiving equipment is updated from offline to online, the target receiving equipment is recorded as a re-online receiving equipment, and whether the file state of the target file is a deleted file is judged;
if not, acquiring the first blocking information of the online receiving equipment and the current blocking information of the sending equipment;
determining target block information based on the current block information of the sending equipment and the first block information of the online receiving equipment again, wherein the target block information is the block information which is retransmitted after being transmitted by a transmission terminal corresponding to a target file;
and sending the target file data corresponding to the target block information to the target receiving equipment.
3. The method for synchronizing ship-shore data according to claim 2, wherein after said determining whether the file status of the target file is a deleted file, further comprising:
If yes, acquiring second blocking information of the online receiving equipment again, and determining current deleting blocking information based on the second blocking information of the online receiving equipment again;
and sending the current deletion block information to the online re-receiving equipment, wherein the current deletion block information is used for controlling the online re-receiving equipment to delete the file data corresponding to the current deletion block information in the target receiving equipment.
4. The method for synchronizing ship-shore data according to claim 2, wherein after said monitoring in real time of the status of said target receiving device, further comprising:
when the offline time length of the target receiving equipment exceeds an offline time length threshold, marking the target receiving equipment as offline receiving equipment, acquiring monitoring information of the offline receiving equipment, and judging whether the offline receiving equipment has danger or not based on the monitoring information;
when the offline receiving equipment is dangerous, danger early warning information is generated and sent to the danger monitoring terminal, wherein the danger early warning information is convenient for a user to take emergency treatment for the offline receiving equipment in a dangerous condition.
5. The method for synchronizing ship-shore data according to claim 1, further comprising, after said acquiring the file status:
When the file state is a deleted file, performing blocking processing on a disk address corresponding to a target file in the deleted file state to obtain deleted blocking information;
and sending the deleting block information to target receiving equipment, wherein the deleting block information is used for controlling the target receiving equipment to delete file data corresponding to the deleting block information in the target receiving equipment.
6. The method for synchronizing ship-shore data according to any one of claims 1 to 5, wherein before performing the blocking processing on the disk address corresponding to the target file in the target state to obtain the blocking information, the method further comprises:
acquiring network quality information and distance between two ends, wherein the distance between the two ends is the distance between the sending equipment and the target receiving equipment;
determining a preset size based on the network quality information, the distance between two ends and a block size adjustment rule;
correspondingly, the block processing is performed on the disk address corresponding to the target file in the target state to obtain block information, which includes:
and performing blocking processing on the disk address corresponding to the target file in the target state according to the preset size to obtain blocking information.
7. A synchronization device for ship-shore data, comprising:
the device comprises a blocking module, a storage module and a storage module, wherein the blocking module is used for acquiring a file state in a folder, and when the file state is a target state, blocking processing is carried out on a disk address corresponding to a target file in the target state to obtain blocking information, wherein the target state comprises: newly added files and modified files;
the sending module is used for sending the blocking information to the target receiving equipment, wherein the blocking information is used for informing the target receiving equipment of the division condition of the target file;
the data reading module is used for reading file data based on the block information when receiving a synchronous request sent by the target receiving equipment to obtain target file data, and sequentially sending each target file data to the target receiving equipment to complete the synchronization of ship-shore data;
when the file status is the modified file, the synchronous device of the ship-shore data further comprises:
the device comprises a difference block information determining module, a modifying state file and a modifying state file, wherein the difference block information determining module is used for acquiring block information before modification corresponding to the modifying state file, comparing the block information corresponding to the modifying state file with the block information before modification and determining difference block information, the difference block information is a part of the block information, which is different from the block information before modification, and the modifying state file is a target file of the modifying file state;
Correspondingly, when the data reading module performs the file data reading based on the block information to obtain the target file data, the data reading module is configured to:
and reading file data based on the difference block information to obtain target file data.
8. A transmitting apparatus, characterized by comprising:
at least one processor;
a memory;
at least one application program, wherein the at least one application program is stored in the memory and configured to be executed by the at least one processor, the at least one application program configured to: a method of synchronizing shore data according to any of claims 1-6.
9. A computer-readable storage medium, on which a computer program is stored which, when executed in a computer, causes the computer to carry out the method of synchronizing ship-shore data according to any one of claims 1 to 6.
CN202310762354.9A 2023-06-27 2023-06-27 Method, device, equipment and medium for synchronizing ship-shore data Active CN116527691B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310762354.9A CN116527691B (en) 2023-06-27 2023-06-27 Method, device, equipment and medium for synchronizing ship-shore data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310762354.9A CN116527691B (en) 2023-06-27 2023-06-27 Method, device, equipment and medium for synchronizing ship-shore data

Publications (2)

Publication Number Publication Date
CN116527691A CN116527691A (en) 2023-08-01
CN116527691B true CN116527691B (en) 2023-11-03

Family

ID=87408519

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310762354.9A Active CN116527691B (en) 2023-06-27 2023-06-27 Method, device, equipment and medium for synchronizing ship-shore data

Country Status (1)

Country Link
CN (1) CN116527691B (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090943A (en) * 2014-07-01 2014-10-08 中国工商银行股份有限公司 Data file processing method, device and system
CN105915574A (en) * 2015-12-14 2016-08-31 乐视网信息技术(北京)股份有限公司 File synchronization method, receiver equipment and system
CN107766463A (en) * 2017-09-28 2018-03-06 北京北信源软件股份有限公司 A kind of storage processing method and device of the middleware system of multi-service driving
CN110851413A (en) * 2019-11-08 2020-02-28 深圳市元征科技股份有限公司 Data synchronization method and device, electronic equipment and storage medium
CN111104386A (en) * 2019-11-04 2020-05-05 北京海益同展信息科技有限公司 File storage method, terminal and storage medium
CN111245748A (en) * 2020-01-03 2020-06-05 北京明略软件系统有限公司 File transmission method, device, system, electronic equipment and storage medium
WO2020132870A1 (en) * 2018-12-25 2020-07-02 深圳辰锐软件开发有限公司 File update method, file update apparatus and terminal device
CN113157600A (en) * 2021-03-08 2021-07-23 网宿科技股份有限公司 Space allocation method of shingled hard disk, file storage system and server
CN113434470A (en) * 2021-06-24 2021-09-24 华云数据控股集团有限公司 Data distribution method and device and electronic equipment
WO2021218143A1 (en) * 2020-04-29 2021-11-04 平安科技(深圳)有限公司 Data synchronization method and apparatus, and server and storage medium
WO2021233322A1 (en) * 2020-05-19 2021-11-25 中兴通讯股份有限公司 Synchronization method, apparatus and device for recording data, and storage medium
WO2021253889A1 (en) * 2020-06-17 2021-12-23 北京金迅瑞博网络技术有限公司 Load balancing method and apparatus, proxy device, cache device and serving node
CN114217738A (en) * 2021-11-25 2022-03-22 深圳益邦阳光有限公司 Dynamic queue type cyclic storage method, device, equipment and medium
CN114281779A (en) * 2021-12-01 2022-04-05 广州炒米信息科技有限公司 Data synchronization method and device, computer equipment and storage medium
WO2023273725A1 (en) * 2021-06-30 2023-01-05 北京字节跳动网络技术有限公司 File downloading method and apparatus, storage medium and electronic device
CN116319826A (en) * 2022-12-30 2023-06-23 北京天融信网络安全技术有限公司 File synchronization method, system, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170169239A1 (en) * 2015-12-14 2017-06-15 Le Holdings (Beijing) Co., Ltd. Method for file synchronization, the receiver equipment and systems

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090943A (en) * 2014-07-01 2014-10-08 中国工商银行股份有限公司 Data file processing method, device and system
CN105915574A (en) * 2015-12-14 2016-08-31 乐视网信息技术(北京)股份有限公司 File synchronization method, receiver equipment and system
CN107766463A (en) * 2017-09-28 2018-03-06 北京北信源软件股份有限公司 A kind of storage processing method and device of the middleware system of multi-service driving
WO2020132870A1 (en) * 2018-12-25 2020-07-02 深圳辰锐软件开发有限公司 File update method, file update apparatus and terminal device
CN111104386A (en) * 2019-11-04 2020-05-05 北京海益同展信息科技有限公司 File storage method, terminal and storage medium
CN110851413A (en) * 2019-11-08 2020-02-28 深圳市元征科技股份有限公司 Data synchronization method and device, electronic equipment and storage medium
CN111245748A (en) * 2020-01-03 2020-06-05 北京明略软件系统有限公司 File transmission method, device, system, electronic equipment and storage medium
WO2021218143A1 (en) * 2020-04-29 2021-11-04 平安科技(深圳)有限公司 Data synchronization method and apparatus, and server and storage medium
WO2021233322A1 (en) * 2020-05-19 2021-11-25 中兴通讯股份有限公司 Synchronization method, apparatus and device for recording data, and storage medium
WO2021253889A1 (en) * 2020-06-17 2021-12-23 北京金迅瑞博网络技术有限公司 Load balancing method and apparatus, proxy device, cache device and serving node
CN113157600A (en) * 2021-03-08 2021-07-23 网宿科技股份有限公司 Space allocation method of shingled hard disk, file storage system and server
CN113434470A (en) * 2021-06-24 2021-09-24 华云数据控股集团有限公司 Data distribution method and device and electronic equipment
WO2023273725A1 (en) * 2021-06-30 2023-01-05 北京字节跳动网络技术有限公司 File downloading method and apparatus, storage medium and electronic device
CN114217738A (en) * 2021-11-25 2022-03-22 深圳益邦阳光有限公司 Dynamic queue type cyclic storage method, device, equipment and medium
CN114281779A (en) * 2021-12-01 2022-04-05 广州炒米信息科技有限公司 Data synchronization method and device, computer equipment and storage medium
CN116319826A (en) * 2022-12-30 2023-06-23 北京天融信网络安全技术有限公司 File synchronization method, system, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN116527691A (en) 2023-08-01

Similar Documents

Publication Publication Date Title
US9753954B2 (en) Data node fencing in a distributed file system
CN108696589B (en) Block chain data transmission method, device, equipment and storage medium
CN107315825B (en) Index updating system, method and device
CN108989432B (en) User-mode file sending method, user-mode file receiving method and user-mode file receiving and sending device
CN106657269B (en) File transmission method
CN103731499B (en) Terminal and document transmission method
CN109525376B (en) Fast retransmission method and device and terminal equipment
CN113254375A (en) Data transmission method and device, electronic equipment and storage medium
CN112153132A (en) File uploading method, device and equipment based on virtualization management platform
CN104079623A (en) Method and system for controlling multilevel cloud storage synchrony
CN116527691B (en) Method, device, equipment and medium for synchronizing ship-shore data
CN110928952A (en) Data synchronization method and device based on block chain
CN112969198A (en) Data transmission method, terminal and storage medium
CN108965463B (en) File transmission method, device and system
CN115883533A (en) File synchronization method and device, computer equipment and storage medium
CN111586438B (en) Method, device and system for processing service data
CN114202947B (en) Internet of vehicles data transmission method and device and automatic driving vehicle
CN112311760B (en) Terminal credibility analysis method and device for one-end multi-network environment
CN111970340A (en) Information transmission method, readable storage medium and electronic device
CN107615259A (en) A kind of data processing method and system
CN101610477A (en) The treatment system of multimedia messaging service, MMS and method
CN112988461B (en) Data backup method, edge node, data center and computer storage medium
CN117061072B (en) Message transmission method, device, equipment and storage medium
CN115001630B (en) Data transmission method, device, equipment and storage medium
CN111131446B (en) Data sending method and device, computer equipment and medium

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