Data transmission method, device, equipment and medium
By adding time marks and calibration time parameters to the target data during data transmission interruption, the data loss and transmission efficiency reduction caused by data transmission interruption are solved, and the effect of automatic transmission and improvement of transmission efficiency is achieved.
Patent Information
- Application Number
- CN202111482333.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-06
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2041-12-06
AI Technical Summary
During data transmission, due to network and equipment stability issues, transmission may be interrupted, resulting in data loss and reduced transmission efficiency. Especially when the network is in poor condition, manually reoperating sending data wastes time and increases the risk of errors.
By adding a first time mark to the target data during data transmission and generating a clock deviation table; when the transmission is interrupted, the interrupt time point is obtained, the second time mark is added to the remaining data and stored in the local database; when the transmission condition is restored, Automatically transfer data from the local database according to the calibration time parameters of the mark and deviation table.
Automatic data retransmission when data transmission is interrupted is realized, preventing data loss and transmission errors, improving transmission efficiency, and reducing the need for manual intervention.
Smart Images

Figure CN114172609B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data transmission, and in particular to a data transmission method, device, equipment and medium. Background Art
[0002] Data is the result of facts or observations, a logical summary of objective things, and the unprocessed raw material used to represent objective things. Data can be continuous values, such as sound and images, called analog data; or discrete, such as symbols and text, called digital data. In computer systems, data is represented in the form of binary information units 0 and 1.
[0003] With the continuous development of computer technology and the popularization of the Internet, it is becoming more and more convenient to transmit data through the Internet, which can improve work efficiency to a certain extent.
[0004] However, due to network and equipment stability issues and software failures, interruptions may occur during data transmission, and retransmission takes a long time, especially when the network conditions are poor. When sending data in one direction, if a transmission failure occurs, manual re-operation and sending are required, which not only wastes time and manpower, reduces work efficiency, but is also prone to data errors and data loss. Summary of the invention
[0005] In view of the above problems, the present application is proposed to provide a data transmission method, apparatus, device and medium that overcomes the above problems or at least partially solves the above problems, including:
[0006] A data transmission method, the method is used to control a local end to continue to transmit data to a receiving end when transmission is interrupted; the method comprises:
[0007] When data transmission occurs, a first time mark is added to the target data according to the system clock of the receiving end, and a first clock deviation table is generated according to the local clock and the system clock of the receiving end;
[0008] If the transmission process is interrupted, obtaining the first time point of the interruption according to the local clock;
[0009] adding a second time stamp to the remaining target data according to the local clock and the first time point, and continuing to store the remaining target data in the local database;
[0010] When the transmission conditions are restored, the time parameters when the receiving end stops receiving the target data are calibrated according to the first time point, the first time mark, the second time mark and the first clock deviation table, and the remaining target data that continues to exist in the local database is sent to the receiving end according to the time parameters.
[0011] Furthermore, before the step of adding a first time mark to the target data according to the system clock of the receiving end when data transmission occurs, and generating a first clock deviation table according to the local clock and the system clock of the receiving end, the method further comprises:
[0012] Acquire the system clock of the receiving end;
[0013] According to the format of the target data, the target data is divided into a number of data blocks, and the data blocks are put into a preset sending queue.
[0014] Furthermore, when data transmission occurs, the step of adding a first time mark to the target data according to the system clock of the receiving end, and generating a first clock deviation table according to the local clock and the system clock of the receiving end includes:
[0015] When data transmission occurs, adding a first time mark for recording the transmission time to each data block of the target data according to the system clock of the receiving end;
[0016] A first clock deviation table is generated according to the running time deviation between the local clock and the system clock of the receiving end.
[0017] Furthermore, if the transmission process is interrupted, the step of obtaining the first time point at which the interruption occurs according to the local clock includes:
[0018] If the transmission process is interrupted, the preset network parameters are used to determine the node where the interruption occurs, wherein the node includes a network node, a receiving end node, and a local end node;
[0019] Acquire an NTP clock, and generate a second clock deviation table according to the local clock and the NTP clock;
[0020] When the interruption occurrence node is a network node and / or a receiving end node, the first time point of the interruption occurrence is obtained according to the local clock, or, when the interruption occurrence node is a local end node, the first time point of the interruption occurrence is obtained according to the NTP clock and the second clock deviation table.
[0021] Furthermore, the step of adding a second time stamp to the remaining target data according to the local clock and the first time point, and continuing to store the remaining target data in the local database includes:
[0022] adding a second time stamp for recording a local storage time to the remaining target data according to the local clock and the first time point;
[0023] According to the second time stamp, the remaining target data is stored in the local database.
[0024] Further, when the transmission condition is restored, the step of calibrating the time parameter when the receiving end stops receiving the target data according to the first time point, the first time mark, the second time mark and the first clock deviation table, and sending the remaining target data stored in the local database to the receiving end according to the time parameter includes:
[0025] When the transmission condition is restored, determining a second time point when the transmission of the target data is stopped according to a timing difference between the first time mark and the second time mark;
[0026] Calibrate the second time point according to the first clock deviation table and the first time point;
[0027] According to the calibrated second time point, the remaining target data stored in the local database is sent to the receiving end.
[0028] Furthermore, the method further includes: if the transmission condition is not met, compressing and encrypting the remaining target data stored in the local database.
[0029] A data transmission device is provided, wherein the device is used to control a local end to continue transmitting data to a receiving end when transmission is interrupted; the device comprises:
[0030] A data timing module, used for adding a first time mark to the target data according to the system clock of the receiving end when data transmission occurs, and generating a first clock deviation table according to the local clock and the system clock of the receiving end;
[0031] An interruption detection module, used for obtaining the first time point of the interruption according to the local clock if the transmission process is interrupted;
[0032] A storage processing module, used for adding a second time mark to the remaining target data according to the local clock and the first time point, and continuing to store the remaining target data in the local database;
[0033] A data transmission module is used to calibrate the time parameters when the receiving end stops receiving the target data according to the first time point, the first time mark, the second time mark and the first clock deviation table when the transmission condition is restored, and send the remaining target data that continues to exist in the local database to the receiving end according to the time parameters.
[0034] A device comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the steps of the data transmission method described above when executed by the processor.
[0035] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data transmission method described above are implemented.
[0036] The present application has the following advantages: In an embodiment of the present application, when data transmission occurs, a first time mark is added to the target data according to the system clock of the receiving end, and a first clock deviation table is generated according to the local clock and the system clock of the receiving end; if the transmission process is interrupted, the first time point of the interruption is obtained according to the local clock; a second time mark is added to the remaining target data according to the local clock and the first time point, and the remaining target data is stored in the local database; when the transmission condition is restored, the time parameter when the receiving end stops receiving the target data is calibrated according to the first time point, the first time mark, the second time mark and the first clock deviation table, and the remaining target data stored in the local database is sent to the receiving end according to the time parameter. By the above method, when data transmission is interrupted, the data is temporarily stored in the local database, and the data in the local database is automatically resumed according to the interruption time point after the transmission condition is restored, so as to prevent data loss and data errors caused by breakpoint transmission, and improve transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the description of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0038] Figure 1 is a flowchart of a data transmission method provided by an embodiment of the present application;
[0039] Figure 2 is a structural block diagram of a data transmission device provided by an embodiment of the present application;
[0040] Figure 3 It is a structural schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to make the objects, features and advantages of the present application more obvious and understandable, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0042] It should be noted that in any embodiment of the present invention, the data transmission method actively stores data through a local database when a data transmission failure occurs, and then transmits the data when the transmission conditions are restored, rather than transmitting data offline when the software downloads data, by storing a link to the download target address; therefore, the data transmission of the present application has good reliability, and the reliability of the transmission does not depend on the network protocol.
[0043] Reference Figure 1 , shows a data transmission method provided by an embodiment of the present application, the method is used to control the local end to continue to transmit data to the receiving end when the transmission is interrupted;
[0044] The method comprises:
[0045] S110, when data transmission occurs, adding a first time mark to the target data according to the system clock of the receiving end, and generating a first clock deviation table according to the local clock and the system clock of the receiving end;
[0046] S120: If the transmission process is interrupted, obtain the first time point of the interruption according to the local clock;
[0047] S130, adding a second time mark to the remaining target data according to the local clock and the first time point, and continuing to store the remaining target data in the local database;
[0048] S140. When the transmission condition is restored, the time parameters when the receiving end stops receiving the target data are calibrated according to the first time point, the first time mark, the second time mark and the first clock deviation table, and the remaining target data remaining in the local database is sent to the receiving end according to the time parameters.
[0049] In an embodiment of the present application, when data transmission is interrupted by the above method, the data is temporarily stored in a local database, and after the transmission conditions are restored, the data in the local database is automatically resumed according to the interruption time point, thereby preventing data loss and data errors caused by breakpoint transmission, and improving transmission efficiency; and after the data is stored in the local database, when the transmission conditions are restored, the data in the local database is transmitted to the receiving end without manual intervention, thereby realizing automatic resumption of data transmission.
[0050] Next, a data transmission method in this exemplary embodiment will be further described.
[0051] As described in step S110, when data transmission occurs, a first time mark is added to the target data according to the system clock of the receiving end, and a first clock deviation table is generated according to the local clock and the system clock of the receiving end.
[0052] In one embodiment of the present invention, when data transmission occurs in step S110, before adding a first time mark to the target data according to the system clock of the receiving end and generating a first clock deviation table according to the local clock and the system clock of the receiving end, the method further includes:
[0053] Acquire the system clock of the receiving end; divide the target data into a plurality of data blocks according to the format of the target data, and put the data blocks into a preset sending queue.
[0054] It should be noted that the data format is a rule that describes how data is stored in a file or record. It can be a text format in the form of characters, or a compressed format in the form of binary data. The text format in the form of characters takes up more storage space but has high transparency, while the compressed format in the form of binary numbers takes up less storage space but lacks transparency.
[0055] In the above embodiment, when data needs to be transmitted, the system clock of the receiving end (the target of data transmission, such as a server) is obtained according to the communication with the receiving end;
[0056] According to the format of the target data, for example, the target data is divided into data blocks using several hexadecimal units as basic units, and the divided data blocks are stored in a set sending queue. The data to be sent to the receiving end is managed through the sending queue. In case of an interruption, the breakpoint time and the position of the breakpoint of the data to be sent can be determined according to the minimum unit of the sending queue. Dividing the data blocks can further prevent the interruption of the data transmission process and the loss of data.
[0057] In one embodiment of the present invention, the specific process of step S110 "when data transmission occurs, adding a first time mark to the target data according to the system clock of the receiving end, and generating a first clock deviation table according to the local clock and the system clock of the receiving end" can be further explained in combination with the following description.
[0058] As described in the following steps, when data transmission occurs, a first time mark for recording the transmission time is added to each data block of the target data according to the system clock of the receiving end;
[0059] As described in the following steps, a first clock deviation table is generated according to the running time deviation between the local clock and the system clock of the receiving end.
[0060] In the above embodiment, a first time mark for recording the sending time is added to the data block, so that the sending time point of each data block can be recorded. When the data transmission is interrupted, the position and time of the data interruption point can be accurately determined through the first time point; a first time deviation table is established through the time deviation between the local clock and the receiving end system clock. Through the first time deviation table, the time parameters of the same data at the receiving end can be obtained, and the data can be verified and checked according to the time deviation table to ensure the accuracy of the data.
[0061] It should be noted that the so-called system clock refers to the clock system, which is a circuit composed of an oscillator (signal source), a timer wake-up device, a frequency divider, etc. Common signal sources include crystal oscillators and RC oscillators. The clock is the pulse of the embedded system. The processor core completes instruction execution, state change and other actions under the drive of the clock. The peripheral components complete various tasks under the drive of the clock, such as serial port data transmission, A / D conversion, timer counting, etc. Therefore, the clock is crucial to the computer system. Usually, problems with the clock system are fatal, such as the oscillator not oscillating, unstable oscillation, and stopped oscillation.
[0062] As described in step S120, if the transmission process is interrupted, the first time point of the interruption is obtained according to the local clock.
[0063] In an embodiment of the present invention, the specific process of step S120 is "if the transmission process is interrupted, obtaining the first time point of the interruption according to the local clock".
[0064] As described in the following steps, if the transmission process is interrupted, the preset network parameters are used to determine the node where the interruption occurs, wherein the node includes a network node, a receiving end node, and a local end node;
[0065] As described in the following steps, an NTP clock is obtained, and a second clock deviation table is generated according to the local clock and the NTP clock;
[0066] As described in the following steps, when the interruption occurrence node is a network node and / or a receiving end node, the first time point when the interruption occurs is obtained based on the local clock, or, when the interruption occurrence node is a local end node, the first time point when the interruption occurs is obtained based on the NTP clock and the second clock deviation table.
[0067] In the above embodiment, if the transmission process is interrupted, the preset network parameters are used to determine the node where the interruption occurs, wherein the nodes include network nodes, receiving end nodes, and local end nodes; for example, whether the target end is normal is determined by the return data of the target end, and whether the network is normal is determined by network parameters such as the return value of the PING network; the NTP clock is obtained through the network, and a second clock deviation table between the local clock and the NTP clock is generated based on the local clock.
[0068] It should be noted that the NTP clock is a network clock provided by the NTP server. The NTP server (Network Time Protocol (NTP)) is a protocol used to synchronize computer time. It can synchronize computers with their servers or clock sources (such as quartz clocks, GPS, etc.). It can provide high-precision time correction (the difference with the standard is less than 1 millisecond on LAN and tens of milliseconds on WAN), and can prevent malicious protocol attacks through encryption confirmation. Time is propagated according to the level of the NTP server. All servers are classified into different Stratums according to their distance from the external UTC source.
[0069] In order for NTP to provide accurate time, it must first have an accurate time source, which should be the international standard time UTC. The time source for NTP to obtain UTC can be atomic clocks, observatories, satellites, or the Internet. In this way, there is an accurate and reliable time source. Time is propagated according to the level of the NTP server. All servers are classified into different Stratums (layers) according to their distance from the external UTC source. Stratum-1 is at the top level and has external UTC access, while Stratum-2 obtains time from Stratum-1, Stratum-3 obtains time from Stratum-2, and so on, but the total number of Stratum layers is limited to 15. All these servers logically form a ladder-like architecture that is interconnected, and the Stratum-1 time server is the foundation of the entire system.
[0070] As described in step S130, a second time stamp is added to the remaining target data according to the local clock and the first time point, and the remaining target data is stored in the local database.
[0071] In one embodiment of the present invention, the specific process of "adding a second time mark to the remaining target data according to the local clock and the first time point, and continuing to store the remaining target data in the local database" in step S130 can be further explained in combination with the following description.
[0072] As described in the following steps, adding a second time stamp for recording the local storage time to the remaining target data according to the local clock and the first time point;
[0073] As described in the following steps, the remaining target data is stored in the local database according to the second time stamp.
[0074] In the above embodiment, after the transmission is interrupted, since the system clock of the receiving end may not be available, a second time stamp may be added to the data after the interruption through the local clock to record the time of the data stored in the local database.
[0075] In one embodiment of the present invention, the specific process of step S140 described in "When the transmission condition is restored, calibrate the time parameters when the receiving end stops receiving the target data according to the first time point, the first time mark, the second time mark and the first clock deviation table, and send the remaining target data continuing to exist in the local database to the receiving end according to the time parameters" can be further explained in combination with the following description.
[0076] As described in the following steps, when the transmission condition is restored, a second time point when the transmission of the target data is stopped is determined according to the timing difference between the first time mark and the second time mark;
[0077] As described in the following steps, calibrating the second time point according to the first clock deviation table and the first time point;
[0078] As described in the following steps, the remaining target data stored in the local database is sent to the receiving end according to the calibrated second time point.
[0079] In the above embodiment, after the transmission condition is restored, the first time deviation table, the first time point and the second time point are calibrated to ensure that the data before and after the interruption can be correctly connected, thereby ensuring the accuracy of the data.
[0080] In one embodiment of the present invention, the method further includes: if the transmission condition is not satisfied, compressing and encrypting the remaining target data stored in the local database.
[0081] In the above embodiment, when the transmission is interrupted and the transmission conditions are not restored, the target data is compressed when stored in the local database, thereby saving storage space, and compressing the data can prevent data overflow caused by excessive storage of data; the security of the data is ensured by encrypting the data; after the transmission conditions are restored, the data is decompressed for transmission.
[0082] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0083] Reference Figure 2 , shows a data transmission device provided by an embodiment of the present application, the device is used to control the local end to continue to transmit data to the receiving end when the transmission is interrupted; the device includes:
[0084] The data timing module 210 is used to add a first time mark to the target data according to the system clock of the receiving end when data transmission occurs, and generate a first clock deviation table according to the local clock and the system clock of the receiving end;
[0085] An interruption detection module 220 is used to obtain a first time point of the interruption according to the local clock if the transmission process is interrupted;
[0086] A storage processing module 230, configured to add a second time tag to the remaining target data according to the local clock and the first time point, and continue to store the remaining target data in the local database;
[0087] A data transmission module is used to calibrate the time parameters when the receiving end stops receiving the target data according to the first time point, the first time mark, the second time mark and the first clock deviation table when the transmission condition is restored, and send the remaining target data that continues to exist in the local database to the receiving end according to the time parameters.
[0088] In one embodiment of the present invention, the data timing module 210 includes:
[0089] A first time mark submodule, used for adding a first time mark for recording the sending time to each data block of the target data according to the system clock of the receiving end when data transmission occurs;
[0090] The deviation table submodule is used to generate a first clock deviation table according to the running time deviation between the local clock and the system clock of the receiving end.
[0091] In one embodiment of the present invention, the interrupt detection module 220 includes:
[0092] A node judgment submodule is used to determine the node where the interruption occurs based on the preset network parameters if the transmission process is interrupted, wherein the node includes a network node, a receiving end node and a local end node;
[0093] A clock acquisition submodule, used to acquire an NTP clock and generate a second clock deviation table according to the local clock and the NTP clock;
[0094] The time point acquisition submodule is used to obtain the first time point of the interruption according to the local clock when the interruption occurrence node is a network node and / or a receiving end node, or to obtain the first time point of the interruption according to the NTP clock and the second clock deviation table when the interruption occurrence node is a local end node.
[0095] In one embodiment of the present invention, the storage processing module 230 includes:
[0096] A second time stamp submodule, configured to add a second time stamp for recording a local storage time to the remaining target data according to the local clock and the first time point;
[0097] The local storage submodule is used to store the remaining target data into the local database according to the second time mark.
[0098] In one embodiment of the present invention, the storage processing module 240 includes:
[0099] A time determination submodule, configured to determine, when the transmission condition is restored, a second time point when the transmission of the target data is terminated according to a timing difference between the first time mark and the second time mark;
[0100] A time calibration submodule, configured to calibrate a second time point according to a first clock deviation table and the first time point;
[0101] The data sending submodule is used to send the remaining target data stored in the local database to the receiving end according to the calibrated second time point.
[0102] In one embodiment of the present invention, it also includes:
[0103] The compression and encryption module is used to compress and encrypt the remaining target data stored in the local database if the transmission condition is not met.
[0104] Reference Figure 3 , showing a computer device of a data transmission method of the present invention, which may specifically include the following:
[0105] The computer device 12 is in the form of a general-purpose computing device, and the components of the computer device 12 may include but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).
[0106] The bus 18 represents one or more of several types of bus 18 structures, including a memory bus 18 or memory controller, a peripheral bus 18, an accelerated graphics port, a processor or a local bus 18 using any of a variety of bus 18 architectures. These architectures include, by way of example, but are not limited to, an Industry Standard Architecture (ISA) bus 18, a Micro Channel Architecture (MAC) bus 18, an Enhanced ISA bus 18, an Audio Video Electronics Standards Association (VESA) local bus 18, and a Peripheral Component Interconnect (PCI) bus 18.
[0107] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0108] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (commonly referred to as a "hard drive"). Although Figure 3 Not shown, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM or other optical medium) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules 42, which are configured to perform the functions of various embodiments of the present invention.
[0109] A program / utility 40 having a set (at least one) of program modules 42 may be stored in, for example, a memory, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules 42, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0110] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, cameras, etc.), one or more devices that enable an operator to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., local area networks (LANs)), wide area networks (WANs), and / or public networks (e.g., the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with the other modules of the computer device 12 via the bus 18. It should be understood that although Figure 3 Not shown, other hardware and / or software modules may be used in conjunction with the computer device 12, including but not limited to: microcode, device drivers, redundant processing units 16, external disk drive arrays, RAID systems, tape drives, and data backup storage systems 34, etc.
[0111] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the data transmission method provided in the embodiment of the present invention.
[0112] That is, when the processing unit 16 executes the program, the following is achieved: when data transmission occurs, timing is performed according to a preset timer and whether the current data transmission process is interrupted; if the transmission process is interrupted, the remaining part of the current data is stored in the local database according to the time point when the interruption occurs, and whether the transmission conditions are met is monitored; if the transmission conditions are met, the data stored in the local database is synchronized to the receiving end according to the time point.
[0113] In an embodiment of the present invention, the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the data transmission method provided in all embodiments of the present application is implemented:
[0114] That is, when the program is executed by the processor, it is implemented as follows: when data transmission occurs, timing is performed according to a preset timer and whether the current data transmission process is interrupted; if the transmission process is interrupted, the remaining part of the current data is stored in the local database according to the time point when the interruption occurs, and it is monitored whether the transmission conditions are met; if the transmission conditions are met, the data stored in the local database is synchronized to the receiving end according to the time point.
[0115] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPOM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with a pointer execution system, device or device.
[0116] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with a pointer execution system, apparatus, or device.
[0117] The computer program code for performing the operation of the present invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the medical staff computer, partially on the medical staff computer, as an independent software package, partially on the medical staff computer, partially on the remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the medical staff computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet). The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other.
[0118] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0119] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0120] The above is a detailed introduction to a data transmission method, device, equipment and medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data transmission method, characterized in that: The method is used to control the local end to continue to transmit data to the receiving end when transmission is interrupted; obtain the system clock of the receiving end; divide the target data into several data blocks according to the format of the target data, and put the data blocks into a preset sending queue; the method includes: When data transmission occurs, a first time mark is added to the target data according to the system clock of the receiving end, and a first clock deviation table is generated according to the local clock and the system clock of the receiving end; specifically, when data transmission occurs, a first time mark for recording the sending time is added to each data block of the target data according to the system clock of the receiving end; and a first clock deviation table is generated according to the running time deviation between the local clock and the system clock of the receiving end; If the transmission process is interrupted, obtaining the first time point of the interruption according to the local clock; adding a second time stamp to the remaining target data according to the local clock and the first time point, and continuing to store the remaining target data in the local database; When the transmission condition is restored, the time parameter when the receiving end stops receiving the target data is calibrated according to the first time point, the first time mark, the second time mark and the first clock deviation table, and the remaining target data that continues to exist in the local database is sent to the receiving end according to the time parameter; specifically, when the transmission condition is restored, the second time point when the transmission of the target data is terminated is determined according to the timing difference between the first time mark and the second time mark; the second time point is calibrated according to the first clock deviation table and the first time point; and the remaining target data that continues to exist in the local database is sent to the receiving end according to the calibrated second time point.
2. The method according to claim 1, characterized in that If the transmission process is interrupted, the step of obtaining the first time point of the interruption according to the local clock includes: If the transmission process is interrupted, the node where the interruption occurs is determined according to the preset network parameters, wherein the node includes a network node, a receiving end node and a local end node; Acquire an NTP clock, and generate a second clock deviation table according to the local clock and the NTP clock; When the interruption occurrence node is a network node and / or a receiving end node, the first time point of the interruption occurrence is obtained according to the local clock, or, when the interruption occurrence node is a local end node, the first time point of the interruption occurrence is obtained according to the NTP clock and the second clock deviation table.
3. The method according to claim 1, characterized in that The step of adding a second time mark to the remaining target data according to the local clock and the first time point, and continuing to store the remaining target data in the local database includes: adding a second time stamp for recording a local storage time to the remaining target data according to the local clock and the first time point; According to the second time stamp, the remaining target data is stored in the local database.
4. The method according to claim 1, characterized in that Also includes: If the transmission condition is not satisfied, the remaining target data stored in the local database is compressed and encrypted.
5. A data transmission device, characterized in that: The device is used to control the local end to continue to transmit data to the receiving end when the transmission is interrupted; obtain the system clock of the receiving end; divide the target data into several data blocks according to the format of the target data, and put the data blocks into a preset sending queue; the device includes: A data timing module, used for, when data transmission occurs, adding a first time mark to the target data according to the system clock of the receiving end, and generating a first clock deviation table according to the local clock and the system clock of the receiving end; specifically, when data transmission occurs, adding a first time mark for recording the sending time to each data block of the target data according to the system clock of the receiving end; generating the first clock deviation table according to the running time deviation between the local clock and the system clock of the receiving end; An interruption detection module, used for obtaining the first time point of the interruption according to the local clock if the transmission process is interrupted; A storage processing module, used for adding a second time mark to the remaining target data according to the local clock and the first time point, and continuing to store the remaining target data in the local database; The data transmission module is used to calibrate the time parameter when the receiving end stops receiving the target data according to the first time point, the first time mark, the second time mark and the first clock deviation table when the transmission condition is restored, and send the remaining target data that continues to exist in the local database to the receiving end according to the time parameter; specifically, when the transmission condition is restored, determine the second time point when the transmission of the target data is terminated according to the timing difference between the first time mark and the second time mark; calibrate the second time point according to the first clock deviation table and the first time point; and send the remaining target data that continues to exist in the local database to the receiving end according to the calibrated second time point.
6. A device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the method according to any one of claims 1 to 4 when executed by the processor.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Internet disconnection data continuingly-transferring method based on remote monitoring, electronic equipment and storage medium
CN107846309A
Data transmission method and apparatus, data storage method and apparatus, server and storage medium
CN109639811A